Skip to content

Commit 903e943

Browse files
committed
Doxygen
1 parent bee5470 commit 903e943

File tree

2 files changed

+180
-13
lines changed

2 files changed

+180
-13
lines changed

python/analysis/auto_generated/vector/geometry_checker/qgsgeometrycheck.sip.in

+66-1
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,16 @@ the Free Software Foundation; either version 2 of the License, or *
7979
struct Change
8080
{
8181
Change();
82+
8283
Change( ChangeWhat _what, ChangeType _type, QgsVertexId _vidx = QgsVertexId() );
84+
%Docstring
85+
Create a new Change
86+
%End
87+
8388
ChangeWhat what;
89+
8490
ChangeType type;
91+
8592
QgsVertexId vidx;
8693
bool operator==( const Change &other );
8794
};
@@ -91,19 +98,77 @@ the Free Software Foundation; either version 2 of the License, or *
9198
QgsGeometryCheck( CheckType checkType,
9299
const QgsGeometryCheckContext *context,
93100
const QVariantMap &configuration );
101+
%Docstring
102+
Create a new geometry check.
103+
%End
94104
virtual ~QgsGeometryCheck();
95105

96106

97107
virtual bool isCompatible( QgsVectorLayer *layer ) const;
108+
%Docstring
109+
Returns if this geometry check is compatible with ``layer``.
110+
By default it checks for the geometry type in ``compatibleGeometryTypes``().
111+
112+
.. versionadded:: 3.4
113+
%End
114+
98115
virtual QList<QgsWkbTypes::GeometryType> compatibleGeometryTypes() const = 0;
116+
%Docstring
117+
A list of geometry types for which this check can be performed.
118+
119+
.. versionadded:: 3.4
120+
%End
121+
99122
virtual QgsGeometryCheck::Flags flags() const;
123+
%Docstring
124+
Flags for this geometry check.
125+
%End
126+
127+
virtual void collectErrors( const QMap<QString, QgsFeaturePool *> &featurePools, QList<QgsGeometryCheckError *> &errors /In,Out/, QStringList &messages /In,Out/, QgsFeedback *feedback = 0, const LayerFeatureIds &ids = QgsGeometryCheck::LayerFeatureIds() ) const = 0;
128+
%Docstring
129+
The main worker method.
130+
Check all features available from ``featurePools`` and write errors found to ``errors``.
131+
Other status messages can be written to ``messages``.
132+
Progress should be reported to ``feedback``. Only features and layers listed in ``ids`` should be checked.
133+
134+
.. versionadded:: 3.4
135+
%End
136+
100137

101-
virtual void collectErrors( const QMap<QString, QgsFeaturePool *> &featurePools, QList<QgsGeometryCheckError *> &errors, QStringList &messages, QgsFeedback *feedback = 0, const LayerFeatureIds &ids = QgsGeometryCheck::LayerFeatureIds() ) const = 0;
102138
virtual QStringList resolutionMethods() const = 0;
139+
%Docstring
140+
Returns a list of descriptions for available resolutions for errors. The index will be passed as ``method`` to :py:func:`fixError`.
141+
142+
.. versionadded:: 3.4
143+
%End
144+
103145
virtual QString description() const = 0;
146+
%Docstring
147+
Returns a human readable description for this check.
148+
149+
.. versionadded:: 3.4
150+
%End
151+
104152
virtual QString id() const = 0;
153+
%Docstring
154+
Returns an id for this check.
155+
156+
.. versionadded:: 3.4
157+
%End
158+
105159
CheckType checkType() const;
160+
%Docstring
161+
Returns the check type.
162+
163+
.. versionadded:: 3.4
164+
%End
165+
106166
const QgsGeometryCheckContext *context() const;
167+
%Docstring
168+
Returns the context
169+
170+
.. versionadded:: 3.4
171+
%End
107172

108173
protected:
109174

src/analysis/vector/geometry_checker/qgsgeometrycheck.h

+114-12
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,41 @@ class ANALYSIS_EXPORT QgsGeometryCheck
6767
#endif
6868
};
6969

70+
/**
71+
* Description of a change to indicate at which level a change occured.
72+
*
73+
* \since Python bindings since QGIS 3.4
74+
*/
7075
enum ChangeWhat
7176
{
72-
ChangeFeature,
73-
ChangePart,
74-
ChangeRing,
75-
ChangeNode
77+
ChangeFeature, //!< This change happens on feature level
78+
ChangePart, //!< This change happens on part level
79+
ChangeRing, //!< This change happens on ring level
80+
ChangeNode //!< This change happens on node level
7681
};
7782

83+
/**
84+
* Description of the type of a change.
85+
*
86+
* \since Python bindings since QGIS 3.4
87+
*/
7888
enum ChangeType
7989
{
80-
ChangeAdded,
81-
ChangeRemoved,
82-
ChangeChanged
90+
ChangeAdded, //!< Something has been added
91+
ChangeRemoved, //!< Something has been removed
92+
ChangeChanged //!< Something has been updated
8393
};
8494

