QGIS API Documentation
3.8.0-Zanzibar (11aff65)
src
core
layout
qgsmasterlayoutinterface.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslayoutinterface.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 QGSLAYOUTINTERFACE_H
17
#define QGSLAYOUTINTERFACE_H
18
19
#include "qgis_core.h"
20
#include "
qgis_sip.h
"
21
#include <QString>
22
#include <QIcon>
23
#include <QDomElement>
24
25
class
QgsProject
;
26
class
QgsReadWriteContext
;
27
28
#ifdef SIP_RUN
29
% ModuleHeaderCode
30
#include "
qgsprintlayout.h
"
31
#include "
qgsreport.h
"
32
% End
33
#endif
34
41
class
CORE_EXPORT
QgsMasterLayoutInterface
42
{
43
44
#ifdef SIP_RUN
45
SIP_CONVERT_TO_SUBCLASS_CODE
46
switch
( sipCpp->layoutType() )
47
{
48
case
QgsMasterLayoutInterface::PrintLayout
:
49
sipType = sipType_QgsPrintLayout;
50
*sipCppRet =
static_cast<
QgsPrintLayout
*
>
( sipCpp );
51
break
;
52
case
QgsMasterLayoutInterface::Report
:
53
*sipCppRet =
static_cast<
QgsReport *
>
( sipCpp );
54
sipType = sipType_QgsReport;
55
break
;
56
default
:
57
sipType = NULL;
58
}
59
SIP_END
60
#endif
61
62
public
:
63
65
enum
Type
66
{
67
PrintLayout = 0,
68
Report = 1,
69
};
70
71
virtual
~
QgsMasterLayoutInterface
() =
default
;
72
77
virtual
QgsMasterLayoutInterface
*clone()
const
= 0
SIP_FACTORY
;
78
82
virtual
QgsMasterLayoutInterface::Type
layoutType()
const
= 0;
83
88
virtual
QString name()
const
= 0;
89
93
virtual
QIcon icon()
const
= 0;
94
99
virtual
void
setName(
const
QString &name ) = 0;
100
105
virtual
QgsProject
*layoutProject()
const
= 0;
106
111
virtual
QDomElement writeLayoutXml( QDomDocument &document,
const
QgsReadWriteContext
&context )
const
= 0;
112
117
virtual
bool
readLayoutXml(
const
QDomElement &layoutElement,
const
QDomDocument &document,
const
QgsReadWriteContext
&context ) = 0;
118
122
virtual
void
updateSettings() = 0;
123
};
124
125
#endif //QGSLAYOUTINTERFACE_H
126
127
128
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects...
Definition:
qgsreadwritecontext.h:34
QgsMasterLayoutInterface::Type
Type
Master layout type.
Definition:
qgsmasterlayoutinterface.h:65
qgsprintlayout.h
qgis_sip.h
SIP_END
#define SIP_END
Definition:
qgis_sip.h:182
qgsreport.h
QgsProject
Reads and writes project states.
Definition:
qgsproject.h:89
SIP_FACTORY
#define SIP_FACTORY
Definition:
qgis_sip.h:69
QgsMasterLayoutInterface::Report
Report (QgsReport)
Definition:
qgsmasterlayoutinterface.h:68
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition:
qgis_sip.h:165
QgsPrintLayout
Print layout, a QgsLayout subclass for static or atlas-based layouts.
Definition:
qgsprintlayout.h:30
QgsMasterLayoutInterface
Interface for master layout type objects, such as print layouts and reports.
Definition:
qgsmasterlayoutinterface.h:41
QgsMasterLayoutInterface::PrintLayout
Individual print layout (QgsPrintLayout)
Definition:
qgsmasterlayoutinterface.h:67
Generated on Sat Jun 22 2019 09:24:07 for QGIS API Documentation by
1.8.13