QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
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... | |
QgsLayerTreeEmbeddedWidgetProvider * | provider (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 QgsLayerTreeEmbeddedWidgetRegistry * | instance () |
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... | |
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.
Definition at line 61 of file qgslayertreeembeddedwidgetregistry.h.
QgsLayerTreeEmbeddedWidgetRegistry::~QgsLayerTreeEmbeddedWidgetRegistry | ( | ) |
Definition at line 34 of file qgslayertreeembeddedwidgetregistry.cpp.
|
protected |
Protected constructor - use instance() to access the registry.
Definition at line 28 of file qgslayertreeembeddedwidgetregistry.cpp.
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.
|
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.
|
protected |
storage of all the providers
Definition at line 89 of file qgslayertreeembeddedwidgetregistry.h.