QGIS API Documentation  3.6.0-Noosa (5873452)
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
QgsSymbolLayer Class Referenceabstract

#include <qgssymbollayer.h>

Inheritance diagram for QgsSymbolLayer:
Inheritance graph
[legend]

Public Types

enum  Property {
  PropertySize = 0, PropertyAngle, PropertyName, PropertyFillColor,
  PropertyStrokeColor, PropertyStrokeWidth, PropertyStrokeStyle, PropertyOffset,
  PropertyCharacter, PropertyWidth, PropertyHeight, PropertyPreserveAspectRatio,
  PropertyFillStyle, PropertyJoinStyle, PropertySecondaryColor, PropertyLineAngle,
  PropertyLineDistance, PropertyGradientType, PropertyCoordinateMode, PropertyGradientSpread,
  PropertyGradientReference1X, PropertyGradientReference1Y, PropertyGradientReference2X, PropertyGradientReference2Y,
  PropertyGradientReference1IsCentroid, PropertyGradientReference2IsCentroid, PropertyBlurRadius, PropertyShapeburstUseWholeShape,
  PropertyShapeburstMaxDistance, PropertyShapeburstIgnoreRings, PropertyFile, PropertyDistanceX,
  PropertyDistanceY, PropertyDisplacementX, PropertyDisplacementY, PropertyOpacity,
  PropertyCustomDash, PropertyCapStyle, PropertyPlacement, PropertyInterval,
  PropertyOffsetAlongLine, PropertyHorizontalAnchor, PropertyVerticalAnchor, PropertyLayerEnabled,
  PropertyArrowWidth, PropertyArrowStartWidth, PropertyArrowHeadLength, PropertyArrowHeadThickness,
  PropertyArrowHeadType, PropertyArrowType
}
 Data definable properties. More...
 

Public Member Functions

virtual ~QgsSymbolLayer ()
 
virtual QgsSymbolLayerclone () const =0
 Shall be reimplemented by subclasses to create a deep copy of the instance. More...
 
virtual QColor color () const
 The fill color. More...
 
QgsPropertyCollectiondataDefinedProperties ()
 Returns a reference to the symbol layer's property collection, used for data defined overrides. More...
 
const QgsPropertyCollectiondataDefinedProperties () 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
 Gets fill color. 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
 
virtual QString layerType () const =0
 Returns a string that represents this layer type. More...
 
virtual QgsMapUnitScale mapUnitScale () const
 
virtual QString ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const
 
virtual QgsUnitTypes::RenderUnit outputUnit () const
 Returns the units to use for sizes and widths within the symbol layer. More...
 
QgsPaintEffectpaintEffect () 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 QgsStringMap 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
 
virtual void setColor (const QColor &color)
 The fill color. 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)
 Set fill color. More...
 
void setLocked (bool locked)
 
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)
 
virtual void setStrokeColor (const QColor &color)
 Set stroke color. More...
 
virtual bool setSubSymbol (QgsSymbol *symbol)
 Sets layer's subsymbol. takes ownership of the passed symbol. More...
 
virtual void startRender (QgsSymbolRenderContext &context)=0
 
virtual void stopRender (QgsSymbolRenderContext &context)=0
 
virtual QColor strokeColor () const
 Gets stroke color. More...
 
virtual QgsSymbolsubSymbol ()
 Returns the symbol's sub symbol, if present. More...
 
virtual void toSld (QDomDocument &doc, QDomElement &element, const QgsStringMap &props) const
 
QgsSymbol::SymbolType type () const
 
virtual QSet< QString > usedAttributes (const QgsRenderContext &context) const
 Returns the set of attributes referenced by the layer. 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 QgsPropertiesDefinitionpropertyDefinitions ()
 Returns the symbol layer property definitions. More...
 

Protected Member Functions

 QgsSymbolLayer (QgsSymbol::SymbolType type, bool locked=false)
 
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 QgsStringMap &stringMap)
 Restores older data defined properties from string map. More...
 

Protected Attributes

QColor mColor
 
QgsPropertyCollection mDataDefinedProperties
 
bool mEnabled
 True if layer is enabled and should be drawn. More...
 
