QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Registry of widgets that may be embedded into layer tree view. More...
#include <qgslayertreeembeddedwidgetregistry.h>
Public Member Functions | |
QgsLayerTreeEmbeddedWidgetRegistry () | |
Constructor for QgsLayerTreeEmbeddedWidgetRegistry/. | |
QgsLayerTreeEmbeddedWidgetRegistry (const QgsLayerTreeEmbeddedWidgetRegistry &other)=delete | |
~QgsLayerTreeEmbeddedWidgetRegistry () | |
bool | addProvider (QgsLayerTreeEmbeddedWidgetProvider *provider) |
Register a provider, takes ownership of the object. | |
QgsLayerTreeEmbeddedWidgetRegistry & | operator= (const QgsLayerTreeEmbeddedWidgetRegistry &other)=delete |
QgsLayerTreeEmbeddedWidgetProvider * | provider (const QString &providerId) const |
Gets provider object from the provider's ID. | |
QStringList | providers () const |
Returns list of all registered providers. | |
bool | removeProvider (const QString &providerId) |
Unregister a provider, the provider object is deleted. | |
Protected Attributes | |
QMap< QString, QgsLayerTreeEmbeddedWidgetProvider * > | mProviders |
storage of all the providers | |
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.
QgsLayerTreeEmbeddedWidgetRegistry is not usually directly created, but rather accessed through QgsGui::layerTreeEmbeddedWidgetRegistry().
Definition at line 68 of file qgslayertreeembeddedwidgetregistry.h.
QgsLayerTreeEmbeddedWidgetRegistry::QgsLayerTreeEmbeddedWidgetRegistry | ( | ) |
Constructor for QgsLayerTreeEmbeddedWidgetRegistry/.
QgsLayerTreeEmbeddedWidgetRegistry is not usually directly created, but rather accessed through QgsGui::layerTreeEmbeddedWidgetRegistry().
Definition at line 21 of file qgslayertreeembeddedwidgetregistry.cpp.
QgsLayerTreeEmbeddedWidgetRegistry::~QgsLayerTreeEmbeddedWidgetRegistry | ( | ) |
Definition at line 27 of file qgslayertreeembeddedwidgetregistry.cpp.
|
delete |
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 46 of file qgslayertreeembeddedwidgetregistry.cpp.
|
delete |
QgsLayerTreeEmbeddedWidgetProvider * QgsLayerTreeEmbeddedWidgetRegistry::provider | ( | const QString & | providerId | ) | const |
Gets provider object from the provider's ID.
Definition at line 41 of file qgslayertreeembeddedwidgetregistry.cpp.
QStringList QgsLayerTreeEmbeddedWidgetRegistry::providers | ( | ) | const |
Returns list of all registered providers.
Definition at line 36 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 55 of file qgslayertreeembeddedwidgetregistry.cpp.
|
protected |
storage of all the providers
Definition at line 104 of file qgslayertreeembeddedwidgetregistry.h.