Subgroup: Layout

Class: QgsLayoutReportContext

class qgis.core.QgsLayoutReportContext

Bases: PyQt5.QtCore.QObject

Stores information relating to the current reporting context for a layout.

New in version 3.0: Methods

blockSignals
childEvent
children
connectNotify
currentGeometry Returns the current feature() geometry in the given crs.
customEvent
deleteLater
disconnect
disconnectNotify
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
event
eventFilter
feature Returns the current feature for evaluating the layout.
findChild findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
findChildren findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
inherits
installEventFilter
isSignalConnected
isWidgetType
isWindowType
killTimer
layer Returns the vector layer associated with the layout’s context.
metaObject
moveToThread
objectName
parent
predefinedScales Returns the current list of predefined scales for use with the layout.
property
pyqtConfigure Each keyword argument is either the name of a Qt property or a Qt signal.
receivers
removeEventFilter
sender
senderSignalIndex
setFeature Sets the current feature for evaluating the layout.
setLayer Sets the vector layer associated with the layout’s context.
setObjectName
setParent
setPredefinedScales Sets the list of predefined scales to use with the layout.
setProperty
signalsBlocked
startTimer
thread
timerEvent
tr

Attributes

changed Emitted certain settings in the context is changed, e.g.
destroyed destroyed(self, QObject = None) [signal]
layerChanged Emitted when the context’s layer is changed.
objectNameChanged objectNameChanged(self, str) [signal]
staticMetaObject
changed

Emitted certain settings in the context is changed, e.g. by setting a new feature or vector layer for the context. [signal]

childEvent()
connectNotify()
currentGeometry(self, crs: QgsCoordinateReferenceSystem = QgsCoordinateReferenceSystem()) → QgsGeometry

Returns the current feature() geometry in the given crs. If no CRS is specified, the original feature geometry is returned.

Reprojection only works if a valid layer is set for layer().

See also

feature()

See also

layer()

customEvent()
disconnectNotify()
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

setFeature()

isSignalConnected()
layer(self) → QgsVectorLayer

Returns the vector layer associated with the layout’s context.

See also

setLayer()

layerChanged

Emitted when the context’s layer is changed. [signal]

predefinedScales(self) → List[float]

Returns the current list of predefined scales for use with the layout.

receivers()
sender()
senderSignalIndex()
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

feature()

setLayer(self, layer: QgsVectorLayer)

Sets the vector layer associated with the layout’s context.

Emits the changed() signal.

See also

layer()

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.

timerEvent()