QgsFields mFields
 
bool mLocked
 
QgsPaintEffectmPaintEffect = nullptr
 
int mRenderingPass
 
QgsSymbol::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...
 

Detailed Description

Definition at line 51 of file qgssymbollayer.h.

Member Enumeration Documentation

◆ Property

Data definable properties.

Since
QGIS 3.0
Enumerator
PropertySize 

Symbol size.

PropertyAngle 

Symbol angle.

PropertyName 

Name, eg shape name for simple markers.

PropertyFillColor 

Fill color.

PropertyStrokeColor 

Stroke color.

PropertyStrokeWidth 

Stroke width.

PropertyStrokeStyle 

Stroke style (eg solid, dashed)

PropertyOffset 

Symbol offset.

PropertyCharacter 

Character, eg for font marker symbol layers.

PropertyWidth 

Symbol width.

PropertyHeight 

Symbol height.

PropertyPreserveAspectRatio 

Preserve aspect ratio between width and height.

PropertyFillStyle 

Fill style (eg solid, dots)

PropertyJoinStyle 

Line join style.

PropertySecondaryColor 

Secondary color (eg for gradient fills)

PropertyLineAngle 

Line angle.

PropertyLineDistance 

Distance between lines.

PropertyGradientType 

Gradient fill type.

PropertyCoordinateMode 

Gradient coordinate mode.

PropertyGradientSpread 

Gradient spread mode.

PropertyGradientReference1X 

Gradient reference point 1 x.

PropertyGradientReference1Y 

Gradient reference point 1 y.

PropertyGradientReference2X 

Gradient reference point 2 x.

PropertyGradientReference2Y 

Gradient reference point 2 y.

PropertyGradientReference1IsCentroid 

Gradient reference point 1 is centroid.

PropertyGradientReference2IsCentroid 

Gradient reference point 2 is centroid.

PropertyBlurRadius 

Shapeburst blur radius.

PropertyShapeburstUseWholeShape 

Shapeburst use whole shape.

PropertyShapeburstMaxDistance 

Shapeburst fill from edge distance.

PropertyShapeburstIgnoreRings 

Shapeburst ignore rings.

PropertyFile 

Filename, eg for svg files.

PropertyDistanceX 

Horizontal distance between points.

PropertyDistanceY 

Vertical distance between points.

PropertyDisplacementX 

Horizontal displacement.

PropertyDisplacementY 

Vertical displacement.

PropertyOpacity 

Opacity.

PropertyCustomDash 

Custom dash pattern.

PropertyCapStyle 

Line cap style.

PropertyPlacement 

Line marker placement.

PropertyInterval 

Line marker interval.

PropertyOffsetAlongLine 

Offset along line.

PropertyHorizontalAnchor 

Horizontal anchor point.

PropertyVerticalAnchor 

Vertical anchor point.

PropertyLayerEnabled 

Whether symbol layer is enabled.

PropertyArrowWidth 

Arrow tail width.

PropertyArrowStartWidth 

Arrow tail start width.

PropertyArrowHeadLength 

Arrow head length.

PropertyArrowHeadThickness 

Arrow head thickness.

PropertyArrowHeadType 

Arrow head type.

PropertyArrowType 

Arrow type.

Definition at line 125 of file qgssymbollayer.h.

Constructor & Destructor Documentation

◆ ~QgsSymbolLayer()

QgsSymbolLayer::~QgsSymbolLayer ( )
virtual

Definition at line 207 of file qgssymbollayer.cpp.

◆ QgsSymbolLayer()

QgsSymbolLayer::QgsSymbolLayer ( QgsSymbol::SymbolType  type,
bool  locked = false 
)
protected

Definition at line 174 of file qgssymbollayer.cpp.

Member Function Documentation

◆ clone()

virtual QgsSymbolLayer* QgsSymbolLayer::clone ( ) const
pure virtual

◆ color()

virtual QColor QgsSymbolLayer::color ( ) const
inlinevirtual

◆ copyDataDefinedProperties()

void QgsSymbolLayer::copyDataDefinedProperties ( QgsSymbolLayer destLayer) const
protected

