Class: QgsProjectStorageGuiRegistry

class qgis.gui.QgsProjectStorageGuiRegistry

Bases: sip.wrapper

A registry / canonical manager of GUI parts of project storage backends.

QgsProjectStorageGuiRegistry is not usually directly created, but rather accessed through QgsGui.projectStorageGuiRegistry().

New in version 3.10:

Methods

initializeFromProviderGuiRegistry

Initializes the registry.

projectStorageFromType

Returns storage implementation if the storage type matches one.

projectStorageFromUri

Returns storage implementation if the URI matches one.

projectStorages

Returns a list of registered project storage implementations

registerProjectStorage

Registers a storage backend and takes ownership of it

unregisterProjectStorage

Unregisters a storage backend and destroys its instance

initializeFromProviderGuiRegistry(self, providerGuiRegistry: QgsProviderGuiRegistry)

Initializes the registry. The registry needs to be passed explicitly (instead of using singleton) because this gets called from QgsGui constructor.

Parameters

providerGuiRegistry (QgsProviderGuiRegistry) –

projectStorageFromType(self, type: str) QgsProjectStorageGuiProvider

Returns storage implementation if the storage type matches one. Returns None otherwise (it is a normal file)

Parameters

type (str) –

Return type

QgsProjectStorageGuiProvider

projectStorageFromUri(self, uri: str) QgsProjectStorageGuiProvider

Returns storage implementation if the URI matches one. Returns None otherwise (it is a normal file)

Parameters

uri (str) –

Return type

QgsProjectStorageGuiProvider

projectStorages(self) List[QgsProjectStorageGuiProvider]

Returns a list of registered project storage implementations

Return type

List[QgsProjectStorageGuiProvider]

registerProjectStorage(self, storage: QgsProjectStorageGuiProvider)

Registers a storage backend and takes ownership of it

Parameters

storage (QgsProjectStorageGuiProvider) –

unregisterProjectStorage(self, storage: QgsProjectStorageGuiProvider)

Unregisters a storage backend and destroys its instance

Parameters

storage (QgsProjectStorageGuiProvider) –