180 lines
4.7 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/vector/geometry_checker/qgsgeometrycheck.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsGeometryCheck
{
%Docstring
*************************************************************************
qgsgeometrycheck.h
---------------------
begin : September 2014
copyright : (C) 2014 by Sandro Mani / Sourcepole AG
email : smani at sourcepole dot ch
**************************************************************************
This program is free software; you can redistribute it and/or modify *
it under the terms of the GNU General Public License as published by *
the Free Software Foundation; either version 2 of the License, or *
(at your option) any later version. *
**************************************************************************
%End
%TypeHeaderCode
#include "qgsgeometrycheck.h"
%End
public:
static const QMetaObject staticMetaObject;
public:
struct LayerFeatureIds
{
LayerFeatureIds();
};
enum ChangeWhat
{
ChangeFeature,
ChangePart,
ChangeRing,
ChangeNode
};
enum ChangeType
{
ChangeAdded,
ChangeRemoved,
ChangeChanged
};
enum CheckType
{
FeatureNodeCheck,
FeatureCheck,
LayerCheck
};
enum Flag
{
AvailableInValidation
};
typedef QFlags<QgsGeometryCheck::Flag> Flags;
struct Change
{
Change();
2018-09-28 13:59:42 +02:00
2018-10-05 01:36:40 +02:00
Change( QgsGeometryCheck::ChangeWhat _what, QgsGeometryCheck::ChangeType _type, QgsVertexId _vidx = QgsVertexId() );
2018-09-28 13:59:42 +02:00
%Docstring
Create a new Change
%End
2018-10-05 01:36:40 +02:00
QgsGeometryCheck::ChangeWhat what;
2018-09-28 13:59:42 +02:00
2018-10-05 01:36:40 +02:00
QgsGeometryCheck::ChangeType type;
2018-09-28 13:59:42 +02:00
QgsVertexId vidx;
2018-10-05 01:36:40 +02:00
bool operator==( const QgsGeometryCheck::Change &other );
};
2018-10-05 01:36:40 +02:00
typedef QMap<QString, QMap<QgsFeatureId, QList<QgsGeometryCheck::Change> > > Changes;
QgsGeometryCheck( const QgsGeometryCheckContext *context, const QVariantMap &configuration );
2018-09-28 13:59:42 +02:00
%Docstring
Create a new geometry check.
%End
virtual ~QgsGeometryCheck();
virtual bool isCompatible( QgsVectorLayer *layer ) const;
2018-09-28 13:59:42 +02:00
%Docstring
Returns if this geometry check is compatible with ``layer``.
By default it checks for the geometry type in ``compatibleGeometryTypes``().
.. versionadded:: 3.4
%End
virtual QList<QgsWkbTypes::GeometryType> compatibleGeometryTypes() const = 0;
2018-09-28 13:59:42 +02:00
%Docstring
A list of geometry types for which this check can be performed.
.. versionadded:: 3.4
%End
virtual QgsGeometryCheck::Flags flags() const;
2018-09-28 13:59:42 +02:00
%Docstring
Flags for this geometry check.
%End
virtual void collectErrors( const QMap<QString, QgsFeaturePool *> &featurePools, QList<QgsGeometryCheckError *> &errors /In,Out/, QStringList &messages /In,Out/, QgsFeedback *feedback, const LayerFeatureIds &ids = QgsGeometryCheck::LayerFeatureIds() ) const = 0;
2018-09-28 13:59:42 +02:00
%Docstring
The main worker method.
Check all features available from ``featurePools`` and write errors found to ``errors``.
Other status messages can be written to ``messages``.
Progress should be reported to ``feedback``. Only features and layers listed in ``ids`` should be checked.
.. versionadded:: 3.4
%End
virtual QStringList resolutionMethods() const = 0;
2018-09-28 13:59:42 +02:00
%Docstring
Returns a list of descriptions for available resolutions for errors. The index will be passed as ``method`` to :py:func:`fixError`.
.. versionadded:: 3.4
%End
virtual QString description() const = 0;
2018-09-28 13:59:42 +02:00
%Docstring
Returns a human readable description for this check.
.. versionadded:: 3.4
%End
virtual QString id() const = 0;
2018-09-28 13:59:42 +02:00
%Docstring
Returns an id for this check.
.. versionadded:: 3.4
%End
virtual CheckType checkType() const = 0;
2018-09-28 13:59:42 +02:00
%Docstring
Returns the check type.
.. versionadded:: 3.4
%End
const QgsGeometryCheckContext *context() const;
2018-09-28 13:59:42 +02:00
%Docstring
Returns the context
.. versionadded:: 3.4
%End
protected:
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/vector/geometry_checker/qgsgeometrycheck.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/