QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsProviderSourceWidgetProviderRegistry Class Reference

This class keeps a list of provider source widget providers. More...

#include <qgsprovidersourcewidgetproviderregistry.h>

Public Member Functions

 QgsProviderSourceWidgetProviderRegistry ()
 
 QgsProviderSourceWidgetProviderRegistry (const QgsProviderSourceWidgetProviderRegistry &rh)=delete
 
 ~QgsProviderSourceWidgetProviderRegistry ()
 
void addProvider (QgsProviderSourceWidgetProvider *provider)
 Add a provider implementation. Takes ownership of the object.
 
QgsProviderSourceWidgetcreateWidget (QgsMapLayer *layer, QWidget *parent=nullptr)
 Creates a new widget to configure the source of the specified layer.
 
void initializeFromProviderGuiRegistry (QgsProviderGuiRegistry *providerGuiRegistry)
 Initializes the registry.
 
QgsProviderSourceWidgetProviderRegistryoperator= (const QgsProviderSourceWidgetProviderRegistry &rh)=delete
 
QgsProviderSourceWidgetProviderproviderByName (const QString &name)
 Returns a provider by name or nullptr if not found.
 
QList< QgsProviderSourceWidgetProvider * > providers ()
 Gets list of available providers.
 
QList< QgsProviderSourceWidgetProvider * > providersByKey (const QString &providerKey)
 Returns a (possibly empty) list of providers by data providerkey.
 
bool removeProvider (QgsProviderSourceWidgetProvider *provider)
 Remove provider implementation from the list (provider object is deleted)
 

Detailed Description

This class keeps a list of provider source widget providers.

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

Since
QGIS 3.18

Definition at line 39 of file qgsprovidersourcewidgetproviderregistry.h.

Constructor & Destructor Documentation

◆ QgsProviderSourceWidgetProviderRegistry() [1/2]

QgsProviderSourceWidgetProviderRegistry::QgsProviderSourceWidgetProviderRegistry ( )
default

◆ ~QgsProviderSourceWidgetProviderRegistry()

QgsProviderSourceWidgetProviderRegistry::~QgsProviderSourceWidgetProviderRegistry ( )

Definition at line 25 of file qgsprovidersourcewidgetproviderregistry.cpp.

◆ QgsProviderSourceWidgetProviderRegistry() [2/2]

QgsProviderSourceWidgetProviderRegistry::QgsProviderSourceWidgetProviderRegistry ( const QgsProviderSourceWidgetProviderRegistry rh)
delete

Member Function Documentation

◆ addProvider()

void QgsProviderSourceWidgetProviderRegistry::addProvider ( QgsProviderSourceWidgetProvider provider)

Add a provider implementation. Takes ownership of the object.

Definition at line 35 of file qgsprovidersourcewidgetproviderregistry.cpp.

◆ createWidget()

QgsProviderSourceWidget * QgsProviderSourceWidgetProviderRegistry::createWidget ( QgsMapLayer layer,
QWidget *  parent = nullptr 
)

Creates a new widget to configure the source of the specified layer.

It may return nullptr if no provider was found. The returned object must be destroyed by the caller.

Definition at line 96 of file qgsprovidersourcewidgetproviderregistry.cpp.

◆ initializeFromProviderGuiRegistry()

void QgsProviderSourceWidgetProviderRegistry::initializeFromProviderGuiRegistry ( QgsProviderGuiRegistry providerGuiRegistry)

Initializes the registry.

The registry needs to be passed explicitly (instead of using singleton) because this gets called from QgsGui constructor.

Definition at line 52 of file qgsprovidersourcewidgetproviderregistry.cpp.

◆ operator=()

QgsProviderSourceWidgetProviderRegistry & QgsProviderSourceWidgetProviderRegistry::operator= ( const QgsProviderSourceWidgetProviderRegistry rh)
delete

◆ providerByName()

QgsProviderSourceWidgetProvider * QgsProviderSourceWidgetProviderRegistry::providerByName ( const QString &  name)

Returns a provider by name or nullptr if not found.

Definition at line 69 of file qgsprovidersourcewidgetproviderregistry.cpp.

◆ providers()

QList< QgsProviderSourceWidgetProvider * > QgsProviderSourceWidgetProviderRegistry::providers ( )

Gets list of available providers.

Definition at line 30 of file qgsprovidersourcewidgetproviderregistry.cpp.

◆ providersByKey()

QList< QgsProviderSourceWidgetProvider * > QgsProviderSourceWidgetProviderRegistry::providersByKey ( const QString &  providerKey)

Returns a (possibly empty) list of providers by data providerkey.

Definition at line 82 of file qgsprovidersourcewidgetproviderregistry.cpp.

◆ removeProvider()

bool QgsProviderSourceWidgetProviderRegistry::removeProvider ( QgsProviderSourceWidgetProvider provider)

Remove provider implementation from the list (provider object is deleted)

Returns
true if the provider was actually removed and deleted

Definition at line 40 of file qgsprovidersourcewidgetproviderregistry.cpp.


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