QGIS API Documentation
2.2.0-Valmiera
|
a registry of plugin layers types More...
#include <qgspluginlayerregistry.h>
Public Member Functions | |
~QgsPluginLayerRegistry () | |
QStringList | pluginLayerTypes () |
list all known layer types | |
bool | addPluginLayerType (QgsPluginLayerType *pluginLayerType) |
add plugin layer type (take ownership) and return true on success | |
bool | removePluginLayerType (QString typeName) |
remove plugin layer type and return true on success | |
QgsPluginLayerType * | pluginLayerType (QString typeName) |
return plugin layer type metadata or NULL if doesn't exist | |
QgsPluginLayer * | createLayer (QString typeName) |
return new layer if corresponding plugin has been found, else return NULL |
Static Public Member Functions | |
static QgsPluginLayerRegistry * | instance () |
means of accessing canonical single instance |
Private Types | |
typedef QMap< QString, QgsPluginLayerType * > | PluginLayerTypes |
Private Member Functions | |
QgsPluginLayerRegistry () | |
private since instance() creates it |
Private Attributes | |
PluginLayerTypes | mPluginLayerTypes |
Static Private Attributes | |
static QgsPluginLayerRegistry * | _instance = NULL |
pointer to canonical Singleton object |
a registry of plugin layers types
Definition at line 58 of file qgspluginlayerregistry.h.
|
private |
Definition at line 85 of file qgspluginlayerregistry.h.
QgsPluginLayerRegistry::~QgsPluginLayerRegistry | ( | ) |
Definition at line 67 of file qgspluginlayerregistry.cpp.
References mPluginLayerTypes, QgsDebugMsg, and removePluginLayerType().
|
private |
private since instance() creates it
Definition at line 63 of file qgspluginlayerregistry.cpp.
Referenced by instance().
bool QgsPluginLayerRegistry::addPluginLayerType | ( | QgsPluginLayerType * | pluginLayerType | ) |
add plugin layer type (take ownership) and return true on success
Definition at line 82 of file qgspluginlayerregistry.cpp.
References mPluginLayerTypes, and QgsPluginLayerType::name().
QgsPluginLayer * QgsPluginLayerRegistry::createLayer | ( | QString | typeName | ) |
return new layer if corresponding plugin has been found, else return NULL
Definition at line 124 of file qgspluginlayerregistry.cpp.
References QgsPluginLayerType::createLayer(), pluginLayerType(), and QgsDebugMsg.
|
static |
means of accessing canonical single instance
Definition at line 53 of file qgspluginlayerregistry.cpp.
References _instance, and QgsPluginLayerRegistry().
Referenced by removePluginLayerType().
QgsPluginLayerType * QgsPluginLayerRegistry::pluginLayerType | ( | QString | typeName | ) |
return plugin layer type metadata or NULL if doesn't exist
Definition at line 118 of file qgspluginlayerregistry.cpp.
References mPluginLayerTypes.
Referenced by createLayer().
QStringList QgsPluginLayerRegistry::pluginLayerTypes | ( | ) |
list all known layer types
Definition at line 77 of file qgspluginlayerregistry.cpp.
References mPluginLayerTypes.
bool QgsPluginLayerRegistry::removePluginLayerType | ( | QString | typeName | ) |
remove plugin layer type and return true on success
Definition at line 94 of file qgspluginlayerregistry.cpp.
References QgsMapLayer::id(), instance(), mPluginLayerTypes, QgsMapLayer::PluginLayer, QgsPluginLayer::pluginLayerType(), and QgsMapLayer::type().
Referenced by ~QgsPluginLayerRegistry().
|
staticprivate |
pointer to canonical Singleton object
Static calls to enforce singleton behaviour.
Definition at line 91 of file qgspluginlayerregistry.h.
Referenced by instance().
|
private |
Definition at line 93 of file qgspluginlayerregistry.h.
Referenced by addPluginLayerType(), pluginLayerType(), pluginLayerTypes(), removePluginLayerType(), and ~QgsPluginLayerRegistry().