QGIS API Documentation 3.99.0-Master (a5475b57e34)
Loading...
Searching...
No Matches
qgslayoutvaliditychecks.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayoutvaliditychecks.h
3 ---------------------------
4 begin : November 2018
5 copyright : (C) 2018 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
17#ifndef QGSLAYOUTVALIDITYCHECKS_H
18#define QGSLAYOUTVALIDITYCHECKS_H
19
20// We don't want to expose this in the public API
21
22#include "qgis_gui.h"
24
25#define SIP_NO_FILE
26
35{
36 public:
38 QgsLayoutScaleBarValidityCheck *create() const override;
39 QString id() const override;
40 int checkType() const override;
41 bool prepareCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
42 QList<QgsValidityCheckResult> runCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
43
44 private:
45 QList<QgsValidityCheckResult> mResults;
46};
47
48
57{
58 public:
61 QString id() const override;
62 int checkType() const override;
63 bool prepareCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
64 QList<QgsValidityCheckResult> runCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
65
66 private:
67 QList<QgsValidityCheckResult> mResults;
68};
69
70
79{
80 public:
82 QgsLayoutOverviewValidityCheck *create() const override;
83 QString id() const override;
84 int checkType() const override;
85 bool prepareCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
86 QList<QgsValidityCheckResult> runCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
87
88 private:
89 QList<QgsValidityCheckResult> mResults;
90};
91
92
101{
102 public:
105 QString id() const override;
106 int checkType() const override;
107 bool prepareCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
108 QList<QgsValidityCheckResult> runCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
109
110 private:
111 QList<QgsValidityCheckResult> mResults;
112};
113
122{
123 public:
125 QgsLayoutHtmlItemValidityCheck *create() const override;
126 QString id() const override;
127 int checkType() const override;
128 bool prepareCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
129 QList<QgsValidityCheckResult> runCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
130
131 private:
132 QList<QgsValidityCheckResult> mResults;
133};
134
135#endif // QGSLAYOUTVALIDITYCHECKS_H
Abstract base class for individual validity checks.
virtual bool prepareCheck(const QgsValidityCheckContext *context, QgsFeedback *feedback)
Prepares the check for execution, and returns true if the check can be run.
virtual QString id() const =0
Returns the unique ID of the check.
virtual int checkType() const =0
Returns the type of the check.
virtual QgsAbstractValidityCheck * create() const =0
Creates a new instance of the check and returns it.
virtual QList< QgsValidityCheckResult > runCheck(const QgsValidityCheckContext *context, QgsFeedback *feedback)=0
Runs the check and returns a list of results.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition qgsfeedback.h:44
Layout HTML item validity check.
Layout north arrow validity check.
Layout overview validity check.
Layout picture source validity check.
Layout scalebar validity check.
Base class for validity check contexts.