Class: QgsReportSectionFieldGroup

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.

Class Hierarchy

Inheritance diagram of qgis.core.QgsReportSectionFieldGroup

Base classes

QgsAbstractReportSection

An abstract base class for QgsReport subsections.

QgsAbstractLayoutIterator

An abstract base class for QgsLayout based classes which can be exported by QgsLayoutExporter.

Methods

body

Returns the body layout for the section.

bodyEnabled

Returns True if the body for the section is enabled.

field

Returns the field associated with this section.

footerVisibility

Returns the footer visibility mode.

headerVisibility

Returns the header visibility mode.

layer

Returns the vector layer associated with this section.

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.

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.

Attributes

AlwaysInclude

IncludeWhenFeaturesFound

class qgis.core.QgsReportSectionFieldGroup[source]

Bases: QgsAbstractReportSection

__init__(parentSection: QgsAbstractReportSection | None = None)

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

Parameters:

parentSection (Optional[QgsAbstractReportSection] = None)

AlwaysInclude = 1
IncludeWhenFeaturesFound = 0
class SectionVisibility

Bases: int

body(self) QgsLayout | None[source]

Returns the body layout for the section.

See also

setBody()

See also

bodyEnabled()

See also

setBodyEnabled()

Return type:

Optional[QgsLayout]

bodyEnabled(self) bool[source]

Returns True if the body for the section is enabled.

See also

setBodyEnabled()

See also

body()

See also

setBody()

Return type:

bool

field(self) str[source]

Returns the field associated with this section.

See also

setField()

Return type:

str

footerVisibility(self) QgsReportSectionFieldGroup.SectionVisibility[source]

Returns the footer visibility mode.

Return type:

QgsReportSectionFieldGroup.SectionVisibility

headerVisibility(self) QgsReportSectionFieldGroup.SectionVisibility[source]

Returns the header visibility mode.

Return type:

QgsReportSectionFieldGroup.SectionVisibility

layer(self) QgsVectorLayer | None[source]

Returns the vector layer associated with this section.

See also

setLayer()

Return type:

Optional[QgsVectorLayer]

setBody(self, body: QgsLayout | None)[source]

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 (Optional[QgsLayout])

setBodyEnabled(self, enabled: bool)[source]

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 | None)[source]

Sets the field associated with this section.

See also

field()

Parameters:

field (Optional[str])

setFooterVisibility(self, visibility: QgsReportSectionFieldGroup.SectionVisibility)[source]

Sets the visibility mode for the footer.

Parameters:

visibility (QgsReportSectionFieldGroup.SectionVisibility)

setHeaderVisibility(self, visibility: QgsReportSectionFieldGroup.SectionVisibility)[source]

Sets the visibility mode for the header.

Parameters:

visibility (QgsReportSectionFieldGroup.SectionVisibility)

setLayer(self, layer: QgsVectorLayer | None)[source]

Sets the vector layer associated with this section.

See also

layer()

Parameters:

layer (Optional[QgsVectorLayer])

setSortAscending(self, sortAscending: bool)[source]

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[source]

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

Return type:

bool