QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsSymbolLayerV2Registry Class Reference

Registry of available symbol layer classes. More...

#include <qgssymbollayerv2registry.h>

Public Member Functions

bool addSymbolLayerType (QgsSymbolLayerV2AbstractMetadata *metadata)
 register a new symbol layer type. Takes ownership of the metadata instance. More...
 
QgsSymbolLayerV2createSymbolLayer (const QString &name, const QgsStringMap &properties=QgsStringMap()) const
 create a new instance of symbol layer given symbol layer name and properties More...
 
QgsSymbolLayerV2createSymbolLayerFromSld (const QString &name, QDomElement &element) const
 create a new instance of symbol layer given symbol layer name and SLD More...
 
QgsSymbolLayerV2AbstractMetadatasymbolLayerMetadata (const QString &name) const
 return metadata for specified symbol layer. Returns NULL if not found More...
 
QStringList symbolLayersForType (QgsSymbolV2::SymbolType type)
 return a list of available symbol layers for a specified symbol type More...
 

Static Public Member Functions

static QgsSymbolLayerV2defaultSymbolLayer (QgsSymbolV2::SymbolType type)
 create a new instance of symbol layer for specified symbol type with default settings More...
 
static QgsSymbolLayerV2Registryinstance ()
 return the single instance of this class (instantiate it if not exists) More...
 

Protected Member Functions

 QgsSymbolLayerV2Registry ()
 
 ~QgsSymbolLayerV2Registry ()
 

Protected Attributes

QMap< QString, QgsSymbolLayerV2AbstractMetadata * > mMetadata
 

Detailed Description

Registry of available symbol layer classes.

Implemented as a singleton.

Definition at line 117 of file qgssymbollayerv2registry.h.

Constructor & Destructor Documentation

◆ QgsSymbolLayerV2Registry()

QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry ( )
protected

Definition at line 26 of file qgssymbollayerv2registry.cpp.

◆ ~QgsSymbolLayerV2Registry()

QgsSymbolLayerV2Registry::~QgsSymbolLayerV2Registry ( )
protected

Definition at line 69 of file qgssymbollayerv2registry.cpp.

Member Function Documentation

◆ addSymbolLayerType()

bool QgsSymbolLayerV2Registry::addSymbolLayerType ( QgsSymbolLayerV2AbstractMetadata metadata)

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

Definition at line 74 of file qgssymbollayerv2registry.cpp.

◆ createSymbolLayer()

QgsSymbolLayerV2 * QgsSymbolLayerV2Registry::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 116 of file qgssymbollayerv2registry.cpp.

◆ createSymbolLayerFromSld()

QgsSymbolLayerV2 * QgsSymbolLayerV2Registry::createSymbolLayerFromSld ( const QString name,
QDomElement element 
) const

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

Definition at line 124 of file qgssymbollayerv2registry.cpp.

◆ defaultSymbolLayer()

QgsSymbolLayerV2 * QgsSymbolLayerV2Registry::defaultSymbolLayer ( QgsSymbolV2::SymbolType  type)
static

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

Definition at line 95 of file qgssymbollayerv2registry.cpp.

◆ instance()

QgsSymbolLayerV2Registry * QgsSymbolLayerV2Registry::instance ( )
static

return the single instance of this class (instantiate it if not exists)

Definition at line 89 of file qgssymbollayerv2registry.cpp.

◆ symbolLayerMetadata()

QgsSymbolLayerV2AbstractMetadata * QgsSymbolLayerV2Registry::symbolLayerMetadata ( const QString name) const

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

Definition at line 84 of file qgssymbollayerv2registry.cpp.

◆ symbolLayersForType()

QStringList QgsSymbolLayerV2Registry::symbolLayersForType ( QgsSymbolV2::SymbolType  type)

return a list of available symbol layers for a specified symbol type

Definition at line 132 of file qgssymbollayerv2registry.cpp.

Member Data Documentation

◆ mMetadata

QMap<QString, QgsSymbolLayerV2AbstractMetadata*> QgsSymbolLayerV2Registry::mMetadata
protected

Definition at line 146 of file qgssymbollayerv2registry.h.


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