QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsvaliditycheckregistry.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsvaliditycheckregistry.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 QGSVALIDITYCHECKREGISTRY_H
16#define QGSVALIDITYCHECKREGISTRY_H
17
18#include <memory>
19#include <vector>
20
21#include "qgis_core.h"
22#include "qgis_sip.h"
24
25#include <QList>
26
38class CORE_EXPORT QgsValidityCheckRegistry
39{
40
41 public:
42
44
46
49
53 QList<const QgsAbstractValidityCheck *> checks() const;
54
58 QList<const QgsAbstractValidityCheck *> checks( int type ) const;
59
65
71
86 QList< QgsValidityCheckResult > runChecks( int type, const QgsValidityCheckContext *context, QgsFeedback *feedback ) const;
87
88 private:
89
90#ifdef SIP_RUN
92#endif
93
97 std::vector<std::unique_ptr< QgsAbstractValidityCheck > > createChecks( int type ) const SIP_FACTORY;
98
100 QList< QgsAbstractValidityCheck * > mChecks;
101
102};
103
104#endif // QGSVALIDITYCHECKREGISTRY_H
Abstract base class for individual validity checks.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition qgsfeedback.h:44
Base class for validity check contexts.
QgsValidityCheckRegistry(const QgsValidityCheckRegistry &rh)=delete
QList< QgsValidityCheckResult > runChecks(int type, const QgsValidityCheckContext *context, QgsFeedback *feedback) const
Runs all checks of the specified type and returns a list of results.
QList< const QgsAbstractValidityCheck * > checks() const
Returns the list of available checks.
void removeCheck(QgsAbstractValidityCheck *check)
Removes a check from the registry.
void addCheck(QgsAbstractValidityCheck *check)
Adds a check to the registry.
QgsValidityCheckRegistry & operator=(const QgsValidityCheckRegistry &rh)=delete
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_FACTORY
Definition qgis_sip.h:84