swift
Loading...
Searching...
No Matches
earthangle.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_MISC_GEO_EARTHANGLE_H
7#define SWIFT_MISC_GEO_EARTHANGLE_H
8
9#include "misc/pq/angle.h"
10
11namespace swift::misc::geo
12{
13 class CLatitude;
14 class CLongitude;
15
19 template <class LATorLON>
21 {
22 public:
25
28
30 CEarthAngle &operator*=(double multiply);
31
33 LATorLON operator+(const CEarthAngle &latOrLon) const;
34
36 LATorLON operator-(const CEarthAngle &latOrLon) const;
37
39 LATorLON operator*(double multiply) const;
40
43
49 static LATorLON fromWgs84(const QString &wgsCoordinate);
50
51 protected:
54
57
60
62 QString toWgs84(const QChar pos, const QChar neg, int fractionalDigits = 3) const;
63
64 public:
66 QString convertToQString(bool i18n = false) const;
67
68 private:
70 LATorLON const *derived() const;
71
73 LATorLON *derived();
74 };
75
80} // namespace swift::misc::geo
81
82#endif // SWIFT_MISC_GEO_EARTHANGLE_H
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
Definition icons.h:32
Base class for latitude / longitude.
Definition earthangle.h:21
CIcons::IconIndex toIcon() const
As icon, not implemented by all classes.
QString toWgs84(const QChar pos, const QChar neg, int fractionalDigits=3) const
To WGS84 string.
LATorLON operator-(const CEarthAngle &latOrLon) const
Minus operator -.
CEarthAngle & operator*=(double multiply)
Multiply operator *=.
CEarthAngle & operator+=(const CEarthAngle &latOrLon)
Plus operator +=.
static LATorLON fromWgs84(const QString &wgsCoordinate)
Latitude / Longitude from a WGS string such as.
LATorLON operator+(const CEarthAngle &latOrLon) const
Plus operator +.
CEarthAngle()
Default constructor.
QString convertToQString(bool i18n=false) const
Cast as QString.
LATorLON operator*(double multiply) const
Multiply operator *.
CEarthAngle(double value, const swift::misc::physical_quantities::CAngleUnit &unit)
Init by double value.
CEarthAngle & operator-=(const CEarthAngle &latOrLon)
Minus operator-=.
CEarthAngle(const swift::misc::physical_quantities::CAngle &angle)
Init by CAngle value.
Physical unit angle (radians, degrees).
Definition angle.h:23
Specialized class for angles (degrees, radian).
Definition units.h:231
#define SWIFT_MISC_EXPORT_DECLARE_TEMPLATE
Export explicit template declaration.