Class: QgsReportSectionFieldGroup

class qgis.core.QgsReportSectionFieldGroup(parentSection: QgsAbstractReportSection = None)

Bases: QgsAbstractReportSection

Constructor for QgsReportSectionFieldGroup, attached to the specified parent section. Note that ownership is not transferred to parent.

A report section consisting of a features

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.

Parameters

parentSection

AlwaysInclude = 1
IncludeWhenFeaturesFound = 0
class SectionVisibility

Bases: int

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) → QgsReportSectionFieldGroup
Return type

QgsReportSectionFieldGroup

copyCommonProperties()
description(self) → str
Return type

str

field(self) → str

Returns the field associated with this section.

See also

setField()

Return type

str

footerVisibility(self) → QgsReportSectionFieldGroup.SectionVisibility

Returns the footer visibility mode.

Return type

QgsReportSectionFieldGroup.SectionVisibility

headerVisibility(self) → QgsReportSectionFieldGroup.SectionVisibility

Returns the header visibility mode.

Return type

QgsReportSectionFieldGroup.SectionVisibility

icon(self) → QIcon
Return type

QIcon

layer(self) → QgsVectorLayer

Returns the vector layer associated with this section.

See also

setLayer()

Return type

QgsVectorLayer

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

Tuple[QgsLayout, bool]

prepareFooter(self) → bool
Return type

bool

prepareHeader(self) → bool
Return type

bool

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

bool

reloadSettings(self)
reset(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) –

setField(self, field: str)

Sets the field associated with this section.

See also

field()

Parameters

field (str) –

setFooterVisibility(self, visibility: QgsReportSectionFieldGroup.SectionVisibility)

Sets the visibility mode for the footer.

Parameters

visibility (QgsReportSectionFieldGroup.SectionVisibility) –

setHeaderVisibility(self, visibility: QgsReportSectionFieldGroup.SectionVisibility)

Sets the visibility mode for the header.

Parameters

visibility (QgsReportSectionFieldGroup.SectionVisibility) –

setLayer(self, layer: QgsVectorLayer)

Sets the vector layer associated with this section.

See also

layer()

Parameters

layer (QgsVectorLayer) –

setParentSection(self, parentSection: QgsAbstractReportSection)
Parameters

parentSection (QgsAbstractReportSection) –

setSortAscending(self, sortAscending: bool)

Sets whether the field values should be sorted ascending. Set to true to sort ascending, or false for descending sort.

See also

sortAscending()

Parameters

sortAscending (bool) –

sortAscending(self) → bool

Returns true if the field values should be sorted ascending, or false for descending sort.

Return type

bool

type(self) → str
Return type

str

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

bool