Skip to content

Commit 1214b8e

Browse files
committed
remove buttons for saving contrast enhancement, std dev. and band
combination from raster layer properties dialog
1 parent 67b698e commit 1214b8e

File tree

3 files changed

+39
-152
lines changed

3 files changed

+39
-152
lines changed

src/app/qgsrasterlayerproperties.cpp

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,6 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
197197
pbnDefaultValues->setIcon( QgisApp::getThemeIcon( "/mActionCopySelected.png" ) );
198198
pbnImportTransparentPixelValues->setIcon( QgisApp::getThemeIcon( "/mActionFileOpen.png" ) );
199199
pbnExportTransparentPixelValues->setIcon( QgisApp::getThemeIcon( "/mActionFileSave.png" ) );
200-
pbtnMakeBandCombinationDefault->setIcon( QgisApp::getThemeIcon( "/mActionFileSave.png" ) );
201-
pbtnMakeStandardDeviationDefault->setIcon( QgisApp::getThemeIcon( "/mActionFileSave.png" ) );
202-
pbtnMakeContrastEnhancementAlgorithmDefault->setIcon( QgisApp::getThemeIcon( "/mActionFileSave.png" ) );
203200

204201
pbtnLoadColorMapFromBand->setIcon( QgisApp::getThemeIcon( "/mActionNewAttribute.png" ) );
205202
pbtnExportColorMapToFile->setIcon( QgisApp::getThemeIcon( "/mActionFileSave.png" ) );
@@ -2759,50 +2756,6 @@ void QgsRasterLayerProperties::on_pbtnLoadMinMax_clicked()
27592756
}
27602757
}
27612758

