16#ifndef QGSREPORTSECTIONLAYOUT_H
17#define QGSREPORTSECTIONLAYOUT_H
33class CORE_EXPORT QgsReportSectionLayout :
public QgsAbstractReportSection
41 QgsReportSectionLayout( QgsAbstractReportSection *parentSection =
nullptr );
43 QString type()
const override {
return QStringLiteral(
"SectionLayout" ); }
44 QString description()
const override {
return QObject::tr(
"Section" ); }
45 QIcon icon()
const override;
53 QgsLayout *body() {
return mBody.get(); }
62 void setBody( QgsLayout *body
SIP_TRANSFER ) { mBody.reset( body ); }
70 bool bodyEnabled()
const {
return mBodyEnabled; }
78 void setBodyEnabled(
bool enabled ) { mBodyEnabled = enabled; }
80 QgsReportSectionLayout *clone() const override
SIP_FACTORY;
81 bool beginRender() override;
82 QgsLayout *nextBody(
bool &ok ) override;
83 void reloadSettings() override;
87 bool writePropertiesToElement( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const override;
88 bool readPropertiesFromElement( const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context ) override;
92 bool mExportedBody = false;
93 std::unique_ptr< QgsLayout > mBody;
94 bool mBodyEnabled = true;