95+
/**
96+
* The type of a check.
97+
*
98+
* \since Python bindings since QGIS 3.4
99+
*/
85100
enum CheckType
86101
{
87-
FeatureNodeCheck,
88-
FeatureCheck,
89-
LayerCheck
102+
FeatureNodeCheck, //!< The check controls individual nodes
103+
FeatureCheck, //!< The check controls geometries as a whole
104+
LayerCheck //!< The check controls a whole layer (topology checks)
90105
};
91106

92107
enum Flag
@@ -98,25 +113,53 @@ class ANALYSIS_EXPORT QgsGeometryCheck
98113
Q_DECLARE_FLAGS( Flags, Flag )
99114
Q_FLAG( Flags )
100115

116+
/**
117+
* Descripts a change to fix a geometry.
118+
*
119+
* \since Python bindings since QGIS 3.4
120+
*/
101121
struct Change
102122
{
103123
Change() = default;
124+
125+
/**
126+
* Create a new Change
127+
*/
104128
Change( ChangeWhat _what, ChangeType _type, QgsVertexId _vidx = QgsVertexId() )
105129
: what( _what )
106130
, type( _type )
107131
, vidx( _vidx )
108132
{}
133+
134+
/**
135+
* What level this change affects.
136+
*/
109137
ChangeWhat what;
138+
139+
/**
140+
* What action this change performs.
141+
*/
110142
ChangeType type;
143+
144+
/**
145+
* The index of the part / ring / vertex, depending on \see what.
146+
*/
111147
QgsVertexId vidx;
112148
bool operator==( const Change &other )
113149
{
114150
return what == other.what && type == other.type && vidx == other.vidx;
115151
}
116152
};
117153

154+
/**
155+
* A collection of changes.
156+
* Grouped by layer id and feature id.
157+
*/
118158
typedef QMap<QString, QMap<QgsFeatureId, QList<Change> > > Changes;
119159

160+
/**
161+
* Create a new geometry check.
162+
*/
120163
QgsGeometryCheck( CheckType checkType,
121164
const QgsGeometryCheckContext *context,
122165
const QVariantMap &configuration )
@@ -134,17 +177,76 @@ class ANALYSIS_EXPORT QgsGeometryCheck
134177
}
135178
#endif
136179

180+
/**
181+
* Returns if this geometry check is compatible with \a layer.
182+
* By default it checks for the geometry type in \a compatibleGeometryTypes().
183+
*
184+
* \since QGIS 3.4
185+
*/
137186
virtual bool isCompatible( QgsVectorLayer *layer ) const;
187+
188+
/**
189+
* A list of geometry types for which this check can be performed.
190+
*
191+
* \since QGIS 3.4
192+
*/
138193
virtual QList<QgsWkbTypes::GeometryType> compatibleGeometryTypes() const = 0;
194+
195+
/**
196+
* Flags for this geometry check.
197+
*/
139198
virtual QgsGeometryCheck::Flags flags() const {return nullptr;}
140199

141-
virtual void collectErrors( const QMap<QString, QgsFeaturePool *> &featurePools, QList<QgsGeometryCheckError *> &errors, QStringList &messages, QgsFeedback *feedback = nullptr, const LayerFeatureIds &ids = QgsGeometryCheck::LayerFeatureIds() ) const = 0;
142-
//! Fix the error \a error with the specified \a method.
200+
/**
201+
* The main worker method.
202+
* Check all features available from \a featurePools and write errors found to \a errors.
203+
* Other status messages can be written to \a messages.
204+
* Progress should be reported to \a feedback. Only features and layers listed in \a ids should be checked.
205+
*
206+
* \since QGIS 3.4
207+
*/
208+
virtual void collectErrors( const QMap<QString, QgsFeaturePool *> &featurePools, QList<QgsGeometryCheckError *> &errors SIP_INOUT, QStringList &messages SIP_INOUT, QgsFeedback *feedback = nullptr, const LayerFeatureIds &ids = QgsGeometryCheck::LayerFeatureIds() ) const = 0;
209+
210+
/**
211+
* Fix the error \a error with the specified \a method.
212+
*
213+
* \since QGIS 3.4
214+
*/
143215
virtual void fixError( const QMap<QString, QgsFeaturePool *> &featurePools, QgsGeometryCheckError *error, int method, const QMap<QString, int> &mergeAttributeIndices, Changes &changes SIP_INOUT ) const SIP_SKIP;
216+
217+
/**
218+
* Returns a list of descriptions for available resolutions for errors. The index will be passed as ``method`` to \see fixError().
219+
*
220+
* \since QGIS 3.4
221+
*/
144222
virtual QStringList resolutionMethods() const = 0;
223+
224+
/**
225+
* Returns a human readable description for this check.
226+
*
227+
* \since QGIS 3.4
228+
*/
145229
virtual QString description() const = 0;
230+
231+
/**
232+
* Returns an id for this check.
233+
*
234+
* \since QGIS 3.4
235+
*/
146236
virtual QString id() const = 0;
237+
238+
/**
239+
* Returns the check type.
240+
*
241+
* \since QGIS 3.4
242+
*/
147243
CheckType checkType() const { return mCheckType; }
244+
245+
/**
246+
* Returns the context
247+
*
248+
* \since QGIS 3.4
249+
*/
148250
const QgsGeometryCheckContext *context() const { return mContext; }
149251

150252
protected:

0 commit comments

Comments
 (0)