QGIS API Documentation
3.14.0-Pi (9f7028fd23)
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 <QObject>
20
21
#include "qgis_core.h"
22
#include "
qgis_sip.h
"
23
24
class
QgsMapSettings
;
25
class
QgsMapLayer
;
26
class
QgsPointXY
;
27
32
class
CORE_EXPORT
QgsTolerance
33
{
34
Q_GADGET
35
public
:
36
40
enum
UnitType
41
{
43
LayerUnits
,
45
Pixels
,
47
ProjectUnits
48
};
49
Q_ENUM( UnitType )
50
51
57
static
double
vertexSearchRadius(
const
QgsMapSettings
&mapSettings );
58
64
static
double
vertexSearchRadius(
QgsMapLayer
*layer,
const
QgsMapSettings
&mapSettings );
65
71
static
double
defaultTolerance(
QgsMapLayer
*layer,
const
QgsMapSettings
&mapSettings );
72
82
static
double
toleranceInProjectUnits(
double
tolerance,
QgsMapLayer
*layer,
const
QgsMapSettings
&mapSettings,
QgsTolerance::UnitType
units );
83
92
static
double
toleranceInMapUnits(
double
tolerance,
QgsMapLayer
*layer,
const
QgsMapSettings
&mapSettings, UnitType units = LayerUnits );
93
94
private
:
95
static
double
computeMapUnitPerPixel(
QgsMapLayer
*layer,
const
QgsMapSettings
&mapSettings );
96
static
QgsPointXY
toLayerCoordinates(
QgsMapLayer
*layer,
const
QgsMapSettings
&mapSettings, QPoint point );
97
98
};
99
100
#endif
QgsTolerance::UnitType
UnitType
Type of unit of tolerance value from settings.
Definition:
qgstolerance.h:40
QgsTolerance::Pixels
@ Pixels
Pixels unit of tolerance.
Definition:
qgstolerance.h:45
qgis_sip.h
QgsTolerance::LayerUnits
@ LayerUnits
Layer unit value.
Definition:
qgstolerance.h:43
QgsPointXY
Definition:
qgspointxy.h:43
QgsTolerance
Definition:
qgstolerance.h:32
QgsMapLayer
Definition:
qgsmaplayer.h:81
QgsMapSettings
Definition:
qgsmapsettings.h:86
Generated on Mon Jun 22 2020 05:14:09 for QGIS API Documentation by
1.8.17