Class: QgsProfileSourceRegistry¶
Registry of profile sources used by QgsProfilePlotRenderer.
QgsProfileSourceRegistry is not usually directly created,
but rather accessed through
QgsApplication.profileSourceRegistry().
Added in version 3.38.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Methods
Finds a registered profile source by id. |
|
Returns a list of registered profile sources. |
|
Registers a profile source and takes ownership of it. |
|
Unregisters a profile source and destroys its instance. |
Signals
Signal emitted once a profile source is registered. |
|
Signal emitted once a profile source is unregistered. |
- class qgis.core.QgsProfileSourceRegistry[source]¶
Bases:
QObject- __init__()
Constructor - creates a registry of profile sources
- findSourceById(self, sourceId: str | None) QgsAbstractProfileSource | None[source]¶
Finds a registered profile source by id. Returns
Noneif the source is not found in the registry.- Parameters:
sourceId (Optional[str]) – Id of the source to be found in the registry.
Added in version 4.0.
- Return type:
- signal profileSourceRegistered(sourceId: str, sourceName: str)[source]¶
Signal emitted once a profile source is registered.
- Parameters:
sourceId (str) – Unique identifier of the profile source that has been registered.
sourceName (str) – Name of the profile source that has been registered.
Added in version 4.0.
- signal profileSourceUnregistered(sourceId: str)[source]¶
Signal emitted once a profile source is unregistered.
- Parameters:
sourceId (str) – Unique identifier of the profile source that has been unregistered.
Added in version 4.0.
- profileSources(self) list[QgsAbstractProfileSource]¶
Returns a list of registered profile sources.
- Return type:
list[QgsAbstractProfileSource]
- registerProfileSource(self, source: QgsAbstractProfileSource | None) bool[source]¶
Registers a profile
sourceand takes ownership of it.Returns
Trueif the profilesourcecould be registered andFalseotherwise.- Parameters:
source (Optional[QgsAbstractProfileSource])
- Return type:
bool
- unregisterProfileSource(self, source: QgsAbstractProfileSource | None) bool[source]¶
Unregisters a profile
sourceand destroys its instance.Deprecated since version 4.0: Unregister the profile source by ID instead.
unregisterProfileSource(self, sourceId: Optional[str]) -> bool Unregisters a profile source by a given ID and destroys its instance.
Returns
Trueif the source id was found in the registry andFalseotherwise.- Parameters:
sourceId – Profile source ID to be unregistered.
Added in version 4.0.
- Parameters:
source (Optional[QgsAbstractProfileSource])
- Return type:
bool