QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Public 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 ()
 Constructor for QgsLayerTreeEmbeddedWidgetRegistry/. More...
 
 QgsLayerTreeEmbeddedWidgetRegistry (const QgsLayerTreeEmbeddedWidgetRegistry &other)=delete
 QgsLayerTreeEmbeddedWidgetRegistry cannot be copied. More...
 
 ~QgsLayerTreeEmbeddedWidgetRegistry ()
 
bool addProvider (QgsLayerTreeEmbeddedWidgetProvider *provider)
 Register a provider, takes ownership of the object. More...
 
QgsLayerTreeEmbeddedWidgetRegistryoperator= (const QgsLayerTreeEmbeddedWidgetRegistry &other)=delete
 QgsLayerTreeEmbeddedWidgetRegistry cannot be copied. More...
 
QgsLayerTreeEmbeddedWidgetProviderprovider (const QString &providerId) const
 Gets provider object from the provider's ID. More...
 
QStringList providers () const
 Returns list of all registered providers. More...
 
bool removeProvider (const QString &providerId)
 Unregister a provider, the provider object is deleted. 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.

QgsLayerTreeEmbeddedWidgetRegistry is not usually directly created, but rather accessed through QgsGui::layerTreeEmbeddedWidgetRegistry().

See also
QgsLayerTreeEmbeddedWidgetRegistry
Since
QGIS 2.16

Definition at line 70 of file qgslayertreeembeddedwidgetregistry.h.

Constructor & Destructor Documentation

◆ QgsLayerTreeEmbeddedWidgetRegistry() [1/2]

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::~QgsLayerTreeEmbeddedWidgetRegistry ( )

Definition at line 27 of file qgslayertreeembeddedwidgetregistry.cpp.

◆ QgsLayerTreeEmbeddedWidgetRegistry() [2/2]

QgsLayerTreeEmbeddedWidgetRegistry::QgsLayerTreeEmbeddedWidgetRegistry ( const QgsLayerTreeEmbeddedWidgetRegistry other)
delete

Member Function Documentation

◆ addProvider()

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.

◆ operator=()

QgsLayerTreeEmbeddedWidgetRegistry & QgsLayerTreeEmbeddedWidgetRegistry::operator= ( const QgsLayerTreeEmbeddedWidgetRegistry other)
delete

◆ provider()

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

Gets provider object from the provider's ID.

Definition at line 41 of file qgslayertreeembeddedwidgetregistry.cpp.

◆ providers()

QStringList QgsLayerTreeEmbeddedWidgetRegistry::providers ( ) const

Returns list of all registered providers.

Definition at line 36 of file qgslayertreeembeddedwidgetregistry.cpp.

◆ removeProvider()

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.

Member Data Documentation

◆ mProviders

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

storage of all the providers

Definition at line 110 of file qgslayertreeembeddedwidgetregistry.h.


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