@@ -135,7 +135,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer *lyr, QWidget *p
135
135
// setup custom colormap tab
136
136
cboxColorInterpolation->addItem ( tr ( " Discrete" ) );
137
137
cboxColorInterpolation->addItem ( tr ( " Linear" ) );
138
- cboxColorInterpolation->addItem ( tr ( " Exact" ) );
138
+ cboxColorInterpolation->addItem ( tr ( " Exact" ) );
139
139
cboxClassificationMode->addItem ( tr ( " Equal interval" ) );
140
140
// cboxClassificationMode->addItem( tr( "Quantiles" ) );
141
141
@@ -294,7 +294,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer *lyr, QWidget *p
294
294
295
295
pbtnExportColorMapToFile->setIcon ( QgisApp::getThemeIcon ( " /mActionFileSave.png" ) );
296
296
pbtnLoadColorMapFromFile->setIcon ( QgisApp::getThemeIcon ( " /mActionFileOpen.png" ) );
297
-
297
+
298
298
// Only do pyramids if dealing directly with GDAL.
299
299
if ( mRasterLayerIsGdal )
300
300
{
@@ -2587,10 +2587,12 @@ void QgsRasterLayerProperties::on_mClassifyButton_clicked()
2587
2587
currentValue += intervalDiff;
2588
2588
}
2589
2589
}
2590
- // else if ( cboxClassificationMode->currentText() == tr( "Quantiles" ) )
2591
- // {
2590
+ #if 0
2591
+ else if ( cboxClassificationMode->currentText() == tr( "Quantiles" ) )
2592
+ {
2592
2593
//todo
2593
- // }
2594
+ }
2595
+ #endif
2594
2596
2595
2597
// hard code color range from blue -> red for now. Allow choice of ramps in future
2596
2598
int colorDiff = 0 ;
@@ -2677,7 +2679,7 @@ void QgsRasterLayerProperties::on_pbtnExportColorMapToFile_clicked()
2677
2679
{
2678
2680
myOutputStream << " EXACT\n " ;
2679
2681
}
2680
-
2682
+
2681
2683
int myTopLevelItemCount = mColormapTreeWidget ->topLevelItemCount ();
2682
2684
QTreeWidgetItem* myCurrentItem;
2683
2685
QColor myColor;
@@ -2691,9 +2693,9 @@ void QgsRasterLayerProperties::on_pbtnExportColorMapToFile_clicked()
2691
2693
myColor = myCurrentItem->background ( 1 ).color ();
2692
2694
myOutputStream << myCurrentItem->text ( 0 ).toDouble () << " ," ;
2693
2695
myOutputStream << myColor.red () << " ," << myColor.green () << " ," << myColor.blue () << " ," << myColor.alpha () << " ," ;
2694
- if ( myCurrentItem->text (2 ) == " " )
2696
+ if ( myCurrentItem->text ( 2 ) == " " )
2695
2697
{
2696
- myOutputStream << " Color entry " << i+ 1 << " \n " ;
2698
+ myOutputStream << " Color entry " << i + 1 << " \n " ;
2697
2699
}
2698
2700
else
2699
2701
{
@@ -2721,11 +2723,11 @@ void QgsRasterLayerProperties::on_pbtnLoadColorMapFromFile_clicked()
2721
2723
{
2722
2724
// clear the current tree
2723
2725
mColormapTreeWidget ->clear ();
2724
-
2726
+
2725
2727
QTextStream myInputStream ( &myInputFile );
2726
2728
QString myInputLine;
2727
2729
QStringList myInputStringComponents;
2728
-
2730
+
2729
2731
// read through the input looking for valid data
2730
2732
while ( !myInputStream.atEnd () )
2731
2733
{
@@ -2735,16 +2737,16 @@ void QgsRasterLayerProperties::on_pbtnLoadColorMapFromFile_clicked()
2735
2737
{
2736
2738
if ( !myInputLine.simplified ().startsWith ( " #" ) )
2737
2739
{
2738
- if ( myInputLine.contains (" INTERPOLATION" , Qt::CaseInsensitive) )
2740
+ if ( myInputLine.contains ( " INTERPOLATION" , Qt::CaseInsensitive ) )
2739
2741
{
2740
- myInputStringComponents = myInputLine.split (" :" );
2741
- if ( myInputStringComponents.size () == 2 )
2742
+ myInputStringComponents = myInputLine.split ( " :" );
2743
+ if ( myInputStringComponents.size () == 2 )
2742
2744
{
2743
- if ( myInputStringComponents[1 ].trimmed ().toUpper ().compare ( " INTERPOLATED" , Qt::CaseInsensitive) == 0 )
2745
+ if ( myInputStringComponents[1 ].trimmed ().toUpper ().compare ( " INTERPOLATED" , Qt::CaseInsensitive ) == 0 )
2744
2746
{
2745
2747
cboxColorInterpolation->setCurrentIndex ( cboxColorInterpolation->findText ( tr ( " Linear" ) ) );
2746
2748
}
2747
- else if ( myInputStringComponents[1 ].trimmed ().toUpper ().compare ( " DISCRETE" , Qt::CaseInsensitive) == 0 )
2749
+ else if ( myInputStringComponents[1 ].trimmed ().toUpper ().compare ( " DISCRETE" , Qt::CaseInsensitive ) == 0 )
2748
2750
{
2749
2751
cboxColorInterpolation->setCurrentIndex ( cboxColorInterpolation->findText ( tr ( " Discrete" ) ) );
2750
2752
}
@@ -2761,12 +2763,12 @@ void QgsRasterLayerProperties::on_pbtnLoadColorMapFromFile_clicked()
2761
2763
}
2762
2764
else
2763
2765
{
2764
- myInputStringComponents = myInputLine.split (" ," );
2765
- if ( myInputStringComponents.size () == 6 )
2766
+ myInputStringComponents = myInputLine.split ( " ," );
2767
+ if ( myInputStringComponents.size () == 6 )
2766
2768
{
2767
2769
QTreeWidgetItem* newItem = new QTreeWidgetItem ( mColormapTreeWidget );
2768
2770
newItem->setText ( 0 , myInputStringComponents[0 ] );
2769
- newItem->setBackground ( 1 , QBrush ( QColor::fromRgb (myInputStringComponents[1 ].toInt (), myInputStringComponents[2 ].toInt (), myInputStringComponents[3 ].toInt (), myInputStringComponents[4 ].toInt ()) ) );
2771
+ newItem->setBackground ( 1 , QBrush ( QColor::fromRgb ( myInputStringComponents[1 ].toInt (), myInputStringComponents[2 ].toInt (), myInputStringComponents[3 ].toInt (), myInputStringComponents[4 ].toInt () ) ) );
2770
2772
newItem->setText ( 2 , myInputStringComponents[5 ] );
2771
2773
}
2772
2774
else
@@ -2779,7 +2781,7 @@ void QgsRasterLayerProperties::on_pbtnLoadColorMapFromFile_clicked()
2779
2781
}
2780
2782
myLineCounter++;
2781
2783
}
2782
-
2784
+
2783
2785
2784
2786
if ( myImportError )
2785
2787
{
0 commit comments