18#ifndef QGSPALETTEDRASTERRENDERER_H
19#define QGSPALETTEDRASTERRENDERER_H
44 Class(
double value,
const QColor &color = QColor(),
const QString &label = QString() )
70 MultiValueClass(
const QVector< QVariant > &values,
const QColor &color = QColor(),
const QString &label = QString() );
84 typedef QList< QgsPalettedRasterRenderer::Class >
ClassData;
106 Qgis::RasterRendererFlags flags() const override;
126 bool canCreateRasterAttributeTable( ) const override;
137 QString label(
double idx ) const;
142 void setLabel(
double idx, const QString &label );
154 void writeXml( QDomDocument &doc, QDomElement &parentElem )
const override;
158 void toSld( QDomDocument &doc, QDomElement &element,
const QVariantMap &props = QVariantMap() )
const override;
224 MultiValueClassData mMultiValueClassData;
226 ClassData classData()
const;
229 std::unique_ptr<QgsColorRamp> mSourceColorRamp;
232 QMap< double, QRgb > mColors;
236 static const int MAX_FLOAT_CLASSES;
The Qgis class provides global constants for use throughout the application.
Abstract base class for color ramps.
Layer tree node points to a map layer.
Properties of a multi value class: a class that contains multiple values.
QColor color
Color to render values.
QVector< QVariant > values
Values.
QString label
Label for values.
Renderer for paletted raster images.
const QgsPalettedRasterRenderer & operator=(const QgsPalettedRasterRenderer &)=delete
QgsPalettedRasterRenderer cannot be copied. Use clone() instead.
QList< QgsPalettedRasterRenderer::Class > ClassData
Map of value to class properties.
QList< QgsPalettedRasterRenderer::MultiValueClass > MultiValueClassData
Map of multi value to class properties.
QgsPalettedRasterRenderer(const QgsPalettedRasterRenderer &)=delete
QgsPalettedRasterRenderer cannot be copied. Use clone() instead.
QgsPalettedRasterRenderer(QgsRasterInterface *input, int bandNumber, const MultiValueClassData &classes)
Constructor for QgsPalettedRasterRenderer from multi value classes.
The QgsRasterAttributeTable class represents a Raster Attribute Table (RAT).
Feedback object tailored for raster block reading.
Base class for processing filters like renderers, reprojector, resampler etc.
virtual void writeXml(QDomDocument &doc, QDomElement &parentElem) const
Write base class members to xml.
Raster renderer pipe that applies colors to a raster.
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 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 bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified symbology visitor, causing it to visit all symbols associated with the renderer...
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.
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.
A rectangle specified with double values.
An interface for classes which can visit style entity (e.g.
Properties of a single value class.
QColor color
Color to render value.
Class(double value, const QColor &color=QColor(), const QString &label=QString())
Constructor for Class.
QString label
Label for value.