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 throughQgsGui.sourceSelectProviderRegistry()
.New in version 3.0:
Methods
Add a
provider
implementation.Gets select widget from provider with
name
Initializes the registry.
Returns a provider by
name
orNone
if not foundGets list of available providers
Returns a (possibly empty) list of providers by data
providerkey
Remove
provider
implementation from the list (provider
object is deleted)Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
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: Union[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.8New in version 3.10.
- Parameters
name (str) –
parent (QWidget) –
fl (Union[Qt.WindowFlags) –
widgetMode (QgsProviderRegistry.WidgetMode) –
- Return type
- 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
orNone
if not found- Parameters
name (str) –
- Return type
- 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)¶