QGIS/python/core/raster/qgspalettedrasterrenderer.sip

39 lines
1.4 KiB
Plaintext
Raw Normal View History

class QgsPalettedRasterRenderer : QgsRasterRenderer
{
%TypeHeaderCode
#include "qgspalettedrasterrenderer.h"
%End
public:
2015-07-29 11:52:14 +02:00
/** Renderer owns color array*/
QgsPalettedRasterRenderer( QgsRasterInterface* input, int bandNumber, QColor* colorArray /Array,Transfer/, int nColors /ArraySize/, const QVector<QString>& labels = QVector<QString>() );
~QgsPalettedRasterRenderer();
virtual QgsPalettedRasterRenderer * clone() const /Factory/;
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterInterface* input ) /Factory/;
QgsRasterBlock *block( int bandNo, const QgsRectangle & extent, int width, int height, QgsRasterBlockFeedback* feedback = nullptr ) /Factory/;
2015-07-29 11:52:14 +02:00
/** Returns number of colors*/
int nColors() const;
2015-07-29 11:52:14 +02:00
/** Returns copy of color array (caller takes ownership)*/
2012-09-26 18:46:52 +02:00
QColor* colors() const /Factory/;
2014-01-27 09:22:24 +01:00
/** Return optional category label
* @note added in 2.1 */
QString label( int idx ) const;
/** Set category label
* @note added in 2.1 */
void setLabel( int idx, const QString& label );
2014-01-27 09:22:24 +01:00
void writeXml( QDomDocument& doc, QDomElement& parentElem ) const;
void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems /Out/ ) const;
QList<int> usesBands() const;
private:
QgsPalettedRasterRenderer( const QgsPalettedRasterRenderer& );
const QgsPalettedRasterRenderer& operator=( const QgsPalettedRasterRenderer& );
};