QGIS API Documentation  2.3.0-Master
 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 More...
 
bool addPluginLayerType (QgsPluginLayerType *pluginLayerType)
 add plugin layer type (take ownership) and return true on success More...
 
bool removePluginLayerType (QString typeName)
 remove plugin layer type and return true on success More...
 
QgsPluginLayerTypepluginLayerType (QString typeName)
 return plugin layer type metadata or NULL if doesn't exist More...
 
QgsPluginLayercreateLayer (QString typeName)
 return new layer if corresponding plugin has been found, else return NULL More...
 

Static Public Member Functions

static QgsPluginLayerRegistryinstance ()
 means of accessing canonical single instance More...
 

Private Types

typedef QMap< QString,
QgsPluginLayerType * > 
PluginLayerTypes
 

Private Member Functions

 QgsPluginLayerRegistry ()
 private since instance() creates it More...
 

Private Attributes

PluginLayerTypes mPluginLayerTypes
 

Static Private Attributes

static QgsPluginLayerRegistry_instance = NULL
 pointer to canonical Singleton object More...
 

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.

Referenced by QgsProject::addLayer(), and QgsMapLayer::fromLayerDefinition().

QgsPluginLayerRegistry * QgsPluginLayerRegistry::instance ( )
static

means of accessing canonical single instance

Definition at line 53 of file qgspluginlayerregistry.cpp.

References _instance, and QgsPluginLayerRegistry().

Referenced by QgsProject::addLayer(), and QgsMapLayer::fromLayerDefinition().

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)

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: