Class: QgsReportSectionFieldGroup

class qgis.core.QgsReportSectionFieldGroup

Bases: QgsAbstractReportSection

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.

QgsReportSectionFieldGroup(parentSection: QgsAbstractReportSection = None) Constructor for QgsReportSectionFieldGroup, 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

QgsReportSectionFieldGroup

copyCommonProperties

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

description

rtype

str

field

Returns the field associated with this section.

footerVisibility

Returns the footer visibility mode.

headerVisibility

Returns the header visibility mode.

icon

rtype

QIcon

layer

Returns the vector layer associated with this section.

nextBody

rtype

Tuple[QgsLayout, bool]

prepareFooter

rtype

bool

prepareHeader

rtype

bool

readPropertiesFromElement

param element

reloadSettings

reset

setBody

Sets the body layout for the section.

setBodyEnabled

Sets whether the body for the section is enabled.

setField

Sets the field associated with this section.

setFooterVisibility

Sets the visibility mode for the footer.

setHeaderVisibility

Sets the visibility mode for the header.

setLayer

Sets the vector layer associated with this section.

setParentSection

param parentSection

setSortAscending

Sets whether the field values should be sorted ascending.

sortAscending

Returns True if the field values should be sorted ascending, or False for descending sort.

type

rtype

str

writePropertiesToElement

param element

Attributes

AlwaysInclude

IncludeWhenFeaturesFound

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(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

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