diff --git a/src/core/qgsmaplayer.h b/src/core/qgsmaplayer.h index 7ccb8b526e1f..f91fc77c674e 100644 --- a/src/core/qgsmaplayer.h +++ b/src/core/qgsmaplayer.h @@ -201,7 +201,7 @@ class CORE_EXPORT QgsMapLayer : public QObject unsigned int getTransparency(); /** Mutator for transparency level. Should be between 0 and 255 */ - void setTransparency( unsigned int ); + virtual void setTransparency( unsigned int ); /** * If an operation returns 0 (e.g. draw()), this function diff --git a/src/core/raster/qgsrasterlayer.cpp b/src/core/raster/qgsrasterlayer.cpp index 7e67bf778abf..04ace8ab83b7 100644 --- a/src/core/raster/qgsrasterlayer.cpp +++ b/src/core/raster/qgsrasterlayer.cpp @@ -3151,7 +3151,8 @@ bool QgsRasterLayer::readSymbology( const QDomNode& layer_node, QString& errorMe { QgsColorRampShader* myColorRampShader = ( QgsColorRampShader* ) mRasterShader->rasterShaderFunction(); - //TODO: Remove the customColorRampType check and following if() in v2.0, added for compatibility with older ( bugged ) project files + //TODO: Remove the customColorRampType check and following if() in v2.0, + //added for compatibility with older ( bugged ) project files QDomNode customColorRampTypeNode = customColorRampNode.namedItem( "customColorRampType" ); QDomNode colorRampTypeNode = customColorRampNode.namedItem( "colorRampType" ); QString myRampType = ""; @@ -3760,7 +3761,8 @@ QString QgsRasterLayer::generateBandName( int theBandNumber ) */ bool QgsRasterLayer::hasBand( QString const & theBandName ) { - //TODO: This function is no longer really needed and about be removed -- it is only used to see if "Palette" exists which is not the correct way to see if a band is paletted or not + //TODO: This function is no longer really needed and about be removed + //-- it is only used to see if "Palette" exists which is not the correct way to see if a band is paletted or not QgsDebugMsg( "Looking for band : " + theBandName ); for ( int i = 1; i <= mDataProvider->bandCount(); i++ ) @@ -3984,3 +3986,12 @@ bool QgsRasterLayer::readColorTable( int theBandNumber, QListsetOpacity( mTransparencyLevel / 255.0 ); + } +} diff --git a/src/core/raster/qgsrasterlayer.h b/src/core/raster/qgsrasterlayer.h index 120c64bd8efd..e693d5112f12 100644 --- a/src/core/raster/qgsrasterlayer.h +++ b/src/core/raster/qgsrasterlayer.h @@ -694,6 +694,9 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer /** \brief receive progress signal from provider */ void onProgress( int, double, QString ); + /** \brief Overload the setTransparency method from QgsMapLayer */ + void setTransparency( unsigned int theInt ); + signals: /** \brief Signal for notifying listeners of long running processes */ void progressUpdate( int theValue );