18#ifndef QGSRASTERSINGLECOLORRENDERER_H
19#define QGSRASTERSINGLECOLORRENDERER_H
46 Qgis::RasterRendererFlags
flags() const override;
65 void writeXml( QDomDocument &doc, QDomElement &parentElem ) const override;
Provides global constants and enumerations for use throughout the application.
Feedback object tailored for raster block reading.
QgsRasterInterface(QgsRasterInterface *input=nullptr)
virtual QgsRectangle extent() const
Gets the extent of the interface.
virtual QgsRasterInterface * input() const
Current input.
QgsRasterRenderer(QgsRasterInterface *input=nullptr, const QString &type=QString())
Constructor for QgsRasterRenderer.
const QgsRasterRenderer & operator=(const QgsRasterRenderer &)=delete
QgsRasterRenderer cannot be copied. Use clone() instead.
QgsRasterRenderer * clone() const override=0
Clone itself, create deep copy.
int inputBand() const override
Returns the input band for the renderer, or -1 if no input band is available.
static std::unique_ptr< QgsRasterRenderer > create(const QDomElement &elem, QgsRasterInterface *input)
Creates an instance of the renderer based on definition from XML (used by the renderer registry).
bool setInputBand(int band) override
Attempts to set the input band for the renderer.
void writeXml(QDomDocument &doc, QDomElement &parentElem) const override
Write base class members to xml.
Qgis::RasterRendererFlags flags() const override
Returns flags which dictate renderer behavior.
const QgsRasterSingleColorRenderer & operator=(const QgsRasterSingleColorRenderer &)=delete
QgsRasterSingleColorRenderer cannot be copied. Use clone() instead.
QgsRasterSingleColorRenderer(QgsRasterInterface *input, int band, const QColor &color)
Creates a single color renderer.
QColor color() const
Returns the single color used by the renderer.
QList< int > usesBands() const override
Returns a list of band numbers used by the renderer.
QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr) override
Read block of data using given extent and size.
QgsRasterSingleColorRenderer(const QgsRasterSingleColorRenderer &)=delete
QgsRasterSingleColorRenderer cannot be copied. Use clone() instead.
void setColor(const QColor &color)
Sets the single color used by the renderer.
A rectangle specified with double values.