QGIS API Documentation  2.18.3-Las Palmas (77b8c3d)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsLayerTreeEmbeddedWidgetRegistry Class Reference

Registry of widgets that may be embedded into layer tree view. More...

#include <qgslayertreeembeddedwidgetregistry.h>

Public Member Functions

 ~QgsLayerTreeEmbeddedWidgetRegistry ()
 
bool addProvider (QgsLayerTreeEmbeddedWidgetProvider *provider)
 Register a provider, takes ownership of the object. More...
 
QgsLayerTreeEmbeddedWidgetProviderprovider (const QString &providerId) const
 Get provider object from the provider's ID. More...
 
QStringList providers () const
 Return list of all registered providers. More...
 
bool removeProvider (const QString &providerId)
 Unregister a provider, the provider object is deleted. More...
 

Static Public Member Functions

static QgsLayerTreeEmbeddedWidgetRegistryinstance ()
 Means of accessing canonical single instance. More...
 

Protected Member Functions

 QgsLayerTreeEmbeddedWidgetRegistry ()
 Protected constructor - use instance() to access the registry. More...
 

Protected Attributes

QMap< QString, QgsLayerTreeEmbeddedWidgetProvider * > mProviders
 storage of all the providers More...
 

Detailed Description

Registry of widgets that may be embedded into layer tree view.

Embedded widgets are assigned per individual map layers and they are shown before any legend entries. Layer tree must have UseEmbeddedWidgets flag enabled in order to show assigned widgets.

See also
QgsLayerTreeEmbeddedWidgetRegistry
Note
introduced in QGIS 2.16

Definition at line 61 of file qgslayertreeembeddedwidgetregistry.h.

Constructor & Destructor Documentation

QgsLayerTreeEmbeddedWidgetRegistry::~QgsLayerTreeEmbeddedWidgetRegistry ( )

Definition at line 34 of file qgslayertreeembeddedwidgetregistry.cpp.

QgsLayerTreeEmbeddedWidgetRegistry::QgsLayerTreeEmbeddedWidgetRegistry ( )
protected

Protected constructor - use instance() to access the registry.

Definition at line 28 of file qgslayertreeembeddedwidgetregistry.cpp.

Member Function Documentation

bool QgsLayerTreeEmbeddedWidgetRegistry::addProvider ( QgsLayerTreeEmbeddedWidgetProvider provider)

Register a provider, takes ownership of the object.

Returns true on success, false if the provider is already registered.

Definition at line 52 of file qgslayertreeembeddedwidgetregistry.cpp.

QgsLayerTreeEmbeddedWidgetRegistry * QgsLayerTreeEmbeddedWidgetRegistry::instance ( )
static

Means of accessing canonical single instance.

Definition at line 22 of file qgslayertreeembeddedwidgetregistry.cpp.

QgsLayerTreeEmbeddedWidgetProvider * QgsLayerTreeEmbeddedWidgetRegistry::provider ( const QString providerId) const

Get provider object from the provider's ID.

Definition at line 47 of file qgslayertreeembeddedwidgetregistry.cpp.

QStringList QgsLayerTreeEmbeddedWidgetRegistry::providers ( ) const

Return list of all registered providers.

Definition at line 42 of file qgslayertreeembeddedwidgetregistry.cpp.

bool QgsLayerTreeEmbeddedWidgetRegistry::removeProvider ( const QString providerId)

Unregister a provider, the provider object is deleted.

Returns true on success, false if the provider was not registered.

Definition at line 61 of file qgslayertreeembeddedwidgetregistry.cpp.

Member Data Documentation

QMap<QString, QgsLayerTreeEmbeddedWidgetProvider*> QgsLayerTreeEmbeddedWidgetRegistry::mProviders
protected

storage of all the providers

Definition at line 89 of file qgslayertreeembeddedwidgetregistry.h.


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