QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
15 #ifndef QGSMERGEDFEATURERENDERER_H
16 #define QGSMERGEDFEATURERENDERER_H
18 #include "qgis_core.h"
79 QString
dump()
const override;
82 QgsFeatureRenderer::Capabilities
capabilities()
override;
130 std::unique_ptr<QgsFeatureRenderer> mSubRenderer;
135 struct CombinedFeature
137 QVector<QgsGeometry> geometries;
140 typedef QVector<CombinedFeature> FeatureCategoryVector;
142 FeatureCategoryVector mFeaturesCategories;
145 QMap<QByteArray, int> mSymbolCategories;
160 struct FeatureDecoration
166 FeatureDecoration(
const QgsFeature &a_feature,
bool a_selected,
bool a_drawMarkers,
int a_layer )
167 : feature( a_feature )
168 , selected( a_selected )
169 , drawMarkers( a_drawMarkers )
173 QList<FeatureDecoration> mFeatureDecorations;
178 #endif // QGSMERGEDFEATURERENDERER_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.
QVector< QgsPolylineXY > QgsPolygonXY
Polygon: first item of the list is outer ring, inner rings (if any) start from second item.
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified symbology visitor, causing it to visit all symbols associated with the renderer...
virtual QgsFeatureRenderer::Capabilities capabilities()
Returns details about internals of this renderer.
Container of fields for a vector layer.
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 setEmbeddedRenderer(QgsFeatureRenderer *subRenderer)
Sets an embedded renderer (subrenderer) for this feature renderer.
virtual void stopRender(QgsRenderContext &context)
Must be called when a render cycle has finished, to allow the renderer to clean up.
virtual bool willRenderFeature(const QgsFeature &feature, QgsRenderContext &context) const
Returns whether the renderer will render a feature or not.
virtual bool legendSymbolItemChecked(const QString &key)
items of symbology items in legend is checked
virtual bool legendSymbolItemsCheckable() const
items of symbology items in legend should be checkable
virtual QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context)
Stores renderer properties to an XML element.
Custom exception class for Coordinate Reference System related exceptions.
virtual bool filterNeedsGeometry() const
Returns true if this renderer requires the geometry to apply the filter.
virtual void checkLegendSymbolItem(const QString &key, bool state=true)
item in symbology was checked
QList< QgsSymbol * > QgsSymbolList
virtual QgsFeatureRenderer * clone() const =0
Create a deep copy of this renderer.
virtual QgsSymbolList originalSymbolsForFeature(const QgsFeature &feature, QgsRenderContext &context) const
Equivalent of originalSymbolsForFeature() call extended to support renderers that may use more symbol...
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...
Represents a vector layer which manages a vector based data sets.
virtual bool renderFeature(const QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false) SIP_THROW(QgsCsException)
Render a feature using this renderer in the given context.
virtual QString dump() const
Returns debug information about this renderer.
QgsMergedFeatureRenderer is a polygon or line-only feature renderer used to renderer a set of feature...
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
GeometryOperation
Operations to apply to collected geometries prior to rendering.
QList< QgsLegendSymbolItem > QgsLegendSymbolList
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)
Must be called when a new render cycle is started.
virtual QgsSymbolList symbolsForFeature(const QgsFeature &feature, QgsRenderContext &context) const
Returns list of symbols used for rendering the feature.
virtual const QgsFeatureRenderer * embeddedRenderer() const
Returns the current embedded renderer (subrenderer) for this feature renderer.
virtual QSet< QString > legendKeysForFeature(const QgsFeature &feature, QgsRenderContext &context) const
Returns legend keys matching a specified feature.