26 qDeleteAll( mProviders );
37 mProviders.append( provider );
40 return first->
ordering() < second->ordering();
46 int index = mProviders.indexOf( provider );
49 delete mProviders.takeAt( index );
57 const QList<QgsSourceSelectProvider *> providerList =
providers();
58 for (
const auto provider : providerList )
60 if ( provider->name() == name )
70 QList<QgsSourceSelectProvider *> result;
71 const QList<QgsSourceSelectProvider *> providerList =
providers();
72 for (
const auto provider : providerList )
74 if ( provider->providerKey() == providerKey )
82 void QgsSourceSelectProviderRegistry::init()
89 for (
const QString &key : providersList )
96 if ( sourceSelectProvidersFn )
98 QList<QgsSourceSelectProvider *> *providerList = sourceSelectProvidersFn();
100 for (
auto provider : qgis::as_const( *providerList ) )
QList< QgsSourceSelectProvider * > providers()
Gets list of available providers.
QList< QgsSourceSelectProvider * > * sourceSelectProviders_t()
QStringList providerList() const
Returns list of available providers by their keys.
static QgsProviderRegistry * instance(const QString &pluginPath=QString())
Means of accessing canonical single instance.
~QgsSourceSelectProviderRegistry()
QgsSourceSelectProvider * providerByName(const QString &name)
Returns a provider by name or nullptr if not found.
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)
void addProvider(QgsSourceSelectProvider *provider)
Add a provider implementation. Takes ownership of the object.
virtual int ordering() const
Ordering: the source select provider registry will be able to sort the source selects (ascending) usi...
QList< QgsSourceSelectProvider * > providersByKey(const QString &providerKey)
Returns a (possibly empty) list of providers by data providerkey.