Copies all data defined properties of this layer to another symbol layer.

Parameters
destLayerdestination layer

Definition at line 372 of file qgssymbollayer.cpp.

◆ copyPaintEffect()

void QgsSymbolLayer::copyPaintEffect ( QgsSymbolLayer destLayer) const
protected

Copies paint effect of this layer to another symbol layer.

Parameters
destLayerdestination layer
Since
QGIS 2.9

Definition at line 380 of file qgssymbollayer.cpp.

◆ dataDefinedProperties() [1/2]

QgsPropertyCollection& QgsSymbolLayer::dataDefinedProperties ( )
inline

Returns a reference to the symbol layer's property collection, used for data defined overrides.

See also
setDataDefinedProperties()
Property
Since
QGIS 3.0

Definition at line 384 of file qgssymbollayer.h.

◆ dataDefinedProperties() [2/2]

const QgsPropertyCollection& QgsSymbolLayer::dataDefinedProperties ( ) const
inline

Returns a reference to the symbol layer's property collection, used for data defined overrides.

See also
setDataDefinedProperties()
Since
QGIS 3.0

Definition at line 391 of file qgssymbollayer.h.

◆ drawPreviewIcon()

virtual void QgsSymbolLayer::drawPreviewIcon ( QgsSymbolRenderContext context,
QSize  size 
)
pure virtual

◆ dxfAngle()

double QgsSymbolLayer::dxfAngle ( QgsSymbolRenderContext context) const
virtual

Gets angle.

Reimplemented in QgsSimpleFillSymbolLayer.

Definition at line 135 of file qgssymbollayer.cpp.

◆ dxfBrushColor()

QColor QgsSymbolLayer::dxfBrushColor ( QgsSymbolRenderContext context) const
virtual

Gets brush/fill color.

Reimplemented in QgsSimpleFillSymbolLayer.

Definition at line 152 of file qgssymbollayer.cpp.

◆ dxfBrushStyle()

Qt::BrushStyle QgsSymbolLayer::dxfBrushStyle ( ) const
virtual

Gets brush/fill style.

Reimplemented in QgsSimpleFillSymbolLayer.

Definition at line 158 of file qgssymbollayer.cpp.

◆ dxfColor()

QColor QgsSymbolLayer::dxfColor ( QgsSymbolRenderContext context) const
virtual

Gets color.

Reimplemented in QgsImageFillSymbolLayer, QgsSimpleLineSymbolLayer, and QgsSimpleFillSymbolLayer.

Definition at line 129 of file qgssymbollayer.cpp.

◆ dxfCustomDashPattern()

QVector< qreal > QgsSymbolLayer::dxfCustomDashPattern ( QgsUnitTypes::RenderUnit unit) const
virtual

Gets dash pattern.

Reimplemented in QgsSimpleLineSymbolLayer.

Definition at line 141 of file qgssymbollayer.cpp.

◆ dxfOffset()

double QgsSymbolLayer::dxfOffset ( const QgsDxfExport e,
QgsSymbolRenderContext context 
) const
virtual

Gets offset.

Reimplemented in QgsSimpleLineSymbolLayer.

Definition at line 122 of file qgssymbollayer.cpp.

◆ dxfPenStyle()

Qt::PenStyle QgsSymbolLayer::dxfPenStyle ( ) const
virtual

Gets pen style.

Reimplemented in QgsImageFillSymbolLayer, QgsSimpleFillSymbolLayer, and QgsSimpleLineSymbolLayer.

Definition at line 147 of file qgssymbollayer.cpp.

◆ dxfWidth()

double QgsSymbolLayer::dxfWidth ( const QgsDxfExport e,
QgsSymbolRenderContext context 
) const
virtual

Gets line width.

Reimplemented in QgsLineSymbolLayer, QgsImageFillSymbolLayer, QgsSimpleLineSymbolLayer, and QgsSimpleFillSymbolLayer.

Definition at line 115 of file qgssymbollayer.cpp.

◆ enabled()

bool QgsSymbolLayer::enabled ( ) const
inline

Returns true if symbol layer is enabled and will be drawn.

See also
setEnabled()
Since
QGIS 3.0

