QGIS API Documentation
2.2.0-Valmiera
|
This is the class is providing tolerance value in map unit values. More...
#include <qgstolerance.h>
Public Types | |
enum | UnitType { MapUnits, Pixels } |
Type of unit of tolerance value from settings. More... |
Static Public Member Functions | |
static double | vertexSearchRadius (QgsMapLayer *layer, QgsMapRenderer *renderer) |
Static function to get vertex tolerance value for a layer. | |
static double | defaultTolerance (QgsMapLayer *layer, QgsMapRenderer *renderer) |
Static function to get default tolerance value for a layer. | |
static double | toleranceInMapUnits (double tolerance, QgsMapLayer *layer, QgsMapRenderer *renderer, UnitType units=MapUnits) |
Static function to translate tolerance value into current map unit value. |
Static Private Member Functions | |
static double | computeMapUnitPerPixel (QgsMapLayer *layer, QgsMapRenderer *renderer) |
static QgsPoint | toLayerCoordinates (QgsMapLayer *layer, QgsMapRenderer *renderer, const QPoint &point) |
This is the class is providing tolerance value in map unit values.
Definition at line 28 of file qgstolerance.h.
Type of unit of tolerance value from settings.
Definition at line 33 of file qgstolerance.h.
|
staticprivate |
Definition at line 50 of file qgstolerance.cpp.
References QgsMapRenderer::hasCrsTransformEnabled(), QgsMapRenderer::mapUnitsPerPixel(), QgsPoint::sqrDist(), and toLayerCoordinates().
Referenced by toleranceInMapUnits().
|
static |
Static function to get default tolerance value for a layer.
The value is read from settings and transformed if necessary.
Definition at line 41 of file qgstolerance.cpp.
References toleranceInMapUnits().
Referenced by QgsMapCanvasSnapper::snapToBackgroundLayers().
|
staticprivate |
Definition at line 78 of file qgstolerance.cpp.
References QgsMapRenderer::coordinateTransform(), QgsMapRenderer::mapToLayerCoordinates(), and QgsMapToPixel::toMapCoordinates().
Referenced by computeMapUnitPerPixel().
|
static |
Static function to translate tolerance value into current map unit value.
tolerance | tolerance value to be translated |
layer | reference layer |
renderer | renderer |
units | type of units to be translated |
Definition at line 21 of file qgstolerance.cpp.
References computeMapUnitPerPixel(), and MapUnits.
Referenced by defaultTolerance(), QgsSnapper::snapPoint(), and vertexSearchRadius().
|
static |
Static function to get vertex tolerance value for a layer.
The value is read from settings and transformed if necessary.
Definition at line 32 of file qgstolerance.cpp.
References Pixels, and toleranceInMapUnits().
Referenced by QgsMapCanvasSnapper::snapToCurrentLayer().