81 Q_FOREACH (
const QString &key, providersList )
90 if ( dataItemProvidersFn )
92 QList<QgsDataItemProvider *> *providerList = dataItemProvidersFn();
94 mProviders << *providerList;
101 if ( !dataCapabilities )
103 QgsDebugMsg( library->fileName() +
" does not have dataCapabilities" );
110 QgsDebugMsg( library->fileName() +
" does not have dataItem" );
122 qDeleteAll( mProviders );
127 mProviders.append( provider );
132 int index = mProviders.indexOf( provider );
134 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)
Remove provider implementation from the list (provider object is deleted)
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)
Add a provider implementation. Takes ownership of the object.
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
Return list of available providers by their keys.
int capabilities() override
Return combination of flags from QgsDataProvider::DataCapabilities.
QgsDataItem * createDataItem(const QString &path, QgsDataItem *parentItem) override
Create a new instance of QgsDataItem (or null) 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.