QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
QgsPluginLayerRegistry Class Reference

a registry of plugin layers types More...

#include <qgspluginlayerregistry.h>

Collaboration diagram for QgsPluginLayerRegistry:
Collaboration graph
[legend]

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
QgsPluginLayerTypepluginLayerType (QString typeName)
 return plugin layer type metadata or NULL if doesn't exist
QgsPluginLayercreateLayer (QString typeName)
 return new layer if corresponding plugin has been found, else return NULL

Static Public Member Functions

static QgsPluginLayerRegistryinstance ()
 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

Detailed Description

a registry of plugin layers types

Note
added in v1.5

Definition at line 58 of file qgspluginlayerregistry.h.

Member Typedef Documentation

Definition at line 85 of file qgspluginlayerregistry.h.

Constructor & Destructor Documentation

QgsPluginLayerRegistry::~QgsPluginLayerRegistry ( )
QgsPluginLayerRegistry::QgsPluginLayerRegistry ( )
private

private since instance() creates it

Definition at line 63 of file qgspluginlayerregistry.cpp.

Referenced by instance().

Member Function Documentation

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.

QgsPluginLayerRegistry * QgsPluginLayerRegistry::instance ( )
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

Note
added in v2.1

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().

Member Data Documentation

QgsPluginLayerRegistry * QgsPluginLayerRegistry::_instance = NULL
staticprivate

pointer to canonical Singleton object

Static calls to enforce singleton behaviour.

Definition at line 91 of file qgspluginlayerregistry.h.

Referenced by instance().

PluginLayerTypes QgsPluginLayerRegistry::mPluginLayerTypes
private

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