Class: QgsReportSectionLayout

class qgis.core.QgsReportSectionLayout

Bases: QgsAbstractReportSection

A report section consisting of a single QgsLayout body.

Warning

This is not considered stable API, and may change in future QGIS releases. It is exposed to the Python bindings for unit testing purposes only.

New in version 3.0.

QgsReportSectionLayout(parentSection: QgsAbstractReportSection = None) Constructor for QgsReportSectionLayout, attached to the specified parent section. Note that ownership is not transferred to parent.

Methods

beginRender

rtype

bool

body

Returns the body layout for the section.

bodyEnabled

Returns True if the body for the section is enabled.

clone

rtype

QgsReportSectionLayout

copyCommonProperties

Copies the common properties of a report section to a destination section.

description

rtype

str

icon

rtype

QIcon

nextBody

rtype

Tuple[QgsLayout, bool]

readPropertiesFromElement

param element

reloadSettings

setBody

Sets the body layout for the section.

setBodyEnabled

Sets whether the body for the section is enabled.

setParentSection

Sets the parent report section.

type

rtype

str

writePropertiesToElement

param element

beginRender(self)bool
Return type

bool

body(self)QgsLayout

Returns the body layout for the section.

See also

setBody()

See also

bodyEnabled()

See also

setBodyEnabled()

Return type

QgsLayout

bodyEnabled(self)bool

Returns True if the body for the section is enabled.

See also

setBodyEnabled()

See also

body()

See also

setBody()

Return type

bool

clone(self)QgsReportSectionLayout
Return type

QgsReportSectionLayout

copyCommonProperties(self, destination: QgsAbstractReportSection)

Copies the common properties of a report section to a destination section. This method should be called from clone() implementations.

description(self)str
Return type

str

icon(self)QIcon
Return type

QIcon

nextBody(self)Tuple[QgsLayout, bool]
Return type

Tuple[QgsLayout, bool]

readPropertiesFromElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext)bool
Parameters
Return type

bool

reloadSettings(self)
setBody(self, body: QgsLayout)

Sets the body layout for the section. Ownership of body is transferred to the report section.

See also

body()

See also

bodyEnabled()

See also

setBodyEnabled()

Parameters

body (QgsLayout) –

setBodyEnabled(self, enabled: bool)

Sets whether the body for the section is enabled.

See also

bodyEnabled()

See also

body()

See also

setBody()

Parameters

enabled (bool) –

setParentSection(self, parent: QgsAbstractReportSection)

Sets the parent report section.

type(self)str
Return type

str

writePropertiesToElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext)bool
Parameters
Return type

bool