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.

Added in version 3.0.

QgsReportSectionFieldGroup(parentSection: Optional[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:

Optional[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

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:

Signals

AlwaysInclude

IncludeWhenFeaturesFound

Attributes

AlwaysInclude

IncludeWhenFeaturesFound

AlwaysInclude = 1
IncludeWhenFeaturesFound = 0
class SectionVisibility

Bases: int

beginRender(self) bool
Return type:

bool

body(self) QgsLayout | None

Returns the body layout for the section.

See also

setBody()

See also

bodyEnabled()

See also

setBodyEnabled()

Return type:

Optional[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 | None
Return type:

Optional[QgsReportSectionFieldGroup]

copyCommonProperties(self, destination: QgsAbstractReportSection | None)

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

Returns the vector layer associated with this section.

See also

setLayer()

Return type:

Optional[QgsVectorLayer]

nextBody(self)
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 | None)

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)

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)

Sets the field associated with this section.

See also

field()

Parameters:

field (Optional[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 | None)

Sets the vector layer associated with this section.

See also

layer()

Parameters:

layer (Optional[QgsVectorLayer])

setParentSection(self, parentSection: QgsAbstractReportSection | None)
Parameters:

parentSection (Optional[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