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 | None)

Add a provider implementation. Takes ownership of the object.

Parameters:

provider (Optional[QgsSourceSelectProvider])

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

Gets select widget from provider with name

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

Added in version 3.10.

Parameters:
Return type:

Optional[QgsAbstractDataSourceWidget]

customEvent(self, a0: QEvent | None)
disconnectNotify(self, signal: QMetaMethod)
initializeFromProviderGuiRegistry(self, providerGuiRegistry: QgsProviderGuiRegistry | None)

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

Added in version 3.10.

Parameters:

providerGuiRegistry (Optional[QgsProviderGuiRegistry])

isSignalConnected(self, signal: 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 | None) QgsSourceSelectProvider | None

Returns a provider by name or None if not found

Parameters:

name (Optional[str])

Return type:

Optional[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 | None) List[QgsSourceSelectProvider]

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

Parameters:

providerKey (Optional[str])

Return type:

List[QgsSourceSelectProvider]

receivers(self, signal: PYQT_SIGNAL) int
removeProvider(self, provider: QgsSourceSelectProvider | None) 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 (Optional[QgsSourceSelectProvider])

sender(self) QObject | None
senderSignalIndex(self) int
timerEvent(self, a0: QTimerEvent | None)