Class: QgsSourceSelectProvider

An interface for pages shown in a QgsDataSourceManagerDialog.

Note

This is an abstract class, with methods which must be implemented by a subclass.

The following methods must be implemented: createDataSourceWidget(), icon(), providerKey(), text()

List of all members, including inherited members

Enums

Capability

The Capability enum describes the capabilities of the source select implementation.

Ordering

Abstract Methods

createDataSourceWidget

Create a new instance of QgsAbstractDataSourceWidget (or None).

icon

Creates a new instance of an QIcon for the menu item entry

providerKey

Data Provider key

text

Text for the menu item entry, it will be visible to the user so make sure it's translatable

Methods

Capabilities

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsSourceSelectProvider. See the FAQ for more details.

capabilities

Returns the source select provider capabilities.

name

Source select provider name, this is useful to retrieve a particular source select in case the provider has more than one, it should be unique among all providers.

ordering

Ordering: the source select provider registry will be able to sort the source selects (ascending) using this integer value

toolTip

Text for the tooltip menu item entry, it will be visible to the user so make sure it's translatable

class qgis.gui.QgsSourceSelectProvider[source]

Bases: object

Capabilities()
class Capability(*values)

Bases: IntFlag

The Capability enum describes the capabilities of the source select implementation.

Added in version 3.38.

  • NoCapabilities: No capabilities

  • ConfigureFromUri: The source select widget can be configured from a URI

ConfigureFromUri = 1
NoCapabilities = 0
OrderDatabaseProvider = 1000
OrderLocalProvider = 0
OrderOtherProvider = 5000
OrderRemoteProvider = 2000
OrderSearchProvider = 4000
class Ordering(*values)

Bases: IntEnum

OrderDatabaseProvider = 1000
OrderLocalProvider = 0
OrderOtherProvider = 5000
OrderRemoteProvider = 2000
OrderSearchProvider = 4000
virtual capabilities(self) QgsSourceSelectProvider.Capability[source]

Returns the source select provider capabilities. The default implementation returns no capabilities.

Added in version 3.38.

Return type:

QgsSourceSelectProvider.Capability

abstract createDataSourceWidget(self, parent: QWidget | None = None, fl: Qt.WindowType = Qt.Widget, widgetMode: QgsProviderRegistry.WidgetMode = QgsProviderRegistry.WidgetMode.Embedded) QgsAbstractDataSourceWidget | None[source]

Create a new instance of QgsAbstractDataSourceWidget (or None). Caller takes responsibility of deleting created.

Parameters:
  • parent (Optional[QWidget] = None)

  • fl (Qt.WindowType = Qt.Widget)

  • widgetMode (QgsProviderRegistry.WidgetMode = QgsProviderRegistry.WidgetMode.Embedded)

Return type:

Optional[QgsAbstractDataSourceWidget]

abstract icon(self) QIcon[source]

Creates a new instance of an QIcon for the menu item entry

Return type:

QIcon

virtual name(self) str[source]

Source select provider name, this is useful to retrieve a particular source select in case the provider has more than one, it should be unique among all providers.

The default implementation returns the providerKey()

Return type:

str

virtual ordering(self) int[source]

Ordering: the source select provider registry will be able to sort the source selects (ascending) using this integer value

Return type:

int

abstract providerKey(self) str[source]

Data Provider key

Return type:

str

abstract text(self) str[source]

Text for the menu item entry, it will be visible to the user so make sure it’s translatable

Return type:

str

virtual toolTip(self) str[source]

Text for the tooltip menu item entry, it will be visible to the user so make sure it’s translatable

The default implementation returns an empty string.

Return type:

str