QGIS API Documentation  3.6.0-Noosa (5873452)
Public Member Functions | Static Public Member Functions | List of all members
QgsSymbolLayerRegistry Class Reference

Registry of available symbol layer classes. More...

#include <qgssymbollayerregistry.h>

Public Member Functions

 QgsSymbolLayerRegistry ()
 
 QgsSymbolLayerRegistry (const QgsSymbolLayerRegistry &rh)=delete
 QgsSymbolLayerRegistry cannot be copied. More...
 
 ~QgsSymbolLayerRegistry ()
 
bool addSymbolLayerType (QgsSymbolLayerAbstractMetadata *metadata)
 register a new symbol layer type. Takes ownership of the metadata instance. More...
 
QgsSymbolLayercreateSymbolLayer (const QString &name, const QgsStringMap &properties=QgsStringMap()) const
 create a new instance of symbol layer given symbol layer name and properties More...
 
QgsSymbolLayercreateSymbolLayerFromSld (const QString &name, QDomElement &element) const
 create a new instance of symbol layer given symbol layer name and SLD More...
 
QgsSymbolLayerRegistryoperator= (const QgsSymbolLayerRegistry &rh)=delete
 QgsSymbolLayerRegistry cannot be copied. More...
 
void resolvePaths (const QString &name, QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving) const
 Resolve paths in properties of a particular symbol layer. More...
 
QgsSymbolLayerAbstractMetadatasymbolLayerMetadata (const QString &name) const
 Returns metadata for specified symbol layer. Returns NULL if not found. More...
 
QStringList symbolLayersForType (QgsSymbol::SymbolType type)
 Returns a list of available symbol layers for a specified symbol type. More...
 

Static Public Member Functions

static QgsSymbolLayerdefaultSymbolLayer (QgsSymbol::SymbolType type)
 create a new instance of symbol layer for specified symbol type with default settings More...
 

Detailed Description

Registry of available symbol layer classes.

QgsSymbolLayerRegistry is not usually directly created, but rather accessed through QgsApplication::symbolLayerRegistry().

Definition at line 144 of file qgssymbollayerregistry.h.

Constructor & Destructor Documentation

◆ QgsSymbolLayerRegistry() [1/2]

QgsSymbolLayerRegistry::QgsSymbolLayerRegistry ( )

Definition at line 26 of file qgssymbollayerregistry.cpp.

◆ ~QgsSymbolLayerRegistry()

QgsSymbolLayerRegistry::~QgsSymbolLayerRegistry ( )

Definition at line 71 of file qgssymbollayerregistry.cpp.

◆ QgsSymbolLayerRegistry() [2/2]

QgsSymbolLayerRegistry::QgsSymbolLayerRegistry ( const QgsSymbolLayerRegistry rh)
delete

QgsSymbolLayerRegistry cannot be copied.

Member Function Documentation

◆ addSymbolLayerType()

bool QgsSymbolLayerRegistry::addSymbolLayerType ( QgsSymbolLayerAbstractMetadata metadata)

register a new symbol layer type. Takes ownership of the metadata instance.

Definition at line 76 of file qgssymbollayerregistry.cpp.

◆ createSymbolLayer()

QgsSymbolLayer * QgsSymbolLayerRegistry::createSymbolLayer ( const QString &  name,
const QgsStringMap properties = QgsStringMap() 
) const

create a new instance of symbol layer given symbol layer name and properties

Definition at line 112 of file qgssymbollayerregistry.cpp.

◆ createSymbolLayerFromSld()

QgsSymbolLayer * QgsSymbolLayerRegistry::createSymbolLayerFromSld ( const QString &  name,
QDomElement &  element 
) const

create a new instance of symbol layer given symbol layer name and SLD

Definition at line 120 of file qgssymbollayerregistry.cpp.

◆ defaultSymbolLayer()

QgsSymbolLayer * QgsSymbolLayerRegistry::defaultSymbolLayer ( QgsSymbol::SymbolType  type)
static

create a new instance of symbol layer for specified symbol type with default settings

Definition at line 91 of file qgssymbollayerregistry.cpp.

◆ operator=()

QgsSymbolLayerRegistry& QgsSymbolLayerRegistry::operator= ( const QgsSymbolLayerRegistry rh)
delete

QgsSymbolLayerRegistry cannot be copied.

◆ resolvePaths()

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.

Since
QGIS 3.0

Definition at line 128 of file qgssymbollayerregistry.cpp.

◆ symbolLayerMetadata()

QgsSymbolLayerAbstractMetadata * QgsSymbolLayerRegistry::symbolLayerMetadata ( const QString &  name) const

Returns metadata for specified symbol layer. Returns NULL if not found.

Definition at line 86 of file qgssymbollayerregistry.cpp.

◆ symbolLayersForType()

QStringList QgsSymbolLayerRegistry::symbolLayersForType ( QgsSymbol::SymbolType  type)

Returns a list of available symbol layers for a specified symbol type.

Definition at line 136 of file qgssymbollayerregistry.cpp.


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