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.
Class Hierarchy¶
Base classes¶
- 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:
Optional[QgsAbstractProfileSource]
- signal profileSourceRegistered[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal profileSourceUnregistered[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- profileSources(self) List[QgsAbstractProfileSource]¶
Returns a list of registered profile sources.
- Return type:
- 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