Skip to content
Permalink
Browse files

Added setBand capability to qgssinglebandpseudocolorrenderer API

  • Loading branch information
carolinux committed Jun 23, 2015
1 parent da39ab3 commit 45681e6e0a007ecb1b9b543de5b4d8ce123dd602
@@ -28,6 +28,7 @@ class QgsSingleBandPseudoColorRenderer: QgsRasterRenderer
* @note added in QGIS 2.7
*/
int band() const;
void setBand(int bandNo);

double classificationMin() const;
double classificationMax() const;
@@ -38,6 +38,15 @@ QgsSingleBandPseudoColorRenderer::~QgsSingleBandPseudoColorRenderer()
delete mShader;
}

void QgsSingleBandPseudoColorRenderer::setBand(int bandNo)
{
if ( bandNo>=mInput->bandCount() || bandNo<0 )
{
return;
}
mBand = bandNo;
}

QgsRasterInterface * QgsSingleBandPseudoColorRenderer::clone() const
{
QgsRasterShader *shader = 0;
@@ -53,6 +53,7 @@ class CORE_EXPORT QgsSingleBandPseudoColorRenderer: public QgsRasterRenderer
* @note added in QGIS 2.7
*/
int band() const { return mBand; }
void setBand( int bandNo );

double classificationMin() const { return mClassificationMin; }
double classificationMax() const { return mClassificationMax; }

0 comments on commit 45681e6

Please sign in to comment.
You can’t perform that action at this time.