QGIS API Documentation  2.0.1-Dufour
 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 ()
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 81 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 77 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 119 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 113 of file qgspluginlayerregistry.cpp.

References mPluginLayerTypes.

Referenced by createLayer().

bool QgsPluginLayerRegistry::removePluginLayerType ( QString  typeName)

remove plugin layer type and return true on success

Definition at line 89 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 87 of file qgspluginlayerregistry.h.

Referenced by instance().

PluginLayerTypes QgsPluginLayerRegistry::mPluginLayerTypes
private

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