|
QGIS API Documentation
2.4.0-Chugiak
|
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, const QgsMapSettings &mapSettings) |
| Static function to get vertex tolerance value for a layer. More... | |
| static Q_DECL_DEPRECATED double | vertexSearchRadius (QgsMapLayer *layer, QgsMapRenderer *renderer) |
| Static function to get vertex tolerance value for a layer. More... | |
| static double | defaultTolerance (QgsMapLayer *layer, const QgsMapSettings &mapSettings) |
| Static function to get default tolerance value for a layer. More... | |
| static Q_DECL_DEPRECATED double | defaultTolerance (QgsMapLayer *layer, QgsMapRenderer *renderer) |
| Static function to get default tolerance value for a layer. More... | |
| static double | toleranceInMapUnits (double tolerance, QgsMapLayer *layer, const QgsMapSettings &mapSettings, UnitType units=MapUnits) |
| Static function to translate tolerance value into current map unit value. More... | |
| static Q_DECL_DEPRECATED double | toleranceInMapUnits (double tolerance, QgsMapLayer *layer, QgsMapRenderer *renderer, UnitType units=MapUnits) |
| Static function to translate tolerance value into current map unit value. More... | |
Static Private Member Functions | |
| static double | computeMapUnitPerPixel (QgsMapLayer *layer, const QgsMapSettings &mapSettings) |
| static QgsPoint | toLayerCoordinates (QgsMapLayer *layer, const QgsMapSettings &mapSettings, 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.
| Enumerator | |
|---|---|
| MapUnits |
Map unit value. |
| Pixels |
Pixels unit of tolerance. |
Definition at line 33 of file qgstolerance.h.
|
staticprivate |
Definition at line 64 of file qgstolerance.cpp.
References QgsMapSettings::hasCrsTransformEnabled(), QgsMapSettings::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 49 of file qgstolerance.cpp.
References toleranceInMapUnits().
Referenced by defaultTolerance(), and QgsMapCanvasSnapper::snapToBackgroundLayers().
|
static |
Static function to get default tolerance value for a layer.
The value is read from settings and transformed if necessary.
Definition at line 58 of file qgstolerance.cpp.
References defaultTolerance(), and QgsMapRenderer::mapSettings().
|
staticprivate |
Definition at line 92 of file qgstolerance.cpp.
References QgsMapSettings::mapToLayerCoordinates(), QgsMapSettings::mapToPixel(), 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 |
| mapSettings | settings of the map |
| units | type of units to be translated |
Definition at line 21 of file qgstolerance.cpp.
References computeMapUnitPerPixel(), and MapUnits.
Referenced by defaultTolerance(), QgsSnapper::snapPoint(), QgsMapCanvasSnapper::snapToBackgroundLayers(), toleranceInMapUnits(), and vertexSearchRadius().
|
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 31 of file qgstolerance.cpp.
References QgsMapRenderer::mapSettings(), and toleranceInMapUnits().
|
static |
Static function to get vertex tolerance value for a layer.
The value is read from settings and transformed if necessary.
Definition at line 36 of file qgstolerance.cpp.
References Pixels, and toleranceInMapUnits().
Referenced by QgsMapCanvasSnapper::snapToCurrentLayer(), 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 44 of file qgstolerance.cpp.
References QgsMapRenderer::mapSettings(), and vertexSearchRadius().
1.8.7