QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
26 qDeleteAll( mProviders );
36 mProviders.append( provider );
39 return first->ordering() < second->ordering();
45 int index = mProviders.indexOf( provider );
48 delete mProviders.takeAt( index );
57 if ( !providerGuiRegistry )
60 const QStringList providersList = providerGuiRegistry->
providerList();
61 for (
const QString &key : providersList )
63 const QList<QgsSourceSelectProvider *> providerList = providerGuiRegistry->
sourceSelectProviders( key );
65 for (
auto provider : providerList )
74 const QList<QgsSourceSelectProvider *> providerList =
providers();
75 for (
const auto provider : providerList )
77 if ( provider->name() == name )
87 QList<QgsSourceSelectProvider *> result;
88 const QList<QgsSourceSelectProvider *> providerList =
providers();
89 for (
const auto provider : providerList )
91 if ( provider->providerKey() == providerKey )
QgsAbstractDataSourceWidget * createSelectionWidget(const QString &name, QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode)
Gets select widget from provider with name.
QgsSourceSelectProviderRegistry()
This is the interface for those who want to add entries to the QgsDataSourceManagerDialog.
bool removeProvider(QgsSourceSelectProvider *provider)
Remove provider implementation from the list (provider object is deleted)
virtual QgsAbstractDataSourceWidget * createDataSourceWidget(QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::Widget, QgsProviderRegistry::WidgetMode widgetMode=QgsProviderRegistry::WidgetMode::Embedded) const =0
Create a new instance of QgsAbstractDataSourceWidget (or nullptr).
WidgetMode
Different ways a source select dialog can be used.
A registry / canonical manager of GUI parts of data providers.
QList< QgsSourceSelectProvider * > providersByKey(const QString &providerKey)
Returns a (possibly empty) list of providers by data providerkey.
virtual QList< QgsSourceSelectProvider * > sourceSelectProviders(const QString &providerKey)
Returns all source select providers registered in provider with providerKey.
void initializeFromProviderGuiRegistry(QgsProviderGuiRegistry *providerGuiRegistry)
Initializes the registry.
QList< QgsSourceSelectProvider * > providers()
Gets list of available providers.
QgsSourceSelectProvider * providerByName(const QString &name)
Returns a provider by name or nullptr if not found.
QStringList providerList() const
Returns list of available providers by their keys.
void addProvider(QgsSourceSelectProvider *provider)
Add a provider implementation. Takes ownership of the object.
~QgsSourceSelectProviderRegistry()