Subgroup: Report

Class: QgsReportSectionLayout

class qgis.core.QgsReportSectionLayout

Bases: qgis._core.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: Methods

appendChild Adds a child section, transferring ownership of the section to this section.
beginRender
body Returns the body layout for the section.
bodyEnabled Returns true if the body for the section is enabled.
childCount Return the number of child sections for this report section.
childSection Returns the child section at the specified index.
childSections Return all child sections for this report section.
clone
context Returns the current context for this section.
copyCommonProperties
count
description
endRender
filePath
footer Returns the footer for the section.
footerEnabled Returns true if the footer for the section is enabled.
header Returns the header for the section.
headerEnabled Returns true if the header for the section is enabled.
icon
insertChild Inserts a child section at the specified index, transferring ownership of the section to this section.
layout
next
nextBody
parentSection Returns the parent report section.
prepareFooter Called just before rendering the section’s footer.
prepareHeader Called just before rendering the section’s header.
project Returns the associated project.
readPropertiesFromElement
readXml Sets the item state from a DOM element.
removeChild Removes a child section, deleting it.
removeChildAt Removes the child section at the specified index, deleting it.
reset Resets the section, ready for a new iteration.
row Returns the row number of the section within it’s parent section.
setBody Sets the body layout for the section.
setBodyEnabled Sets whether the body for the section is enabled.
setContext Sets the current context for this section.
setFooter Sets the footer for the section.
setFooterEnabled Sets whether the footer for the section is enabled.
setHeader Sets the header for the section.
setHeaderEnabled Sets whether the header for the section is enabled.
setParentSection
type
writePropertiesToElement
writeXml Stores the section state in a DOM element.

Attributes

Body
Children
End
Footer
Header
beginRender(self) → bool
body(self) → QgsLayout

Returns the body layout for the section.

See also

setBody()

See also

bodyEnabled()

See also

setBodyEnabled()

bodyEnabled(self) → bool

Returns true if the body for the section is enabled.

See also

setBodyEnabled()

See also

body()

See also

setBody()

clone(self) → QgsReportSectionLayout
copyCommonProperties()
description(self) → str
icon(self) → QIcon
nextBody(self) → Tuple[QgsLayout, bool]
readPropertiesFromElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool
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()

setBodyEnabled(self, enabled: bool)

Sets whether the body for the section is enabled.

See also

bodyEnabled()

See also

body()

See also

setBody()

setParentSection()
type(self) → str
writePropertiesToElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool