QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
qgsmeasureutils.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmeasureutils.h
3
--------------------
4
begin : February 2026
5
copyright : (C) 2026 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSMEASUREUTILS_H
19
#define QGSMEASUREUTILS_H
20
21
#include "
qgis.h
"
22
#include "qgis_core.h"
23
24
#include <QObject>
25
#include <QString>
26
27
class
QgsProject
;
28
35
class
CORE_EXPORT
QgsMeasureUtils
36
{
37
Q_GADGET
38
39
public
:
44
Q_INVOKABLE
static
QString
formatAreaForProject
(
QgsProject
*project,
double
area,
Qgis::AreaUnit
unit );
45
50
Q_INVOKABLE
static
QString
formatDistanceForProject
(
QgsProject
*project,
double
distance,
Qgis::DistanceUnit
unit );
51
};
52
53
54
#endif
//QGSMEASUREUTILS_H
Qgis::DistanceUnit
DistanceUnit
Units of distance.
Definition
qgis.h:5568
Qgis::AreaUnit
AreaUnit
Units of area.
Definition
qgis.h:5645
QgsMeasureUtils
Utilities for handling and formatting measurements.
Definition
qgsmeasureutils.h:36
QgsMeasureUtils::formatAreaForProject
static Q_INVOKABLE QString formatAreaForProject(QgsProject *project, double area, Qgis::AreaUnit unit)
Formats an area measurement (with the specified unit) for use with a project, respecting the project'...
Definition
qgsmeasureutils.cpp:32
QgsMeasureUtils::formatDistanceForProject
static Q_INVOKABLE QString formatDistanceForProject(QgsProject *project, double distance, Qgis::DistanceUnit unit)
Formats a distance measurement (with the specified unit) for use with a project, respecting the proje...
Definition
qgsmeasureutils.cpp:64
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition
qgsproject.h:114
qgis.h
Generated on
for QGIS API Documentation by
1.17.0