QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
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/.
 
 QgsLayerTreeEmbeddedWidgetRegistry (const QgsLayerTreeEmbeddedWidgetRegistry &other)=delete
 
 ~QgsLayerTreeEmbeddedWidgetRegistry ()
 
bool addProvider (QgsLayerTreeEmbeddedWidgetProvider *provider)
 Register a provider, takes ownership of the object.
 
QgsLayerTreeEmbeddedWidgetRegistryoperator= (const QgsLayerTreeEmbeddedWidgetRegistry &other)=delete
 
QgsLayerTreeEmbeddedWidgetProviderprovider (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
 

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

Definition at line 68 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 106 of file qgslayertreeembeddedwidgetregistry.h.


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