QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
layout
qgsreportsectionlayout.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsreportsectionlayout.h
3
---------------------------
4
begin : December 2017
5
copyright : (C) 2017 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
/***************************************************************************
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
***************************************************************************/
16
#ifndef QGSREPORTSECTIONLAYOUT_H
17
#define QGSREPORTSECTIONLAYOUT_H
18
19
#include "qgis_core.h"
20
#include "
qgsabstractreportsection.h
"
21
22
#include <QString>
23
24
using namespace
Qt::StringLiterals;
25
27
28
// This is not considered stable API - it is exposed to python bindings only for unit testing!
29
37
class
CORE_EXPORT QgsReportSectionLayout :
public
QgsAbstractReportSection
38
{
39
public
:
44
QgsReportSectionLayout( QgsAbstractReportSection *parentSection =
nullptr
);
45
46
QString type()
const override
{
return
u
"SectionLayout"
_s; }
47
QString description()
const override
{
return
QObject::tr(
"Section"
); }
48
QIcon icon()
const override
;
49
56
QgsLayout *body() {
return
mBody.get(); }
57
65
void
setBody( QgsLayout *body
SIP_TRANSFER
) { mBody.reset( body ); }
66
73
bool
bodyEnabled()
const
{
return
mBodyEnabled; }
74
81
void
setBodyEnabled(
bool
enabled ) { mBodyEnabled = enabled; }
82
83
QgsReportSectionLayout *clone() const override
SIP_FACTORY
;
84
bool
beginRender() override;
85
QgsLayout *nextBody(
bool
&ok ) override;
86
void
reloadSettings() override;
87
88
protected:
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;
91
92
private:
93
bool
mExportedBody = false;
94
std::unique_ptr< QgsLayout > mBody;
95
bool
mBodyEnabled = true;
96
};
97
99
100
#endif
//QGSREPORTSECTIONLAYOUT_H
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:35
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:83
qgsabstractreportsection.h
Generated on
for QGIS API Documentation by
1.17.0