16#ifndef QGSREPORTSECTIONLAYOUT_H
17#define QGSREPORTSECTIONLAYOUT_H
24using namespace Qt::StringLiterals;
37class CORE_EXPORT QgsReportSectionLayout :
public QgsAbstractReportSection
45 QgsReportSectionLayout( QgsAbstractReportSection *parentSection =
nullptr );
47 QString type()
const override {
return u
"SectionLayout"_s; }
48 QString description()
const override {
return QObject::tr(
"Section" ); }
49 QIcon icon()
const override;
57 QgsLayout *body() {
return mBody.get(); }
66 void setBody( QgsLayout *body
SIP_TRANSFER ) { mBody.reset( body ); }
74 bool bodyEnabled()
const {
return mBodyEnabled; }
82 void setBodyEnabled(
bool enabled ) { mBodyEnabled = enabled; }
84 QgsReportSectionLayout *clone() const override
SIP_FACTORY;
85 bool beginRender() override;
86 QgsLayout *nextBody(
bool &ok ) override;
87 void reloadSettings() override;
91 bool writePropertiesToElement( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const override;
92 bool readPropertiesFromElement( const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context ) override;
96 bool mExportedBody = false;
97 std::unique_ptr< QgsLayout > mBody;
98 bool mBodyEnabled = true;