QGIS API Documentation 3.41.0-Master (45a0abf3bec)
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#define SIP_NO_FILE
22
23#include "qgis_gui.h"
25
34{
35 public:
37 QgsLayoutScaleBarValidityCheck *create() const override;
38 QString id() const override;
39 int checkType() const override;
40 bool prepareCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
41 QList< QgsValidityCheckResult > runCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
42
43 private:
44 QList<QgsValidityCheckResult> mResults;
45};
46
47
56{
57 public:
60 QString id() const override;
61 int checkType() const override;
62 bool prepareCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
63 QList< QgsValidityCheckResult > runCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
64
65 private:
66 QList<QgsValidityCheckResult> mResults;
67};
68
69
78{
79 public:
81 QgsLayoutOverviewValidityCheck *create() const override;
82 QString id() const override;
83 int checkType() const override;
84 bool prepareCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
85 QList< QgsValidityCheckResult > runCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
86
87 private:
88 QList<QgsValidityCheckResult> mResults;
89};
90
91
100{
101 public:
104 QString id() const override;
105 int checkType() const override;
106 bool prepareCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
107 QList< QgsValidityCheckResult > runCheck( const QgsValidityCheckContext *context, QgsFeedback *feedback ) override;
108
109 private:
110 QList<QgsValidityCheckResult> mResults;
111};
112
113#ifndef WITH_QTWEBKIT
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#endif
135
136#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.