Skip to content
Permalink
Browse files

sip updates

  • Loading branch information
jef-n committed Oct 6, 2012
1 parent 41d306b commit 9fb31117cb53966f698610397499569255eb0521
@@ -64,4 +64,14 @@ class QgsRasterRenderer : QgsRasterInterface

/**Returns a list of band numbers used by the renderer*/
virtual QList<int> usesBands() const;

static QString minMaxOriginName( int theOrigin );
static QString minMaxOriginLabel( int theOrigin );
static int minMaxOriginFromName( QString theName );

protected:

/**Write upper class info into rasterrenderer element (called by writeXML method of subclasses)*/
void _writeXML( QDomDocument& doc, QDomElement& rasterRendererElem ) const;

};
@@ -7,7 +7,7 @@ class QgsSingleBandPseudoColorRenderer: QgsRasterRenderer
/**Note: takes ownership of QgsRasterShader*/
QgsSingleBandPseudoColorRenderer( QgsRasterDataProvider* provider, int band, QgsRasterShader* shader /Transfer/ );
~QgsSingleBandPseudoColorRenderer();
QgsRasterInterface * clone() /Factory/;
QgsRasterInterface * clone() const /Factory/;

static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterDataProvider* provider ) /Factory/;

@@ -16,8 +16,22 @@ class QgsSingleBandPseudoColorRenderer: QgsRasterRenderer
/**Takes ownership of the shader*/
void setShader( QgsRasterShader* shader /Transfer/ );
QgsRasterShader* shader();
const QgsRasterShader* constShader() const;
%MethodCode
sipRes = sipCpp->shader();
%End

void writeXML( QDomDocument& doc, QDomElement& parentElem ) const;

void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const;

QList<int> usesBands() const;

double classificationMin() const;
double classificationMax() const;
void setClassificationMin( double min );
void setClassificationMax( double max );
int classificationMinMaxOrigin() const;
void setClassificationMinMaxOrigin( int origin );

};
@@ -12,5 +12,5 @@ class QgsRasterMinMaxWidget: QWidget
void setBands( const QList<int> & theBands );

signals:
void load( int theBandNo, double theMin, double theMax );
void load( int theBandNo, double theMin, double theMax, int origin );
};
@@ -12,4 +12,8 @@ class QgsSingleBandPseudoColorRendererWidget : QgsRasterRendererWidget
QgsRasterRenderer* renderer();

void setFromRenderer( const QgsRasterRenderer* r );

public slots:
void loadMinMax( int theBandNo, double theMin, double theMax, int theOrigin );

};
@@ -36,7 +36,7 @@ class CORE_EXPORT QgsSingleBandPseudoColorRenderer: public QgsRasterRenderer

static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterInterface* input );

void * readBlock( int bandNo, QgsRectangle const & extent, int width, int height );
void * readBlock( int bandNo, const QgsRectangle & extent, int width, int height );

/**Takes ownership of the shader*/
void setShader( QgsRasterShader* shader );
@@ -36,12 +36,12 @@ class GUI_EXPORT QgsSingleBandPseudoColorRendererWidget: public QgsRasterRendere

void setFromRenderer( const QgsRasterRenderer* r );

private:
void populateColormapTreeWidget( const QList<QgsColorRampShader::ColorRampItem>& colorRampItems );

public slots:
void loadMinMax( int theBandNo, double theMin, double theMax, int theOrigin );

private:
void populateColormapTreeWidget( const QList<QgsColorRampShader::ColorRampItem>& colorRampItems );

private slots:
void on_mAddEntryButton_clicked();
void on_mDeleteEntryButton_clicked();

0 comments on commit 9fb3111

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