Skip to content

Commit

Permalink
remove buttons for saving contrast enhancement, std dev. and band
Browse files Browse the repository at this point in the history
combination from raster layer properties dialog
  • Loading branch information
alexbruy committed Apr 15, 2012
1 parent 67b698e commit 1214b8e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 152 deletions.
47 changes: 0 additions & 47 deletions src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -197,9 +197,6 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
pbnDefaultValues->setIcon( QgisApp::getThemeIcon( "/mActionCopySelected.png" ) );
pbnImportTransparentPixelValues->setIcon( QgisApp::getThemeIcon( "/mActionFileOpen.png" ) );
pbnExportTransparentPixelValues->setIcon( QgisApp::getThemeIcon( "/mActionFileSave.png" ) );
pbtnMakeBandCombinationDefault->setIcon( QgisApp::getThemeIcon( "/mActionFileSave.png" ) );
pbtnMakeStandardDeviationDefault->setIcon( QgisApp::getThemeIcon( "/mActionFileSave.png" ) );
pbtnMakeContrastEnhancementAlgorithmDefault->setIcon( QgisApp::getThemeIcon( "/mActionFileSave.png" ) );

pbtnLoadColorMapFromBand->setIcon( QgisApp::getThemeIcon( "/mActionNewAttribute.png" ) );
pbtnExportColorMapToFile->setIcon( QgisApp::getThemeIcon( "/mActionFileSave.png" ) );
Expand Down Expand Up @@ -2759,50 +2756,6 @@ void QgsRasterLayerProperties::on_pbtnLoadMinMax_clicked()
}
}

void QgsRasterLayerProperties::on_pbtnMakeBandCombinationDefault_clicked()
{
mDefaultRedBand = cboRed->currentIndex() + 1;
mDefaultGreenBand = cboGreen->currentIndex() + 1;
mDefaultBlueBand = cboBlue->currentIndex() + 1;
labelDefaultBandCombination->setText( tr( "Default R:%1 G:%2 B:%3" ).arg( mDefaultRedBand ).arg( mDefaultGreenBand ).arg( mDefaultBlueBand ) );
}

void QgsRasterLayerProperties::on_pbtnMakeContrastEnhancementAlgorithmDefault_clicked()
{
if ( cboxContrastEnhancementAlgorithm->currentText() != tr( "User Defined" ) )
{
if ( cboxContrastEnhancementAlgorithm->currentText() == tr( "No Stretch" ) )
{
mDefaultContrastEnhancementAlgorithm = "NoEnhancement";
labelDefaultContrastEnhancementAlgorithm->setText( cboxContrastEnhancementAlgorithm->currentText() );
}
else if ( cboxContrastEnhancementAlgorithm->currentText() == tr( "Stretch To MinMax" ) )
{
mDefaultContrastEnhancementAlgorithm = "StretchToMinimumMaximum";
labelDefaultContrastEnhancementAlgorithm->setText( cboxContrastEnhancementAlgorithm->currentText() );
}
else if ( cboxContrastEnhancementAlgorithm->currentText() == tr( "Stretch And Clip To MinMax" ) )
{
mDefaultContrastEnhancementAlgorithm = "StretchAndClipToMinimumMaximum";
labelDefaultContrastEnhancementAlgorithm->setText( cboxContrastEnhancementAlgorithm->currentText() );
}
else if ( cboxContrastEnhancementAlgorithm->currentText() == tr( "Clip To MinMax" ) )
{
mDefaultContrastEnhancementAlgorithm = "ClipToMinimumMaximum";
labelDefaultContrastEnhancementAlgorithm->setText( cboxContrastEnhancementAlgorithm->currentText() );
}
else
{
//do nothing
}
}
}

void QgsRasterLayerProperties::on_pbtnMakeStandardDeviationDefault_clicked()
{
mDefaultStandardDeviation = sboxThreeBandStdDev->value();
}

