QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
validity
qgsvaliditycheckcontext.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsvaliditycheckcontext.h
3
--------------------------
4
begin : November 2018
5
copyright : (C) 2018 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
#ifndef QGSVALIDITYCHECKCONTEXT_H
16
#define QGSVALIDITYCHECKCONTEXT_H
17
18
#include "qgis_core.h"
19
#include "
qgis_sip.h
"
20
21
class
QgsLayout
;
22
35
class
CORE_EXPORT
QgsValidityCheckContext
36
{
37
#ifdef SIP_RUN
38
SIP_CONVERT_TO_SUBCLASS_CODE
39
if
(
dynamic_cast<
QgsLayoutValidityCheckContext
*
>
( sipCpp ) != NULL )
40
sipType = sipType_QgsLayoutValidityCheckContext;
41
else
42
sipType = 0;
43
SIP_END
44
#endif
45
46
public
:
47
49
enum
ContextType
50
{
51
TypeLayoutContext
= 1,
52
TypeUserContext
= 10001,
53
};
54
58
virtual
int
type
()
const
= 0;
59
60
virtual
~QgsValidityCheckContext
() =
default
;
61
};
62
73
class
CORE_EXPORT
QgsLayoutValidityCheckContext
:
public
QgsValidityCheckContext
74
{
75
public
:
79
QgsLayoutValidityCheckContext
(
QgsLayout
*
layout
)
80
:
layout
(
layout
)
81
{}
82
83
int
type
()
const override
{
return
TypeLayoutContext
; }
84
88
QgsLayout
*
layout
=
nullptr
;
89
};
90
#endif
// QGSVALIDITYCHECKCONTEXT_H
QgsLayoutValidityCheckContext
Validity check context for print layout validation.
Definition
qgsvaliditycheckcontext.h:74
QgsLayoutValidityCheckContext::QgsLayoutValidityCheckContext
QgsLayoutValidityCheckContext(QgsLayout *layout)
Constructor for QgsLayoutValidityCheckContext for the specified layout.
Definition
qgsvaliditycheckcontext.h:79
QgsLayoutValidityCheckContext::layout
QgsLayout * layout
Pointer to the layout which the check is being run against.
Definition
qgsvaliditycheckcontext.h:88
QgsLayoutValidityCheckContext::type
int type() const override
Returns the context type.
Definition
qgsvaliditycheckcontext.h:83
QgsLayout
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition
qgslayout.h:51
QgsValidityCheckContext
Base class for validity check contexts.
Definition
qgsvaliditycheckcontext.h:36
QgsValidityCheckContext::type
virtual int type() const =0
Returns the context type.
QgsValidityCheckContext::~QgsValidityCheckContext
virtual ~QgsValidityCheckContext()=default
QgsValidityCheckContext::ContextType
ContextType
Available check context types.
Definition
qgsvaliditycheckcontext.h:50
QgsValidityCheckContext::TypeLayoutContext
@ TypeLayoutContext
Layout context, see QgsLayoutValidityCheckContext.
Definition
qgsvaliditycheckcontext.h:51
QgsValidityCheckContext::TypeUserContext
@ TypeUserContext
Starting point for user contexts.
Definition
qgsvaliditycheckcontext.h:52
qgis_sip.h
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition
qgis_sip.h:203
SIP_END
#define SIP_END
Definition
qgis_sip.h:220
Generated on
for QGIS API Documentation by
1.17.0