18#ifndef QGSSINGLEBANDPSEUDOCOLORRENDERER_H
19#define QGSSINGLEBANDPSEUDOCOLORRENDERER_H
48 Qgis::RasterRendererFlags
flags() const override;
80 void writeXml( QDomDocument &doc, QDomElement &parentElem )
const override;
84 Q_DECL_DEPRECATED
void toSld( QDomDocument &doc, QDomElement &element,
const QVariantMap &props = QVariantMap() ) const override
SIP_DEPRECATED;
85 bool toSld( QDomDocument &doc, QDomElement &element,
QgsSldExportContext &context ) const override;
108 void setClassificationMin(
double min );
109 void setClassificationMax(
double max );
121 bool refresh(
const QgsRectangle &extent,
const QList<double> &min,
const QList<double> &max,
bool forceRefresh =
false ) override
SIP_SKIP;
129 std::unique_ptr< QgsRasterShader > mShader;
134 double mClassificationMin;
135 double mClassificationMax;
Provides global constants and enumerations for use throughout the application.
ShaderInterpolationMethod
Color ramp shader interpolation methods.
@ Linear
Interpolates the color between two class breaks linearly.
ShaderClassificationMethod
Color ramp shader classification methods.
@ Continuous
Uses breaks from color palette.
Abstract base class for color ramps.
Layer tree node points to a map layer.
Feedback object tailored for raster block reading.
QgsRasterInterface(QgsRasterInterface *input=nullptr)
virtual QgsRectangle extent() const
Gets the extent of the interface.
virtual void writeXml(QDomDocument &doc, QDomElement &parentElem) const
Write base class members to xml.
virtual QgsRasterInterface * input() const
Current input.
QgsRasterRenderer(QgsRasterInterface *input=nullptr, const QString &type=QString())
Constructor for QgsRasterRenderer.
virtual bool canCreateRasterAttributeTable() const
Returns true if the renderer is suitable for attribute table creation.
virtual int inputBand() const
Returns the input band for the renderer, or -1 if no input band is available.
virtual bool setInputBand(int band)
Attempts to set the input band for the renderer.
virtual bool refresh(const QgsRectangle &extent, const QList< double > &min, const QList< double > &max, bool forceRefresh=false)
Refreshes the renderer according to the min and max values associated with the extent.
virtual QList< int > usesBands() const
Returns a list of band numbers used by the renderer.
virtual QList< QgsLayerTreeModelLegendNode * > createLegendNodes(QgsLayerTreeLayer *nodeLayer)
Creates a set of legend nodes representing the renderer.
virtual Q_DECL_DEPRECATED void toSld(QDomDocument &doc, QDomElement &element, const QVariantMap &props=QVariantMap()) const
Used from subclasses to create SLD Rule elements following SLD v1.0 specs.
virtual QList< QPair< QString, QColor > > legendSymbologyItems() const
Returns symbology items if provided by renderer.
const QgsRasterRenderer & operator=(const QgsRasterRenderer &)=delete
QgsRasterRenderer cannot be copied. Use clone() instead.
QgsRasterRenderer * clone() const override=0
Clone itself, create deep copy.
Interface for all raster shaders.
A rectangle specified with double values.
Raster renderer pipe for single band pseudocolor.
void setShader(QgsRasterShader *shader)
Takes ownership of the shader.
double classificationMin() const
const QgsSingleBandPseudoColorRenderer & operator=(const QgsSingleBandPseudoColorRenderer &)=delete
QgsSingleBandPseudoColorRenderer cannot be copied. Use clone() instead.
QgsRasterShader * shader()
Returns the raster shader.
double classificationMax() const
QgsSingleBandPseudoColorRenderer(const QgsSingleBandPseudoColorRenderer &)=delete
QgsSingleBandPseudoColorRenderer cannot be copied. Use clone() instead.
QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr) override
Read block of data using given extent and size.
Qgis::RasterRendererFlags flags() const override
Returns flags which dictate renderer behavior.
QgsSingleBandPseudoColorRenderer(QgsRasterInterface *input, int band=-1, QgsRasterShader *shader=nullptr)
Note: takes ownership of QgsRasterShader.
const QgsRasterShader * shader() const
Returns the raster shader.
static QgsRasterRenderer * create(const QDomElement &elem, QgsRasterInterface *input)
Q_DECL_DEPRECATED int band() const
Returns the band used by the renderer.
Holds SLD export options and other information related to SLD export of a QGIS layer style.
An interface for classes which can visit style entity (e.g.