void QgsRasterLayerProperties::on_pbtnSortColorMap_clicked()
{
bool inserted = false;
Expand Down
6 changes: 0 additions & 6 deletions src/app/qgsrasterlayerproperties.h
Expand Up @@ -125,12 +125,6 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
void on_pbtnLoadColorMapFromFile_clicked();
/** This slot loads the minimum and maximum values from the raster band and updates the gui */
void on_pbtnLoadMinMax_clicked();
/** This slot sets the default band combination variable to current band combination */
void on_pbtnMakeBandCombinationDefault_clicked();
/** This slot sets the default contrast enhancement variable to current contrast enhancement algorithm */
void on_pbtnMakeContrastEnhancementAlgorithmDefault_clicked();
/** This slot sets the standard deviation default */
void on_pbtnMakeStandardDeviationDefault_clicked();
/** This slot will sort the color map in ascending order */
void on_pbtnSortColorMap_clicked();
/** Load the default style when appropriate button is pressed. */
Expand Down
138 changes: 39 additions & 99 deletions src/ui/qgsrasterlayerpropertiesbase.ui
Expand Up @@ -28,7 +28,7 @@
<item row="1" column="0" colspan="4">
<widget class="QTabWidget" name="tabBar">
<property name="currentIndex">
<number>6</number>
<number>0</number>
</property>
<property name="iconSize">
<size>
Expand Down Expand Up @@ -60,9 +60,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>462</width>
<height>619</height>
<y>-74</y>
<width>713</width>
<height>611</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
Expand Down Expand Up @@ -244,6 +244,17 @@
</property>
</widget>
</item>
<item row="4" column="3" colspan="2">
<layout class="QHBoxLayout" name="_6">
<item>
<widget class="QLabel" name="labelDefaultBandCombination">
<property name="text">
<string>Default R:1 G:2 B:3</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0">
<widget class="QLabel" name="lblRedMin">
<property name="sizePolicy">
Expand Down Expand Up @@ -493,78 +504,29 @@
</widget>
</item>
<item row="8" column="4">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QDoubleSpinBox" name="sboxThreeBandStdDev">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>75</width>
<height>16777215</height>
</size>
</property>
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="pbtnMakeStandardDeviationDefault">
<property name="toolTip">
<string>Save current standard deviation value as default. This setting will be persistent between QGIS sessions.</string>
</property>
<property name="whatsThis">
<string>Save current standard deviation value as default. This setting will be persistent between QGIS sessions.</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset>
<normaloff>../../images/themes/default/mActionFileSave.png</normaloff>../../images/themes/default/mActionFileSave.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="3" colspan="2">
<layout class="QHBoxLayout" name="_6">
<item>
<widget class="QToolButton" name="pbtnMakeBandCombinationDefault">
<property name="toolTip">
<string>Save current RGB composition as default. This setting will be persistent between QGIS sessions.</string>
</property>
<property name="whatsThis">
<string>Save current RGB composition as default. This setting will be persistent between QGIS sessions.</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset>
<normaloff>../../images/themes/default/mActionFileSave.png</normaloff>../../images/themes/default/mActionFileSave.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelDefaultBandCombination">
<property name="text">
<string>Default R:1 G:2 B:3</string>
</property>
</widget>
</item>
</layout>
<widget class="QDoubleSpinBox" name="sboxThreeBandStdDev">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>75</width>
<height>16777215</height>
</size>
</property>
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
Expand Down Expand Up @@ -897,29 +859,6 @@
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="pbtnMakeContrastEnhancementAlgorithmDefault">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Save current contrast enhancement algorithm as default. This setting will be persistent between QGIS sessions.</string>
</property>
<property name="whatsThis">
<string>Saves current contrast enhancement algorithm as a default. This setting will be persistent between QGIS sessions.</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>../../images/themes/default/mActionFileSave.png</normaloff>../../images/themes/default/mActionFileSave.png</iconset>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
Expand Down Expand Up @@ -1877,6 +1816,7 @@ p, li { white-space: pre-wrap; }
&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;
&lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt;
&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;
&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;
&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;
&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;
Expand Down

0 comments on commit 1214b8e

Please sign in to comment.