Definition at line 192 of file qgssymbollayer.h.

◆ estimateMaxBleed()

virtual double QgsSymbolLayer::estimateMaxBleed ( const QgsRenderContext context) const
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 QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsRasterFillSymbolLayer, QgsImageFillSymbolLayer, QgsFilledMarkerSymbolLayer, QgsShapeburstFillSymbolLayer, QgsMarkerLineSymbolLayer, QgsGradientFillSymbolLayer, QgsSimpleFillSymbolLayer, and QgsSimpleLineSymbolLayer.

Definition at line 283 of file qgssymbollayer.h.

◆ fillColor()

virtual QColor QgsSymbolLayer::fillColor ( ) const
inlinevirtual

Gets fill color.

Supported by marker and fill layers.

Since
QGIS 2.1

Reimplemented in QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsSimpleFillSymbolLayer, and QgsEllipseSymbolLayer.

Definition at line 231 of file qgssymbollayer.h.

◆ hasDataDefinedProperties()

bool QgsSymbolLayer::hasDataDefinedProperties ( ) const
virtual

Returns true if the symbol layer (or any of its sub-symbols) contains data defined properties.

Since
QGIS 3.4.5

Reimplemented in QgsCentroidFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsImageFillSymbolLayer, QgsFilledMarkerSymbolLayer, QgsMarkerLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsVectorFieldSymbolLayer, and QgsArrowSymbolLayer.

Definition at line 196 of file qgssymbollayer.cpp.

◆ isCompatibleWithSymbol()

bool QgsSymbolLayer::isCompatibleWithSymbol ( QgsSymbol symbol) const
virtual

Returns if the layer can be used below the specified symbol.

Reimplemented in QgsGeometryGeneratorSymbolLayer.

Definition at line 212 of file qgssymbollayer.cpp.

◆ isLocked()

bool QgsSymbolLayer::isLocked ( ) const
inline

Definition at line 275 of file qgssymbollayer.h.

◆ layerType()

virtual QString QgsSymbolLayer::layerType ( ) const
pure virtual

◆ mapUnitScale()

virtual QgsMapUnitScale QgsSymbolLayer::mapUnitScale ( ) const
inlinevirtual

◆ ogrFeatureStyle()

virtual QString QgsSymbolLayer::ogrFeatureStyle ( double  mmScaleFactor,
double  mapUnitScaleFactor 
) const
inlinevirtual

◆ outputUnit()

virtual QgsUnitTypes::RenderUnit QgsSymbolLayer::outputUnit ( ) const
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.

Returns
output unit, or QgsUnitTypes::RenderUnknownUnit if the symbol layer contains mixed units
See also
setOutputUnit()

Reimplemented in QgsCentroidFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLineSymbolLayer, QgsMarkerSymbolLayer, QgsImageFillSymbolLayer, QgsSvgMarkerSymbolLayer, QgsShapeburstFillSymbolLayer, QgsMarkerLineSymbolLayer, QgsGradientFillSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsVectorFieldSymbolLayer, and QgsSimpleLineSymbolLayer.

Definition at line 303 of file qgssymbollayer.h.

◆ paintEffect()

QgsPaintEffect * QgsSymbolLayer::paintEffect ( ) const

Returns the current paint effect for the layer.

Returns
paint effect
See also
setPaintEffect
Since
QGIS 2.9

Definition at line 163 of file qgssymbollayer.cpp.

◆ prepareExpressions()

void QgsSymbolLayer::prepareExpressions ( const QgsSymbolRenderContext context)
virtual

Prepares all data defined property expressions for evaluation.

This should be called prior to evaluating data defined properties.

Parameters
contextsymbol render context
Since
QGIS 2.12

Definition at line 185 of file qgssymbollayer.cpp.

◆ properties()

virtual QgsStringMap QgsSymbolLayer::properties ( ) const
pure virtual

◆ propertyDefinitions()

const QgsPropertiesDefinition & QgsSymbolLayer::propertyDefinitions ( )
static

Returns the symbol layer property definitions.

Since
QGIS 3.0

Definition at line 201 of file qgssymbollayer.cpp.

◆ renderingPass()

