@@ -1179,23 +1179,23 @@ QString QgsRasterLayer::colorShadingAlgorithmAsString() const
1179
1179
{
1180
1180
switch ( mColorShadingAlgorithm )
1181
1181
{
1182
- case PseudoColor :
1183
- return QString ( " PseudoColor " );
1182
+ case PseudoColorShader :
1183
+ return QString ( " PseudoColorShader " );
1184
1184
break ;
1185
- case FreakOut :
1186
- return QString ( " FreakOut " );
1185
+ case FreakOutShader :
1186
+ return QString ( " FreakOutShader " );
1187
1187
break ;
1188
- case ColorRamp :
1189
- return QString ( " ColorRamp " );
1188
+ case ColorRampShader :
1189
+ return QString ( " ColorRampShader " );
1190
1190
break ;
1191
- case UserDefined :
1192
- return QString ( " UserDefined " );
1191
+ case UserDefinedShader :
1192
+ return QString ( " UserDefinedShader " );
1193
1193
break ;
1194
1194
default :
1195
1195
break ;
1196
1196
}
1197
1197
1198
- return QString ( " UndefinedShadingAlgorithm " );
1198
+ return QString ( " UndefinedShader " );
1199
1199
}
1200
1200
1201
1201
/* *
@@ -1252,7 +1252,7 @@ QString QgsRasterLayer::contrastEnhancementAlgorithmAsString() const
1252
1252
case QgsContrastEnhancement::ClipToMinimumMaximum:
1253
1253
return QString ( " ClipToMinimumMaximum" );
1254
1254
break ;
1255
- case QgsContrastEnhancement::UserDefined :
1255
+ case QgsContrastEnhancement::UserDefinedEnhancement :
1256
1256
return QString ( " UserDefined" );
1257
1257
break ;
1258
1258
}
@@ -1980,7 +1980,7 @@ QPixmap QgsRasterLayer::legendAsPixmap( bool theWithNameFlag )
1980
1980
int myBlue = 255 ;
1981
1981
int myGreen = static_cast < int >((( 255 / myRangeSize ) * ( my - myClassBreakMin1 ) ) * 3 );
1982
1982
// testing this stuff still ...
1983
- if ( mColorShadingAlgorithm == FreakOut )
1983
+ if ( mColorShadingAlgorithm == FreakOutShader )
1984
1984
{
1985
1985
myRed = 255 - myGreen;
1986
1986
}
@@ -1993,7 +1993,7 @@ QPixmap QgsRasterLayer::legendAsPixmap( bool theWithNameFlag )
1993
1993
int myBlue = static_cast < int >( 255 - ((( 255 / myRangeSize ) * (( my - myClassBreakMin2 ) / 1 ) ) * 3 ) );
1994
1994
int myGreen = 255 ;
1995
1995
// testing this stuff still ...
1996
- if ( mColorShadingAlgorithm == FreakOut )
1996
+ if ( mColorShadingAlgorithm == FreakOutShader )
1997
1997
{
1998
1998
myGreen = myBlue;
1999
1999
}
@@ -2006,7 +2006,7 @@ QPixmap QgsRasterLayer::legendAsPixmap( bool theWithNameFlag )
2006
2006
int myBlue = 0 ;
2007
2007
int myGreen = static_cast < int >( 255 - ((( 255 / myRangeSize ) * (( my - myClassBreakMin3 ) / 1 ) * 3 ) ) );
2008
2008
// testing this stuff still ...
2009
- if ( mColorShadingAlgorithm == FreakOut )
2009
+ if ( mColorShadingAlgorithm == FreakOutShader )
2010
2010
{
2011
2011
myRed = myGreen;
2012
2012
myGreen = 255 - myGreen;
@@ -2023,7 +2023,7 @@ QPixmap QgsRasterLayer::legendAsPixmap( bool theWithNameFlag )
2023
2023
int myBlue = 0 ;
2024
2024
int myGreen = static_cast < int >((( 255 / myRangeSize ) * (( my - myClassBreakMin1 ) / 1 ) * 3 ) );
2025
2025
// testing this stuff still ...
2026
- if ( mColorShadingAlgorithm == FreakOut )
2026
+ if ( mColorShadingAlgorithm == FreakOutShader )
2027
2027
{
2028
2028
myRed = 255 - myGreen;
2029
2029
}
@@ -2036,7 +2036,7 @@ QPixmap QgsRasterLayer::legendAsPixmap( bool theWithNameFlag )
2036
2036
int myBlue = static_cast < int >((( 255 / myRangeSize ) * (( my - myClassBreakMin2 ) / 1 ) ) * 3 );
2037
2037
int myGreen = 255 ;
2038
2038
// testing this stuff still ...
2039
- if ( mColorShadingAlgorithm == FreakOut )
2039
+ if ( mColorShadingAlgorithm == FreakOutShader )
2040
2040
{
2041
2041
myGreen = myBlue;
2042
2042
}
@@ -2049,7 +2049,7 @@ QPixmap QgsRasterLayer::legendAsPixmap( bool theWithNameFlag )
2049
2049
int myBlue = 255 ;
2050
2050
int myGreen = static_cast < int >( 255 - ((( 255 / myRangeSize ) * ( my - myClassBreakMin3 ) ) * 3 ) );
2051
2051
// testing this stuff still ...
2052
- if ( mColorShadingAlgorithm == FreakOut )
2052
+ if ( mColorShadingAlgorithm == FreakOutShader )
2053
2053
{
2054
2054
myRed = 255 - myGreen;
2055
2055
}
@@ -2238,7 +2238,7 @@ QPixmap QgsRasterLayer::legendAsPixmap( int theLabelCount )
2238
2238
int myBlue = 255 ;
2239
2239
int myGreen = static_cast < int >((( 255 / myRangeSize ) * ( my - myClassBreakMin1 ) ) * 3 );
2240
2240
// testing this stuff still ...
2241
- if ( mColorShadingAlgorithm == FreakOut )
2241
+ if ( mColorShadingAlgorithm == FreakOutShader )
2242
2242
{
2243
2243
myRed = 255 - myGreen;
2244
2244
}
@@ -2251,7 +2251,7 @@ QPixmap QgsRasterLayer::legendAsPixmap( int theLabelCount )
2251
2251
int myBlue = static_cast < int >( 255 - ((( 255 / myRangeSize ) * (( my - myClassBreakMin2 ) / 1 ) ) * 3 ) );
2252
2252
int myGreen = 255 ;
2253
2253
// testing this stuff still ...
2254
- if ( mColorShadingAlgorithm == FreakOut )
2254
+ if ( mColorShadingAlgorithm == FreakOutShader )
2255
2255
{
2256
2256
myGreen = myBlue;
2257
2257
}
@@ -2264,7 +2264,7 @@ QPixmap QgsRasterLayer::legendAsPixmap( int theLabelCount )
2264
2264
int myBlue = 0 ;
2265
2265
int myGreen = static_cast < int >( 255 - ((( 255 / myRangeSize ) * (( my - myClassBreakMin3 ) / 1 ) * 3 ) ) );
2266
2266
// testing this stuff still ...
2267
- if ( mColorShadingAlgorithm == FreakOut )
2267
+ if ( mColorShadingAlgorithm == FreakOutShader )
2268
2268
{
2269
2269
myRed = myGreen;
2270
2270
myGreen = 255 - myGreen;
@@ -2281,7 +2281,7 @@ QPixmap QgsRasterLayer::legendAsPixmap( int theLabelCount )
2281
2281
int myBlue = 0 ;
2282
2282
int myGreen = static_cast < int >((( 255 / myRangeSize ) * (( my - myClassBreakMin1 ) / 1 ) * 3 ) );
2283
2283
// testing this stuff still ...
2284
- if ( mColorShadingAlgorithm == FreakOut )
2284
+ if ( mColorShadingAlgorithm == FreakOutShader )
2285
2285
{
2286
2286
myRed = 255 - myGreen;
2287
2287
}
@@ -2294,7 +2294,7 @@ QPixmap QgsRasterLayer::legendAsPixmap( int theLabelCount )
2294
2294
int myBlue = static_cast < int >((( 255 / myRangeSize ) * (( my - myClassBreakMin2 ) / 1 ) ) * 3 );
2295
2295
int myGreen = 255 ;
2296
2296
// testing this stuff still ...
2297
- if ( mColorShadingAlgorithm == FreakOut )
2297
+ if ( mColorShadingAlgorithm == FreakOutShader )
2298
2298
{
2299
2299
myGreen = myBlue;
2300
2300
}
@@ -2307,7 +2307,7 @@ QPixmap QgsRasterLayer::legendAsPixmap( int theLabelCount )
2307
2307
int myBlue = 255 ;
2308
2308
int myGreen = static_cast < int >( 255 - ((( 255 / myRangeSize ) * ( my - myClassBreakMin3 ) ) * 3 ) );
2309
2309
// testing this stuff still ...
2310
- if ( mColorShadingAlgorithm == FreakOut )
2310
+ if ( mColorShadingAlgorithm == FreakOutShader )
2311
2311
{
2312
2312
myRed = 255 - myGreen;
2313
2313
}
@@ -3150,16 +3150,16 @@ void QgsRasterLayer::setColorShadingAlgorithm( ColorShadingAlgorithm theShadingA
3150
3150
3151
3151
switch ( theShadingAlgorithm )
3152
3152
{
3153
- case PseudoColor :
3153
+ case PseudoColorShader :
3154
3154
mRasterShader ->setRasterShaderFunction ( new QgsPseudoColorShader () );
3155
3155
break ;
3156
- case FreakOut :
3157
- mRasterShader ->setRasterShaderFunction ( new QgsFreakOutShader () );
3156
+ case FreakOutShader :
3157
+ mRasterShader ->setRasterShaderFunction ( new QgsFreakOutShaderShader () );
3158
3158
break ;
3159
- case ColorRamp :
3159
+ case ColorRampShader :
3160
3160
mRasterShader ->setRasterShaderFunction ( new QgsColorRampShader () );
3161
3161
break ;
3162
- case UserDefined :
3162
+ case UserDefinedShader :
3163
3163
// do nothing
3164
3164
break ;
3165
3165
default :
@@ -3174,16 +3174,16 @@ void QgsRasterLayer::setColorShadingAlgorithm( QString theShaderAlgorithm )
3174
3174
{
3175
3175
QgsDebugMsg ( " called with [" + theShaderAlgorithm + " ]" );
3176
3176
3177
- if ( theShaderAlgorithm == " PseudoColor " )
3178
- setColorShadingAlgorithm ( PseudoColor );
3179
- else if ( theShaderAlgorithm == " FreakOut " )
3180
- setColorShadingAlgorithm ( FreakOut );
3181
- else if ( theShaderAlgorithm == " ColorRamp " )
3182
- setColorShadingAlgorithm ( ColorRamp );
3183
- else if ( theShaderAlgorithm == " UserDefined " )
3184
- setColorShadingAlgorithm ( UserDefined );
3177
+ if ( theShaderAlgorithm == " PseudoColorShader " )
3178
+ setColorShadingAlgorithm ( PseudoColorShader );
3179
+ else if ( theShaderAlgorithm == " FreakOutShader " )
3180
+ setColorShadingAlgorithm ( FreakOutShader );
3181
+ else if ( theShaderAlgorithm == " ColorRampShader " )
3182
+ setColorShadingAlgorithm ( ColorRampShader );
3183
+ else if ( theShaderAlgorithm == " UserDefinedShader " )
3184
+ setColorShadingAlgorithm ( UserDefinedShader );
3185
3185
else
3186
- setColorShadingAlgorithm ( UndefinedShadingAlgorithm );
3186
+ setColorShadingAlgorithm ( UndefinedShader );
3187
3187
}
3188
3188
3189
3189
void QgsRasterLayer::setContrastEnhancementAlgorithm ( QgsContrastEnhancement::ContrastEnhancementAlgorithm theAlgorithm, bool theGenerateLookupTableFlag)
@@ -3219,7 +3219,7 @@ void QgsRasterLayer::setContrastEnhancementAlgorithm( QString theAlgorithm, bool
3219
3219
}
3220
3220
else if ( theAlgorithm == " UserDefined" )
3221
3221
{
3222
- setContrastEnhancementAlgorithm ( QgsContrastEnhancement::UserDefined , theGenerateLookupTableFlag );
3222
+ setContrastEnhancementAlgorithm ( QgsContrastEnhancement::UserDefinedEnhancement , theGenerateLookupTableFlag );
3223
3223
}
3224
3224
else
3225
3225
{
@@ -3365,13 +3365,13 @@ void QgsRasterLayer::setRasterShaderFunction( QgsRasterShaderFunction* theFuncti
3365
3365
if ( theFunction )
3366
3366
{
3367
3367
mRasterShader ->setRasterShaderFunction ( theFunction );
3368
- mColorShadingAlgorithm = QgsRasterLayer::UserDefined ;
3368
+ mColorShadingAlgorithm = QgsRasterLayer::UserDefinedShader ;
3369
3369
}
3370
3370
else
3371
3371
{
3372
3372
// If NULL as passed in, set a default shader function to prevent segfaults
3373
3373
mRasterShader ->setRasterShaderFunction ( new QgsRasterShaderFunction () );
3374
- mColorShadingAlgorithm = QgsRasterLayer::UserDefined ;
3374
+ mColorShadingAlgorithm = QgsRasterLayer::UserDefinedShader ;
3375
3375
}
3376
3376
}
3377
3377
@@ -3518,7 +3518,7 @@ bool QgsRasterLayer::readSymbology( const QDomNode& layer_node, QString& errorMe
3518
3518
3519
3519
snode = mnl.namedItem ( " mStandardDeviations" );
3520
3520
myElement = snode.toElement ();
3521
- setStandardDeviationsToPlot ( myElement.text ().toDouble () );
3521
+ setStandardDeviations ( myElement.text ().toDouble () );
3522
3522
3523
3523
snode = mnl.namedItem ( " mUserDefinedRGBMinimumMaximum" );
3524
3524
myElement = snode.toElement ();
@@ -3918,7 +3918,7 @@ bool QgsRasterLayer::writeSymbology( QDomNode & layer_node, QDomDocument & docum
3918
3918
3919
3919
// <mStandardDeviations>
3920
3920
QDomElement mStandardDeviationsElement = document.createElement ( " mStandardDeviations" );
3921
- QDomText mStandardDeviationsText = document.createTextNode ( QString::number ( standardDeviationsToPlot () ) );
3921
+ QDomText mStandardDeviationsText = document.createTextNode ( QString::number ( standardDeviations () ) );
3922
3922
3923
3923
mStandardDeviationsElement .appendChild ( mStandardDeviationsText );
3924
3924
@@ -4074,7 +4074,7 @@ bool QgsRasterLayer::writeSymbology( QDomNode & layer_node, QDomDocument & docum
4074
4074
/*
4075
4075
* Color Ramp tab
4076
4076
*/
4077
- if ( QgsRasterLayer::ColorRamp == colorShadingAlgorithm () )
4077
+ if ( QgsRasterLayer::ColorRampShader == colorShadingAlgorithm () )
4078
4078
{
4079
4079
QDomElement customColorRampElement = document.createElement ( " customColorRamp" );
4080
4080
@@ -5157,7 +5157,7 @@ bool QgsRasterLayer::readFile( QString const &theFilename )
5157
5157
mDrawingStyle = PalettedColor; // sensible default
5158
5158
5159
5159
// Set up a new color ramp shader
5160
- setColorShadingAlgorithm ( ColorRamp );
5160
+ setColorShadingAlgorithm ( ColorRampShader );
5161
5161
QgsColorRampShader* myColorRampShader = ( QgsColorRampShader* ) mRasterShader ->rasterShaderFunction ();
5162
5162
myColorRampShader->setColorRampType ( QgsColorRampShader::INTERPOLATED );
5163
5163
myColorRampShader->setColorRampItemList ( *colorTable ( 1 ) );
0 commit comments