QgsSymbolLayerRegistry class
Registry of available symbol layer classes.
Contents
QgsSymbolLayerRegistry is not usually directly created, but rather accessed through QgsApplication::
Public static functions
-
static auto defaultSymbolLayer(QgsSymbol::
SymbolType type) -> QgsSymbolLayer* - create a new instance of symbol layer for specified symbol type with default settings
Constructors, destructors, conversion operators
- QgsSymbolLayerRegistry(const QgsSymbolLayerRegistry& rh) deleted
- QgsSymbolLayerRegistry cannot be copied.
Public functions
- auto addSymbolLayerType(QgsSymbolLayerAbstractMetadata* metadata) -> bool
- register a new symbol layer type. Takes ownership of the metadata instance.
- auto createSymbolLayer(const QString& name, const QgsStringMap& properties = QgsStringMap()) const -> QgsSymbolLayer*
- create a new instance of symbol layer given symbol layer name and properties
- auto createSymbolLayerFromSld(const QString& name, QDomElement& element) const -> QgsSymbolLayer*
- create a new instance of symbol layer given symbol layer name and SLD
- auto operator=(const QgsSymbolLayerRegistry& rh) -> QgsSymbolLayerRegistry& deleted
- QgsSymbolLayerRegistry cannot be copied.
- void resolvePaths(const QString& name, QgsStringMap& properties, const QgsPathResolver& pathResolver, bool saving) const
- Resolve paths in properties of a particular symbol layer.
- auto symbolLayerMetadata(const QString& name) const -> QgsSymbolLayerAbstractMetadata*
- Returns metadata for specified symbol layer. Returns NULL if not found.
-
auto symbolLayersForType(QgsSymbol::
SymbolType type) -> QStringList - Returns a list of available symbol layers for a specified symbol type.
Function documentation
void QgsSymbolLayerRegistry:: resolvePaths(const QString& name,
QgsStringMap& properties,
const QgsPathResolver& pathResolver,
bool saving) const
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.