QGIS API Documentation  2.5.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 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...
 

Detailed Description

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

Note
This class has been added in version 1.1.

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

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