Skip to content

Commit b0ab895

Browse files
author
jef
committedMay 28, 2010
apply #1683 (completes r13568)
git-svn-id: http://svn.osgeo.org/qgis/trunk@13582 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 578cd9c commit b0ab895

File tree

2 files changed

+33
-19
lines changed

2 files changed

+33
-19
lines changed
 

‎src/app/qgsrasterlayerproperties.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,8 @@ void QgsRasterLayerProperties::sync()
775775
labelDefaultContrastEnhancementAlgorithm->setText( tr( "No Stretch" ) );
776776
}
777777

778+
mDefaultStandardDeviation = myQSettings.value( "/Raster/defaultStandardDeviation", 1.0 ).toDouble();
779+
sboxThreeBandStdDev->setValue( mDefaultStandardDeviation );
778780

779781

780782
QgsDebugMsg( "populate transparency tab" );
@@ -1192,6 +1194,8 @@ void QgsRasterLayerProperties::apply()
11921194

11931195
myQSettings.setValue( "/Raster/defaultContrastEnhancementAlgorithm", mDefaultContrastEnhancementAlgorithm );
11941196

1197+
myQSettings.setValue( "/Raster/defaultStandardDeviation", mDefaultStandardDeviation );
1198+
11951199
QgsDebugMsg( "processing transparency tab" );
11961200
/*
11971201
* Transparent Pixel Tab
@@ -2973,6 +2977,11 @@ void QgsRasterLayerProperties::on_pbtnMakeContrastEnhancementAlgorithmDefault_cl
29732977
}
29742978
}
29752979

2980+
void QgsRasterLayerProperties::on_pbtnMakeStandardDeviationDefault_clicked()
2981+
{
2982+
mDefaultStandardDeviation = sboxThreeBandStdDev->value();
2983+
}
2984+
29762985
void QgsRasterLayerProperties::on_pbtnSortColorMap_clicked()
29772986
{
29782987
bool inserted = false;

‎src/app/qgsrasterlayerproperties.h

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -92,43 +92,45 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
9292
void userDefinedMinMax_textEdited( QString );
9393

9494
private slots:
95-
/** This slow handles necessary interface modifiations (i.e., loading min max values) */
95+
/** This slow handles necessary interface modifications (i.e. loading min max values) */
9696
void on_cboBlue_currentIndexChanged( const QString& );
97-
/** This slow handles necessary interface modifiations (i.e., loading min max values) */
97+
/** This slow handles necessary interface modifications (i.e. loading min max values) */
9898
void on_cboGray_currentIndexChanged( const QString& );
99-
/** This slow handles necessary interface modifiations (i.e., loading min max values) */
99+
/** This slow handles necessary interface modifications (i.e. loading min max values) */
100100
void on_cboGreen_currentIndexChanged( const QString& );
101-
/** This slow handles necessary interface modifiations (i.e., loading min max values) */
101+
/** This slow handles necessary interface modifications (i.e. loading min max values) */
102102
void on_cboRed_currentIndexChanged( const QString& );
103-
/**The slot handles necessary interface modifications based when color map selected changes*/
103+
/** This slot handles necessary interface modifications based when color map selected changes */
104104
void on_cboxColorMap_currentIndexChanged( const QString& );
105-
/**This slot calculates classification values and colors for the tree widget on the colormap tab*/
105+
/** This slot calculates classification values and colors for the tree widget on the colormap tab */
106106
void on_mClassifyButton_clicked();
107-
/**This slot deletes the current class from the tree widget on the colormap tab*/
107+
/** This slot deletes the current class from the tree widget on the colormap tab */
108108
void on_mDeleteEntryButton_clicked();
109-
/**Callback for double clicks on the colormap entry widget*/
109+
/** Callback for double clicks on the colormap entry widget */
110110
void handleColormapTreeWidgetDoubleClick( QTreeWidgetItem* item, int column );
111-
/**This slot adds a new row to the color map table */
111+
/** This slot adds a new row to the color map table */
112112
void on_pbtnAddColorMapEntry_clicked();
113-
/**This slots saves the current color map to a file */
113+
/** This slots saves the current color map to a file */
114114
void on_pbtnExportColorMapToFile_clicked();
115-
/**This slots loads the current color map from a band */
115+
/** This slots loads the current color map from a band */
116116
void on_pbtnLoadColorMapFromBand_clicked();
117-
/**This slots loads the current color map from a file */
117+
/** This slots loads the current color map from a file */
118118
void on_pbtnLoadColorMapFromFile_clicked();
119-
/**This slot loads the minimum and maximum values from the raster band and updates the gui*/
119+
/** This slot loads the minimum and maximum values from the raster band and updates the gui */
120120
void on_pbtnLoadMinMax_clicked();
121-
/**This slot sets the default band combination varaible to current band combination */
121+
/** This slot sets the default band combination variable to current band combination */
122122
void on_pbtnMakeBandCombinationDefault_clicked();
123-
/**This slot sets the default contrast enhancement varaible to current contrast enhancement algorithm */
123+
/** This slot sets the default contrast enhancement variable to current contrast enhancement algorithm */
124124
void on_pbtnMakeContrastEnhancementAlgorithmDefault_clicked();
125-
/**This slot will sort the color map in ascending order*/
125+
/** This slot sets the standard deviation default */
126+
void on_pbtnMakeStandardDeviationDefault_clicked();
127+
/** This slot will sort the color map in ascending order */
126128
void on_pbtnSortColorMap_clicked();
127-
/** Load the default style when appriate button is pressed. */
129+
/** Load the default style when appropriate button is pressed. */
128130
void on_pbnLoadDefaultStyle_clicked();
129-
/** Save the default style when appriate button is pressed. */
131+
/** Save the default style when appropriate button is pressed. */
130132
void on_pbnSaveDefaultStyle_clicked();
131-
/** Load a saved style when appriate button is pressed. */
133+
/** Load a saved style when appropriate button is pressed. */
132134
void on_pbnLoadStyle_clicked();
133135
/** Save a style when appriate button is pressed. */
134136
void on_pbnSaveStyleAs_clicked();
@@ -148,6 +150,9 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
148150
/** \brief Default contrast enhancement algorithm */
149151
QString mDefaultContrastEnhancementAlgorithm;
150152

153+
/** \brief default standard deviation */
154+
double mDefaultStandardDeviation;
155+
151156
/** \brief Default band combination */
152157
int mDefaultRedBand;
153158
int mDefaultGreenBand;

0 commit comments

Comments
 (0)
Please sign in to comment.