QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
31 const auto constProvidersList = providersList;
32 for (
const QString &key : constProvidersList )
35 mProviders << providerList;
36 for (
const auto &p : std::as_const( providerList ) )
38 if ( ! p->dataProviderKey().isEmpty() )
40 mDataItemProviderOrigin[ p->name() ] = p->dataProviderKey();
48 qDeleteAll( mProviders );
55 for (
const auto &p : std::as_const( mProviders ) )
57 if ( p->name() == providerName )
77 int index = mProviders.indexOf(
provider );
81 delete mProviders.takeAt( index );
87 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.
This is the interface for those who want to add custom data items to the browser tree.
~QgsDataItemProviderRegistry()
A data item provider for file based data sources.
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.