mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
69 lines
2.5 KiB
Plaintext
69 lines
2.5 KiB
Plaintext
|
|
class QgsTolerance
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgstolerance.h>
|
|
%End
|
|
|
|
public:
|
|
/**Type of unit of tolerance value from settings*/
|
|
enum UnitType
|
|
{
|
|
/**Map unit value*/
|
|
MapUnits,
|
|
/**Pixels unit of tolerance*/
|
|
Pixels
|
|
};
|
|
|
|
/**
|
|
* Static function to get vertex tolerance value for a layer.
|
|
* The value is read from settings and transformed if necessary.
|
|
* @return value of vertex tolerance in map units
|
|
*/
|
|
static double vertexSearchRadius( QgsMapLayer* layer, const QgsMapSettings& mapSettings );
|
|
|
|
/**
|
|
* Static function to get vertex tolerance value for a layer.
|
|
* The value is read from settings and transformed if necessary.
|
|
* @return value of vertex tolerance in map units
|
|
*/
|
|
//! @deprecated since 2.4 - use override with QgsMapSettings
|
|
static double vertexSearchRadius( QgsMapLayer* layer, QgsMapRenderer* renderer ) /Deprecated/;
|
|
|
|
/**
|
|
* Static function to get default tolerance value for a layer.
|
|
* The value is read from settings and transformed if necessary.
|
|
* @return value of default tolerance in map units
|
|
*/
|
|
static double defaultTolerance( QgsMapLayer* layer, const QgsMapSettings& mapSettings );
|
|
|
|
/**
|
|
* Static function to get default tolerance value for a layer.
|
|
* The value is read from settings and transformed if necessary.
|
|
* @return value of default tolerance in map units
|
|
*/
|
|
//! @deprecated since 2.4 - use override with QgsMapSettings
|
|
static double defaultTolerance( QgsMapLayer* layer, QgsMapRenderer* renderer ) /Deprecated/;
|
|
|
|
/**
|
|
* Static function to translate tolerance value into current map unit value
|
|
* @param tolerance tolerance value to be translated
|
|
* @param layer reference layer
|
|
* @param mapSettings settings of the map
|
|
* @param units type of units to be translated
|
|
* @return value of tolerance in map units
|
|
*/
|
|
static double toleranceInMapUnits( double tolerance, QgsMapLayer* layer, const QgsMapSettings& mapSettings, UnitType units = MapUnits );
|
|
|
|
/**
|
|
* Static function to translate tolerance value into current map unit value
|
|
* @param tolerance tolerance value to be translated
|
|
* @param layer reference layer
|
|
* @param renderer renderer
|
|
* @param units type of units to be translated
|
|
* @return value of tolerance in map units
|
|
*/
|
|
//! @deprecated since 2.4 - use the override with QgsMapSettings
|
|
static double toleranceInMapUnits( double tolerance, QgsMapLayer* layer, QgsMapRenderer* renderer, UnitType units = MapUnits ) /Deprecated/;
|
|
};
|