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

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: