Quantum GIS API Documentation
1.7.4
|
Registry of available symbol layer classes. More...
#include <qgssymbollayerv2registry.h>
Public Member Functions | |
QgsSymbolLayerV2AbstractMetadata * | symbolLayerMetadata (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. | |
QgsSymbolLayerV2 * | createSymbolLayer (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 QgsSymbolLayerV2Registry * | instance () |
return the single instance of this class (instantiate it if not exists) | |
static QgsSymbolLayerV2 * | defaultSymbolLayer (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 QgsSymbolLayerV2Registry * | mInstance = NULL |
Registry of available symbol layer classes.
Implemented as a singleton.
Definition at line 68 of file qgssymbollayerv2registry.h.
QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry | ( | ) | [protected] |
Definition at line 10 of file qgssymbollayerv2registry.cpp.
References addSymbolLayerType(), QgsSimpleLineSymbolLayerV2::create(), QgsSimpleFillSymbolLayerV2::create(), QgsSimpleMarkerSymbolLayerV2::create(), QgsSVGFillSymbolLayer::create(), QgsSvgMarkerSymbolLayerV2::create(), QgsMarkerLineSymbolLayerV2::create(), QgsCentroidFillSymbolLayerV2::create(), QgsFontMarkerSymbolLayerV2::create(), QgsLineDecorationSymbolLayerV2::create(), QgsSymbolV2::Fill, QgsSymbolV2::Line, and QgsSymbolV2::Marker.
Referenced by instance().
QgsSymbolLayerV2Registry::~QgsSymbolLayerV2Registry | ( | ) | [protected] |
Definition at line 35 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 44 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 86 of file qgssymbollayerv2registry.cpp.
References mMetadata.
Referenced by QgsSymbolLayerV2Utils::loadSymbolLayer().
QgsSymbolLayerV2 * QgsSymbolLayerV2Registry::defaultSymbolLayer | ( | QgsSymbolV2::SymbolType | type | ) | [static] |
create a new instance of symbol layer for specified symbol type with default settings
Definition at line 69 of file qgssymbollayerv2registry.cpp.
References QgsSimpleLineSymbolLayerV2::create(), QgsSimpleFillSymbolLayerV2::create(), QgsSimpleMarkerSymbolLayerV2::create(), QgsSymbolV2::Fill, QgsSymbolV2::Line, and QgsSymbolV2::Marker.
QgsSymbolLayerV2Registry * QgsSymbolLayerV2Registry::instance | ( | ) | [static] |
return the single instance of this class (instantiate it if not exists)
Definition at line 62 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 54 of file qgssymbollayerv2registry.cpp.
References mMetadata.
QStringList QgsSymbolLayerV2Registry::symbolLayersForType | ( | QgsSymbolV2::SymbolType | type | ) |
return a list of available symbol layers for a specified symbol type
Definition at line 94 of file qgssymbollayerv2registry.cpp.
References mMetadata.
QgsSymbolLayerV2Registry * QgsSymbolLayerV2Registry::mInstance = NULL [static, protected] |
Definition at line 94 of file qgssymbollayerv2registry.h.
Referenced by instance().
QMap<QString, QgsSymbolLayerV2AbstractMetadata*> QgsSymbolLayerV2Registry::mMetadata [protected] |
Definition at line 95 of file qgssymbollayerv2registry.h.
Referenced by addSymbolLayerType(), createSymbolLayer(), symbolLayerMetadata(), symbolLayersForType(), and ~QgsSymbolLayerV2Registry().