QGIS API Documentation
3.40.0-Bratislava (b56115d8743)
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
23
24
// This is not considered stable API - it is exposed to python bindings only for unit testing!
25
33
class
CORE_EXPORT QgsReportSectionLayout :
public
QgsAbstractReportSection
34
{
35
public
:
36
41
QgsReportSectionLayout( QgsAbstractReportSection *parentSection =
nullptr
);
42
43
QString type()
const override
{
return
QStringLiteral(
"SectionLayout"
); }
44
QString description()
const override
{
return
QObject::tr(
"Section"
); }
45
QIcon icon()
const override
;
46
53
QgsLayout
*body() {
return
mBody.get(); }
54
62
void
setBody(
QgsLayout
*body
SIP_TRANSFER
) { mBody.reset( body ); }
63
70
bool
bodyEnabled()
const
{
return
mBodyEnabled; }
71
78
void
setBodyEnabled(
bool
enabled ) { mBodyEnabled = enabled; }
79
80
QgsReportSectionLayout *clone() const override
SIP_FACTORY
;
81
bool
beginRender() override;
82
QgsLayout
*nextBody(
bool
&ok ) override;
83
void
reloadSettings() override;
84
85
protected:
86
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;
89
90
private:
91
92
bool
mExportedBody = false;
93
std::unique_ptr<
QgsLayout
> mBody;
94
bool
mBodyEnabled = true;
95
};
96
98
99
#endif
//QGSREPORTSECTIONLAYOUT_H
QgsLayout
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition
qgslayout.h:49
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition
qgsreadwritecontext.h:34
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:36
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:76
qgsabstractreportsection.h
Generated on Mon Oct 28 2024 22:06:03 for QGIS API Documentation by
1.9.8