QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
This class keeps a list of source select providers that may add items to the QgsDataSourceManagerDialog When created, it automatically adds providers from data provider plugins (e.g. More...
#include <qgssourceselectproviderregistry.h>
Signals | |
void | providerAdded (const QString &name) |
Emitted whenever a provider is added to the registry. | |
void | providerRemoved (const QString &name) |
Emitted whenever a provider is removed from the registry. | |
Public Member Functions | |
QgsSourceSelectProviderRegistry () | |
QgsSourceSelectProviderRegistry (const QgsSourceSelectProviderRegistry &rh)=delete | |
QgsDataItemProviderRegistry cannot be copied. | |
~QgsSourceSelectProviderRegistry () | |
void | addProvider (QgsSourceSelectProvider *provider) |
Add a provider implementation. Takes ownership of the object. | |
QgsAbstractDataSourceWidget * | createSelectionWidget (const QString &name, QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode) |
Gets select widget from provider with name. | |
void | initializeFromProviderGuiRegistry (QgsProviderGuiRegistry *providerGuiRegistry) |
Initializes the registry. | |
QgsSourceSelectProviderRegistry & | operator= (const QgsSourceSelectProviderRegistry &rh)=delete |
QgsDataItemProviderRegistry cannot be copied. | |
QgsSourceSelectProvider * | providerByName (const QString &name) |
Returns a provider by name or nullptr if not found. | |
QList< QgsSourceSelectProvider * > | providers () |
Gets list of available providers. | |
QList< QgsSourceSelectProvider * > | providersByKey (const QString &providerKey) |
Returns a (possibly empty) list of providers by data providerkey. | |
bool | removeProvider (QgsSourceSelectProvider *provider) |
Remove provider implementation from the list (provider object is deleted) | |
This class keeps a list of source select providers that may add items to the QgsDataSourceManagerDialog When created, it automatically adds providers from data provider plugins (e.g.
PostGIS, WMS, ...)
QgsSourceSelectProviderRegistry is not usually directly created, but rather accessed through QgsGui::sourceSelectProviderRegistry().
Definition at line 40 of file qgssourceselectproviderregistry.h.
|
default |
QgsSourceSelectProviderRegistry::~QgsSourceSelectProviderRegistry | ( | ) |
Definition at line 24 of file qgssourceselectproviderregistry.cpp.
|
delete |
QgsDataItemProviderRegistry cannot be copied.
void QgsSourceSelectProviderRegistry::addProvider | ( | QgsSourceSelectProvider * | provider | ) |
Add a provider implementation. Takes ownership of the object.
Definition at line 34 of file qgssourceselectproviderregistry.cpp.
QgsAbstractDataSourceWidget * QgsSourceSelectProviderRegistry::createSelectionWidget | ( | const QString & | name, |
QWidget * | parent, | ||
Qt::WindowFlags | fl, | ||
QgsProviderRegistry::WidgetMode | widgetMode | ||
) |
Gets select widget from provider with name.
The function is replacement of QgsProviderRegistry::createSelectionWidget() from QGIS 3.8
Definition at line 103 of file qgssourceselectproviderregistry.cpp.
void QgsSourceSelectProviderRegistry::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 59 of file qgssourceselectproviderregistry.cpp.
|
delete |
QgsDataItemProviderRegistry cannot be copied.
|
signal |
Emitted whenever a provider is added to the registry.
QgsSourceSelectProvider * QgsSourceSelectProviderRegistry::providerByName | ( | const QString & | name | ) |
Returns a provider by name or nullptr
if not found.
Definition at line 76 of file qgssourceselectproviderregistry.cpp.
|
signal |
Emitted whenever a provider is removed from the registry.
QList< QgsSourceSelectProvider * > QgsSourceSelectProviderRegistry::providers | ( | ) |
Gets list of available providers.
Definition at line 29 of file qgssourceselectproviderregistry.cpp.
QList< QgsSourceSelectProvider * > QgsSourceSelectProviderRegistry::providersByKey | ( | const QString & | providerKey | ) |
Returns a (possibly empty) list of providers by data providerkey.
Definition at line 89 of file qgssourceselectproviderregistry.cpp.
bool QgsSourceSelectProviderRegistry::removeProvider | ( | QgsSourceSelectProvider * | provider | ) |
Remove provider implementation from the list (provider object is deleted)
true
if the provider was actually removed and deleted Definition at line 45 of file qgssourceselectproviderregistry.cpp.