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
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 68 of file qgssymbollayerv2registry.h.


Constructor & Destructor Documentation

QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry (  )  [protected]

QgsSymbolLayerV2Registry::~QgsSymbolLayerV2Registry (  )  [protected]

Definition at line 32 of file qgssymbollayerv2registry.cpp.

References mMetadata.


Member Function Documentation

QgsSymbolLayerV2Registry * QgsSymbolLayerV2Registry::instance (  )  [static]

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

Definition at line 59 of file qgssymbollayerv2registry.cpp.

References mInstance, and QgsSymbolLayerV2Registry().

Referenced by QgsSymbolLayerV2Utils::loadSymbolLayer().

QgsSymbolLayerV2AbstractMetadata * QgsSymbolLayerV2Registry::symbolLayerMetadata ( QString  name  )  const

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

Definition at line 51 of file qgssymbollayerv2registry.cpp.

References mMetadata.

bool QgsSymbolLayerV2Registry::addSymbolLayerType ( QgsSymbolLayerV2AbstractMetadata metadata  ) 

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

Definition at line 41 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 83 of file qgssymbollayerv2registry.cpp.

References mMetadata.

Referenced by QgsSymbolLayerV2Utils::loadSymbolLayer().

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

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

Definition at line 91 of file qgssymbollayerv2registry.cpp.

References mMetadata.

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

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

Definition at line 66 of file qgssymbollayerv2registry.cpp.

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


Member Data Documentation

Definition at line 94 of file qgssymbollayerv2registry.h.

Referenced by instance().


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

Generated on Sat Feb 4 19:17:54 2012 for Quantum GIS API Documentation by  doxygen 1.5.6