QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
18 #ifndef QGSSINGLEBANDPSEUDOCOLORRENDERER_H
19 #define QGSSINGLEBANDPSEUDOCOLORRENDERER_H
21 #include "qgis_core.h"
79 void writeXml( QDomDocument &doc, QDomElement &parentElem )
const override;
83 void toSld( QDomDocument &doc, QDomElement &element,
const QVariantMap &props = QVariantMap() )
const override;
90 int band()
const {
return mBand; }
97 void setBand(
int bandNo );
101 void setClassificationMin(
double min );
102 void setClassificationMax(
double max );
110 std::unique_ptr< QgsRasterShader > mShader;
115 double mClassificationMin;
116 double mClassificationMax;
120 #endif // QGSSINGLEBANDPSEUDOCOLORRENDERER_H
Abstract base class for color ramps.
QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr) override=0
Read block of data using given extent and size.
virtual QList< QPair< QString, QColor > > legendSymbologyItems() const
Returns symbology items if provided by renderer.
const QgsRasterShader * shader() const
virtual void writeXml(QDomDocument &doc, QDomElement &parentElem) const
Write base class members to xml.
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified symbology visitor, causing it to visit all symbols associated with the renderer...
double classificationMin() const
An interface for classes which can visit style entity (e.g. symbol) nodes (using the visitor pattern)...
int band() const
Returns the band used by the renderer.
virtual QList< int > usesBands() const
Returns a list of band numbers used by the renderer.
Type
Supported methods for color interpolation.
A rectangle specified with double values.
double classificationMax() const
@ Continuous
Uses breaks from color palette.
Raster renderer pipe that applies colors to a raster.
Layer tree node points to a map layer.
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.
QgsRasterRenderer * clone() const override=0
Clone itself, create deep copy.
ClassificationMode
Classification modes used to create the color ramp shader.
Base class for processing filters like renderers, reprojector, resampler etc.
Feedback object tailored for raster block reading.
Raster renderer pipe for single band pseudocolor.
const QgsRasterRenderer & operator=(const QgsRasterRenderer &)=delete
QgsRasterRenderer cannot be copied. Use clone() instead.
Interface for all raster shaders.
QgsRasterShader * shader()
Returns the raster shader.
@ Interpolated
Interpolates the color between two class breaks linearly.
virtual QList< QgsLayerTreeModelLegendNode * > createLegendNodes(QgsLayerTreeLayer *nodeLayer)
Creates a set of legend nodes representing the renderer.