QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
18 #ifndef QGSPALETTEDRASTERRENDERER_H
19 #define QGSPALETTEDRASTERRENDERER_H
21 #include "qgis_core.h"
43 Class(
double 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;
88 QString label(
double idx )
const;
94 void setLabel(
double idx,
const QString &label );
100 int band()
const {
return mBand; }
102 void writeXml( QDomDocument &doc, QDomElement &parentElem )
const override;
106 void toSld( QDomDocument &doc, QDomElement &element,
const QVariantMap &props = QVariantMap() )
const override;
167 ClassData mClassData;
170 std::unique_ptr<QgsColorRamp> mSourceColorRamp;
173 QMap< double, QRgb > mColors;
177 static const int MAX_FLOAT_CLASSES;
180 #endif // QGSPALETTEDRASTERRENDERER_H
QList< QgsPalettedRasterRenderer::Class > ClassData
Map of value to class properties.
Class(double value, const QColor &color=QColor(), const QString &label=QString())
Constructor for Class.
Abstract base class for color ramps.
virtual QList< QPair< QString, QColor > > legendSymbologyItems() const
Returns symbology items if provided by renderer.
virtual void writeXml(QDomDocument &doc, QDomElement &parentElem) const
Write base class members to xml.
QColor color
Color to render value.
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified symbology visitor, causing it to visit all symbols associated with the renderer...
QString label
Label for value.
An interface for classes which can visit style entity (e.g. symbol) nodes (using the visitor pattern)...
virtual QList< int > usesBands() const
Returns a list of band numbers used by the renderer.
A rectangle specified with double values.
Raster renderer pipe that applies colors to a raster.
Layer tree node points to a map layer.
int band() const
Returns the raster band used for rendering the raster.
virtual void toSld(QDomDocument &doc, QDomElement &element, const QVariantMap &props=QVariantMap()) const
Used from subclasses to create SLD Rule elements following SLD v1.0 specs.
Properties of a single value class.
Renderer for paletted raster images.
QgsRasterRenderer * clone() const override=0
Clone itself, create deep copy.
Base class for processing filters like renderers, reprojector, resampler etc.
Feedback object tailored for raster block reading.
const QgsRasterRenderer & operator=(const QgsRasterRenderer &)=delete
QgsRasterRenderer cannot be copied. Use clone() instead.
virtual QList< QgsLayerTreeModelLegendNode * > createLegendNodes(QgsLayerTreeLayer *nodeLayer)
Creates a set of legend nodes representing the renderer.