int QgsSymbolLayer::renderingPass ( ) const
inline

Definition at line 310 of file qgssymbollayer.h.

◆ restoreOldDataDefinedProperties()

void QgsSymbolLayer::restoreOldDataDefinedProperties ( const QgsStringMap stringMap)
protected

Restores older data defined properties from string map.

Since
QGIS 3.0

Definition at line 327 of file qgssymbollayer.cpp.

◆ setColor()

virtual void QgsSymbolLayer::setColor ( const QColor &  color)
inlinevirtual

◆ setDataDefinedProperties()

void QgsSymbolLayer::setDataDefinedProperties ( const QgsPropertyCollection collection)
inline

Sets the symbol layer's property collection, used for data defined overrides.

Parameters
collectionproperty collection. Existing properties will be replaced.
See also
properties()
Since
QGIS 3.0

Definition at line 399 of file qgssymbollayer.h.

◆ setDataDefinedProperty()

void QgsSymbolLayer::setDataDefinedProperty ( QgsSymbolLayer::Property  key,
const QgsProperty property 
)
virtual

Sets a data defined property for the layer.

Any existing property with the same key will be overwritten.

See also
dataDefinedProperties()
Property
Since
QGIS 3.0

Reimplemented in QgsMarkerLineSymbolLayer.

Definition at line 100 of file qgssymbollayer.cpp.

◆ setEnabled()

void QgsSymbolLayer::setEnabled ( bool  enabled)
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.

See also
enabled()
Since
QGIS 3.0

Definition at line 201 of file qgssymbollayer.h.

◆ setFillColor()

virtual void QgsSymbolLayer::setFillColor ( const QColor &  color)
inlinevirtual

Set fill color.

Supported by marker and fill layers.

Since
QGIS 2.1

Reimplemented in QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsSimpleFillSymbolLayer, and QgsEllipseSymbolLayer.

Definition at line 226 of file qgssymbollayer.h.

◆ setLocked()

void QgsSymbolLayer::setLocked ( bool  locked)
inline

Definition at line 274 of file qgssymbollayer.h.

◆ setMapUnitScale()

virtual void QgsSymbolLayer::setMapUnitScale ( const QgsMapUnitScale scale)
inlinevirtual

◆ setOutputUnit()

virtual void QgsSymbolLayer::setOutputUnit ( QgsUnitTypes::RenderUnit  unit)
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.

Parameters
unitoutput units
See also
outputUnit()

Reimplemented in QgsCentroidFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsSVGFillSymbolLayer, QgsLineSymbolLayer, QgsMarkerSymbolLayer, QgsImageFillSymbolLayer, QgsSvgMarkerSymbolLayer, QgsShapeburstFillSymbolLayer, QgsMarkerLineSymbolLayer, QgsGradientFillSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsEllipseSymbolLayer, QgsSimpleFillSymbolLayer, QgsVectorFieldSymbolLayer, and QgsSimpleLineSymbolLayer.

Definition at line 293 of file qgssymbollayer.h.

◆ setPaintEffect()

void QgsSymbolLayer::setPaintEffect ( QgsPaintEffect effect)

Sets the current paint effect for the layer.

Parameters
effectpaint effect. Ownership is transferred to the layer.
See also
paintEffect
Since
QGIS 2.9

Definition at line 168 of file qgssymbollayer.cpp.

◆ setRenderingPass()

void QgsSymbolLayer::setRenderingPass ( int  renderingPass)
inline

Definition at line 309 of file qgssymbollayer.h.

◆ setStrokeColor()

virtual void QgsSymbolLayer::setStrokeColor ( const QColor &  color)
inlinevirtual

Set stroke color.

Supported by marker and fill layers.

Since
QGIS 2.1

Reimplemented in QgsFontMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsEllipseSymbolLayer, and QgsSimpleFillSymbolLayer.

Definition at line 216 of file qgssymbollayer.h.

◆ setSubSymbol()

virtual bool QgsSymbolLayer::setSubSymbol ( QgsSymbol symbol)
inlinevirtual

◆ startRender()

virtual void QgsSymbolLayer::startRender ( QgsSymbolRenderContext context)
pure virtual

