18 #ifndef QGSPALETTEDRASTERRENDERER_H 19 #define QGSPALETTEDRASTERRENDERER_H 21 #include "qgis_core.h" 43 Class(
int value,
const QColor &color = QColor(),
const QString &label = QString() )
59 typedef QList< QgsPalettedRasterRenderer::Class >
ClassData;
77 int nColors()
const {
return mClassData.size(); }
82 ClassData classes()
const;
87 QString label(
int idx )
const;
92 void setLabel(
int idx,
const QString &label );
98 int band()
const {
return mBand; }
100 void writeXml( QDomDocument &doc, QDomElement &parentElem )
const override;
101 void legendSymbologyItems( QList< QPair< QString, QColor > > &symbolItems
SIP_OUT )
const override;
102 QList<int> usesBands()
const override;
164 ClassData mClassData;
167 std::unique_ptr<QgsColorRamp> mSourceColorRamp;
170 QMap< int, QRgb > mColors;
174 #endif // QGSPALETTEDRASTERRENDERER_H A rectangle specified with double values.
QColor color
Color to render value.
Renderer for paletted raster images.
QString label
Label for value.
Abstract base class for color ramps.
Properties of a single value class.
An interface for classes which can visit style entity (e.g.
QMap< QString, QString > QgsStringMap
QList< QgsPalettedRasterRenderer::Class > ClassData
Map of value to class properties.
Base class for processing filters like renderers, reprojector, resampler etc.
int band() const
Returns the raster band used for rendering the raster.
Class(int value, const QColor &color=QColor(), const QString &label=QString())
Constructor for Class.
Feedback object tailored for raster block reading.
Raster renderer pipe that applies colors to a raster.