QGIS API Documentation
2.0.1-Dufour
|
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 | |
QgsSymbolLayerV2 * | createSymbolLayerFromSld (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 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 114 of file qgssymbollayerv2registry.h.
|
protected |
Definition at line 26 of file qgssymbollayerv2registry.cpp.
References addSymbolLayerType(), QgsEllipseSymbolLayerV2::create(), QgsSimpleFillSymbolLayerV2::create(), QgsSimpleLineSymbolLayerV2::create(), QgsSimpleMarkerSymbolLayerV2::create(), QgsVectorFieldSymbolLayer::create(), QgsSvgMarkerSymbolLayerV2::create(), QgsMarkerLineSymbolLayerV2::create(), QgsSVGFillSymbolLayer::create(), QgsFontMarkerSymbolLayerV2::create(), QgsLinePatternFillSymbolLayer::create(), QgsPointPatternFillSymbolLayer::create(), QgsCentroidFillSymbolLayerV2::create(), QgsEllipseSymbolLayerV2::createFromSld(), QgsSimpleFillSymbolLayerV2::createFromSld(), QgsSimpleLineSymbolLayerV2::createFromSld(), QgsSimpleMarkerSymbolLayerV2::createFromSld(), QgsSvgMarkerSymbolLayerV2::createFromSld(), QgsMarkerLineSymbolLayerV2::createFromSld(), QgsSVGFillSymbolLayer::createFromSld(), QgsFontMarkerSymbolLayerV2::createFromSld(), QgsLinePatternFillSymbolLayer::createFromSld(), QgsPointPatternFillSymbolLayer::createFromSld(), QgsCentroidFillSymbolLayerV2::createFromSld(), QgsSymbolV2::Fill, QgsSymbolV2::Line, QgsSymbolV2::Marker, and tr.
Referenced by instance().
|
protected |
Definition at line 57 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 66 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 108 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 given symbol layer name and SLD
Definition at line 116 of file qgssymbollayerv2registry.cpp.
References mMetadata.
Referenced by QgsSymbolLayerV2Utils::createFillLayerFromSld(), QgsSymbolLayerV2Utils::createLineLayerFromSld(), QgsSymbolLayerV2Utils::createMarkerLayerFromSld(), and QgsSymbolLayerV2Utils::createSymbolLayerV2ListFromSld().
|
static |
create a new instance of symbol layer for specified symbol type with default settings
Definition at line 91 of file qgssymbollayerv2registry.cpp.
References QgsSimpleFillSymbolLayerV2::create(), QgsSimpleLineSymbolLayerV2::create(), QgsSimpleMarkerSymbolLayerV2::create(), QgsSymbolV2::Fill, QgsSymbolV2::Line, and QgsSymbolV2::Marker.
|
static |
return the single instance of this class (instantiate it if not exists)
Definition at line 84 of file qgssymbollayerv2registry.cpp.
References mInstance, and QgsSymbolLayerV2Registry().
Referenced by QgsSymbolLayerV2Utils::convertPolygonSymbolizerToPointMarker(), QgsSymbolLayerV2Utils::createFillLayerFromSld(), QgsSymbolLayerV2Utils::createLineLayerFromSld(), QgsSymbolLayerV2Utils::createMarkerLayerFromSld(), QgsSymbolLayerV2Utils::createSymbolLayerV2ListFromSld(), and QgsSymbolLayerV2Utils::loadSymbolLayer().
QgsSymbolLayerV2AbstractMetadata * QgsSymbolLayerV2Registry::symbolLayerMetadata | ( | QString | name | ) | const |
return metadata for specified symbol layer. Returns NULL if not found
Definition at line 76 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 124 of file qgssymbollayerv2registry.cpp.
References mMetadata.
|
staticprotected |
Definition at line 143 of file qgssymbollayerv2registry.h.
Referenced by instance().
|
protected |
Definition at line 144 of file qgssymbollayerv2registry.h.
Referenced by addSymbolLayerType(), createSymbolLayer(), createSymbolLayerFromSld(), symbolLayerMetadata(), symbolLayersForType(), and ~QgsSymbolLayerV2Registry().