QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
28 const auto constProvidersList = providersList;
29 for (
const QString &key : constProvidersList )
32 mProviders << providerList;
33 for (
const auto &p : qgis::as_const( providerList ) )
35 if ( ! p->dataProviderKey().isEmpty() )
37 mDataItemProviderOrigin[ p->name() ] = p->dataProviderKey();
45 qDeleteAll( mProviders );
52 for (
const auto &p : qgis::as_const( mProviders ) )
54 if ( p->name() == providerName )
74 int index = mProviders.indexOf(
provider );
78 delete mProviders.takeAt( index );
84 return mDataItemProviderOrigin.value( dataItemProviderName, QString() );
void providerAdded(QgsDataItemProvider *provider)
Emitted when a new data item provider has been added.
QgsDataItemProviderRegistry()
QStringList providerList() const
Returns list of available providers by their keys.
virtual QString name()=0
Human-readable name of the provider name.
QList< QgsDataItemProvider * > dataItemProviders(const QString &providerKey) const
Returns list of data item providers of the provider.
void removeProvider(QgsDataItemProvider *provider)
Removes a provider implementation from the registry.
void addProvider(QgsDataItemProvider *provider)
Adds a provider implementation to the registry.
QList< QgsDataItemProvider * > providers() const
Returns the list of available providers.
~QgsDataItemProviderRegistry()
virtual QString dataProviderKey() const
Returns the data provider key (if the data item provider is associated with a data provider),...
void providerWillBeRemoved(QgsDataItemProvider *provider)
Emitted when a data item provider is about to be removed.
QString dataProviderKey(const QString &dataItemProviderName)
Returns the (possibly blank) data provider key for a given data item provider name.
QgsDataItemProvider * provider(const QString &providerName) const
Returns the (possibly NULL) data item provider named providerName.
static QgsProviderRegistry * instance(const QString &pluginPath=QString())
Means of accessing canonical single instance.