QGIS API Documentation
4.3.0-Master (1c7cf7431bd)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
qgstolerance.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgstolerance.h - wrapper for tolerance handling
3
----------------------
4
begin : March 2009
5
copyright : (C) 2009 by Richard Kostecky
6
email : csf.kostej at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSTOLERANCE_H
17
#define QGSTOLERANCE_H
18
19
#include "
qgis.h
"
20
#include "qgis_core.h"
21
22
#include <QObject>
23
24
class
QgsMapSettings
;
25
class
QgsMapLayer
;
26
class
QgsPointXY
;
27
32
class
CORE_EXPORT
QgsTolerance
33
{
34
Q_GADGET
35
public
:
41
static
double
vertexSearchRadius
(
const
QgsMapSettings
&mapSettings );
42
48
static
double
vertexSearchRadius
(
QgsMapLayer
*layer,
const
QgsMapSettings
&mapSettings );
49
55
static
double
defaultTolerance
(
QgsMapLayer
*layer,
const
QgsMapSettings
&mapSettings );
56
65
static
double
toleranceInProjectUnits
(
double
tolerance,
QgsMapLayer
*layer,
const
QgsMapSettings
&mapSettings,
Qgis::MapToolUnit
units );
66
75
static
double
toleranceInMapUnits
(
double
tolerance,
QgsMapLayer
*layer,
const
QgsMapSettings
&mapSettings,
Qgis::MapToolUnit
units =
Qgis::MapToolUnit::Layer
);
76
77
private
:
78
static
double
computeMapUnitPerPixel(
QgsMapLayer
*layer,
const
QgsMapSettings
&mapSettings );
79
static
QgsPointXY
toLayerCoordinates(
QgsMapLayer
*layer,
const
QgsMapSettings
&mapSettings, QPoint point );
80
};
81
82
#endif
Qgis::MapToolUnit
MapToolUnit
Type of unit of tolerance value from settings.
Definition
qgis.h:5536
Qgis::MapToolUnit::Layer
@ Layer
Layer unit value.
Definition
qgis.h:5537
QgsMapLayer
Base class for all map layer types.
Definition
qgsmaplayer.h:83
QgsMapSettings
Contains configuration for rendering maps.
Definition
qgsmapsettings.h:91
QgsPointXY
Represents a 2D point.
Definition
qgspointxy.h:62
QgsTolerance
Provides calculations for tolerance values in map units.
Definition
qgstolerance.h:33
QgsTolerance::toleranceInMapUnits
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.
Definition
qgstolerance.cpp:59
QgsTolerance::vertexSearchRadius
static double vertexSearchRadius(const QgsMapSettings &mapSettings)
Static function to get vertex tolerance value.
Definition
qgstolerance.cpp:78
QgsTolerance::defaultTolerance
static double defaultTolerance(QgsMapLayer *layer, const QgsMapSettings &mapSettings)
Static function to get default tolerance value for a layer.
Definition
qgstolerance.cpp:94
QgsTolerance::toleranceInProjectUnits
static double toleranceInProjectUnits(double tolerance, QgsMapLayer *layer, const QgsMapSettings &mapSettings, Qgis::MapToolUnit units)
Static function to translate tolerance value into map units.
Definition
qgstolerance.cpp:44
qgis.h
Generated on
for QGIS API Documentation by
1.17.0