QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
#include <qgssymbollayer.h>
Public Member Functions | |
virtual | ~QgsSymbolLayer () |
virtual bool | canCauseArtifactsBetweenAdjacentTiles () const |
Returns true if the symbol layer rendering can cause visible artifacts across a single feature when the feature is rendered as a series of adjacent map tiles each containing a portion of the feature's geometry. | |
virtual QgsSymbolLayer * | clone () const =0 |
Shall be reimplemented by subclasses to create a deep copy of the instance. | |
virtual QColor | color () const |
Returns the "representative" color of the symbol layer. | |
QgsPropertyCollection & | dataDefinedProperties () |
Returns a reference to the symbol layer's property collection, used for data defined overrides. | |
const QgsPropertyCollection & | dataDefinedProperties () const |
Returns a reference to the symbol layer's property collection, used for data defined overrides. | |
virtual void | drawPreviewIcon (QgsSymbolRenderContext &context, QSize size)=0 |
virtual double | dxfAngle (QgsSymbolRenderContext &context) const |
Gets angle. | |
virtual QColor | dxfBrushColor (QgsSymbolRenderContext &context) const |
Gets brush/fill color. | |
virtual Qt::BrushStyle | dxfBrushStyle () const |
Gets brush/fill style. | |
virtual QColor | dxfColor (QgsSymbolRenderContext &context) const |
Gets color. | |
virtual QVector< qreal > | dxfCustomDashPattern (Qgis::RenderUnit &unit) const |
Gets dash pattern. | |
virtual double | dxfOffset (const QgsDxfExport &e, QgsSymbolRenderContext &context) const |
Gets offset. | |
virtual Qt::PenStyle | dxfPenStyle () const |
Gets pen style. | |
virtual double | dxfSize (const QgsDxfExport &e, QgsSymbolRenderContext &context) const |
Gets marker size. | |
virtual double | dxfWidth (const QgsDxfExport &e, QgsSymbolRenderContext &context) const |
Gets line width. | |
bool | enabled () const |
Returns true if symbol layer is enabled and will be drawn. | |
virtual double | estimateMaxBleed (const QgsRenderContext &context) const |
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when drawn in the specified /a context. | |
virtual QColor | fillColor () const |
Returns the fill color for the symbol layer. | |
virtual Qgis::SymbolLayerFlags | flags () const |
Returns flags which control the symbol layer's behavior. | |
virtual bool | hasDataDefinedProperties () const |
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties. | |
QString | id () const |
Returns symbol layer identifier This id is unique in the whole project. | |
bool | installMasks (QgsRenderContext &context, bool recursive, const QRectF &rect=QRectF()) |
When rendering, install masks on context painter. | |
virtual bool | isCompatibleWithSymbol (QgsSymbol *symbol) const |
Returns if the layer can be used below the specified symbol. | |
bool | isLocked () const |
Returns true if the symbol layer colors are locked and the layer will ignore any symbol-level color changes. | |
virtual QString | layerType () const =0 |
Returns a string that represents this layer type. | |
virtual QgsMapUnitScale | mapUnitScale () const |
virtual QList< QgsSymbolLayerReference > | masks () const |
Returns masks defined by this symbol layer. | |
virtual QString | ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const |
QgsSymbolLayer & | operator= (const QgsSymbolLayer &other)=delete |
virtual Qgis::RenderUnit | outputUnit () const |
Returns the units to use for sizes and widths within the symbol layer. | |
QgsPaintEffect * | paintEffect () const |
Returns the current paint effect for the layer. | |
virtual void | prepareExpressions (const QgsSymbolRenderContext &context) |
Prepares all data defined property expressions for evaluation. | |
virtual void | prepareMasks (const QgsSymbolRenderContext &context) |
Prepares all mask internal objects according to what is defined in context This should be called prior to calling startRender() method. | |
virtual QVariantMap | properties () const =0 |
Should be reimplemented by subclasses to return a string map that contains the configuration information for the symbol layer. | |
int | renderingPass () const |
Specifies the rendering pass in which this symbol layer should be rendered. | |
virtual void | setColor (const QColor &color) |
Sets the "representative" color for the symbol layer. | |
void | setDataDefinedProperties (const QgsPropertyCollection &collection) |
Sets the symbol layer's property collection, used for data defined overrides. | |
virtual void | setDataDefinedProperty (Property key, const QgsProperty &property) |
Sets a data defined property for the layer. | |
void | setEnabled (bool enabled) |
Sets whether symbol layer is enabled and should be drawn. | |
virtual void | setFillColor (const QColor &color) |
Sets the fill color for the symbol layer. | |
void | setId (const QString &id) |
Set symbol layer identifier This id has to be unique in the whole project. | |
void | setLocked (bool locked) |
Sets whether the layer's colors are locked. | |
virtual void | setMapUnitScale (const QgsMapUnitScale &scale) |
virtual void | setOutputUnit (Qgis::RenderUnit unit) |
Sets the units to use for sizes and widths within the symbol layer. | |
void | setPaintEffect (QgsPaintEffect *effect) |
Sets the current paint effect for the layer. | |
void | setRenderingPass (int renderingPass) |
Specifies the rendering pass in which this symbol layer should be rendered. | |
virtual void | setStrokeColor (const QColor &color) |
Sets the stroke color for the symbol layer. | |
virtual bool | setSubSymbol (QgsSymbol *symbol) |
Sets layer's subsymbol. takes ownership of the passed symbol. | |
void | setUserFlags (Qgis::SymbolLayerUserFlags flags) |
Sets user-controlled flags which control the symbol layer's behavior. | |
virtual void | startFeatureRender (const QgsFeature &feature, QgsRenderContext &context) |
Called before the layer will be rendered for a particular feature. | |
virtual void | startRender (QgsSymbolRenderContext &context)=0 |
Called before a set of rendering operations commences on the supplied render context. | |
virtual void | stopFeatureRender (const QgsFeature &feature, QgsRenderContext &context) |
Called after the layer has been rendered for a particular feature. | |
virtual void | stopRender (QgsSymbolRenderContext &context)=0 |
Called after a set of rendering operations has finished on the supplied render context. | |
virtual QColor | strokeColor () const |
Returns the stroke color for the symbol layer. | |
virtual QgsSymbol * | subSymbol () |
Returns the symbol's sub symbol, if present. | |
virtual void | toSld (QDomDocument &doc, QDomElement &element, const QVariantMap &props) const |
Saves the symbol layer as SLD. | |
Qgis::SymbolType | type () const |
virtual QSet< QString > | usedAttributes (const QgsRenderContext &context) const |
Returns the set of attributes referenced by the layer. | |
Qgis::SymbolLayerUserFlags | userFlags () const |
Returns user-controlled flags which control the symbol layer's behavior. | |
virtual bool | usesMapUnits () const |
Returns true if the symbol layer has any components which use map unit based sizes. | |
virtual bool | writeDxf (QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift=QPointF(0.0, 0.0)) const |
write as DXF | |
Static Public Member Functions | |
static const QgsPropertiesDefinition & | propertyDefinitions () |
Returns the symbol layer property definitions. | |
Protected Member Functions | |
QgsSymbolLayer (const QgsSymbolLayer &other) | |
QgsSymbolLayer (Qgis::SymbolType type, bool locked=false) | |
Constructor for QgsSymbolLayer. | |
void | copyDataDefinedProperties (QgsSymbolLayer *destLayer) const |
Copies all data defined properties of this layer to another symbol layer. | |
void | copyPaintEffect (QgsSymbolLayer *destLayer) const |
Copies paint effect of this layer to another symbol layer. | |
void | removeMasks (QgsRenderContext &context, bool recursive) |
When rendering, remove previously installed masks from context painter if recursive is true masks are removed recursively for all children symbol layers. | |
void | restoreOldDataDefinedProperties (const QVariantMap &stringMap) |
Restores older data defined properties from string map. | |
bool | shouldRenderUsingSelectionColor (const QgsSymbolRenderContext &context) const |
Returns true if the symbol layer should be rendered using the selection color from the render context. | |
Protected Attributes | |
QPainterPath | mClipPath |
QColor | mColor |
QgsPropertyCollection | mDataDefinedProperties |
bool | mEnabled = true |
True if layer is enabled and should be drawn. | |
QgsFields | mFields |
QString | mId |
bool | mLocked = false |
std::unique_ptr< QgsPaintEffect > | mPaintEffect |
int | mRenderingPass = 0 |
Qgis::SymbolType | mType |
Qgis::SymbolLayerUserFlags | mUserFlags |
User controlled flags. | |
Static Protected Attributes | |
static const bool | SELECT_FILL_BORDER = false |
Whether fill styles for selected features also highlight symbol stroke. | |
static const bool | SELECT_FILL_STYLE = false |
Whether fill styles for selected features uses symbol layer style. | |
static const bool | SELECTION_IS_OPAQUE = true |
Whether styles for selected features ignore symbol alpha. | |
Definition at line 54 of file qgssymbollayer.h.
|
strong |
Data definable properties.
Definition at line 145 of file qgssymbollayer.h.
|
virtualdefault |
|
protected |
Definition at line 234 of file qgssymbollayer.cpp.
|
protected |
Constructor for QgsSymbolLayer.
type | specifies the associated symbol type |
locked | if true , then symbol layer colors will be locked and will ignore any symbol-level color changes. |
Definition at line 249 of file qgssymbollayer.cpp.
|
virtual |
Returns true
if the symbol layer rendering can cause visible artifacts across a single feature when the feature is rendered as a series of adjacent map tiles each containing a portion of the feature's geometry.
The default implementation returns false
.
Reimplemented in QgsArrowSymbolLayer, QgsGradientFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsSimpleLineSymbolLayer, and QgsTemplatedLineSymbolLayerBase.
Definition at line 332 of file qgssymbollayer.cpp.
|
pure virtual |
Shall be reimplemented by subclasses to create a deep copy of the instance.
Implemented in QgsArrowSymbolLayer, QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsGradientFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsRasterFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsLinearReferencingSymbolLayer, QgsSimpleLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsHashedLineSymbolLayer, QgsRasterLineSymbolLayer, QgsLineburstSymbolLayer, QgsFilledLineSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsFontMarkerSymbolLayer, QgsAnimatedMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, and QgsVectorFieldSymbolLayer.
|
virtual |
Returns the "representative" color of the symbol layer.
Depending on the symbol layer type, this will have different meaning. For instance, a line symbol layer will generally return the stroke color of the layer, while a fill symbol layer will return the "fill" color instead of stroke.
Some symbol layer types will return an invalid QColor if they have no representative color associated (e.g. raster image based symbol layers).
Reimplemented in QgsArrowSymbolLayer, QgsRasterFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsHashedLineSymbolLayer, QgsRasterLineSymbolLayer, QgsFilledLineSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, and QgsVectorFieldSymbolLayer.
Definition at line 271 of file qgssymbollayer.cpp.
|
protected |
Copies all data defined properties of this layer to another symbol layer.
destLayer | destination layer |
Definition at line 507 of file qgssymbollayer.cpp.
|
protected |
Copies paint effect of this layer to another symbol layer.
destLayer | destination layer |
Definition at line 515 of file qgssymbollayer.cpp.
|
inline |
Returns a reference to the symbol layer's property collection, used for data defined overrides.
Definition at line 604 of file qgssymbollayer.h.
|
inline |
Returns a reference to the symbol layer's property collection, used for data defined overrides.
Definition at line 610 of file qgssymbollayer.h.
|
pure virtual |
|
virtual |
Gets angle.
Reimplemented in QgsSimpleFillSymbolLayer, and QgsMarkerSymbolLayer.
Definition at line 193 of file qgssymbollayer.cpp.
|
virtual |
Gets brush/fill color.
Reimplemented in QgsSimpleFillSymbolLayer.
Definition at line 210 of file qgssymbollayer.cpp.
|
virtual |
Gets brush/fill style.
Reimplemented in QgsSimpleFillSymbolLayer.
Definition at line 216 of file qgssymbollayer.cpp.
|
virtual |
Gets color.
Reimplemented in QgsSimpleFillSymbolLayer, QgsSVGFillSymbolLayer, and QgsSimpleLineSymbolLayer.
Definition at line 187 of file qgssymbollayer.cpp.
|
virtual |
Gets dash pattern.
Reimplemented in QgsSimpleLineSymbolLayer.
Definition at line 199 of file qgssymbollayer.cpp.
|
virtual |
Gets offset.
Reimplemented in QgsSimpleLineSymbolLayer.
Definition at line 180 of file qgssymbollayer.cpp.
|
virtual |
Gets pen style.
Reimplemented in QgsSimpleFillSymbolLayer, QgsImageFillSymbolLayer, and QgsSimpleLineSymbolLayer.
Definition at line 205 of file qgssymbollayer.cpp.
|
virtual |
Gets marker size.
Reimplemented in QgsMarkerSymbolLayer.
Definition at line 173 of file qgssymbollayer.cpp.
|
virtual |
Gets line width.
Reimplemented in QgsSimpleFillSymbolLayer, QgsImageFillSymbolLayer, QgsSimpleLineSymbolLayer, and QgsLineSymbolLayer.
Definition at line 166 of file qgssymbollayer.cpp.
|
inline |
Returns true
if symbol layer is enabled and will be drawn.
Definition at line 242 of file qgssymbollayer.h.
|
inlinevirtual |
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape when drawn in the specified /a context.
For example, polygons drawn with an stroke will draw half the width of the stroke outside of the polygon. This amount is estimated, since it may be affected by data defined symbology rules.
Reimplemented in QgsSimpleFillSymbolLayer, QgsGradientFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsRasterFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsSimpleLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsHashedLineSymbolLayer, QgsRasterLineSymbolLayer, QgsLineburstSymbolLayer, QgsFilledLineSymbolLayer, and QgsFilledMarkerSymbolLayer.
Definition at line 486 of file qgssymbollayer.h.
|
virtual |
Returns the fill color for the symbol layer.
This property is not supported by all symbol layer types, only those with a fill component. Symbol layers without a fill component will return an invalid QColor.
Reimplemented in QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsSimpleMarkerSymbolLayer, and QgsSvgMarkerSymbolLayer.
Definition at line 295 of file qgssymbollayer.cpp.
|
virtual |
Returns flags which control the symbol layer's behavior.
Reimplemented in QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsGradientFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsRasterFillSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsLinearReferencingSymbolLayer, QgsSimpleLineSymbolLayer, QgsRasterLineSymbolLayer, QgsLineburstSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, and QgsFontMarkerSymbolLayer.
Definition at line 256 of file qgssymbollayer.cpp.
|
virtual |
Returns true
if the symbol layer (or any of its sub-symbols) contains data defined properties.
Reimplemented in QgsArrowSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsMarkerLineSymbolLayer, QgsHashedLineSymbolLayer, QgsFilledLineSymbolLayer, QgsFilledMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, and QgsVectorFieldSymbolLayer.
Definition at line 311 of file qgssymbollayer.cpp.
QString QgsSymbolLayer::id | ( | ) | const |
Returns symbol layer identifier This id is unique in the whole project.
Definition at line 1099 of file qgssymbollayer.cpp.
bool QgsSymbolLayer::installMasks | ( | QgsRenderContext & | context, |
bool | recursive, | ||
const QRectF & | rect = QRectF() |
||
) |
When rendering, install masks on context painter.
If recursive is true
masks are installed recursively for all children symbol layers.
Since QGIS 3.38 the rect argument can be used to specify a target bounds (in painter coordinates) for mask geometries. Only mask geometries which intersect rect
will be installed.
true
if any masks were installed (since QGIS 3.38)Definition at line 1043 of file qgssymbollayer.cpp.
|
virtual |
Returns if the layer can be used below the specified symbol.
Reimplemented in QgsGeometryGeneratorSymbolLayer.
Definition at line 324 of file qgssymbollayer.cpp.
|
inline |
Returns true
if the symbol layer colors are locked and the layer will ignore any symbol-level color changes.
Definition at line 477 of file qgssymbollayer.h.
|
pure virtual |
Returns a string that represents this layer type.
Used for serialization. Should match with the string used to register this symbol layer in the registry.
Implemented in QgsArrowSymbolLayer, QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsGradientFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsRasterFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsLinearReferencingSymbolLayer, QgsSimpleLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsHashedLineSymbolLayer, QgsRasterLineSymbolLayer, QgsLineburstSymbolLayer, QgsFilledLineSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsFontMarkerSymbolLayer, QgsAnimatedMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, and QgsVectorFieldSymbolLayer.
|
inlinevirtual |
Reimplemented in QgsTemplatedLineSymbolLayerBase, QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsGradientFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsImageFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsSimpleLineSymbolLayer, QgsRasterLineSymbolLayer, QgsLineburstSymbolLayer, QgsFilledLineSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsMarkerSymbolLayer, QgsLineSymbolLayer, and QgsVectorFieldSymbolLayer.
Definition at line 516 of file qgssymbollayer.h.
|
virtual |
Returns masks defined by this symbol layer.
This is a list of symbol layers of other layers that should be occluded.
Reimplemented in QgsMaskMarkerSymbolLayer.
Definition at line 951 of file qgssymbollayer.cpp.
|
inlinevirtual |
Reimplemented in QgsSimpleFillSymbolLayer, QgsSimpleLineSymbolLayer, and QgsSimpleMarkerSymbolLayer.
Definition at line 429 of file qgssymbollayer.h.
|
delete |
|
inlinevirtual |
Returns the units to use for sizes and widths within the symbol layer.
Individual symbol layer subclasses will interpret this in different ways, e.g., a marker symbol layer may use it to specify the units for the marker size, while a line symbol layer may use it to specify the units for the line width.
Reimplemented in QgsTemplatedLineSymbolLayerBase, QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsGradientFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsImageFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsSimpleLineSymbolLayer, QgsRasterLineSymbolLayer, QgsLineburstSymbolLayer, QgsFilledLineSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsMarkerSymbolLayer, QgsLineSymbolLayer, and QgsVectorFieldSymbolLayer.
Definition at line 506 of file qgssymbollayer.h.
QgsPaintEffect * QgsSymbolLayer::paintEffect | ( | ) | const |
Returns the current paint effect for the layer.
Definition at line 221 of file qgssymbollayer.cpp.
|
virtual |
Prepares all data defined property expressions for evaluation.
This should be called prior to evaluating data defined properties.
context | symbol render context |
Reimplemented in QgsSvgMarkerSymbolLayer.
Definition at line 300 of file qgssymbollayer.cpp.
|
virtual |
Prepares all mask internal objects according to what is defined in context This should be called prior to calling startRender() method.
Definition at line 1035 of file qgssymbollayer.cpp.
|
pure virtual |
Should be reimplemented by subclasses to return a string map that contains the configuration information for the symbol layer.
This is used to serialize a symbol layer perstistently.
Implemented in QgsArrowSymbolLayer, QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsGradientFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsImageFillSymbolLayer, QgsRasterFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsLinearReferencingSymbolLayer, QgsSimpleLineSymbolLayer, QgsTemplatedLineSymbolLayerBase, QgsHashedLineSymbolLayer, QgsRasterLineSymbolLayer, QgsLineburstSymbolLayer, QgsFilledLineSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsFontMarkerSymbolLayer, QgsAnimatedMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, and QgsVectorFieldSymbolLayer.
|
static |
Returns the symbol layer property definitions.
Definition at line 316 of file qgssymbollayer.cpp.
|
protected |
When rendering, remove previously installed masks from context painter if recursive is true
masks are removed recursively for all children symbol layers.
Definition at line 1074 of file qgssymbollayer.cpp.
int QgsSymbolLayer::renderingPass | ( | ) | const |
Specifies the rendering pass in which this symbol layer should be rendered.
The lower the number, the lower the symbol will be rendered. 0: first pass, 1: second pass, ... Defaults to 0
Definition at line 347 of file qgssymbollayer.cpp.
|
protected |
Restores older data defined properties from string map.
Definition at line 386 of file qgssymbollayer.cpp.
|
virtual |
Sets the "representative" color for the symbol layer.
Depending on the symbol layer type, this will have different meaning. For instance, a line symbol layer will generally set the stroke color of the layer, while a fill symbol layer will set the "fill" color instead of stroke.
Reimplemented in QgsArrowSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsFilledLineSymbolLayer, QgsFilledMarkerSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsMarkerLineSymbolLayer, QgsHashedLineSymbolLayer, QgsSimpleMarkerSymbolLayer, and QgsVectorFieldSymbolLayer.
Definition at line 276 of file qgssymbollayer.cpp.
|
inline |
Sets the symbol layer's property collection, used for data defined overrides.
collection | property collection. Existing properties will be replaced. |
Definition at line 617 of file qgssymbollayer.h.
|
virtual |
Sets a data defined property for the layer.
Any existing property with the same key will be overwritten.
Reimplemented in QgsMarkerLineSymbolLayer, and QgsHashedLineSymbolLayer.
Definition at line 124 of file qgssymbollayer.cpp.
|
inline |
Sets whether symbol layer is enabled and should be drawn.
Disabled layers are not drawn, but remain part of the symbol and can be re-enabled when desired.
Definition at line 250 of file qgssymbollayer.h.
|
virtual |
Sets the fill color for the symbol layer.
This property is not supported by all symbol layer types, only those with a fill component.
Reimplemented in QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsSimpleMarkerSymbolLayer, and QgsSvgMarkerSymbolLayer.
Definition at line 291 of file qgssymbollayer.cpp.
void QgsSymbolLayer::setId | ( | const QString & | id | ) |
Set symbol layer identifier This id has to be unique in the whole project.
Definition at line 1094 of file qgssymbollayer.cpp.
|
inline |
Sets whether the layer's colors are locked.
If locked is true
then the symbol layer colors are locked and the layer will ignore any symbol-level color changes.
Definition at line 470 of file qgssymbollayer.h.
|
inlinevirtual |
Reimplemented in QgsTemplatedLineSymbolLayerBase, QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsGradientFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsImageFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsSimpleLineSymbolLayer, QgsRasterLineSymbolLayer, QgsLineburstSymbolLayer, QgsFilledLineSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsMarkerSymbolLayer, QgsLineSymbolLayer, and QgsVectorFieldSymbolLayer.
Definition at line 515 of file qgssymbollayer.h.
|
inlinevirtual |
Sets the units to use for sizes and widths within the symbol layer.
Individual symbol layer subclasses will interpret this in different ways, e.g., a marker symbol layer may use it to specify the units for the marker size, while a line symbol layer may use it to specify the units for the line width.
unit | output units |
Reimplemented in QgsArrowSymbolLayer, QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsGradientFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsImageFillSymbolLayer, QgsRasterFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsSimpleLineSymbolLayer, QgsTemplatedLineSymbolLayerBase, QgsMarkerLineSymbolLayer, QgsHashedLineSymbolLayer, QgsRasterLineSymbolLayer, QgsLineburstSymbolLayer, QgsFilledLineSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsFontMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, QgsMarkerSymbolLayer, QgsLineSymbolLayer, and QgsVectorFieldSymbolLayer.
Definition at line 496 of file qgssymbollayer.h.
void QgsSymbolLayer::setPaintEffect | ( | QgsPaintEffect * | effect | ) |
Sets the current paint effect for the layer.
effect | paint effect. Ownership is transferred to the layer. |
Definition at line 226 of file qgssymbollayer.cpp.
void QgsSymbolLayer::setRenderingPass | ( | int | renderingPass | ) |
Specifies the rendering pass in which this symbol layer should be rendered.
The lower the number, the lower the symbol will be rendered. 0: first pass, 1: second pass, ... Defaults to 0
Definition at line 342 of file qgssymbollayer.cpp.
|
virtual |
Sets the stroke color for the symbol layer.
This property is not supported by all symbol layer types, only those with a stroke component.
Reimplemented in QgsEllipseSymbolLayer, QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsFontMarkerSymbolLayer, and QgsSimpleFillSymbolLayer.
Definition at line 281 of file qgssymbollayer.cpp.
|
virtual |
Sets layer's subsymbol. takes ownership of the passed symbol.
Reimplemented in QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsArrowSymbolLayer, QgsRasterFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsLinearReferencingSymbolLayer, QgsMarkerLineSymbolLayer, QgsHashedLineSymbolLayer, QgsFilledLineSymbolLayer, QgsFilledMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, and QgsVectorFieldSymbolLayer.
Definition at line 150 of file qgssymbollayer.cpp.
void QgsSymbolLayer::setUserFlags | ( | Qgis::SymbolLayerUserFlags | flags | ) |
Sets user-controlled flags which control the symbol layer's behavior.
Definition at line 266 of file qgssymbollayer.cpp.
|
protected |
Returns true
if the symbol layer should be rendered using the selection color from the render context.
Definition at line 1089 of file qgssymbollayer.cpp.
|
virtual |
Called before the layer will be rendered for a particular feature.
This is always followed by a call to stopFeatureRender() after the feature has been completely rendered (i.e. all parts have been rendered).
The default implementation does nothing.
Reimplemented in QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsInterpolatedLineSymbolLayer, and QgsTemplatedLineSymbolLayerBase.
Definition at line 129 of file qgssymbollayer.cpp.
|
pure virtual |
Called before a set of rendering operations commences on the supplied render context.
This is always followed by a call to stopRender() after all rendering operations have been completed.
Subclasses can use this method to prepare for a set of rendering operations, e.g. by pre-evaluating paths or images to render, and performing other one-time optimisations.
Implemented in QgsArrowSymbolLayer, QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsGradientFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsRasterFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsLinearReferencingSymbolLayer, QgsSimpleLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsHashedLineSymbolLayer, QgsRasterLineSymbolLayer, QgsLineburstSymbolLayer, QgsFilledLineSymbolLayer, QgsSimpleMarkerSymbolLayerBase, QgsSimpleMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsFontMarkerSymbolLayer, QgsAnimatedMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, QgsMarkerSymbolLayer, and QgsVectorFieldSymbolLayer.
|
virtual |
Called after the layer has been rendered for a particular feature.
This is always preceded by a call to startFeatureRender() just before the feature will be rendered.
The default implementation does nothing.
Reimplemented in QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsInterpolatedLineSymbolLayer, and QgsTemplatedLineSymbolLayerBase.
Definition at line 137 of file qgssymbollayer.cpp.
|
pure virtual |
Called after a set of rendering operations has finished on the supplied render context.
This is always preceded by a call to startRender() before all rendering operations are commenced.
Subclasses can use this method to cleanup after a set of rendering operations.
Implemented in QgsArrowSymbolLayer, QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsGradientFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsRasterFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsLinearReferencingSymbolLayer, QgsSimpleLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsHashedLineSymbolLayer, QgsRasterLineSymbolLayer, QgsLineburstSymbolLayer, QgsFilledLineSymbolLayer, QgsSimpleMarkerSymbolLayerBase, QgsFilledMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsFontMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, QgsMarkerSymbolLayer, and QgsVectorFieldSymbolLayer.
|
virtual |
Returns the stroke color for the symbol layer.
This property is not supported by all symbol layer types, only those with a stroke component. Symbol layers without a stroke component will return an invalid QColor.
Reimplemented in QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, and QgsFontMarkerSymbolLayer.
Definition at line 286 of file qgssymbollayer.cpp.
|
virtual |
Returns the symbol's sub symbol, if present.
Reimplemented in QgsArrowSymbolLayer, QgsRasterFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsLinearReferencingSymbolLayer, QgsMarkerLineSymbolLayer, QgsHashedLineSymbolLayer, QgsFilledLineSymbolLayer, QgsFilledMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, and QgsVectorFieldSymbolLayer.
Definition at line 145 of file qgssymbollayer.cpp.
|
inlinevirtual |
Saves the symbol layer as SLD.
Reimplemented in QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsSimpleLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsMarkerSymbolLayer, and QgsVectorFieldSymbolLayer.
Definition at line 426 of file qgssymbollayer.h.
|
inline |
Definition at line 448 of file qgssymbollayer.h.
|
virtual |
Returns the set of attributes referenced by the layer.
This includes attributes required by any data defined properties associated with the layer.
Reimplemented in QgsArrowSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsMarkerLineSymbolLayer, QgsHashedLineSymbolLayer, QgsFilledLineSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, and QgsVectorFieldSymbolLayer.
Definition at line 352 of file qgssymbollayer.cpp.
Qgis::SymbolLayerUserFlags QgsSymbolLayer::userFlags | ( | ) | const |
Returns user-controlled flags which control the symbol layer's behavior.
Definition at line 261 of file qgssymbollayer.cpp.
|
virtual |
Returns true
if the symbol layer has any components which use map unit based sizes.
Reimplemented in QgsArrowSymbolLayer, QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsGradientFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsRasterFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsCentroidFillSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsSimpleLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsHashedLineSymbolLayer, QgsRasterLineSymbolLayer, QgsLineburstSymbolLayer, QgsFilledLineSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsFontMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, and QgsVectorFieldSymbolLayer.
Definition at line 337 of file qgssymbollayer.cpp.
|
virtual |
write as DXF
Reimplemented in QgsEllipseSymbolLayer, QgsSimpleMarkerSymbolLayer, and QgsSvgMarkerSymbolLayer.
Definition at line 156 of file qgssymbollayer.cpp.
|
protected |
Definition at line 701 of file qgssymbollayer.h.
|
protected |
Definition at line 692 of file qgssymbollayer.h.
|
protected |
Definition at line 695 of file qgssymbollayer.h.
|
protected |
True if layer is enabled and should be drawn.
Definition at line 686 of file qgssymbollayer.h.
|
protected |
Definition at line 698 of file qgssymbollayer.h.
|
protected |
Definition at line 694 of file qgssymbollayer.h.
|
protected |
Definition at line 691 of file qgssymbollayer.h.
|
protected |
Definition at line 697 of file qgssymbollayer.h.
|
protected |
Definition at line 693 of file qgssymbollayer.h.
|
protected |
Definition at line 683 of file qgssymbollayer.h.
|
protected |
User controlled flags.
Definition at line 689 of file qgssymbollayer.h.
|
staticprotected |
Whether fill styles for selected features also highlight symbol stroke.
Definition at line 707 of file qgssymbollayer.h.
|
staticprotected |
Whether fill styles for selected features uses symbol layer style.
Definition at line 709 of file qgssymbollayer.h.
|
staticprotected |
Whether styles for selected features ignore symbol alpha.
Definition at line 705 of file qgssymbollayer.h.