QGIS API Documentation 3.29.0-Master (19d7edcfed)
Signals | Public Member Functions | List of all members
QgsSourceSelectProviderRegistry Class Reference

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>

Inheritance diagram for QgsSourceSelectProviderRegistry:
Inheritance graph
[legend]

Signals

void providerAdded (const QString &name)
 Emitted whenever a provider is added to the registry. More...
 
void providerRemoved (const QString &name)
 Emitted whenever a provider is removed from the registry. More...
 

Public Member Functions

 QgsSourceSelectProviderRegistry ()
 
 QgsSourceSelectProviderRegistry (const QgsSourceSelectProviderRegistry &rh)=delete
 QgsDataItemProviderRegistry cannot be copied. More...
 
 ~QgsSourceSelectProviderRegistry ()
 
void addProvider (QgsSourceSelectProvider *provider)
 Add a provider implementation. Takes ownership of the object. More...
 
QgsAbstractDataSourceWidgetcreateSelectionWidget (const QString &name, QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode)
 Gets select widget from provider with name. More...
 
void initializeFromProviderGuiRegistry (QgsProviderGuiRegistry *providerGuiRegistry)
 Initializes the registry. More...
 
QgsSourceSelectProviderRegistryoperator= (const QgsSourceSelectProviderRegistry &rh)=delete
 QgsDataItemProviderRegistry cannot be copied. More...
 
QgsSourceSelectProviderproviderByName (const QString &name)
 Returns a provider by name or nullptr if not found. More...
 
QList< QgsSourceSelectProvider * > providers ()
 Gets list of available providers. More...
 
QList< QgsSourceSelectProvider * > providersByKey (const QString &providerKey)
 Returns a (possibly empty) list of providers by data providerkey. More...
 
bool removeProvider (QgsSourceSelectProvider *provider)
 Remove provider implementation from the list (provider object is deleted) More...
 

Detailed Description

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().

Since
QGIS 3.0

Definition at line 40 of file qgssourceselectproviderregistry.h.

Constructor & Destructor Documentation

◆ QgsSourceSelectProviderRegistry() [1/2]

QgsSourceSelectProviderRegistry::QgsSourceSelectProviderRegistry ( )
default

◆ ~QgsSourceSelectProviderRegistry()

QgsSourceSelectProviderRegistry::~QgsSourceSelectProviderRegistry ( )

Definition at line 24 of file qgssourceselectproviderregistry.cpp.

◆ QgsSourceSelectProviderRegistry() [2/2]

QgsSourceSelectProviderRegistry::QgsSourceSelectProviderRegistry ( const QgsSourceSelectProviderRegistry rh)
delete

QgsDataItemProviderRegistry cannot be copied.

Member Function Documentation

◆ addProvider()

void QgsSourceSelectProviderRegistry::addProvider ( QgsSourceSelectProvider provider)

Add a provider implementation. Takes ownership of the object.

Definition at line 34 of file qgssourceselectproviderregistry.cpp.

◆ createSelectionWidget()

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

Since
QGIS 3.10

Definition at line 103 of file qgssourceselectproviderregistry.cpp.

◆ initializeFromProviderGuiRegistry()

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.

Since
QGIS 3.10

Definition at line 59 of file qgssourceselectproviderregistry.cpp.

◆ operator=()

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

QgsDataItemProviderRegistry cannot be copied.

◆ providerAdded

void QgsSourceSelectProviderRegistry::providerAdded ( const QString &  name)
signal

Emitted whenever a provider is added to the registry.

Since
QGIS 3.30

◆ providerByName()

QgsSourceSelectProvider * QgsSourceSelectProviderRegistry::providerByName ( const QString &  name)

Returns a provider by name or nullptr if not found.

Definition at line 76 of file qgssourceselectproviderregistry.cpp.

◆ providerRemoved

void QgsSourceSelectProviderRegistry::providerRemoved ( const QString &  name)
signal

Emitted whenever a provider is removed from the registry.

Since
QGIS 3.30

◆ providers()

QList< QgsSourceSelectProvider * > QgsSourceSelectProviderRegistry::providers ( )

Gets list of available providers.

Definition at line 29 of file qgssourceselectproviderregistry.cpp.

◆ providersByKey()

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.

◆ removeProvider()

bool QgsSourceSelectProviderRegistry::removeProvider ( QgsSourceSelectProvider provider)

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

Returns
true if the provider was actually removed and deleted

Definition at line 45 of file qgssourceselectproviderregistry.cpp.


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