◆ stopRender()

virtual void QgsSymbolLayer::stopRender ( QgsSymbolRenderContext context)
pure virtual

◆ strokeColor()

virtual QColor QgsSymbolLayer::strokeColor ( ) const
inlinevirtual

Gets stroke color.

Supported by marker and fill layers.

Since
QGIS 2.1

Reimplemented in QgsFontMarkerSymbolLayer, QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, QgsEllipseSymbolLayer, and QgsSimpleFillSymbolLayer.

Definition at line 221 of file qgssymbollayer.h.

◆ subSymbol()

virtual QgsSymbol* QgsSymbolLayer::subSymbol ( )
inlinevirtual

◆ toSld()

virtual void QgsSymbolLayer::toSld ( QDomDocument &  doc,
QDomElement &  element,
const QgsStringMap props 
) const
inlinevirtual

◆ type()

QgsSymbol::SymbolType QgsSymbolLayer::type ( ) const
inline

Definition at line 269 of file qgssymbollayer.h.

◆ usedAttributes()

QSet< QString > QgsSymbolLayer::usedAttributes ( const QgsRenderContext context) const
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 QgsCentroidFillSymbolLayer, QgsPointPatternFillSymbolLayer, QgsLinePatternFillSymbolLayer, QgsImageFillSymbolLayer, QgsFilledMarkerSymbolLayer, QgsMarkerLineSymbolLayer, QgsGeometryGeneratorSymbolLayer, QgsVectorFieldSymbolLayer, and QgsArrowSymbolLayer.

Definition at line 220 of file qgssymbollayer.cpp.

◆ writeDxf()

bool QgsSymbolLayer::writeDxf ( QgsDxfExport e,
double  mmMapUnitScaleFactor,
const QString &  layerName,
QgsSymbolRenderContext context,
QPointF  shift = QPointF( 0.0, 0.0 ) 
) const
virtual

write as DXF

Reimplemented in QgsSvgMarkerSymbolLayer, QgsSimpleMarkerSymbolLayer, and QgsEllipseSymbolLayer.

Definition at line 105 of file qgssymbollayer.cpp.

Member Data Documentation

◆ mColor

QColor QgsSymbolLayer::mColor
protected

Definition at line 418 of file qgssymbollayer.h.

◆ mDataDefinedProperties

QgsPropertyCollection QgsSymbolLayer::mDataDefinedProperties
protected

Definition at line 421 of file qgssymbollayer.h.

◆ mEnabled

bool QgsSymbolLayer::mEnabled
protected

True if layer is enabled and should be drawn.

Definition at line 415 of file qgssymbollayer.h.

◆ mFields

QgsFields QgsSymbolLayer::mFields
protected

Definition at line 424 of file qgssymbollayer.h.

◆ mLocked

bool QgsSymbolLayer::mLocked
protected

Definition at line 417 of file qgssymbollayer.h.

◆ mPaintEffect

QgsPaintEffect* QgsSymbolLayer::mPaintEffect = nullptr
protected

Definition at line 423 of file qgssymbollayer.h.

◆ mRenderingPass

int QgsSymbolLayer::mRenderingPass
protected

Definition at line 419 of file qgssymbollayer.h.

◆ mType

QgsSymbol::SymbolType QgsSymbolLayer::mType
protected

Definition at line 412 of file qgssymbollayer.h.

◆ SELECT_FILL_BORDER

const bool QgsSymbolLayer::SELECT_FILL_BORDER = false
staticprotected

Whether fill styles for selected features also highlight symbol stroke.

Definition at line 430 of file qgssymbollayer.h.

◆ SELECT_FILL_STYLE

const bool QgsSymbolLayer::SELECT_FILL_STYLE = false
staticprotected

Whether fill styles for selected features uses symbol layer style.

Definition at line 432 of file qgssymbollayer.h.

◆ SELECTION_IS_OPAQUE

const bool QgsSymbolLayer::SELECTION_IS_OPAQUE = true
staticprotected

Whether styles for selected features ignore symbol alpha.

Definition at line 428 of file qgssymbollayer.h.


The documentation for this class was generated from the following files: