Class: QgsLayoutReportContext¶
- class qgis.core.QgsLayoutReportContext¶
Bases:
PyQt5.QtCore.QObject
Stores information relating to the current reporting context for a layout.
QgsLayoutReportContext(layout:
QgsLayout
) Constructor for QgsLayoutReportContext.Methods
Returns the current
feature()
geometry in the givencrs
.Returns the current feature for evaluating the layout.
Returns the vector layer associated with the layout's context.
Returns the current list of predefined scales for use with the layout.
Sets the current
feature
for evaluating the layout.Sets the vector
layer
associated with the layout's context.Sets the list of predefined
scales
to use with the layout.Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
- changed¶
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.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- currentGeometry(self, crs: QgsCoordinateReferenceSystem = QgsCoordinateReferenceSystem()) QgsGeometry ¶
Returns the current
feature()
geometry in the givencrs
. If no CRS is specified, the original feature geometry is returned.Reprojection only works if a valid layer is set for
layer()
.See also
See also
- Parameters:
crs (
QgsCoordinateReferenceSystem
= QgsCoordinateReferenceSystem()) –- Return type:
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- feature(self) QgsFeature ¶
Returns the current feature for evaluating the layout. This feature may be used for altering an item’s content and appearance for a report or atlas layout.
See also
See also
- Return type:
- isSignalConnected(self, QMetaMethod) bool ¶
- layer(self) QgsVectorLayer ¶
Returns the vector layer associated with the layout’s context.
See also
- Return type:
- layerChanged¶
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.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- predefinedScales(self) List[float] ¶
Returns the current list of predefined scales for use with the layout.
See also
Deprecated since version Use:
QgsLayoutRenderContext.predefinedScales()
- Return type:
List[float]
- receivers(self, PYQT_SIGNAL) int ¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setFeature(self, feature: QgsFeature)¶
Sets the current
feature
for evaluating the layout. This feature may be used for altering an item’s content and appearance for a report or atlas layout.Emits the
changed()
signal.See also
- Parameters:
feature (QgsFeature) –
- setLayer(self, layer: QgsVectorLayer)¶
Sets the vector
layer
associated with the layout’s context.Emits the
changed()
signal.See also
- Parameters:
layer (QgsVectorLayer) –
- setPredefinedScales(self, scales: Iterable[float])¶
Sets the list of predefined
scales
to use with the layout. This is used for maps which are set to the predefined atlas scaling mode.See also
Deprecated since version Use:
QgsLayoutRenderContext.setPredefinedScales()
- Parameters:
scales (Iterable[float]) –
- timerEvent(self, QTimerEvent)¶