QGIS API Documentation
3.6.0-Noosa (5873452)
src
core
validity
qgsabstractvaliditycheck.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsabstractvaliditycheck.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 QGSABSTRACTVALIDITYCHECK_H
16
#define QGSABSTRACTVALIDITYCHECK_H
17
18
#include "qgis_core.h"
19
#include "
qgis_sip.h
"
20
#include <QString>
21
#include <QObject>
22
23
class
QgsValidityCheckContext
;
24
class
QgsFeedback
;
25
37
class
CORE_EXPORT
QgsValidityCheckResult
38
{
39
public
:
40
42
enum
Type
43
{
44
Warning
,
45
Critical
,
46
};
47
49
Type
type
;
50
54
QString
title
;
55
60
QString
detailedDescription
;
61
65
QString
checkId
;
66
67
};
68
92
class
CORE_EXPORT
QgsAbstractValidityCheck
93
{
94
95
public
:
96
98
enum
Type
99
{
100
TypeLayoutCheck = 0,
101
TypeUserCheck = 10000,
102
};
103
104
virtual
~
QgsAbstractValidityCheck
() =
default
;
105
109
virtual
QgsAbstractValidityCheck
*create()
const
= 0
SIP_FACTORY
;
110
116
virtual
QString id()
const
= 0;
117
121
virtual
int
checkType()
const
= 0;
122
137
virtual
bool
prepareCheck
(
const
QgsValidityCheckContext
*context,
QgsFeedback
*feedback )
138
{
139
Q_UNUSED( context );
140
Q_UNUSED( feedback );
141
return
true
;
142
}
143
156
virtual
QList< QgsValidityCheckResult > runCheck(
const
QgsValidityCheckContext
*context,
QgsFeedback
*feedback ) = 0;
157
158
};
159
160
#endif // QGSABSTRACTVALIDITYCHECK_H
QgsValidityCheckResult
Represents an individual result from a validity check run by a QgsAbstractValidityCheck subclass...
Definition:
qgsabstractvaliditycheck.h:37
QgsValidityCheckResult::detailedDescription
QString detailedDescription
Detailed description of the result (translated), giving users enough detail for them to resolve the e...
Definition:
qgsabstractvaliditycheck.h:60
QgsValidityCheckResult::Type
Type
Result types.
Definition:
qgsabstractvaliditycheck.h:42
QgsValidityCheckResult::Warning
Warning only, allow operation to proceed but notify user of result.
Definition:
qgsabstractvaliditycheck.h:44
QgsValidityCheckResult::type
Type type
Result type.
Definition:
qgsabstractvaliditycheck.h:49
QgsValidityCheckResult::checkId
QString checkId
ID of the check which generated the result.
Definition:
qgsabstractvaliditycheck.h:65
QgsAbstractValidityCheck::prepareCheck
virtual bool prepareCheck(const QgsValidityCheckContext *context, QgsFeedback *feedback)
Prepares the check for execution, and returns true if the check can be run.
Definition:
qgsabstractvaliditycheck.h:137
QgsFeedback
Base class for feedback objects to be used for cancelation of something running in a worker thread...
Definition:
qgsfeedback.h:44
qgis_sip.h
QgsAbstractValidityCheck::Type
Type
Check types.
Definition:
qgsabstractvaliditycheck.h:98
SIP_FACTORY
#define SIP_FACTORY
Definition:
qgis_sip.h:69
QgsAbstractValidityCheck
Abstract base class for individual validity checks.
Definition:
qgsabstractvaliditycheck.h:92
QgsValidityCheckResult::Critical
Critical error - notify user of result and prevent operation from proceeding.
Definition:
qgsabstractvaliditycheck.h:45
QgsValidityCheckContext
Base class for validity check contexts.
Definition:
qgsvaliditycheckcontext.h:35
QgsValidityCheckResult::title
QString title
A short, translated string summarising the result.
Definition:
qgsabstractvaliditycheck.h:54
Generated on Sat Feb 23 2019 03:59:22 for QGIS API Documentation by
1.8.13