QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgssimplifymethod.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgssimplifymethod.h
3  ---------------------
4  begin : December 2013
5  copyright : (C) 2013 by Matthias Kuhn / Alvaro Huarte
6  email :
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 
16 #ifndef QGSSIMPLIFYMETHOD_H
17 #define QGSSIMPLIFYMETHOD_H
18 
20 
25 class CORE_EXPORT QgsSimplifyMethod
26 {
27  public:
29  {
32  PreserveTopology
33  };
34 
40  QgsSimplifyMethod& operator=( const QgsSimplifyMethod& rh );
41 
43  void setMethodType( MethodType methodType );
45  inline MethodType methodType() const { return mMethodType; }
46 
48  void setTolerance( double tolerance );
50  inline double tolerance() const { return mTolerance; }
51 
53  void setForceLocalOptimization( bool localOptimization );
55  inline bool forceLocalOptimization() const { return mForceLocalOptimization; }
56 
58  static QgsAbstractGeometrySimplifier* createGeometrySimplifier( const QgsSimplifyMethod& simplifyMethod );
59 
60  protected:
64  double mTolerance;
67 };
68 
69 #endif // QGSSIMPLIFYMETHOD_H