16#ifndef QGSRASTERCONTOURRENDERER_H
17#define QGSRASTERCONTOURRENDERER_H
43 Qgis::RasterRendererFlags
flags() const override;
48 void writeXml( QDomDocument &doc, QDomElement &parentElem ) const override;
98 std::unique_ptr<QgsLineSymbol> mContourSymbol;
99 std::unique_ptr<QgsLineSymbol> mContourIndexSymbol;
100 double mDownscale = 8.;
101 double mContourInterval = 100.;
102 double mContourIndexInterval = 0.;
Provides global constants and enumerations for use throughout the application.
Layer tree node points to a map layer.
An abstract interface for legend items returned from QgsMapLayerLegend implementation.
A line symbol type, for rendering LineString and MultiLineString geometries.
Feedback object tailored for raster block reading.
Raster renderer that generates contours on the fly for a source raster band.
int inputBand() const override
Returns the input band for the renderer, or -1 if no input band is available.
static QgsRasterRenderer * create(const QDomElement &elem, QgsRasterInterface *input)
Creates an instance of the renderer based on definition from XML (used by renderer registry).
void setDownscale(double scale)
Sets by how much the renderer will scale down the request to the data provider.
QgsLineSymbol * contourIndexSymbol() const
Returns the symbol of index contour lines.
QgsRasterContourRenderer(QgsRasterInterface *input)
Creates a contour renderer.
void setContourInterval(double interval)
Sets the interval of contour lines generation.
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.
void writeXml(QDomDocument &doc, QDomElement &parentElem) const override
Write base class members to xml.
QList< QgsLayerTreeModelLegendNode * > createLegendNodes(QgsLayerTreeLayer *nodeLayer) override
Creates a set of legend nodes representing the renderer.
QgsRasterContourRenderer(const QgsRasterContourRenderer &)=delete
QgsRasterContourRenderer cannot be copied. Use clone() instead.
~QgsRasterContourRenderer() override
double downscale() const
Returns by how much the renderer will scale down the request to the data provider.
void setContourIndexInterval(double interval)
Sets the interval of index contour lines (index contour lines are typical further apart and with a wi...
QgsLineSymbol * contourSymbol() const
Returns the symbol used for contour lines.
bool setInputBand(int band) override
Attempts to set the input band for the renderer.
const QgsRasterContourRenderer & operator=(const QgsRasterContourRenderer &)=delete
QgsRasterContourRenderer cannot be copied. Use clone() instead.
double contourInterval() const
Returns the interval of contour lines generation.
double contourIndexInterval() const
Returns the interval of index contour lines (index contour lines are typical further apart and with a...
QList< int > usesBands() const override
Returns a list of band numbers used by the renderer.
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.
A rectangle specified with double values.