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 forQgsReportSectionFieldGroup
, attached to the specifiedparent
section. Note that ownership is not transferred toparent
.Methods
- rtype
bool
Returns the body layout for the section.
Returns
True
if the body for the section is enabled.- rtype
QgsReportSectionFieldGroup
Copies the common properties of a report section to a
destination
section.- rtype
str
Returns the field associated with this section.
Returns the footer visibility mode.
Returns the header visibility mode.
- rtype
QIcon
Returns the vector layer associated with this section.
- rtype
Tuple[
QgsLayout
, bool]
- rtype
bool
- rtype
bool
- param element
Sets the
body
layout for the section.Sets whether the body for the section is
enabled
.Sets the
field
associated with this section.Sets the visibility mode for the footer.
Sets the visibility mode for the header.
Sets the vector
layer
associated with this section.- param parentSection
Sets whether the field values should be sorted ascending.
Returns
True
if the field values should be sorted ascending, orFalse
for descending sort.- rtype
str
- param element
Attributes
- 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
See also
See also
- Return type
- bodyEnabled(self) bool ¶
Returns
True
if the body for the section is enabled.See also
See also
See also
- Return type
bool
- clone(self) QgsReportSectionFieldGroup ¶
- Return type
- copyCommonProperties(self, destination: QgsAbstractReportSection)¶
Copies the common properties of a report section to a
destination
section. This method should be called fromclone()
implementations.
- description(self) str ¶
- Return type
str
- field(self) str ¶
Returns the field associated with this section.
See also
- Return type
str
Returns the footer visibility mode.
See also
- Return type
- headerVisibility(self) QgsReportSectionFieldGroup.SectionVisibility ¶
Returns the header visibility mode.
See also
- Return type
- icon(self) QIcon ¶
- Return type
QIcon
- layer(self) QgsVectorLayer ¶
Returns the vector layer associated with this section.
See also
- Return type
- Return type
bool
- prepareHeader(self) bool ¶
- Return type
bool
- readPropertiesFromElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool ¶
- Parameters
element (QDomElement) –
document (QDomDocument) –
context (QgsReadWriteContext) –
- Return type
bool
- reloadSettings(self)¶
- reset(self)¶
- setBody(self, body: QgsLayout)¶
Sets the
body
layout for the section. Ownership ofbody
is transferred to the report section.See also
See also
See also
- Parameters
body (QgsLayout) –
- setBodyEnabled(self, enabled: bool)¶
Sets whether the body for the section is
enabled
.See also
See also
See also
- Parameters
enabled (bool) –
- setField(self, field: str)¶
Sets the
field
associated with this section.See also
- Parameters
field (str) –
Sets the visibility mode for the footer.
See also
- Parameters
visibility (QgsReportSectionFieldGroup.SectionVisibility) –
- setHeaderVisibility(self, visibility: QgsReportSectionFieldGroup.SectionVisibility)¶
Sets the visibility mode for the header.
See also
- Parameters
visibility (QgsReportSectionFieldGroup.SectionVisibility) –
- setLayer(self, layer: QgsVectorLayer)¶
Sets the vector
layer
associated with this section.See also
- 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, orFalse
for descending sort.See also
- Parameters
sortAscending (bool) –
- sortAscending(self) bool ¶
Returns
True
if the field values should be sorted ascending, orFalse
for descending sort.See also
- Return type
bool
- type(self) str ¶
- Return type
str
- writePropertiesToElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool ¶
- Parameters
element (QDomElement) –
document (QDomDocument) –
context (QgsReadWriteContext) –
- Return type
bool