16#ifndef QGSREPORTSECTIONLAYOUT_H
17#define QGSREPORTSECTIONLAYOUT_H
24using namespace Qt::StringLiterals;
37class CORE_EXPORT QgsReportSectionLayout :
public QgsAbstractReportSection
44 QgsReportSectionLayout( QgsAbstractReportSection *parentSection =
nullptr );
46 QString type()
const override {
return u
"SectionLayout"_s; }
47 QString description()
const override {
return QObject::tr(
"Section" ); }
48 QIcon icon()
const override;
56 QgsLayout *body() {
return mBody.get(); }
65 void setBody( QgsLayout *body
SIP_TRANSFER ) { mBody.reset( body ); }
73 bool bodyEnabled()
const {
return mBodyEnabled; }
81 void setBodyEnabled(
bool enabled ) { mBodyEnabled = enabled; }
83 QgsReportSectionLayout *clone() const override
SIP_FACTORY;
84 bool beginRender() override;
85 QgsLayout *nextBody(
bool &ok ) override;
86 void reloadSettings() override;
89 bool writePropertiesToElement( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const override;
90 bool readPropertiesFromElement( const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context ) override;
93 bool mExportedBody = false;
94 std::unique_ptr< QgsLayout > mBody;
95 bool mBodyEnabled = true;