QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Static Public Member Functions | List of all members
QgsTolerance Class Reference

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 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 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...
 

Detailed Description

This is the class is providing tolerance value in map unit values.

Definition at line 26 of file qgstolerance.h.

Member Function Documentation

double QgsTolerance::defaultTolerance ( QgsMapLayer layer,
const QgsMapSettings mapSettings 
)
static

Static function to get default tolerance value for a layer.

The value is read from settings and transformed if necessary.

Returns
value of default tolerance in map units

Definition at line 49 of file qgstolerance.cpp.

double QgsTolerance::defaultTolerance ( QgsMapLayer layer,
QgsMapRenderer renderer 
)
static

Static function to get default tolerance value for a layer.

The value is read from settings and transformed if necessary.

Returns
value of default tolerance in map units
Deprecated:
since 2.4 - use override with QgsMapSettings

Definition at line 58 of file qgstolerance.cpp.

double QgsTolerance::toleranceInMapUnits ( double  tolerance,
QgsMapLayer layer,
const QgsMapSettings mapSettings,
QgsTolerance::UnitType  units = MapUnits 
)
static

Static function to translate tolerance value into current map unit value.

Parameters
tolerancetolerance value to be translated
layerreference layer
mapSettingssettings of the map
unitstype of units to be translated
Returns
value of tolerance in map units

Definition at line 21 of file qgstolerance.cpp.

double QgsTolerance::toleranceInMapUnits ( double  tolerance,
QgsMapLayer layer,
QgsMapRenderer renderer,
UnitType  units = MapUnits 
)
static

Static function to translate tolerance value into current map unit value.

Parameters
tolerancetolerance value to be translated
layerreference layer
rendererrenderer
unitstype of units to be translated
Returns
value of tolerance in map units
Deprecated:
since 2.4 - use the override with QgsMapSettings

Definition at line 31 of file qgstolerance.cpp.

double QgsTolerance::vertexSearchRadius ( QgsMapLayer layer,
const QgsMapSettings mapSettings 
)
static

Static function to get vertex tolerance value for a layer.

The value is read from settings and transformed if necessary.

Returns
value of vertex tolerance in map units

Definition at line 36 of file qgstolerance.cpp.

double QgsTolerance::vertexSearchRadius ( QgsMapLayer layer,
QgsMapRenderer renderer 
)
static

Static function to get vertex tolerance value for a layer.

The value is read from settings and transformed if necessary.

Returns
value of vertex tolerance in map units
Deprecated:
since 2.4 - use override with QgsMapSettings

Definition at line 44 of file qgstolerance.cpp.


The documentation for this class was generated from the following files: