QGIS API Documentation
3.22.4-Białowieża (ce8e65e95e)
|
Abstract base class for all rendered symbols. More...
#include <qgssymbol.h>
Public Types | |
enum | Property { PropertyOpacity } |
Data definable properties. More... | |
Public Member Functions | |
virtual | ~QgsSymbol () |
bool | appendSymbolLayer (QgsSymbolLayer *layer) |
Appends a symbol layer at the end of the current symbol layer list. More... | |
QImage | asImage (QSize size, QgsRenderContext *customContext=nullptr) |
Returns an image of the symbol at the specified size. More... | |
Q_DECL_DEPRECATED QImage | bigSymbolPreviewImage (QgsExpressionContext *expressionContext=nullptr, int flags=static_cast< int >(Qgis::SymbolPreviewFlag::FlagIncludeCrosshairsForMarkerSymbols)) |
QImage | bigSymbolPreviewImage (QgsExpressionContext *expressionContext=nullptr, Qgis::SymbolPreviewFlags flags=Qgis::SymbolPreviewFlag::FlagIncludeCrosshairsForMarkerSymbols) |
Returns a large (roughly 100x100 pixel) preview image for the symbol. More... | |
bool | canCauseArtifactsBetweenAdjacentTiles () const |
Returns true if the symbol 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... | |
bool | changeSymbolLayer (int index, QgsSymbolLayer *layer) |
Deletes the current layer at the specified index and replaces it with layer. More... | |
bool | clipFeaturesToExtent () const |
Returns whether features drawn by the symbol will be clipped to the render context's extent. More... | |
virtual QgsSymbol * | clone () const =0 |
Returns a deep copy of this symbol. More... | |
QColor | color () const |
Returns the symbol's color. More... | |
QgsPropertyCollection & | dataDefinedProperties () |
Returns a reference to the symbol's property collection, used for data defined overrides. More... | |
const QgsPropertyCollection & | dataDefinedProperties () const |
Returns a reference to the symbol's property collection, used for data defined overrides. More... | |
bool | deleteSymbolLayer (int index) |
Removes and deletes the symbol layer at the specified index. More... | |
void | drawPreviewIcon (QPainter *painter, QSize size, QgsRenderContext *customContext=nullptr, bool selected=false, const QgsExpressionContext *expressionContext=nullptr, const QgsLegendPatchShape *patchShape=nullptr) |
Draws an icon of the symbol that occupies an area given by size using the specified painter. More... | |
QString | dump () const |
Returns a string dump of the symbol's properties. More... | |
void | exportImage (const QString &path, const QString &format, QSize size) |
Export the symbol as an image format, to the specified path and with the given size. More... | |
Qgis::SymbolFlags | flags () const |
Returns flags for the symbol. More... | |
bool | forceRHR () const |
Returns true if polygon features drawn by the symbol will be reoriented to follow the standard right-hand-rule orientation, in which the area that is bounded by the polygon is to the right of the boundary. More... | |
bool | hasDataDefinedProperties () const |
Returns whether the symbol utilizes any data defined properties. More... | |
bool | insertSymbolLayer (int index, QgsSymbolLayer *layer) |
Inserts a symbol layer to specified index. More... | |
Q_DECL_DEPRECATED const QgsVectorLayer * | layer () const |
QgsMapUnitScale | mapUnitScale () const |
Returns the map unit scale for the symbol. More... | |
qreal | opacity () const |
Returns the opacity for the symbol. More... | |
QgsUnitTypes::RenderUnit | outputUnit () const |
Returns the units to use for sizes and widths within the symbol. More... | |
void | renderFeature (const QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false, Qgis::VertexMarkerType currentVertexMarkerType=Qgis::VertexMarkerType::SemiTransparentCircle, double currentVertexMarkerSize=0.0) SIP_THROW(QgsCsException) |
Render a feature. More... | |
Qgis::SymbolRenderHints | renderHints () const |
Returns the rendering hint flags for the symbol. More... | |
void | setClipFeaturesToExtent (bool clipFeaturesToExtent) |
Sets whether features drawn by the symbol should be clipped to the render context's extent. More... | |
void | setColor (const QColor &color) |
Sets the color for the symbol. More... | |
void | setDataDefinedProperties (const QgsPropertyCollection &collection) |
Sets the symbol's property collection, used for data defined overrides. More... | |
void | setDataDefinedProperty (Property key, const QgsProperty &property) |
Sets a data defined property for the symbol. More... | |
void | setFlags (Qgis::SymbolFlags flags) |
Sets flags for the symbol. More... | |
void | setForceRHR (bool force) |
Sets whether polygon features drawn by the symbol should be reoriented to follow the standard right-hand-rule orientation, in which the area that is bounded by the polygon is to the right of the boundary. More... | |
Q_DECL_DEPRECATED void | setLayer (const QgsVectorLayer *layer) |
void | setMapUnitScale (const QgsMapUnitScale &scale) |
Sets the map unit scale for the symbol. More... | |
void | setOpacity (qreal opacity) |
Sets the opacity for the symbol. More... | |
void | setOutputUnit (QgsUnitTypes::RenderUnit unit) |
Sets the units to use for sizes and widths within the symbol. More... | |
void | setRenderHints (Qgis::SymbolRenderHints hints) |
Sets rendering hint flags for the symbol. More... | |
void | startFeatureRender (const QgsFeature &feature, QgsRenderContext &context, int layer=-1) |
Called before symbol layers will be rendered for a particular feature. More... | |
void | startRender (QgsRenderContext &context, const QgsFields &fields=QgsFields()) |
Begins the rendering process for the symbol. More... | |
void | stopFeatureRender (const QgsFeature &feature, QgsRenderContext &context, int layer=-1) |
Called after symbol layers have been rendered for a particular feature. More... | |
void | stopRender (QgsRenderContext &context) |
Ends the rendering process. More... | |
QgsSymbolLayer * | symbolLayer (int layer) |
Returns the symbol layer at the specified index. More... | |
const QgsSymbolLayer * | symbolLayer (int layer) const |
Returns the symbol layer at the specified index, const variant. More... | |
int | symbolLayerCount () const |
Returns the total number of symbol layers contained in the symbol. More... | |
QgsSymbolLayerList | symbolLayers () |
Returns the list of symbol layers contained in the symbol. More... | |
QgsSymbolRenderContext * | symbolRenderContext () |
Returns the symbol render context. More... | |
QgsSymbolLayer * | takeSymbolLayer (int index) |
Removes a symbol layer from the list and returns a pointer to it. More... | |
void | toSld (QDomDocument &doc, QDomElement &element, QVariantMap props) const |
Converts the symbol to a SLD representation. More... | |
Qgis::SymbolType | type () const |
Returns the symbol's type. More... | |
QSet< QString > | usedAttributes (const QgsRenderContext &context) const |
Returns a list of attributes required to render this feature. More... | |
bool | usesMapUnits () const |
Returns true if the symbol has any components which use map unit based sizes. More... | |
Static Public Member Functions | |
static QgsSymbol * | defaultSymbol (QgsWkbTypes::GeometryType geomType) |
Returns a new default symbol for the specified geometry type. More... | |
static const QgsPropertiesDefinition & | propertyDefinitions () |
Returns the symbol property definitions. More... | |
static Qgis::SymbolType | symbolTypeForGeometryType (QgsWkbTypes::GeometryType type) |
Returns the default symbol type required for the specified geometry type. More... | |
static QString | symbolTypeToString (Qgis::SymbolType type) |
Returns a translated string version of the specified symbol type. More... | |
Protected Member Functions | |
QgsSymbol (Qgis::SymbolType type, const QgsSymbolLayerList &layers) | |
Constructor for a QgsSymbol of the specified type. More... | |
QgsSymbolLayerList | cloneLayers () const |
Retrieve a cloned list of all layers that make up this symbol. More... | |
void | renderUsingLayer (QgsSymbolLayer *layer, QgsSymbolRenderContext &context, QgsWkbTypes::GeometryType geometryType=QgsWkbTypes::GeometryType::UnknownGeometry, const QPolygonF *points=nullptr, const QVector< QPolygonF > *rings=nullptr) |
Renders a context using a particular symbol layer without passing in a geometry. More... | |
void | renderVertexMarker (QPointF pt, QgsRenderContext &context, Qgis::VertexMarkerType currentVertexMarkerType, double currentVertexMarkerSize) |
Render editing vertex marker at specified point. More... | |
Static Protected Member Functions | |
static QPolygonF | _getLineString (QgsRenderContext &context, const QgsCurve &curve, bool clipToExtent=true) |
Creates a line string in screen coordinates from a QgsCurve in map coordinates. More... | |
static QPointF | _getPoint (QgsRenderContext &context, const QgsPoint &point) |
Creates a point in screen coordinates from a QgsPoint in map coordinates. More... | |
static void | _getPolygon (QPolygonF &pts, QVector< QPolygonF > &holes, QgsRenderContext &context, const QgsPolygon &polygon, bool clipToExtent=true, bool correctRingOrientation=false) |
Creates a polygon in screen coordinates from a QgsPolygonXYin map coordinates. More... | |
static QPolygonF | _getPolygonRing (QgsRenderContext &context, const QgsCurve &curve, bool clipToExtent, bool isExteriorRing=false, bool correctRingOrientation=false) |
Creates a polygon ring in screen coordinates from a QgsCurve in map coordinates. More... | |
Protected Attributes | |
bool | mClipFeaturesToExtent = true |
bool | mForceRHR = false |
Q_DECL_DEPRECATED const QgsVectorLayer * | mLayer = nullptr |
QgsSymbolLayerList | mLayers |
qreal | mOpacity = 1.0 |
Symbol opacity (in the range 0 - 1) More... | |
Qgis::SymbolRenderHints | mRenderHints |
Qgis::SymbolFlags | mSymbolFlags = Qgis::SymbolFlags() |
Symbol flags. More... | |
Qgis::SymbolType | mType |
Friends | |
class | QgsFeatureRenderer |
Abstract base class for all rendered symbols.
Definition at line 37 of file qgssymbol.h.
enum QgsSymbol::Property |
Data definable properties.
Enumerator | |
---|---|
PropertyOpacity | Opacity. |
Definition at line 74 of file qgssymbol.h.
|
virtual |
Definition at line 269 of file qgssymbol.cpp.
|
protected |
Constructor for a QgsSymbol of the specified type.
Ownership of layers will be transferred to the symbol.
Definition at line 62 of file qgssymbol.cpp.
|
staticprotected |
Creates a line string in screen coordinates from a QgsCurve in map coordinates.
Definition at line 83 of file qgssymbol.cpp.
|
inlinestaticprotected |
Creates a point in screen coordinates from a QgsPoint in map coordinates.
Definition at line 639 of file qgssymbol.h.
|
staticprotected |
Creates a polygon in screen coordinates from a QgsPolygonXYin map coordinates.
If correctRingOrientation is true
then the ring will be oriented to match standard ring orientation, e.g. clockwise for exterior rings and counter-clockwise for interior rings.
Definition at line 215 of file qgssymbol.cpp.
|
staticprotected |
Creates a polygon ring in screen coordinates from a QgsCurve in map coordinates.
If correctRingOrientation is true
then the ring will be oriented to match standard ring orientation, e.g. clockwise for exterior rings and counter-clockwise for interior rings.
Definition at line 144 of file qgssymbol.cpp.
bool QgsSymbol::appendSymbolLayer | ( | QgsSymbolLayer * | layer | ) |
Appends a symbol layer at the end of the current symbol layer list.
Ownership of layer is transferred to the symbol.
true
if the layer was successfully added, false
if the layer is not compatible with the symbol's type(). Definition at line 443 of file qgssymbol.cpp.
QImage QgsSymbol::asImage | ( | QSize | size, |
QgsRenderContext * | customContext = nullptr |
||
) |
Returns an image of the symbol at the specified size.
Optionally a custom render context may be given in order to ensure that the preview icon exactly matches the settings from that context.
Definition at line 679 of file qgssymbol.cpp.
QImage QgsSymbol::bigSymbolPreviewImage | ( | QgsExpressionContext * | expressionContext = nullptr , |
int | flags = static_cast< int >( Qgis::SymbolPreviewFlag::FlagIncludeCrosshairsForMarkerSymbols ) |
||
) |
Definition at line 738 of file qgssymbol.cpp.
QImage QgsSymbol::bigSymbolPreviewImage | ( | QgsExpressionContext * | expressionContext = nullptr , |
Qgis::SymbolPreviewFlags | flags = Qgis::SymbolPreviewFlag::FlagIncludeCrosshairsForMarkerSymbols |
||
) |
Returns a large (roughly 100x100 pixel) preview image for the symbol.
expressionContext | optional expression context, for evaluation of data defined symbol properties |
flags | optional flags to control how preview image is generated |
Definition at line 693 of file qgssymbol.cpp.
bool QgsSymbol::canCauseArtifactsBetweenAdjacentTiles | ( | ) | const |
Returns true
if the symbol 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.
Internally this calls QgsSymbolLayer::canCauseArtifactsBetweenAdjacentTiles() for all symbol layers in the symbol and returns true
if any of the layers returned TRUE.
Definition at line 852 of file qgssymbol.cpp.
bool QgsSymbol::changeSymbolLayer | ( | int | index, |
QgsSymbolLayer * | layer | ||
) |
Deletes the current layer at the specified index and replaces it with layer.
Ownership of layer is transferred to the symbol.
Returns false
if layer is not compatible with the symbol's type(), or true
if the layer was successfully replaced.
Definition at line 473 of file qgssymbol.cpp.
|
inline |
Returns whether features drawn by the symbol will be clipped to the render context's extent.
If this option is enabled then features which are partially outside the extent will be clipped. This speeds up rendering of the feature, but may have undesirable side effects for certain symbol types.
true
if features will be clipped Definition at line 497 of file qgssymbol.h.
|
pure virtual |
Returns a deep copy of this symbol.
Ownership is transferred to the caller.
Implemented in QgsMarkerSymbol, QgsLineSymbol, and QgsFillSymbol.
|
protected |
Retrieve a cloned list of all layers that make up this symbol.
Ownership is transferred to the caller.
Definition at line 782 of file qgssymbol.cpp.
QColor QgsSymbol::color | ( | ) | const |
Returns the symbol's color.
For multi-layer symbols, this method returns the color of the first unlocked symbol layer.
Definition at line 551 of file qgssymbol.cpp.
|
inline |
Returns a reference to the symbol's property collection, used for data defined overrides.
Definition at line 543 of file qgssymbol.h.
|
inline |
Returns a reference to the symbol's property collection, used for data defined overrides.
Definition at line 550 of file qgssymbol.h.
|
static |
Returns a new default symbol for the specified geometry type.
The caller takes ownership of the returned object.
Definition at line 355 of file qgssymbol.cpp.
bool QgsSymbol::deleteSymbolLayer | ( | int | index | ) |
Removes and deletes the symbol layer at the specified index.
Definition at line 453 of file qgssymbol.cpp.
void QgsSymbol::drawPreviewIcon | ( | QPainter * | painter, |
QSize | size, | ||
QgsRenderContext * | customContext = nullptr , |
||
bool | selected = false , |
||
const QgsExpressionContext * | expressionContext = nullptr , |
||
const QgsLegendPatchShape * | patchShape = nullptr |
||
) |
Draws an icon of the symbol that occupies an area given by size using the specified painter.
Optionally a custom render context may be given in order to ensure that the preview icon exactly matches the settings from that context.
painter | destination painter |
size | size of the icon |
customContext | the context in which the rendering happens |
selected | set to true to render the symbol in a selected state |
expressionContext | optional custom expression context |
patchShape | optional patch shape to use for symbol preview. If not specified a default shape will be used instead. |
Definition at line 562 of file qgssymbol.cpp.
QString QgsSymbol::dump | ( | ) | const |
Returns a string dump of the symbol's properties.
Definition at line 743 of file qgssymbol.cpp.
void QgsSymbol::exportImage | ( | const QString & | path, |
const QString & | format, | ||
QSize | size | ||
) |
Export the symbol as an image format, to the specified path and with the given size.
If format is "SVG" then an SVG file will be created, otherwise a raster image of the specified format will be created.
Definition at line 659 of file qgssymbol.cpp.
|
inline |
Returns flags for the symbol.
Definition at line 475 of file qgssymbol.h.
|
inline |
Returns true
if polygon features drawn by the symbol will be reoriented to follow the standard right-hand-rule orientation, in which the area that is bounded by the polygon is to the right of the boundary.
In particular, the exterior ring is oriented in a clockwise direction and the interior rings in a counter-clockwise direction.
Definition at line 519 of file qgssymbol.h.
bool QgsSymbol::hasDataDefinedProperties | ( | ) | const |
Returns whether the symbol utilizes any data defined properties.
Definition at line 839 of file qgssymbol.cpp.
bool QgsSymbol::insertSymbolLayer | ( | int | index, |
QgsSymbolLayer * | layer | ||
) |
Inserts a symbol layer to specified index.
Ownership of layer is transferred to the symbol.
index | The index at which the layer should be added |
layer | The symbol layer to add |
true
if the layer is added, false
if the index or the layer is bad Definition at line 430 of file qgssymbol.cpp.
const QgsVectorLayer * QgsSymbol::layer | ( | ) | const |
Definition at line 869 of file qgssymbol.cpp.
QgsMapUnitScale QgsSymbol::mapUnitScale | ( | ) | const |
Returns the map unit scale for the symbol.
If the symbol consists of multiple layers, the map unit scale is only returned if all layers have the same scale settings. If the settings differ, a default constructed map unit scale is returned.
Definition at line 313 of file qgssymbol.cpp.
|
inline |
Returns the opacity for the symbol.
Definition at line 440 of file qgssymbol.h.
QgsUnitTypes::RenderUnit QgsSymbol::outputUnit | ( | ) | const |
Returns the units to use for sizes and widths within the symbol.
Individual symbol layer definitions will interpret this in different ways, e.g., a marker symbol may use it to specify the units for the marker size, while a line symbol may use it to specify the units for the line width.
Definition at line 275 of file qgssymbol.cpp.
|
static |
Returns the symbol property definitions.
Definition at line 263 of file qgssymbol.cpp.
PRIVATE void QgsSymbol::renderFeature | ( | const QgsFeature & | feature, |
QgsRenderContext & | context, | ||
int | layer = -1 , |
||
bool | selected = false , |
||
bool | drawVertexMarker = false , |
||
Qgis::VertexMarkerType | currentVertexMarkerType = Qgis::VertexMarkerType::SemiTransparentCircle , |
||
double | currentVertexMarkerSize = 0.0 |
||
) |
Render a feature.
Before calling this the startRender() method should be called to initialize the rendering process. After rendering all features stopRender() must be called.
Definition at line 918 of file qgssymbol.cpp.
|
inline |
Returns the rendering hint flags for the symbol.
Definition at line 459 of file qgssymbol.h.
|
protected |
Renders a context using a particular symbol layer without passing in a geometry.
This is used as fallback, if the symbol being rendered is not compatible with the specified layer. In such a case, this method can be called and will call the layer's rendering method anyway but the geometry passed to the layer will be empty. This is required for layers that generate their own geometry from other information in the rendering context.
Since QGIS 3.22, the optional geometryType, points and rings arguments can specify the original geometry type, points and rings in which are being rendered by the parent symbol.
Definition at line 796 of file qgssymbol.cpp.
|
protected |
Render editing vertex marker at specified point.
Definition at line 1464 of file qgssymbol.cpp.
|
inline |
Sets whether features drawn by the symbol should be clipped to the render context's extent.
If this option is enabled then features which are partially outside the extent will be clipped. This speeds up rendering of the feature, but may have undesirable side effects for certain symbol types.
clipFeaturesToExtent | set to true to enable clipping (defaults to TRUE) |
Definition at line 486 of file qgssymbol.h.
void QgsSymbol::setColor | ( | const QColor & | color | ) |
Sets the color for the symbol.
Calling this method sets the color for each individual symbol layer contained within the symbol to color.
Locked symbol layers are skipped and are left unchanged.
Definition at line 541 of file qgssymbol.cpp.
|
inline |
Sets the symbol's property collection, used for data defined overrides.
collection | property collection. Existing properties will be replaced. |
Definition at line 558 of file qgssymbol.h.
void QgsSymbol::setDataDefinedProperty | ( | QgsSymbol::Property | key, |
const QgsProperty & | property | ||
) |
Sets a data defined property for the symbol.
Any existing property with the same key will be overwritten.
Definition at line 834 of file qgssymbol.cpp.
|
inline |
Sets flags for the symbol.
Definition at line 467 of file qgssymbol.h.
|
inline |
Sets whether polygon features drawn by the symbol should be reoriented to follow the standard right-hand-rule orientation, in which the area that is bounded by the polygon is to the right of the boundary.
In particular, the exterior ring is oriented in a clockwise direction and the interior rings in a counter-clockwise direction.
Definition at line 508 of file qgssymbol.h.
void QgsSymbol::setLayer | ( | const QgsVectorLayer * | layer | ) |
nullptr
after stopRender Definition at line 862 of file qgssymbol.cpp.
void QgsSymbol::setMapUnitScale | ( | const QgsMapUnitScale & | scale | ) |
Sets the map unit scale for the symbol.
Calling this method sets the scale for all symbol layers contained within the symbol.
Definition at line 346 of file qgssymbol.cpp.
|
inline |
Sets the opacity for the symbol.
opacity | opacity value between 0 (fully transparent) and 1 (fully opaque) |
Definition at line 447 of file qgssymbol.h.
void QgsSymbol::setOutputUnit | ( | QgsUnitTypes::RenderUnit | unit | ) |
Sets the units to use for sizes and widths within the symbol.
Individual symbol definitions will interpret this in different ways, e.g., a marker symbol may use it to specify the units for the marker size, while a line symbol may use it to specify the units for the line width.
unit | output units |
Definition at line 337 of file qgssymbol.cpp.
|
inline |
Sets rendering hint flags for the symbol.
Definition at line 453 of file qgssymbol.h.
void QgsSymbol::startFeatureRender | ( | const QgsFeature & | feature, |
QgsRenderContext & | context, | ||
int | layer = -1 |
||
) |
Called before symbol layers 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).
Internally, this notifies all symbol layers which will be used via a call to QgsSymbolLayer::startFeatureRender().
Definition at line 1483 of file qgssymbol.cpp.
void QgsSymbol::startRender | ( | QgsRenderContext & | context, |
const QgsFields & | fields = QgsFields() |
||
) |
Begins the rendering process for the symbol.
This must be called before renderFeature(), and should be followed by a call to stopRender().
context | render context which symbol will be drawn using |
fields | fields for features to be rendered (usually the associated vector layer's fields). Required for correct calculation of data defined overrides. |
Definition at line 489 of file qgssymbol.cpp.
void QgsSymbol::stopFeatureRender | ( | const QgsFeature & | feature, |
QgsRenderContext & | context, | ||
int | layer = -1 |
||
) |
Called after symbol layers have been rendered for a particular feature.
This is always preceded by a call to startFeatureRender() just before the feature will be rendered.
Internally, this notifies all symbol layers which were used via a call to QgsSymbolLayer::stopFeatureRender().
Definition at line 1507 of file qgssymbol.cpp.
void QgsSymbol::stopRender | ( | QgsRenderContext & | context | ) |
Ends the rendering process.
This should be called after rendering all desired features.
context | render context, must match the context specified when startRender() was called. |
Definition at line 516 of file qgssymbol.cpp.
QgsSymbolLayer * QgsSymbol::symbolLayer | ( | int | layer | ) |
Returns the symbol layer at the specified index.
Definition at line 420 of file qgssymbol.cpp.
const QgsSymbolLayer * QgsSymbol::symbolLayer | ( | int | layer | ) | const |
Returns the symbol layer at the specified index, const variant.
Definition at line 425 of file qgssymbol.cpp.
|
inline |
Returns the total number of symbol layers contained in the symbol.
Definition at line 160 of file qgssymbol.h.
|
inline |
Returns the list of symbol layers contained in the symbol.
Definition at line 108 of file qgssymbol.h.
QgsSymbolRenderContext * QgsSymbol::symbolRenderContext | ( | ) |
Returns the symbol render context.
Only valid between startRender and stopRender calls.
Definition at line 1459 of file qgssymbol.cpp.
|
static |
Returns the default symbol type required for the specified geometry type.
Definition at line 246 of file qgssymbol.cpp.
|
static |
Returns a translated string version of the specified symbol type.
Definition at line 230 of file qgssymbol.cpp.
QgsSymbolLayer * QgsSymbol::takeSymbolLayer | ( | int | index | ) |
Removes a symbol layer from the list and returns a pointer to it.
Ownership of the layer is handed to the caller.
index | The index of the layer to remove |
Definition at line 464 of file qgssymbol.cpp.
void QgsSymbol::toSld | ( | QDomDocument & | doc, |
QDomElement & | element, | ||
QVariantMap | props | ||
) | const |
Converts the symbol to a SLD representation.
Definition at line 769 of file qgssymbol.cpp.
|
inline |
Returns the symbol's type.
Definition at line 97 of file qgssymbol.h.
QSet< QString > QgsSymbol::usedAttributes | ( | const QgsRenderContext & | context | ) | const |
Returns a list of attributes required to render this feature.
This should include any attributes required by the symbology including the ones required by expressions.
Definition at line 817 of file qgssymbol.cpp.
bool QgsSymbol::usesMapUnits | ( | ) | const |
Returns true
if the symbol has any components which use map unit based sizes.
Definition at line 296 of file qgssymbol.cpp.
|
friend |
Definition at line 52 of file qgssymbol.h.
|
protected |
Definition at line 721 of file qgssymbol.h.
|
protected |
Definition at line 722 of file qgssymbol.h.
|
protected |
Definition at line 724 of file qgssymbol.h.
|
protected |
Definition at line 707 of file qgssymbol.h.
|
protected |
Symbol opacity (in the range 0 - 1)
Definition at line 710 of file qgssymbol.h.
|
protected |
Definition at line 712 of file qgssymbol.h.
|
protected |
|
protected |
Definition at line 706 of file qgssymbol.h.