2013-03-09 14:05:12 +01:00
|
|
|
class QgsPalettedRasterRenderer : QgsRasterRenderer
|
2012-09-24 02:28:15 +02:00
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgspalettedrasterrenderer.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
/**Renderer owns color array*/
|
2013-11-02 18:21:31 +01:00
|
|
|
QgsPalettedRasterRenderer( QgsRasterInterface* input, int bandNumber, QColor* colorArray /Array,Transfer/, int nColors /ArraySize/, const QVector<QString> labels = QVector<QString>() );
|
2012-09-24 02:28:15 +02:00
|
|
|
~QgsPalettedRasterRenderer();
|
2013-03-09 14:05:12 +01:00
|
|
|
QgsRasterInterface * clone() const /Factory/;
|
|
|
|
static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterInterface* input ) /Factory/;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2013-03-09 14:05:12 +01:00
|
|
|
QgsRasterBlock *block( int bandNo, const QgsRectangle & extent, int width, int height ) /Factory/;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
/**Returns number of colors*/
|
|
|
|
int nColors() const;
|
|
|
|
/**Returns copy of color array (caller takes ownership)*/
|
2012-09-26 18:46:52 +02:00
|
|
|
QColor* colors() const /Factory/;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2014-01-27 09:22:24 +01:00
|
|
|
/**Returns copy of rgb array (caller takes ownership)
|
|
|
|
@note not available in python bindings
|
|
|
|
*/
|
|
|
|
// QRgb* rgbArray() const;
|
|
|
|
|
|
|
|
/** 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, QString label );
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
void writeXML( QDomDocument& doc, QDomElement& parentElem ) const;
|
|
|
|
|
|
|
|
void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const;
|
2013-03-09 14:05:12 +01:00
|
|
|
|
|
|
|
QList<int> usesBands() const;
|
|
|
|
};
|