QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
15 #ifndef QGSSINGLESYMBOLRENDERER_H
16 #define QGSSINGLESYMBOLRENDERER_H
18 #include "qgis_core.h"
62 QString
dump()
const override;
66 void toSld( QDomDocument &doc, QDomElement &element,
const QVariantMap &props = QVariantMap() )
const override;
132 #endif // QGSSINGLESYMBOLRENDERER_H
virtual void setLegendSymbolItem(const QString &key, QgsSymbol *symbol)
Sets the symbol to be used for a legend symbol item.
virtual QgsSymbol * originalSymbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const
Returns symbol for feature.
The class is used as a container of context for various read/write operations on other objects.
std::unique_ptr< QgsSymbol > mSymbol
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified symbology visitor, causing it to visit all symbols associated with the renderer...
Container of fields for a vector layer.
Object that keeps configuration of appearance of marker symbol's data-defined size in legend.
Contains information about the context of a rendering operation.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const =0
Returns a list of attributes required by this renderer.
An interface for classes which can visit style entity (e.g. symbol) nodes (using the visitor pattern)...
virtual QgsLegendSymbolList legendSymbolItems() const
Returns a list of symbology items for the legend.
Abstract base class for all rendered symbols.
virtual void stopRender(QgsRenderContext &context)
Must be called when a render cycle has finished, to allow the renderer to clean up.
@ SymbolLevels
Rendering with symbol levels (i.e. implements symbols(), symbolForFeature())
std::unique_ptr< QgsDataDefinedSizeLegend > mDataDefinedSizeLegend
virtual QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context)
Stores renderer properties to an XML element.
QList< QgsSymbol * > QgsSymbolList
virtual QgsFeatureRenderer * clone() const =0
Create a deep copy of this renderer.
QgsFeatureRenderer::Capabilities capabilities() override
Returns details about internals of this renderer.
virtual void toSld(QDomDocument &doc, QDomElement &element, const QVariantMap &props=QVariantMap()) const
used from subclasses to create SLD Rule elements following SLD v1.1 specs
virtual QgsSymbolList symbols(QgsRenderContext &context) const
Returns list of symbols used by the renderer.
virtual QgsSymbol * symbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const =0
To be overridden.
virtual QString legendKeyToExpression(const QString &key, QgsVectorLayer *layer, bool &ok) const
Attempts to convert the specified legend rule key to a QGIS expression matching the features displaye...
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
Represents a vector layer which manages a vector based data sets.
virtual QString dump() const
Returns debug information about this renderer.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
QList< QgsLegendSymbolItem > QgsLegendSymbolList
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)
Must be called when a new render cycle is started.
virtual QSet< QString > legendKeysForFeature(const QgsFeature &feature, QgsRenderContext &context) const
Returns legend keys matching a specified feature.