QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
QgsSourceSelectProvider Class Referenceabstract

This is the interface for those who want to add entries to the QgsDataSourceManagerDialog. More...

#include <qgssourceselectprovider.h>

Inheritance diagram for QgsSourceSelectProvider:
Inheritance graph
[legend]

Public Types

typedef QFlags< CapabilityCapabilities
 
enum class  Capability : int { NoCapabilities = 0 , ConfigureFromUri = 1 }
 The Capability enum describes the capabilities of the source select implementation. More...
 
enum  Ordering {
  OrderLocalProvider = 0 , OrderDatabaseProvider = 1000 , OrderRemoteProvider = 2000 , OrderSearchProvider = 4000 ,
  OrderOtherProvider = 5000
}
 Provider ordering groups. More...
 

Public Member Functions

virtual ~QgsSourceSelectProvider ()=default
 
virtual Capabilities capabilities ()
 Returns the source select provider capabilities.
 
virtual QgsAbstractDataSourceWidgetcreateDataSourceWidget (QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::Widget, QgsProviderRegistry::WidgetMode widgetMode=QgsProviderRegistry::WidgetMode::Embedded) const =0
 Create a new instance of QgsAbstractDataSourceWidget (or nullptr).
 
virtual QIcon icon () const =0
 Creates a new instance of an QIcon for the menu item entry.
 
virtual QString name () const
 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.
 
virtual int ordering () const
 Ordering: the source select provider registry will be able to sort the source selects (ascending) using this integer value.
 
virtual QString providerKey () const =0
 Data Provider key.
 
virtual QString text () const =0
 Text for the menu item entry, it will be visible to the user so make sure it's translatable.
 
virtual QString toolTip () const
 Text for the tooltip menu item entry, it will be visible to the user so make sure it's translatable.
 

Detailed Description

This is the interface for those who want to add entries to the QgsDataSourceManagerDialog.

Definition at line 34 of file qgssourceselectprovider.h.

Member Typedef Documentation

◆ Capabilities

Definition at line 61 of file qgssourceselectprovider.h.

Member Enumeration Documentation

◆ Capability

enum class QgsSourceSelectProvider::Capability : int
strong

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

Since
QGIS 3.38
Enumerator
NoCapabilities 

No capabilities.

ConfigureFromUri 

The source select widget can be configured from a URI.

Definition at line 54 of file qgssourceselectprovider.h.

◆ Ordering

Provider ordering groups.

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

OrderSearchProvider 

Starting point for search providers (e.g. Layer Metadata)

OrderOtherProvider 

Starting point for other providers (e.g. plugin based providers)

Definition at line 41 of file qgssourceselectprovider.h.

Constructor & Destructor Documentation

◆ ~QgsSourceSelectProvider()

virtual QgsSourceSelectProvider::~QgsSourceSelectProvider ( )
virtualdefault

Member Function Documentation

◆ capabilities()

virtual Capabilities QgsSourceSelectProvider::capabilities ( )
inlinevirtual

Returns the source select provider capabilities.

The default implementation returns no capabilities.

Since
QGIS 3.38

Definition at line 108 of file qgssourceselectprovider.h.

◆ createDataSourceWidget()

virtual 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 nullptr).

Caller takes responsibility of deleting created.

Implemented in QgsLayerMetadataSourceSelectProvider.

◆ icon()

virtual QIcon QgsSourceSelectProvider::icon ( ) const
pure virtual

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

Implemented in QgsLayerMetadataSourceSelectProvider.

◆ name()

virtual QString QgsSourceSelectProvider::name ( ) const
inlinevirtual

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

Definition at line 76 of file qgssourceselectprovider.h.

◆ ordering()

virtual int QgsSourceSelectProvider::ordering ( ) const
inlinevirtual

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

Reimplemented in QgsLayerMetadataSourceSelectProvider.

Definition at line 95 of file qgssourceselectprovider.h.

◆ providerKey()

virtual QString QgsSourceSelectProvider::providerKey ( ) const
pure virtual

Data Provider key.

Implemented in QgsLayerMetadataSourceSelectProvider.

◆ text()

virtual QString QgsSourceSelectProvider::text ( ) const
pure virtual

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

Implemented in QgsLayerMetadataSourceSelectProvider.

◆ toolTip()

virtual QString QgsSourceSelectProvider::toolTip ( ) const
inlinevirtual

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.

Reimplemented in QgsLayerMetadataSourceSelectProvider.

Definition at line 86 of file qgssourceselectprovider.h.


The documentation for this class was generated from the following file: