Class: QgsPlotRegistry¶
Registry of available plot types.
QgsPlotRegistry is not usually directly created, but rather
accessed through QgsApplication.plotRegistry().
Added in version 4.0.
Class Hierarchy¶
Base classes¶
- class qgis.core.QgsPlotRegistry[source]¶
Bases:
QObject- __init__(parent: QObject | None = None)
Creates a new empty plot registry.
QgsPlotRegistry is not usually directly created, but rather accessed through
QgsApplication.plotRegistry().See also
- Parameters:
parent (Optional[QObject] = None)
- addPlotType(self, metadata: QgsPlotAbstractMetadata | None) bool[source]¶
Registers a new plot type.
Note
Takes ownership of the metadata instance.
- Parameters:
metadata (Optional[QgsPlotAbstractMetadata])
- Return type:
bool
- createPlot(self, type: str | None) QgsPlot | None[source]¶
Creates a new instance of a plot given the
type.- Parameters:
type (Optional[str])
- Return type:
Optional[QgsPlot]
- signal plotAboutToBeRemoved[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 plotAdded[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.
- plotMetadata(self, type: str | None) QgsPlotAbstractMetadata | None[source]¶
Returns the metadata for the specified plot
type. ReturnsNoneif a corresponding type was not found in the registry.- Parameters:
type (Optional[str])
- Return type:
Optional[QgsPlotAbstractMetadata]
- plotTypes(self) Dict[str, str]¶
Returns a map of available plot types to translated name.
- Return type:
Dict[str, str]