QGIS API Documentation 3.39.0-Master (bca3cdb6021)
Loading...
Searching...
No Matches
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>

Static Public Member Functions

static double defaultTolerance (QgsMapLayer *layer, const QgsMapSettings &mapSettings)
 Static function to get default tolerance value for a layer.
 
static double toleranceInMapUnits (double tolerance, QgsMapLayer *layer, const QgsMapSettings &mapSettings, Qgis::MapToolUnit units=Qgis::MapToolUnit::Layer)
 Static function to translate tolerance value into layer units.
 
static double toleranceInProjectUnits (double tolerance, QgsMapLayer *layer, const QgsMapSettings &mapSettings, Qgis::MapToolUnit units)
 Static function to translate tolerance value into map units.
 
static double vertexSearchRadius (const QgsMapSettings &mapSettings)
 Static function to get vertex tolerance value.
 
static double vertexSearchRadius (QgsMapLayer *layer, const QgsMapSettings &mapSettings)
 Static function to get vertex tolerance value for a layer.
 

Detailed Description

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

Definition at line 32 of file qgstolerance.h.

Member Function Documentation

◆ defaultTolerance()

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

Definition at line 91 of file qgstolerance.cpp.

◆ toleranceInMapUnits()

double QgsTolerance::toleranceInMapUnits ( double  tolerance,
QgsMapLayer layer,
const QgsMapSettings mapSettings,
Qgis::MapToolUnit  units = Qgis::MapToolUnit::Layer 
)
static

Static function to translate tolerance value into layer units.

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

Definition at line 56 of file qgstolerance.cpp.

◆ toleranceInProjectUnits()

double QgsTolerance::toleranceInProjectUnits ( double  tolerance,
QgsMapLayer layer,
const QgsMapSettings mapSettings,
Qgis::MapToolUnit  units 
)
static

Static function to translate tolerance value into map units.

Parameters
tolerancetolerance value to be translated
layersource layer necessary in case tolerance is in layer units
mapSettingssettings of the map
unitstype of units to be translated
Returns
value of tolerance in map units

Definition at line 41 of file qgstolerance.cpp.

◆ vertexSearchRadius() [1/2]

double QgsTolerance::vertexSearchRadius ( const QgsMapSettings mapSettings)
static

Static function to get vertex tolerance value.

The value is read from settings and transformed if necessary.

Returns
value of vertex tolerance in map units (not layer units)

Definition at line 75 of file qgstolerance.cpp.

◆ vertexSearchRadius() [2/2]

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

Definition at line 84 of file qgstolerance.cpp.


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