QGIS API Documentation
3.8.0-Zanzibar (11aff65)
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
23
24
// This is not considered stable API - it is exposed to python bindings only for unit testing!
25
34
class
CORE_EXPORT QgsReportSectionLayout :
public
QgsAbstractReportSection
35
{
36
public
:
37
42
QgsReportSectionLayout( QgsAbstractReportSection *parentSection =
nullptr
);
43
44
QString type()
const override
{
return
QStringLiteral(
"SectionLayout"
); }
45
QString description()
const override
{
return
QObject::tr(
"Section"
); }
46
QIcon icon()
const override
;
47
54
QgsLayout
*body() {
return
mBody.get(); }
55
63
void
setBody(
QgsLayout
*body
SIP_TRANSFER
) { mBody.reset( body ); }
64
71
bool
bodyEnabled()
const
{
return
mBodyEnabled; }
72
79
void
setBodyEnabled(
bool
enabled ) { mBodyEnabled = enabled; }
80
81
QgsReportSectionLayout *clone() const override
SIP_FACTORY
;
82
bool
beginRender() override;
83
QgsLayout
*nextBody(
bool
&ok ) override;
84
void
reloadSettings() override;
85
86
protected:
87
88
bool
writePropertiesToElement( QDomElement &element, QDomDocument &document, const
QgsReadWriteContext
&context ) const override;
89
bool
readPropertiesFromElement( const QDomElement &element, const QDomDocument &document, const
QgsReadWriteContext
&context ) override;
90
91
private:
92
93
bool
mExportedBody = false;
94
std::
unique_ptr
<
QgsLayout
> mBody;
95
bool
mBodyEnabled = true;
96
};
97
99
100
#endif //QGSREPORTSECTIONLAYOUT_H
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects...
Definition:
qgsreadwritecontext.h:34
geos::unique_ptr
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
Definition:
qgsgeos.h:79
SIP_TRANSFER
#define SIP_TRANSFER
Definition:
qgis_sip.h:36
SIP_FACTORY
#define SIP_FACTORY
Definition:
qgis_sip.h:69
QgsLayout
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition:
qgslayout.h:49
qgsabstractreportsection.h
Generated on Sat Jun 22 2019 09:24:07 for QGIS API Documentation by
1.8.13