QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
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
21class QgsLayout;
22
35class CORE_EXPORT QgsValidityCheckContext
36{
37
38#ifdef SIP_RUN
40 if ( dynamic_cast<QgsLayoutValidityCheckContext *>( sipCpp ) != NULL )
41 sipType = sipType_QgsLayoutValidityCheckContext;
42 else
43 sipType = 0;
45#endif
46
47 public:
48
51 {
52 TypeLayoutContext = 1,
53 TypeUserContext = 10001,
54 };
55
59 virtual int type() const = 0;
60
61 virtual ~QgsValidityCheckContext() = default;
62
63};
64
76{
77 public:
78
83 : layout( layout )
84 {}
85
86 int type() const override { return TypeLayoutContext; }
87
91 QgsLayout *layout = nullptr;
92
93};
94#endif // QGSVALIDITYCHECKCONTEXT_H
Validity check context for print layout validation.
QgsLayoutValidityCheckContext(QgsLayout *layout)
Constructor for QgsLayoutValidityCheckContext for the specified layout.
int type() const override
Returns the context type.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition qgslayout.h:49
Base class for validity check contexts.
virtual int type() const =0
Returns the context type.
virtual ~QgsValidityCheckContext()=default
ContextType
Available check context types.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition qgis_sip.h:191
#define SIP_END
Definition qgis_sip.h:208