Subgroup: Symbol
Class: QgsSymbolLayerRegistry¶
-
class
qgis.core.
QgsSymbolLayerRegistry
¶ Bases:
sip.wrapper
Registry of available symbol layer classes.
QgsSymbolLayerRegistry is not usually directly created, but rather accessed through
QgsApplication.symbolLayerRegistry()
Methods
addSymbolLayerType
register a new symbol layer type. createSymbolLayer
create a new instance of symbol layer given symbol layer name and properties createSymbolLayerFromSld
create a new instance of symbol layer given symbol layer name and SLD defaultSymbolLayer
create a new instance of symbol layer for specified symbol type with default settings resolvePaths
Resolve paths in properties of a particular symbol layer. symbolLayerMetadata
return metadata for specified symbol layer. symbolLayersForType
return a list of available symbol layers for a specified symbol type Signals
Attributes
-
addSymbolLayerType
(self, metadata: QgsSymbolLayerAbstractMetadata) → bool¶ register a new symbol layer type. Takes ownership of the metadata instance.
-
createSymbolLayer
(self, name: str, properties: Dict[str, str] = {}) → QgsSymbolLayer¶ create a new instance of symbol layer given symbol layer name and properties
-
createSymbolLayerFromSld
(self, name: str, element: QDomElement) → QgsSymbolLayer¶ create a new instance of symbol layer given symbol layer name and SLD
-
defaultSymbolLayer
(type: QgsSymbol.SymbolType) → QgsSymbolLayer¶ create a new instance of symbol layer for specified symbol type with default settings
-
resolvePaths
(self, name: str, properties: Dict[str, str], pathResolver: QgsPathResolver, saving: bool)¶ Resolve paths in properties of a particular symbol layer. This normally means converting relative paths to absolute paths when loading and converting absolute paths to relative paths when saving.
New in version 3.0.
-
symbolLayerMetadata
(self, name: str) → QgsSymbolLayerAbstractMetadata¶ return metadata for specified symbol layer. Returns NULL if not found
-
symbolLayersForType
(self, type: QgsSymbol.SymbolType) → List[str]¶ return a list of available symbol layers for a specified symbol type
-