Class: QgsSymbolLayerAbstractMetadata

class qgis.core.QgsSymbolLayerAbstractMetadata

Bases: sip.wrapper

Stores metadata about one symbol layer class.

Note

It’s necessary to implement createSymbolLayer() function. In C++ you can use QgsSymbolLayerMetadata convenience class.

Methods

createSymbolLayer

Create a symbol layer of this type given the map of properties.

createSymbolLayerFromSld

Create a symbol layer of this type given the map of properties.

createSymbolLayerWidget

Create widget for symbol layer of this type.

name

rtype

str

resolvePaths

Resolve paths in symbol layer’s properties (if there are any paths).

type

rtype

QgsSymbol.SymbolType

visibleName

rtype

str

createSymbolLayer(self, map: Dict[str, str]) → QgsSymbolLayer

Create a symbol layer of this type given the map of properties.

Parameters

map (Dict[str) –

Return type

QgsSymbolLayer

createSymbolLayerFromSld(self, QDomElement) → QgsSymbolLayer

Create a symbol layer of this type given the map of properties.

Return type

QgsSymbolLayer

createSymbolLayerWidget(self, QgsVectorLayer) → QgsSymbolLayerWidget

Create widget for symbol layer of this type. Can return NULL if there’s no GUI

Return type

QgsSymbolLayerWidget

name(self) → str
Return type

str

resolvePaths(self, properties: Dict[str, str], pathResolver: QgsPathResolver, saving: bool)

Resolve paths in symbol layer’s properties (if there are any paths). When saving is true, paths are converted from absolute to relative, when saving is false, paths are converted from relative to absolute. This ensures that paths in project files can be relative, but in symbol layer instances the paths are always absolute

New in version 3.0.

Parameters
  • properties (Dict[str) –

  • pathResolver (QgsPathResolver) –

  • saving (bool) –

type(self) → QgsSymbol.SymbolType
Return type

QgsSymbol.SymbolType

visibleName(self) → str
Return type

str