Class: QgsReport

class qgis.core.QgsReport(project: QgsProject)

Bases: PyQt5.QtCore.QObject, QgsAbstractReportSection, QgsMasterLayoutInterface

Constructor for QgsReport, associated with the specified project.

Note that ownership is not transferred to project.

Represents a report for use with the QgsLayout engine.

Reports consist of multiple sections, represented by QgsAbstractReportSection subclasses.

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.

Methods

childEvent

clone

rtype

QgsReport

connectNotify

copyCommonProperties

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

customEvent

description

rtype

str

disconnectNotify

icon

rtype

QIcon

isSignalConnected

layoutAccept

param visitor

layoutProject

rtype

QgsProject

layoutType

rtype

QgsMasterLayoutInterface.Type

name

rtype

str

readLayoutXml

param layoutElement

readPropertiesFromElement

Sets section state from a DOM element.

receivers

sender

senderSignalIndex

setName

param name

setParentSection

Sets the parent report section.

timerEvent

type

rtype

str

updateSettings

writeLayoutXml

param document

writePropertiesToElement

Stores section state within an XML DOM element.

Signals

nameChanged

Emitted when the report’s name is changed.

childEvent(self, QChildEvent)
clone(self)QgsReport
Return type

QgsReport

connectNotify(self, QMetaMethod)
copyCommonProperties(self, destination: QgsAbstractReportSection)

Copies the common properties of a report section to a destination section. This method should be called from clone() implementations.

customEvent(self, QEvent)
description(self)str
Return type

str

disconnectNotify(self, QMetaMethod)
icon(self)QIcon
Return type

QIcon

isSignalConnected(self, QMetaMethod)bool
layoutAccept(self, visitor: QgsStyleEntityVisitorInterface)bool
Parameters

visitor (QgsStyleEntityVisitorInterface) –

Return type

bool

layoutProject(self)QgsProject
Return type

QgsProject

layoutType(self)QgsMasterLayoutInterface.Type
Return type

QgsMasterLayoutInterface.Type

name(self)str
Return type

str

nameChanged

Emitted when the report’s name is changed.

See also

setName() [signal]

Parameters

name (str) –

readLayoutXml(self, layoutElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext)bool
Parameters
  • layoutElement (QDomElement) –

  • document (QDomDocument) –

  • context (QgsReadWriteContext) –

Return type

bool

readPropertiesFromElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext)bool

Sets section state from a DOM element.

See also

readXml()

receivers(self, PYQT_SIGNAL)int
sender(self)QObject
senderSignalIndex(self)int
setName(self, name: str)
Parameters

name (str) –

setParentSection(self, parent: QgsAbstractReportSection)

Sets the parent report section.

timerEvent(self, QTimerEvent)
type(self)str
Return type

str

updateSettings(self)
writeLayoutXml(self, document: QDomDocument, context: QgsReadWriteContext)QDomElement
Parameters
Return type

QDomElement

writePropertiesToElement(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext)bool

Stores section state within an XML DOM element.

See also

writeXml()