59 QgsDataItemProviderRegistry::QgsDataItemProviderRegistry()
63 Q_FOREACH (
const QString& key, providersList )
72 if ( dataItemProvidersFn )
75 mProviders << dataItemProvidersFn();
81 if ( !dataCapabilities )
106 qDeleteAll( mProviders );
111 mProviders.append( provider );
116 int index = mProviders.indexOf( provider );
118 delete mProviders.takeAt( index );
This singleton class keeps a list of data item providers that may add items to the browser tree...
static QgsProviderRegistry * instance(const QString &pluginPath=QString::null)
Means of accessing canonical single instance.
static QgsDataItemProviderRegistry * instance()
QLibrary * providerLibrary(const QString &providerKey) const
dataCapabilities_t * mCapabilitiesFunc
QList< QgsDataItemProvider * > dataItemProviders_t()
QgsDataItemProviderFromPlugin(const QString &name, dataCapabilities_t *capabilitiesFunc, dataItem_t *dataItemFunc)
void removeProvider(QgsDataItemProvider *provider)
Remove provider implementation from the list (provider object is deleted)
Base class for all items in the model.
virtual QString name() override
Human-readable name of the provider name.
~QgsDataItemProviderRegistry()
Simple data item provider implementation that handles the support for provider plugins (which may con...
dataItem_t * mDataItemFunc
virtual int capabilities() override
Return combination of flags from QgsDataProvider::DataCapabilities.
void * resolve(const char *symbol)
void addProvider(QgsDataItemProvider *provider)
Add a provider implementation. Takes ownership of the object.
virtual QgsDataItem * createDataItem(const QString &path, QgsDataItem *parentItem) override
Create a new instance of QgsDataItem (or null) for given path and parent item.
QgsDataItem * dataItem_t(QString, QgsDataItem *)
void(*)() cast_to_fptr(void *p)
QStringList providerList() const
Return list of available providers by their keys.
This is the interface for those who want to add custom data items to the browser tree.