81 const auto constProvidersList = providersList;
82 for (
const QString &key : constProvidersList )
91 if ( dataItemProvidersFn )
93 QList<QgsDataItemProvider *> *providerList = dataItemProvidersFn();
95 mProviders << *providerList;
102 if ( !dataCapabilities )
104 QgsDebugMsg( library->fileName() +
" does not have dataCapabilities" );
111 QgsDebugMsg( library->fileName() +
" does not have dataItem" );
123 qDeleteAll( mProviders );
128 mProviders.append( provider );
133 int index = mProviders.indexOf( provider );
135 delete mProviders.takeAt( index );
QString name() override
Human-readable name of the provider name.
bool handlesDirectoryPath_t(const QString &path)
handlesDirectoryPath function
dataCapabilities_t * mCapabilitiesFunc
static QgsProviderRegistry * instance(const QString &pluginPath=QString())
Means of accessing canonical single instance.
handlesDirectoryPath_t * mHandlesDirectoryPathFunc
QgsDataItemProviderFromPlugin(const QString &name, dataCapabilities_t *capabilitiesFunc, dataItem_t *dataItemFunc, handlesDirectoryPath_t *handlesDirectoryPathFunc)
QgsDataItemProviderFromPlugin constructor.
void removeProvider(QgsDataItemProvider *provider)
Removes a provider implementation from the registry.
Base class for all items in the model.
~QgsDataItemProviderRegistry()
Simple data item provider implementation that handles the support for provider plugins (which may con...
dataItem_t * mDataItemFunc
void addProvider(QgsDataItemProvider *provider)
Adds a provider implementation to the registry.
QgsDataItemProviderRegistry()
bool handlesDirectoryPath(const QString &path) override
Returns true if the provider will handle the directory at the specified path.
QgsDataItem * dataItem_t(QString, QgsDataItem *)
QStringList providerList() const
Returns list of available providers by their keys.
int capabilities() override
Returns combination of flags from QgsDataProvider::DataCapabilities.
QgsDataItem * createDataItem(const QString &path, QgsDataItem *parentItem) override
Create a new instance of QgsDataItem (or nullptr) for given path and parent item. ...
QList< QgsDataItemProvider * > * dataItemProviders_t()
This is the interface for those who want to add custom data items to the browser tree.