Navigation Menu

Skip to content

Commit

Permalink
Allow listing all available plugin layers
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Oct 8, 2013
1 parent cecfff0 commit 8118f4d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/core/qgspluginlayerregistry.sip
Expand Up @@ -33,6 +33,10 @@ class QgsPluginLayerRegistry

~QgsPluginLayerRegistry();

/** list all known layer types
* \note added in v2.1 */
QStringList pluginLayerTypes();

/** add plugin layer type (take ownership) and return true on success */
bool addPluginLayerType( QgsPluginLayerType* pluginLayerType /Transfer/ );

Expand Down
5 changes: 5 additions & 0 deletions src/core/qgspluginlayerregistry.cpp
Expand Up @@ -74,6 +74,11 @@ QgsPluginLayerRegistry::~QgsPluginLayerRegistry()
}
}

QStringList QgsPluginLayerRegistry::pluginLayerTypes()
{
return mPluginLayerTypes.keys();
}

bool QgsPluginLayerRegistry::addPluginLayerType( QgsPluginLayerType* type )
{
if ( type == NULL )
Expand Down
4 changes: 4 additions & 0 deletions src/core/qgspluginlayerregistry.h
Expand Up @@ -64,6 +64,10 @@ class CORE_EXPORT QgsPluginLayerRegistry

~QgsPluginLayerRegistry();

/** list all known layer types
* \note added in v2.1 */
QStringList pluginLayerTypes();

/** add plugin layer type (take ownership) and return true on success */
bool addPluginLayerType( QgsPluginLayerType* pluginLayerType );

Expand Down

0 comments on commit 8118f4d

Please sign in to comment.