Skip to content

Commit

Permalink
Mesh (and raster) calculator dialog HIG fixes and standardization
Browse files Browse the repository at this point in the history
And fix typo and warnings
  • Loading branch information
nyalldawson committed Jan 14, 2019
1 parent edadcb7 commit 6f23d30
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 19 deletions.
5 changes: 5 additions & 0 deletions src/app/mesh/qgsmeshcalculatordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ QgsMeshCalculatorDialog::QgsMeshCalculatorDialog( QgsMeshLayer *meshLayer, QWidg
connect( useExtentCb, &QCheckBox::stateChanged, this, &QgsMeshCalculatorDialog::toggleExtendMask );
maskBox->setVisible( false );

mXMaxSpinBox->setShowClearButton( false );
mXMinSpinBox->setShowClearButton( false );
mYMaxSpinBox->setShowClearButton( false );
mYMinSpinBox->setShowClearButton( false );

connect( mPlusPushButton, &QPushButton::clicked, this, &QgsMeshCalculatorDialog::mPlusPushButton_clicked );
connect( mMinusPushButton, &QPushButton::clicked, this, &QgsMeshCalculatorDialog::mMinusPushButton_clicked );
connect( mLessButton, &QPushButton::clicked, this, &QgsMeshCalculatorDialog::mLessButton_clicked );
Expand Down
7 changes: 7 additions & 0 deletions src/app/qgsrastercalcdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ QgsRasterCalcDialog::QgsRasterCalcDialog( QgsRasterLayer *rasterLayer, QWidget *
setupUi( this );
QgsGui::enableAutoGeometryRestore( this );

mXMaxSpinBox->setShowClearButton( false );
mXMinSpinBox->setShowClearButton( false );
mYMaxSpinBox->setShowClearButton( false );
mYMinSpinBox->setShowClearButton( false );
mNColumnsSpinBox->setShowClearButton( false );
mNRowsSpinBox->setShowClearButton( false );

connect( mRasterBandsListWidget, &QListWidget::itemDoubleClicked, this, &QgsRasterCalcDialog::mRasterBandsListWidget_itemDoubleClicked );
connect( mButtonBox, &QDialogButtonBox::accepted, this, &QgsRasterCalcDialog::mButtonBox_accepted );
connect( mCurrentLayerExtentButton, &QPushButton::clicked, this, &QgsRasterCalcDialog::mCurrentLayerExtentButton_clicked );
Expand Down
23 changes: 13 additions & 10 deletions src/ui/mesh/qgsmeshcalculatordialogbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</widget>
<widget class="QGroupBox" name="mResultGroupBox">
<property name="title">
<string>Result layer</string>
<string>Result Layer</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="8" column="0">
Expand All @@ -62,7 +62,7 @@
</widget>
</item>
<item row="1" column="3">
<widget class="QDoubleSpinBox" name="mXMaxSpinBox">
<widget class="QgsDoubleSpinBox" name="mXMaxSpinBox">
<property name="decimals">
<number>5</number>
</property>
Expand All @@ -89,7 +89,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mXMinSpinBox">
<widget class="QgsDoubleSpinBox" name="mXMinSpinBox">
<property name="decimals">
<number>5</number>
</property>
Expand All @@ -102,7 +102,7 @@
</widget>
</item>
<item row="2" column="3">
<widget class="QDoubleSpinBox" name="mYMaxSpinBox">
<widget class="QgsDoubleSpinBox" name="mYMaxSpinBox">
<property name="decimals">
<number>5</number>
</property>
Expand All @@ -122,7 +122,7 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mYMinSpinBox">
<widget class="QgsDoubleSpinBox" name="mYMinSpinBox">
<property name="decimals">
<number>5</number>
</property>
Expand All @@ -137,7 +137,7 @@
<item row="0" column="0" colspan="2">
<widget class="QPushButton" name="mCurrentLayerExtentButton">
<property name="text">
<string>Current layer extent</string>
<string>Selected Layer Extent</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -259,7 +259,7 @@
<item>
<widget class="QPushButton" name="mAllTimesButton">
<property name="text">
<string>All seletected dataset times </string>
<string>All Selected Dataset Times </string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -330,8 +330,6 @@
</item>
</layout>
<zorder>maskBox</zorder>
<zorder>verticalSpacer_3</zorder>
<zorder>verticalSpacer</zorder>
<zorder>extendBox</zorder>
<zorder>horizontalWidget</zorder>
</widget>
Expand All @@ -341,7 +339,7 @@
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Mesh calculator expression</string>
<string>Mesh Calculator Expression</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
Expand Down Expand Up @@ -595,6 +593,11 @@
<extends>QWidget</extends>
<header>qgsfilewidget.h</header>
</customwidget>
<customwidget>
<class>QgsDoubleSpinBox</class>
<extends>QDoubleSpinBox</extends>
<header>qgsdoublespinbox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>mDatasetsListWidget</tabstop>
Expand Down
28 changes: 19 additions & 9 deletions src/ui/qgsrastercalcdialogbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@
</widget>
</item>
<item row="3" column="4">
<widget class="QSpinBox" name="mNRowsSpinBox">
<widget class="QgsSpinBox" name="mNRowsSpinBox">
<property name="maximum">
<number>999999999</number>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mYMinSpinBox">
<widget class="QgsDoubleSpinBox" name="mYMinSpinBox">
<property name="decimals">
<number>5</number>
</property>
Expand Down Expand Up @@ -96,7 +96,7 @@
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="mNColumnsSpinBox">
<widget class="QgsSpinBox" name="mNColumnsSpinBox">
<property name="maximum">
<number>999999999</number>
</property>
Expand All @@ -110,7 +110,7 @@
</widget>
</item>
<item row="2" column="4">
<widget class="QDoubleSpinBox" name="mYMaxSpinBox">
<widget class="QgsDoubleSpinBox" name="mYMaxSpinBox">
<property name="decimals">
<number>5</number>
</property>
Expand All @@ -123,7 +123,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mXMinSpinBox">
<widget class="QgsDoubleSpinBox" name="mXMinSpinBox">
<property name="decimals">
<number>5</number>
</property>
Expand All @@ -136,7 +136,7 @@
</widget>
</item>
<item row="1" column="4">
<widget class="QDoubleSpinBox" name="mXMaxSpinBox">
<widget class="QgsDoubleSpinBox" name="mXMaxSpinBox">
<property name="decimals">
<number>5</number>
</property>
Expand Down Expand Up @@ -498,16 +498,26 @@
<header>qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsFileWidget</class>
<extends>QWidget</extends>
<header>qgsfilewidget.h</header>
</customwidget>
<customwidget>
<class>QgsDoubleSpinBox</class>
<extends>QDoubleSpinBox</extends>
<header>qgsdoublespinbox.h</header>
</customwidget>
<customwidget>
<class>QgsProjectionSelectionWidget</class>
<extends>QWidget</extends>
<header>qgsprojectionselectionwidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsFileWidget</class>
<extends>QWidget</extends>
<header>qgsfilewidget.h</header>
<class>QgsSpinBox</class>
<extends>QSpinBox</extends>
<header>qgsspinbox.h</header>
</customwidget>
</customwidgets>
<tabstops>
Expand Down

0 comments on commit 6f23d30

Please sign in to comment.