QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
16 #ifndef QGSGEOMETRYGENERATORSYMBOLLAYER_H
17 #define QGSGEOMETRYGENERATORSYMBOLLAYER_H
19 #include "qgis_core.h"
62 QColor
color()
const override;
69 QVariantMap properties() const override;
76 void setGeometryExpression( const QString &exp );
81 QString geometryExpression()
const {
return mExpression->expression(); }
133 void setColor(
const QColor &color )
override;
153 std::unique_ptr<QgsExpression> mExpression;
154 std::unique_ptr<QgsFillSymbol> mFillSymbol;
155 std::unique_ptr<QgsLineSymbol> mLineSymbol;
156 std::unique_ptr<QgsMarkerSymbol> mMarkerSymbol;
166 bool mRenderingFeature =
false;
167 bool mHasRenderedFeature =
false;
170 #endif // QGSGEOMETRYGENERATORSYMBOLLAYER_H
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
virtual QgsMapUnitScale mapUnitScale() const
QgsUnitTypes::RenderUnit units() const
Returns the unit for the geometry expression.
virtual void startFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called before the layer will be rendered for a particular feature.
virtual void setColor(const QColor &color)
Sets the "representative" color for the symbol layer.
RenderUnit
Rendering size units.
virtual bool isCompatibleWithSymbol(QgsSymbol *symbol) const
Returns if the layer can be used below the specified symbol.
QgsSymbol * subSymbol() override
Returns the symbol's sub symbol, if present.
virtual bool hasDataDefinedProperties() const
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties.
Contains information about the context of a rendering operation.
Abstract base class for all rendered symbols.
virtual bool usesMapUnits() const
Returns true if the symbol layer has any components which use map unit based sizes.
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
virtual bool setSubSymbol(QgsSymbol *symbol)
Sets layer's subsymbol. takes ownership of the passed symbol.
A marker symbol type, for rendering Point and MultiPoint geometries.
virtual void stopFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called after the layer has been rendered for a particular feature.
virtual void setOutputUnit(QgsUnitTypes::RenderUnit unit)
Sets the units to use for sizes and widths within the symbol layer.
A line symbol type, for rendering LineString and MultiLineString geometries.
Struct for storing maximum and minimum scales for measurements in map units.
Qgis::SymbolType symbolType() const
Access the symbol type.
void setUnits(QgsUnitTypes::RenderUnit units)
Sets the units for the geometry expression.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const
Returns the set of attributes referenced by the layer.
virtual QgsUnitTypes::RenderUnit outputUnit() const
Returns the units to use for sizes and widths within the symbol layer.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
A geometry is the spatial representation of a feature.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
virtual void stopRender(QgsSymbolRenderContext &context)=0
Called after a set of rendering operations has finished on the supplied render context.
virtual QString layerType() const =0
Returns a string that represents this layer type.
virtual QColor color() const
Returns the "representative" color of the symbol layer.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
virtual void startRender(QgsSymbolRenderContext &context)=0
Called before a set of rendering operations commences on the supplied render context.
@ RenderMapUnits
Map units.