2762-
void QgsRasterLayerProperties::on_pbtnMakeBandCombinationDefault_clicked()
2763-
{
2764-
mDefaultRedBand = cboRed->currentIndex() + 1;
2765-
mDefaultGreenBand = cboGreen->currentIndex() + 1;
2766-
mDefaultBlueBand = cboBlue->currentIndex() + 1;
2767-
labelDefaultBandCombination->setText( tr( "Default R:%1 G:%2 B:%3" ).arg( mDefaultRedBand ).arg( mDefaultGreenBand ).arg( mDefaultBlueBand ) );
2768-
}
2769-
2770-
void QgsRasterLayerProperties::on_pbtnMakeContrastEnhancementAlgorithmDefault_clicked()
2771-
{
2772-
if ( cboxContrastEnhancementAlgorithm->currentText() != tr( "User Defined" ) )
2773-
{
2774-
if ( cboxContrastEnhancementAlgorithm->currentText() == tr( "No Stretch" ) )
2775-
{
2776-
mDefaultContrastEnhancementAlgorithm = "NoEnhancement";
2777-
labelDefaultContrastEnhancementAlgorithm->setText( cboxContrastEnhancementAlgorithm->currentText() );
2778-
}
2779-
else if ( cboxContrastEnhancementAlgorithm->currentText() == tr( "Stretch To MinMax" ) )
2780-
{
2781-
mDefaultContrastEnhancementAlgorithm = "StretchToMinimumMaximum";
2782-
labelDefaultContrastEnhancementAlgorithm->setText( cboxContrastEnhancementAlgorithm->currentText() );
2783-
}
2784-
else if ( cboxContrastEnhancementAlgorithm->currentText() == tr( "Stretch And Clip To MinMax" ) )
2785-
{
2786-
mDefaultContrastEnhancementAlgorithm = "StretchAndClipToMinimumMaximum";
2787-
labelDefaultContrastEnhancementAlgorithm->setText( cboxContrastEnhancementAlgorithm->currentText() );
2788-
}
2789-
else if ( cboxContrastEnhancementAlgorithm->currentText() == tr( "Clip To MinMax" ) )
2790-
{
2791-
mDefaultContrastEnhancementAlgorithm = "ClipToMinimumMaximum";
2792-
labelDefaultContrastEnhancementAlgorithm->setText( cboxContrastEnhancementAlgorithm->currentText() );
2793-
}
2794-
else
2795-
{
2796-
//do nothing
2797-
}
2798-
}
2799-
}
2800-
2801-
void QgsRasterLayerProperties::on_pbtnMakeStandardDeviationDefault_clicked()
2802-
{
2803-
mDefaultStandardDeviation = sboxThreeBandStdDev->value();
2804-
}
2805-
28062759
void QgsRasterLayerProperties::on_pbtnSortColorMap_clicked()
28072760
{
28082761
bool inserted = false;

src/app/qgsrasterlayerproperties.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,6 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
125125
void on_pbtnLoadColorMapFromFile_clicked();
126126
/** This slot loads the minimum and maximum values from the raster band and updates the gui */
127127
void on_pbtnLoadMinMax_clicked();
128-
/** This slot sets the default band combination variable to current band combination */
129-
void on_pbtnMakeBandCombinationDefault_clicked();
130-
/** This slot sets the default contrast enhancement variable to current contrast enhancement algorithm */
131-
void on_pbtnMakeContrastEnhancementAlgorithmDefault_clicked();
132-
/** This slot sets the standard deviation default */
133-
void on_pbtnMakeStandardDeviationDefault_clicked();
134128
/** This slot will sort the color map in ascending order */
135129
void on_pbtnSortColorMap_clicked();
136130
/** Load the default style when appropriate button is pressed. */

src/ui/qgsrasterlayerpropertiesbase.ui

Lines changed: 39 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<item row="1" column="0" colspan="4">
2929
<widget class="QTabWidget" name="tabBar">
3030
<property name="currentIndex">
31-
<number>6</number>
31+
<number>0</number>
3232
</property>
3333
<property name="iconSize">
3434
<size>
@@ -60,9 +60,9 @@
6060
<property name="geometry">
6161
<rect>
6262
<x>0</x>
63-
<y>0</y>
64-
<width>462</width>
65-
<height>619</height>
63+
<y>-74</y>
64+
<width>713</width>
65+
<height>611</height>
6666
</rect>
6767
</property>
6868
<layout class="QVBoxLayout" name="verticalLayout_2">
@@ -244,6 +244,17 @@
244244
</property>
245245
</widget>
246246
</item>
247+
<item row="4" column="3" colspan="2">
248+
<layout class="QHBoxLayout" name="_6">
249+
<item>
250+
<widget class="QLabel" name="labelDefaultBandCombination">
251+
<property name="text">
252+
<string>Default R:1 G:2 B:3</string>
253+
</property>
254+
</widget>
255+
</item>
256+
</layout>
257+
</item>
247258
<item row="5" column="0">
248259
<widget class="QLabel" name="lblRedMin">
249260
<property name="sizePolicy">
@@ -493,78 +504,29 @@
493504
</widget>
494505
</item>
495506
<item row="8" column="4">
496-
<layout class="QHBoxLayout" name="horizontalLayout">
497-
<item>
498-
<widget class="QDoubleSpinBox" name="sboxThreeBandStdDev">
499-
<property name="sizePolicy">
500-
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
501-
<horstretch>0</horstretch>
502-
<verstretch>0</verstretch>
503-
</sizepolicy>
504-
</property>
505-
<property name="maximumSize">
506-
<size>
507-
<width>75</width>
508-
<height>16777215</height>
509-
</size>
510-
</property>
511-
<property name="maximum">
512-
<double>10.000000000000000</double>
513-
</property>
514-
<property name="singleStep">
515-
<double>0.100000000000000</double>
516-
</property>
517-
<property name="value">
518-
<double>0.000000000000000</double>
519-
</property>
520-
</widget>
521-
</item>
522-
<item>
523-
<widget class="QToolButton" name="pbtnMakeStandardDeviationDefault">
524-
<property name="toolTip">
525-
<string>Save current standard deviation value as default. This setting will be persistent between QGIS sessions.</string>
526-
</property>
527-
<property name="whatsThis">
528-
<string>Save current standard deviation value as default. This setting will be persistent between QGIS sessions.</string>
529-
</property>
530-
<property name="text">
531-
<string>...</string>
532-
</property>
533-
<property name="icon">
534-
<iconset>
535-
<normaloff>../../images/themes/default/mActionFileSave.png</normaloff>../../images/themes/default/mActionFileSave.png</iconset>
536-
</property>
537-
</widget>
538-
</item>
539-
</layout>
540-
</item>
541-
<item row="4" column="3" colspan="2">
542-
<layout class="QHBoxLayout" name="_6">
543-
<item>
544-
<widget class="QToolButton" name="pbtnMakeBandCombinationDefault">
545-
<property name="toolTip">
546-
<string>Save current RGB composition as default. This setting will be persistent between QGIS sessions.</string>
547-
</property>
548-
<property name="whatsThis">
549-
<string>Save current RGB composition as default. This setting will be persistent between QGIS sessions.</string>
550-
</property>
551-
<property name="text">
552-
<string>...</string>
553-
</property>
554-
<property name="icon">
555-
<iconset>
556-
<normaloff>../../images/themes/default/mActionFileSave.png</normaloff>../../images/themes/default/mActionFileSave.png</iconset>
557-
</property>
558-
</widget>
559-
</item>
560-
<item>
561-
<widget class="QLabel" name="labelDefaultBandCombination">
562-
<property name="text">
563-
<string>Default R:1 G:2 B:3</string>
564-
</property>
565-
</widget>
566-
</item>
567-
</layout>
507+
<widget class="QDoubleSpinBox" name="sboxThreeBandStdDev">
508+
<property name="sizePolicy">
509+
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
510+
<horstretch>0</horstretch>
511+
<verstretch>0</verstretch>
512+
</sizepolicy>
513+
</property>
514+
<property name="maximumSize">
515+
<size>
516+
<width>75</width>
517+
<height>16777215</height>
518+
</size>
519+
</property>
520+
<property name="maximum">
521+
<double>10.000000000000000</double>
522+
</property>
523+
<property name="singleStep">
524+
<double>0.100000000000000</double>
525+
</property>
526+
<property name="value">
527+
<double>0.000000000000000</double>
528+
</property>
529+
</widget>
568530
</item>
569531
</layout>
570532
</widget>
@@ -897,29 +859,6 @@
897859
</property>
898860
</widget>
899861
</item>
900-
<item row="0" column="2">
901-
<widget class="QPushButton" name="pbtnMakeContrastEnhancementAlgorithmDefault">
902-
<property name="sizePolicy">
903-
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
904-
<horstretch>0</horstretch>
905-
<verstretch>0</verstretch>
906-
</sizepolicy>
907-
</property>
908-
<property name="toolTip">
909-
<string>Save current contrast enhancement algorithm as default. This setting will be persistent between QGIS sessions.</string>
910-
</property>
911-
<property name="whatsThis">
912-
<string>Saves current contrast enhancement algorithm as a default. This setting will be persistent between QGIS sessions.</string>
913-
</property>
914-
<property name="text">
915-
<string/>
916-
</property>
917-
<property name="icon">
918-
<iconset>
919-
<normaloff>../../images/themes/default/mActionFileSave.png</normaloff>../../images/themes/default/mActionFileSave.png</iconset>
920-
</property>
921-
</widget>
922-
</item>
923862
<item row="1" column="0">
924863
<widget class="QLabel" name="label_4">
925864
<property name="text">
@@ -1877,6 +1816,7 @@ p, li { white-space: pre-wrap; }
18771816
&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
18781817
&lt;tr&gt;
18791818
&lt;td style=&quot;border: none;&quot;&gt;
1819+
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
18801820
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;/p&gt;
18811821
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;/p&gt;
18821822
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu';&quot;&gt;&lt;/p&gt;

0 commit comments

Comments
 (0)