Class: QgsSourceSelectProviderRegistry

class qgis.gui.QgsSourceSelectProviderRegistry

Bases: PyQt5.QtCore.QObject

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

Methods

addProvider

Add a provider implementation.

childEvent

connectNotify

createSelectionWidget

Gets select widget from provider with name

customEvent

disconnectNotify

initializeFromProviderGuiRegistry

Initializes the registry.

isSignalConnected

providerByName

Returns a provider by name or None if not found

providers

Gets list of available providers

providersByKey

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

receivers

removeProvider

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

sender

senderSignalIndex

timerEvent

Signals

providerAdded

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

providerRemoved

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

addProvider(self, provider: QgsSourceSelectProvider)

Add a provider implementation. Takes ownership of the object.

Parameters:

provider (QgsSourceSelectProvider) –

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
createSelectionWidget(self, name: str, parent: QWidget, fl: Qt.WindowFlags | Qt.WindowType, widgetMode: QgsProviderRegistry.WidgetMode) QgsAbstractDataSourceWidget

Gets select widget from provider with name

The function is replacement of QgsProviderRegistry.createSelectionWidget() from QGIS 3.8

New in version 3.10.

Parameters:
Return type:

QgsAbstractDataSourceWidget

customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
initializeFromProviderGuiRegistry(self, providerGuiRegistry: QgsProviderGuiRegistry)

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

New in version 3.10.

Parameters:

providerGuiRegistry (QgsProviderGuiRegistry) –

isSignalConnected(self, QMetaMethod) bool
providerAdded

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

providerByName(self, name: str) QgsSourceSelectProvider

Returns a provider by name or None if not found

Parameters:

name (str) –

Return type:

QgsSourceSelectProvider

providerRemoved

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

providers(self) List[QgsSourceSelectProvider]

Gets list of available providers

Return type:

List[QgsSourceSelectProvider]

providersByKey(self, providerKey: str) List[QgsSourceSelectProvider]

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

Parameters:

providerKey (str) –

Return type:

List[QgsSourceSelectProvider]

receivers(self, PYQT_SIGNAL) int
removeProvider(self, provider: QgsSourceSelectProvider) bool

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

Return type:

bool

Returns:

True if the provider was actually removed and deleted

Parameters:

provider (QgsSourceSelectProvider) –

sender(self) QObject
senderSignalIndex(self) int
timerEvent(self, QTimerEvent)