QgsSourceSelectProvider class
This is the interface for those who want to add entries to the QgsDataSourceManagerDialog.
Contents
- Reference
Public types
- enum Ordering { OrderLocalProvider = 0, OrderDatabaseProvider = 1000, OrderRemoteProvider = 2000, OrderGeoCmsProvider = 3000, OrderOtherProvider = 4000 }
- Provider ordering groups.
Public functions
-
auto createDataSourceWidget(QWidget* parent = nullptr,
Qt::WindowFlags fl = Qt::Widget,
QgsProviderRegistry::
WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::Embedded) const -> QgsAbstractDataSourceWidget* pure virtual - Create a new instance of QgsAbstractDataSourceWidget (or null).
- auto icon() const -> QIcon pure virtual
- Creates a new instance of an QIcon for the menu item entry.
- auto name() const -> QString virtual
- 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.
- auto ordering() const -> int virtual
- Ordering: the source select provider registry will be able to sort the source selects (ascending) using this integer value.
- auto providerKey() const -> QString pure virtual
- Data Provider key.
- auto text() const -> QString pure virtual
- Text for the menu item entry, it will be visible to the user so make sure it's translatable.
- auto toolTip() const -> QString virtual
- Text for the tooltip menu item entry, it will be visible to the user so make sure it's translatable.
Enum documentation
enum QgsSourceSelectProvider:: Ordering
Provider ordering groups.
| Enumerators | |
|---|---|
| OrderLocalProvider |
Starting point for local file providers (e.g. OGR) |
| OrderDatabaseProvider |
Starting point for database providers (e.g. Postgres) |
| OrderRemoteProvider |
Starting point for remote (online) providers (e.g. WMS) |
| OrderGeoCmsProvider |
Starting point for GeoCMS type providers (e.g. GeoNode) |
| OrderOtherProvider |
Starting point for other providers (e.g. plugin based providers) |
Function documentation
QgsAbstractDataSourceWidget* QgsSourceSelectProvider:: createDataSourceWidget(QWidget* parent = nullptr,
Qt::WindowFlags fl = Qt::Widget,
QgsProviderRegistry:: WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::Embedded) const pure virtual
Create a new instance of QgsAbstractDataSourceWidget (or null).
Caller takes responsibility of deleting created.
QString QgsSourceSelectProvider:: name() const virtual
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()
QString QgsSourceSelectProvider:: toolTip() const virtual
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.