QGIS/python/core/qgstolerance.sip
Juergen E. Fischer f3cb57b1eb SIP bindings update:
- update methods of existing classes
- add comment to methods missing in the sip bindings
- split up collective sip files into single files and use
  same directory structure in python/ as in src/
- add a lot of missing classes (some might not make sense because of
  missing python methods in those classes)
- remove some non-existing methods from the header files
- add scripts/sipdiff
- replace some usages of std::vector and std::set with QVector/QSet
2012-09-24 02:42:57 +02:00

43 lines
1.3 KiB
Plaintext

class QgsTolerance
{
%TypeHeaderCode
#include <qgstolerance.h>
%End
public:
/**Type of unit of tolerance value from settings*/
enum UnitType
{
/**Map unit value*/
MapUnits,
/**Pixels unit of tolerance*/
Pixels
};
/**
* Static function to get vertex tolerance value for a layer.
* The value is read from settings and transformed if necessary.
* @return value of vertex tolerance in map units
*/
static double vertexSearchRadius( QgsMapLayer* layer, QgsMapRenderer* renderer );
/**
* Static function to get default tolerance value for a layer.
* The value is read from settings and transformed if necessary.
* @return value of default tolerance in map units
*/
static double defaultTolerance( QgsMapLayer* layer, QgsMapRenderer* renderer );
/**
* Static function to translate tolerance value into current map unit value
* @param tolerance tolerance value to be translated
* @param layer reference layer
* @param renderer renderer
* @param units type of units to be translated
* @return value of tolerance in map units
*/
static double toleranceInMapUnits( double tolerance, QgsMapLayer* layer, QgsMapRenderer* renderer, UnitType units = MapUnits );
};