Quantum GIS API Documentation  1.8
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
QgsSymbolLayerV2Registry Class Reference

Registry of available symbol layer classes. More...

#include <qgssymbollayerv2registry.h>

Collaboration diagram for QgsSymbolLayerV2Registry:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

 QgsSymbolLayerV2Registry ()
 ~QgsSymbolLayerV2Registry ()

Protected Attributes

QMap< QString,
QgsSymbolLayerV2AbstractMetadata * > 
mMetadata

Static Protected Attributes

static QgsSymbolLayerV2RegistrymInstance = NULL

Detailed Description

Registry of available symbol layer classes.

Implemented as a singleton.

Definition at line 108 of file qgssymbollayerv2registry.h.


Constructor & Destructor Documentation

Definition at line 59 of file qgssymbollayerv2registry.cpp.

References mMetadata.


Member Function Documentation

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

Definition at line 68 of file qgssymbollayerv2registry.cpp.

References mMetadata, and QgsSymbolLayerV2AbstractMetadata::name().

Referenced by QgsSymbolLayerV2Registry().

QgsSymbolLayerV2 * QgsSymbolLayerV2Registry::createSymbolLayer ( QString  name,
const QgsStringMap properties = QgsStringMap() 
) const

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

Definition at line 110 of file qgssymbollayerv2registry.cpp.

References mMetadata.

Referenced by QgsSymbolLayerV2Utils::loadSymbolLayer().

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

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

Definition at line 93 of file qgssymbollayerv2registry.cpp.

References QgsSimpleLineSymbolLayerV2::create(), QgsSimpleFillSymbolLayerV2::create(), QgsSimpleMarkerSymbolLayerV2::create(), QgsSymbolV2::Fill, QgsSymbolV2::Line, and QgsSymbolV2::Marker.

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

Definition at line 78 of file qgssymbollayerv2registry.cpp.

References mMetadata.

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

Definition at line 126 of file qgssymbollayerv2registry.cpp.

References mMetadata.


Member Data Documentation

Definition at line 137 of file qgssymbollayerv2registry.h.

Referenced by instance().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines