16 #ifndef QGSGEOMETRYGENERATORSYMBOLLAYER_H
17 #define QGSGEOMETRYGENERATORSYMBOLLAYER_H
19 #include "qgis_core.h"
65 QVariantMap properties() const override;
72 void setGeometryExpression( const QString &exp );
77 QString geometryExpression()
const {
return mExpression->expression(); }
105 void setColor(
const QColor &color )
override;
114 std::unique_ptr<QgsExpression> mExpression;
115 std::unique_ptr<QgsFillSymbol> mFillSymbol;
116 std::unique_ptr<QgsLineSymbol> mLineSymbol;
117 std::unique_ptr<QgsMarkerSymbol> mMarkerSymbol;
125 bool mRenderingFeature =
false;
126 bool mHasRenderedFeature =
false;
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
Qgis::SymbolType symbolType() const
Access the symbol type.
~QgsGeometryGeneratorSymbolLayer() override
QgsSymbol * subSymbol() override
Returns the symbol's sub symbol, if present.
A line symbol type, for rendering LineString and MultiLineString geometries.
A marker symbol type, for rendering Point and MultiPoint geometries.
Contains information about the context of a rendering operation.
virtual bool setSubSymbol(QgsSymbol *symbol)
Sets layer's subsymbol. takes ownership of the passed symbol.
virtual void startFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called before the layer will be rendered for a particular feature.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
virtual void startRender(QgsSymbolRenderContext &context)=0
Called before a set of rendering operations commences on the supplied render context.
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
virtual QString layerType() const =0
Returns a string that represents this layer type.
virtual void stopRender(QgsSymbolRenderContext &context)=0
Called after a set of rendering operations has finished on the supplied render context.
virtual bool isCompatibleWithSymbol(QgsSymbol *symbol) const
Returns if the layer can be used below the specified symbol.
virtual void stopFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called after the layer has been rendered for a particular feature.
virtual bool usesMapUnits() const
Returns true if the symbol layer has any components which use map unit based sizes.
virtual void setColor(const QColor &color)
The fill color.
virtual bool hasDataDefinedProperties() const
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties.
Abstract base class for all rendered symbols.