26 qDeleteAll( mBackends );
31 return mBackends.value( type,
nullptr );
36 for (
auto it = mBackends.constBegin(); it != mBackends.constEnd(); ++it )
39 QString scheme = storage->
type() +
':';
40 if ( uri.startsWith( scheme ) )
48 return mBackends.values();
53 mBackends.insert( storage->
type(), storage );
58 delete mBackends.take( storage->
type() );
63 if ( !providerGuiRegistry )
66 const QStringList providersList = providerGuiRegistry->
providerList();
67 for (
const QString &key : providersList )
73 mBackends[key] = provider;
QList< QgsProjectStorageGuiProvider * > projectStorages() const
Returns a list of registered project storage implementations.
QgsProjectStorageGuiProvider * projectStorageFromUri(const QString &uri)
Returns storage implementation if the URI matches one. Returns nullptr otherwise (it is a normal file...
void unregisterProjectStorage(QgsProjectStorageGuiProvider *storage)
Unregisters a storage backend and destroys its instance.
void initializeFromProviderGuiRegistry(QgsProviderGuiRegistry *providerGuiRegistry)
Initializes the registry.
virtual QList< QgsProjectStorageGuiProvider * > projectStorageGuiProviders(const QString &providerKey)
Returns all project storage gui providers registered in provider with providerKey.
~QgsProjectStorageGuiRegistry()
virtual QString type()=0
Unique identifier of the project storage type.
QgsProjectStorageGuiProvider * projectStorageFromType(const QString &type)
Returns storage implementation if the storage type matches one. Returns nullptr otherwise (it is a no...
void registerProjectStorage(QgsProjectStorageGuiProvider *storage)
Registers a storage backend and takes ownership of it.
QStringList providerList() const
Returns list of available providers by their keys.
Abstract interface for project storage GUI - to be implemented by various backends and registered in ...
QgsProjectStorageGuiRegistry()
A registry / canonical manager of GUI parts of data providers.