File: qgsgeometrycheckerror.sip.in

package info (click to toggle)
qgis 3.40.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,181,336 kB
  • sloc: cpp: 1,593,302; python: 370,494; xml: 23,474; perl: 3,664; sh: 3,482; ansic: 2,257; sql: 2,133; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 157
file content (198 lines) | stat: -rw-r--r-- 5,603 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/analysis/vector/geometry_checker/qgsgeometrycheckerror.h         *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/






class QgsGeometryCheckError
{
%Docstring(signature="appended")
This represents an error reported by a geometry check.

.. note::

   This class is a technology preview and unstable API.

.. versionadded:: 3.4
%End

%TypeHeaderCode
#include "qgsgeometrycheckerror.h"
%End
  public:
    enum Status /BaseType=IntEnum/
    {
      StatusPending,
      StatusFixFailed,
      StatusFixed,
      StatusObsolete
    };

    enum ValueType /BaseType=IntEnum/
    {
      ValueLength,
      ValueArea,
      ValueOther
    };

    QgsGeometryCheckError( const QgsGeometryCheck *check, const QgsGeometryCheckerUtils::LayerFeature &layerFeature, const QgsPointXY &errorLocation, QgsVertexId vidx = QgsVertexId(), const QVariant &value = QVariant(), ValueType valueType = ValueOther );
%Docstring
Create a new geometry check error with the parent ``check`` and for the
``layerFeature`` pair at the ``errorLocation``. Optionally the vertex
can be specified via ``vixd`` and a ``value`` with its ``value`` Type
for additional information.
%End

    virtual ~QgsGeometryCheckError();


    const QgsGeometryCheck *check() const;
%Docstring
The geometry check that created this error.
%End

    const QString &layerId() const;
%Docstring
The id of the layer on which this error has been detected.
%End

    QgsFeatureId featureId() const;
%Docstring
The id of the feature on which this error has been detected.
%End

    QgsGeometry geometry() const;
%Docstring
The geometry of the error in map units.
%End

    virtual QgsRectangle contextBoundingBox() const;
%Docstring
The context of the error. For topology checks like gap checks this
returns the context of an error and the involved features. May be a NULL
rectangle.

.. versionadded:: 3.10
%End

    virtual QgsRectangle affectedAreaBBox() const;
%Docstring
The bounding box of the affected area of the error.
%End

    virtual QString description() const;
%Docstring
The error description. By default the description of the parent check
will be returned.
%End

    const QgsPointXY &location() const;
%Docstring
The location of the error in map units.
%End

    QVariant value() const;
%Docstring
An additional value for the error. Lengths and areas are provided in map
units.

.. seealso:: :py:func:`valueType`
%End

    ValueType valueType() const;
%Docstring
The type of the value.

.. seealso:: :py:func:`value`
%End

    const QgsVertexId &vidx() const;
%Docstring
The id of the affected vertex. May be valid or not, depending on the
check.
%End

    Status status() const;
%Docstring
The status of the error.
%End

    QString resolutionMessage() const;
%Docstring
A message with details, how the error has been resolved.
%End

    void setFixed( int method );
%Docstring
Set the status to fixed and specify the ``method`` that has been used to
fix the error.
%End

    void setFixFailed( const QString &reason );
%Docstring
Set the error status to failed and specify the ``reason`` for failure.
%End

    void setObsolete();
%Docstring
Set the error status to obsolete.
%End

    virtual bool isEqual( QgsGeometryCheckError *other ) const;
%Docstring
Check if this error is equal to ``other``. Is reimplemented by
subclasses with additional information, comparison of base information
is done in parent class.
%End

    virtual bool closeMatch( QgsGeometryCheckError * /*other*/ ) const;
%Docstring
Check if this error is almost equal to ``other``. If this returns
``True``, it can be used to update existing errors after re-checking.
%End

    virtual void update( const QgsGeometryCheckError *other );
%Docstring
Update this error with the information from ``other``. Will be used to
update existing errors whenever they are re-checked.
%End



    virtual QIcon icon() const;
%Docstring
Returns an icon that should be shown for this kind of error.

.. versionadded:: 3.8
%End

  protected:
    QgsGeometryCheckError( const QgsGeometryCheck *check, const QString &layerId, QgsFeatureId featureId, const QgsGeometry &geometry, const QgsPointXY &errorLocation, QgsVertexId vidx = QgsVertexId(), const QVariant &value = QVariant(), ValueType valueType = ValueOther );
%Docstring
Create a new geometry check error with the parent ``check`` and for the
layer with ``layerId`` and ``featureId``. The ``geometry`` of the error
and the ``errorLocation`` need to be specified in map coordinates.
Optionally the vertex can be specified via ``vixd`` and a ``value`` with
its ``value`` Type for additional information.
%End


  private:
    const QgsGeometryCheckError &operator=( const QgsGeometryCheckError & );
};


/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/analysis/vector/geometry_checker/qgsgeometrycheckerror.h         *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/