QGIS API Documentation
3.24.2-Tisler (13c1a02865)
|
#include <qgssymbollayer.h>
Public Member Functions | |
QgsSymbolLayer (const QgsSymbolLayer &other)=delete | |
QgsSymbolLayer cannot be copied. More... | |
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. More... | |
virtual QgsSymbolLayer * | clone () const =0 |
Shall be reimplemented by subclasses to create a deep copy of the instance. More... | |
virtual QColor | color () const |
Returns the "representative" color of the symbol layer. More... | |
QgsPropertyCollection & | dataDefinedProperties () |
Returns a reference to the symbol layer's property collection, used for data defined overrides. More... | |
const QgsPropertyCollection & | dataDefinedProperties () const |
Returns a reference to the symbol layer's property collection, used for data defined overrides. More... | |
virtual void | drawPreviewIcon (QgsSymbolRenderContext &context, QSize size)=0 |
virtual double | dxfAngle (QgsSymbolRenderContext &context) const |
Gets angle. More... | |
virtual QColor | dxfBrushColor (QgsSymbolRenderContext &context) const |
Gets brush/fill color. More... | |
virtual Qt::BrushStyle | dxfBrushStyle () const |
Gets brush/fill style. More... | |
virtual QColor | dxfColor (QgsSymbolRenderContext &context) const |
Gets color. More... | |
virtual QVector< qreal > | dxfCustomDashPattern (QgsUnitTypes::RenderUnit &unit) const |
Gets dash pattern. More... | |
virtual double | dxfOffset (const QgsDxfExport &e, QgsSymbolRenderContext &context) const |
Gets offset. More... | |
virtual Qt::PenStyle | dxfPenStyle () const |
Gets pen style. More... | |
virtual double | dxfWidth (const QgsDxfExport &e, QgsSymbolRenderContext &context) const |
Gets line width. More... | |
bool | enabled () const |
Returns true if symbol layer is enabled and will be drawn. More... | |
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. More... | |
virtual QColor | fillColor () const |
Returns the fill color for the symbol layer. More... | |
virtual Qgis::SymbolLayerFlags | flags () const |
Returns flags which control the symbol layer's behavior. More... | |
virtual bool | hasDataDefinedProperties () const |
Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties. More... | |
virtual bool | isCompatibleWithSymbol (QgsSymbol *symbol) const |
Returns if the layer can be used below the specified symbol. More... | |
bool | isLocked () const |
Returns true if the symbol layer colors are locked and the layer will ignore any symbol-level color changes. More... | |
virtual QString | layerType () const =0 |
Returns a string that represents this layer type. More... | |
virtual QgsMapUnitScale | mapUnitScale () const |
virtual QList< QgsSymbolLayerReference > | masks () const |
Returns masks defined by this symbol layer. More... | |
virtual QString | ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const |
QgsSymbolLayer & | operator= (const QgsSymbolLayer &other)=delete |
QgsSymbolLayer cannot be copied. More... | |
virtual QgsUnitTypes::RenderUnit | outputUnit () const |
Returns the units to use for sizes and widths within the symbol layer. More... | |
QgsPaintEffect * | paintEffect () const |
Returns the current paint effect for the layer. More... | |
virtual void | prepareExpressions (const QgsSymbolRenderContext &context) |
Prepares all data defined property expressions for evaluation. More... | |
virtual QVariantMap | properties () const =0 |
Should be reimplemented by subclasses to return a string map that contains the configuration information for the symbol layer. More... | |
int | renderingPass () const |
Specifies the rendering pass in which this symbol layer should be rendered. More... | |
virtual void | setColor (const QColor &color) |
Sets the "representative" color for the symbol layer. More... | |
void | setDataDefinedProperties (const QgsPropertyCollection &collection) |
Sets the symbol layer's property collection, used for data defined overrides. More... | |
virtual void | setDataDefinedProperty (Property key, const QgsProperty &property) |
Sets a data defined property for the layer. More... | |
void | setEnabled (bool enabled) |
Sets whether symbol layer is enabled and should be drawn. More... | |
virtual void | setFillColor (const QColor &color) |
Sets the fill color for the symbol layer. More... | |
void | setLocked (bool locked) |
Sets whether the layer's colors are locked. More... | |
virtual void | setMapUnitScale (const QgsMapUnitScale &scale) |
virtual void | setOutputUnit (QgsUnitTypes::RenderUnit unit) |
Sets the units to use for sizes and widths within the symbol layer. More... | |
void | setPaintEffect (QgsPaintEffect *effect) |
Sets the current paint effect for the layer. More... | |
void | setRenderingPass (int renderingPass) |
Specifies the rendering pass in which this symbol layer should be rendered. More... | |
virtual void | setStrokeColor (const QColor &color) |
Sets the stroke color for the symbol layer. More... | |
virtual bool | setSubSymbol (QgsSymbol *symbol) |
Sets layer's subsymbol. takes ownership of the passed symbol. More... | |
virtual void | startFeatureRender (const QgsFeature &feature, QgsRenderContext &context) |
Called before the layer will be rendered for a particular feature. More... | |
virtual void | startRender (QgsSymbolRenderContext &context)=0 |
Called before a set of rendering operations commences on the supplied render context. More... | |
virtual void | stopFeatureRender (const QgsFeature &feature, QgsRenderContext &context) |
Called after the layer has been rendered for a particular feature. More... | |
virtual void | stopRender (QgsSymbolRenderContext &context)=0 |
Called after a set of rendering operations has finished on the supplied render context. More... | |
virtual QColor | strokeColor () const |
Returns the stroke color for the symbol layer. More... | |
virtual QgsSymbol * | subSymbol () |
Returns the symbol's sub symbol, if present. More... | |
virtual void | toSld (QDomDocument &doc, QDomElement &element, const QVariantMap &props) const |
Saves the symbol layer as SLD. More... | |
Qgis::SymbolType | type () const |
virtual QSet< QString > | usedAttributes (const QgsRenderContext &context) const |
Returns the set of attributes referenced by the layer. More... | |
virtual bool | usesMapUnits () const |
Returns true if the symbol layer has any components which use map unit based sizes. More... | |
virtual bool | writeDxf (QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift=QPointF(0.0, 0.0)) const |
write as DXF More... | |
Static Public Member Functions | |
static const QgsPropertiesDefinition & | propertyDefinitions () |
Returns the symbol layer property definitions. More... | |
Protected Member Functions | |
QgsSymbolLayer (Qgis::SymbolType type, bool locked=false) | |
Constructor for QgsSymbolLayer. More... | |
void | copyDataDefinedProperties (QgsSymbolLayer *destLayer) const |
Copies all data defined properties of this layer to another symbol layer. More... | |
void | copyPaintEffect (QgsSymbolLayer *destLayer) const |
Copies paint effect of this layer to another symbol layer. More... | |
void | restoreOldDataDefinedProperties (const QVariantMap &stringMap) |
Restores older data defined properties from string map. More... | |
Protected Attributes | |
QColor | mColor |
QgsPropertyCollection | mDataDefinedProperties |
bool | mEnabled = true |
True if layer is enabled and should be drawn. More... | |
QgsFields | mFields |
bool | mLocked = false |
std::unique_ptr< QgsPaintEffect > | mPaintEffect |
int | mRenderingPass = 0 |
Qgis::SymbolType | mType |
Static Protected Attributes | |
static const bool | SELECT_FILL_BORDER = false |
Whether fill styles for selected features also highlight symbol stroke. More... | |
static const bool | SELECT_FILL_STYLE = false |
Whether fill styles for selected features uses symbol layer style. More... | |
static const bool | SELECTION_IS_OPAQUE = true |
Whether styles for selected features ignore symbol alpha. More... | |
Definition at line 53 of file qgssymbollayer.h.
Data definable properties.
Definition at line 139 of file qgssymbollayer.h.
|
virtualdefault |
|
delete |
QgsSymbolLayer cannot be copied.
|
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 225 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 QgsTemplatedLineSymbolLayerBase, QgsSimpleLineSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsGradientFillSymbolLayer, and QgsArrowSymbolLayer.
Definition at line 297 of file qgssymbollayer.cpp.
|
pure virtual |
Shall be reimplemented by subclasses to create a deep copy of the instance.
Implemented in QgsVectorFieldSymbolLayer, QgsMaskMarkerSymbolLayer, QgsFontMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsLineburstSymbolLayer, QgsRasterLineSymbolLayer, QgsHashedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsSimpleLineSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsRasterFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsGradientFillSymbolLayer, QgsSimpleFillSymbolLayer, QgsEllipseSymbolLayer, and QgsArrowSymbolLayer.
|
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 QgsVectorFieldSymbolLayer, QgsMaskMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsLineburstSymbolLayer, QgsRasterLineSymbolLayer, QgsHashedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsRasterFillSymbolLayer, and QgsArrowSymbolLayer.
Definition at line 236 of file qgssymbollayer.cpp.
|
protected |
Copies all data defined properties of this layer to another symbol layer.
destLayer | destination layer |
Definition at line 472 of file qgssymbollayer.cpp.
|
protected |
Copies paint effect of this layer to another symbol layer.
destLayer | destination layer |
Definition at line 480 of file qgssymbollayer.cpp.
|
inline |
Returns a reference to the symbol layer's property collection, used for data defined overrides.
Definition at line 592 of file qgssymbollayer.h.
|
inline |
Returns a reference to the symbol layer's property collection, used for data defined overrides.
Definition at line 599 of file qgssymbollayer.h.
|
pure virtual |
|
virtual |
Gets angle.
Reimplemented in QgsSimpleFillSymbolLayer.
Definition at line 184 of file qgssymbollayer.cpp.
|
virtual |
Gets brush/fill color.
Reimplemented in QgsSimpleFillSymbolLayer.
Definition at line 201 of file qgssymbollayer.cpp.
|
virtual |
Gets brush/fill style.
Reimplemented in QgsSimpleFillSymbolLayer.
Definition at line 207 of file qgssymbollayer.cpp.
|
virtual |
Gets color.
Reimplemented in QgsSimpleLineSymbolLayer, QgsSVGFillSymbolLayer, and QgsSimpleFillSymbolLayer.
Definition at line 178 of file qgssymbollayer.cpp.
|
virtual |
Gets dash pattern.
Reimplemented in QgsSimpleLineSymbolLayer.
Definition at line 190 of file qgssymbollayer.cpp.
|
virtual |
Gets offset.
Reimplemented in QgsSimpleLineSymbolLayer.
Definition at line 171 of file qgssymbollayer.cpp.
|
virtual |
Gets pen style.
Reimplemented in QgsSimpleLineSymbolLayer, QgsImageFillSymbolLayer, and QgsSimpleFillSymbolLayer.
Definition at line 196 of file qgssymbollayer.cpp.
|
virtual |
Gets line width.
Reimplemented in QgsLineSymbolLayer, QgsSimpleLineSymbolLayer, QgsImageFillSymbolLayer, and QgsSimpleFillSymbolLayer.
Definition at line 164 of file qgssymbollayer.cpp.
|
inline |
Returns true
if symbol layer is enabled and will be drawn.
Definition at line 239 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 QgsFilledMarkerSymbolLayer, QgsLineburstSymbolLayer, QgsRasterLineSymbolLayer, QgsHashedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsSimpleLineSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsRasterFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsGradientFillSymbolLayer, and QgsSimpleFillSymbolLayer.
Definition at line 472 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 QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsSimpleFillSymbolLayer, and QgsEllipseSymbolLayer.
Definition at line 260 of file qgssymbollayer.cpp.
|
virtual |
Returns flags which control the symbol layer's behavior.
Reimplemented in QgsInterpolatedLineSymbolLayer.
Definition at line 231 of file qgssymbollayer.cpp.
|
virtual |
Returns true
if the symbol layer (or any of its sub-symbols) contains data defined properties.
Reimplemented in QgsVectorFieldSymbolLayer, QgsMaskMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsHashedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, and QgsArrowSymbolLayer.
Definition at line 276 of file qgssymbollayer.cpp.
|
virtual |
Returns if the layer can be used below the specified symbol.
Reimplemented in QgsInterpolatedLineSymbolLayer, and QgsGeometryGeneratorSymbolLayer.
Definition at line 289 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 463 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 QgsVectorFieldSymbolLayer, QgsMaskMarkerSymbolLayer, QgsFontMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsLineburstSymbolLayer, QgsRasterLineSymbolLayer, QgsHashedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsSimpleLineSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsRasterFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsGradientFillSymbolLayer, QgsSimpleFillSymbolLayer, QgsEllipseSymbolLayer, and QgsArrowSymbolLayer.
|
inlinevirtual |
Reimplemented in QgsVectorFieldSymbolLayer, QgsLineSymbolLayer, QgsMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsLineburstSymbolLayer, QgsRasterLineSymbolLayer, QgsSimpleLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsImageFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsGradientFillSymbolLayer, QgsSimpleFillSymbolLayer, QgsEllipseSymbolLayer, and QgsTemplatedLineSymbolLayerBase.
Definition at line 502 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 893 of file qgssymbollayer.cpp.
|
inlinevirtual |
Reimplemented in QgsSimpleMarkerSymbolLayer, QgsSimpleLineSymbolLayer, and QgsSimpleFillSymbolLayer.
Definition at line 415 of file qgssymbollayer.h.
|
delete |
QgsSymbolLayer cannot be copied.
|
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 QgsVectorFieldSymbolLayer, QgsLineSymbolLayer, QgsMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsLineburstSymbolLayer, QgsRasterLineSymbolLayer, QgsSimpleLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsImageFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsGradientFillSymbolLayer, QgsSimpleFillSymbolLayer, QgsEllipseSymbolLayer, and QgsTemplatedLineSymbolLayerBase.
Definition at line 492 of file qgssymbollayer.h.
QgsPaintEffect * QgsSymbolLayer::paintEffect | ( | ) | const |
Returns the current paint effect for the layer.
Definition at line 212 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 265 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 QgsVectorFieldSymbolLayer, QgsMaskMarkerSymbolLayer, QgsFontMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsLineburstSymbolLayer, QgsRasterLineSymbolLayer, QgsHashedLineSymbolLayer, QgsTemplatedLineSymbolLayerBase, QgsSimpleLineSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsRasterFillSymbolLayer, QgsImageFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsGradientFillSymbolLayer, QgsSimpleFillSymbolLayer, QgsEllipseSymbolLayer, and QgsArrowSymbolLayer.
|
static |
Returns the symbol layer property definitions.
Definition at line 281 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 312 of file qgssymbollayer.cpp.
|
protected |
Restores older data defined properties from string map.
Definition at line 351 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 QgsVectorFieldSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsHashedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsFilledMarkerSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, and QgsArrowSymbolLayer.
Definition at line 241 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 607 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 QgsHashedLineSymbolLayer, and QgsMarkerLineSymbolLayer.
Definition at line 126 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 248 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 QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsSimpleFillSymbolLayer, and QgsEllipseSymbolLayer.
Definition at line 256 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 456 of file qgssymbollayer.h.
|
inlinevirtual |
Reimplemented in QgsVectorFieldSymbolLayer, QgsLineSymbolLayer, QgsMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsLineburstSymbolLayer, QgsRasterLineSymbolLayer, QgsSimpleLineSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsImageFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsGradientFillSymbolLayer, QgsSimpleFillSymbolLayer, QgsEllipseSymbolLayer, and QgsTemplatedLineSymbolLayerBase.
Definition at line 501 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 QgsVectorFieldSymbolLayer, QgsLineSymbolLayer, QgsMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsLineburstSymbolLayer, QgsRasterLineSymbolLayer, QgsHashedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsSimpleLineSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsImageFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsGradientFillSymbolLayer, QgsSimpleFillSymbolLayer, and QgsEllipseSymbolLayer.
Definition at line 482 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 217 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 307 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 QgsSimpleFillSymbolLayer, QgsFontMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, and QgsEllipseSymbolLayer.
Definition at line 246 of file qgssymbollayer.cpp.
|
virtual |
Sets layer's subsymbol. takes ownership of the passed symbol.
Reimplemented in QgsVectorFieldSymbolLayer, QgsMaskMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsHashedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsRasterFillSymbolLayer, and QgsArrowSymbolLayer.
Definition at line 148 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 QgsTemplatedLineSymbolLayerBase, QgsInterpolatedLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, and QgsLinePatternFillSymbolLayer.
Definition at line 131 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 QgsVectorFieldSymbolLayer, QgsMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, QgsFontMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsSimpleMarkerSymbolLayerBase, QgsLineburstSymbolLayer, QgsRasterLineSymbolLayer, QgsHashedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsSimpleLineSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsRasterFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsGradientFillSymbolLayer, QgsSimpleFillSymbolLayer, QgsEllipseSymbolLayer, and QgsArrowSymbolLayer.
|
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 QgsTemplatedLineSymbolLayerBase, QgsInterpolatedLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, and QgsLinePatternFillSymbolLayer.
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 QgsVectorFieldSymbolLayer, QgsMarkerSymbolLayer, QgsMaskMarkerSymbolLayer, QgsFontMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSimpleMarkerSymbolLayerBase, QgsLineburstSymbolLayer, QgsRasterLineSymbolLayer, QgsHashedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsSimpleLineSymbolLayer, QgsInterpolatedLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsRasterFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsGradientFillSymbolLayer, QgsSimpleFillSymbolLayer, QgsEllipseSymbolLayer, and QgsArrowSymbolLayer.
|
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 QgsFontMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsSimpleFillSymbolLayer, and QgsEllipseSymbolLayer.
Definition at line 251 of file qgssymbollayer.cpp.
|
virtual |
Returns the symbol's sub symbol, if present.
Reimplemented in QgsVectorFieldSymbolLayer, QgsMaskMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsHashedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsRasterFillSymbolLayer, and QgsArrowSymbolLayer.
Definition at line 143 of file qgssymbollayer.cpp.
|
inlinevirtual |
Saves the symbol layer as SLD.
Reimplemented in QgsVectorFieldSymbolLayer, QgsMarkerSymbolLayer, QgsMarkerLineSymbolLayer, QgsSimpleLineSymbolLayer, QgsCentroidFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsSimpleFillSymbolLayer, and QgsEllipseSymbolLayer.
Definition at line 412 of file qgssymbollayer.h.
|
inline |
Definition at line 434 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 QgsVectorFieldSymbolLayer, QgsMaskMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsHashedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, and QgsArrowSymbolLayer.
Definition at line 317 of file qgssymbollayer.cpp.
|
virtual |
Returns true
if the symbol layer has any components which use map unit based sizes.
Reimplemented in QgsVectorFieldSymbolLayer, QgsMaskMarkerSymbolLayer, QgsFontMarkerSymbolLayer, QgsRasterMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsFilledMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsLineburstSymbolLayer, QgsRasterLineSymbolLayer, QgsHashedLineSymbolLayer, QgsMarkerLineSymbolLayer, QgsSimpleLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsCentroidFillSymbolLayer, QgsRandomMarkerFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsRasterFillSymbolLayer, QgsShapeburstFillSymbolLayer, QgsGradientFillSymbolLayer, QgsSimpleFillSymbolLayer, QgsEllipseSymbolLayer, and QgsArrowSymbolLayer.
Definition at line 302 of file qgssymbollayer.cpp.
|
virtual |
write as DXF
Reimplemented in QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, and QgsEllipseSymbolLayer.
Definition at line 154 of file qgssymbollayer.cpp.
|
protected |
Definition at line 638 of file qgssymbollayer.h.
|
protected |
Definition at line 641 of file qgssymbollayer.h.
|
protected |
True if layer is enabled and should be drawn.
Definition at line 635 of file qgssymbollayer.h.
|
protected |
Definition at line 644 of file qgssymbollayer.h.
|
protected |
Definition at line 637 of file qgssymbollayer.h.
|
protected |
Definition at line 643 of file qgssymbollayer.h.
|
protected |
Definition at line 639 of file qgssymbollayer.h.
|
protected |
Definition at line 632 of file qgssymbollayer.h.
|
staticprotected |
Whether fill styles for selected features also highlight symbol stroke.
Definition at line 650 of file qgssymbollayer.h.
|
staticprotected |
Whether fill styles for selected features uses symbol layer style.
Definition at line 652 of file qgssymbollayer.h.
|
staticprotected |
Whether styles for selected features ignore symbol alpha.
Definition at line 648 of file qgssymbollayer.h.