QGIS API Documentation  3.6.0-Noosa (5873452)
qgsgeometryoptions.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsgeometryoptions.h
3  -------------------
4  begin : Aug 23, 2018
5  copyright : (C) 2018 by Matthias Kuhn
6  email : [email protected]
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSGEOMETRYOPTIONS_H
19 #define QGSGEOMETRYOPTIONS_H
20 
21 #include "qgis_core.h"
22 #include "qgis_sip.h"
23 #include "qgsgeometry.h"
24 
25 #include <QObject>
26 
35 class CORE_EXPORT QgsGeometryOptions : public QObject
36 {
37  Q_OBJECT
38 
39  public:
40 
44  QgsGeometryOptions() = default;
45 
51  bool removeDuplicateNodes() const;
52 
58  void setRemoveDuplicateNodes( bool value );
59 
67  double geometryPrecision() const;
68 
76  void setGeometryPrecision( double value );
77 
83  bool isActive() const;
84 
90  void apply( QgsGeometry &geometry ) const;
91 
97  QStringList geometryChecks() const;
98 
104  void setGeometryChecks( const QStringList &geometryChecks );
105 
111  QVariantMap checkConfiguration( const QString &checkId ) const;
112 
118  void setCheckConfiguration( const QString &checkId, const QVariantMap &checkConfiguration );
119 
125  void writeXml( QDomNode &node ) const;
126 
132  void readXml( const QDomNode &node );
133 
134  signals:
135 
141  void checkConfigurationChanged();
142 
148  void geometryChecksChanged();
149 
155  void removeDuplicateNodesChanged();
156 
164  void geometryPrecisionChanged();
165 
166  private:
167 
173  bool mRemoveDuplicateNodes = false;
174 
182  double mGeometryPrecision = 0.0;
183 
184  QStringList mGeometryChecks;
185  QVariantMap mCheckConfiguration;
186 };
187 
188 #endif // QGSGEOMETRYOPTIONS_H
The QgsGeometryOptions class contains options to automatically adjust geometries to constraints on a ...
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:106