QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
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. | |
QgsProviderSourceWidget * | createWidget (QgsMapLayer *layer, QWidget *parent=nullptr) |
Creates a new widget to configure the source of the specified layer. | |
void | initializeFromProviderGuiRegistry (QgsProviderGuiRegistry *providerGuiRegistry) |
Initializes the registry. | |
QgsProviderSourceWidgetProviderRegistry & | operator= (const QgsProviderSourceWidgetProviderRegistry &rh)=delete |
QgsProviderSourceWidgetProvider * | providerByName (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) | |
This class keeps a list of provider source widget providers.
QgsProviderSourceWidgetProviderRegistry is not usually directly created, but rather accessed through QgsGui::QgsProviderSourceWidgetProviderRegistry().
Definition at line 39 of file qgsprovidersourcewidgetproviderregistry.h.
|
default |
QgsProviderSourceWidgetProviderRegistry::~QgsProviderSourceWidgetProviderRegistry | ( | ) |
Definition at line 25 of file qgsprovidersourcewidgetproviderregistry.cpp.
|
delete |
void QgsProviderSourceWidgetProviderRegistry::addProvider | ( | QgsProviderSourceWidgetProvider * | provider | ) |
Add a provider implementation. Takes ownership of the object.
Definition at line 35 of file qgsprovidersourcewidgetproviderregistry.cpp.
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.
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.
|
delete |
QgsProviderSourceWidgetProvider * QgsProviderSourceWidgetProviderRegistry::providerByName | ( | const QString & | name | ) |
Returns a provider by name or nullptr
if not found.
Definition at line 69 of file qgsprovidersourcewidgetproviderregistry.cpp.
QList< QgsProviderSourceWidgetProvider * > QgsProviderSourceWidgetProviderRegistry::providers | ( | ) |
Gets list of available providers.
Definition at line 30 of file qgsprovidersourcewidgetproviderregistry.cpp.
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.
bool QgsProviderSourceWidgetProviderRegistry::removeProvider | ( | QgsProviderSourceWidgetProvider * | provider | ) |
Remove provider implementation from the list (provider object is deleted)
true
if the provider was actually removed and deleted Definition at line 40 of file qgsprovidersourcewidgetproviderregistry.cpp.