swift
Loading...
Searching...
No Matches
latitude.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_LATITUDE_H
7#define SWIFT_MISC_GEO_LATITUDE_H
8
11
12namespace swift::misc::geo
13{
16 public CEarthAngle<CLatitude>,
17 public mixin::MetaType<CLatitude>,
18 public mixin::String<CLatitude>,
19 public mixin::DBusOperators<CLatitude>,
20 public mixin::DataStreamOperators<CLatitude>,
21 public mixin::Index<CLatitude>
22 {
23 public:
26
30
31
32 QString toWgs84(int fractionalDigits = 3) const
33 {
34 return CEarthAngle<CLatitude>::toWgs84('N', 'S', fractionalDigits);
35 }
36
38 QString convertToQString(bool i18n = false) const
39 {
41 if (!this->isZeroEpsilonConsidered())
42 {
43 s.append(this->isNegativeWithEpsilonConsidered() ? " S" : " N");
44 }
45 return s;
46 }
47
49 CLatitude() = default;
50
53
57 };
58} // namespace swift::misc::geo
59
60Q_DECLARE_METATYPE(swift::misc::geo::CLatitude)
61
62#endif // SWIFT_MISC_GEO_LATITUDE_H
QString toWgs84(const QChar pos, const QChar neg, int fractionalDigits=3) const
To WGS84 string.
QString convertToQString(bool i18n=false) const
Cast as QString.
CLatitude(double value, const swift::misc::physical_quantities::CAngleUnit &unit)
Init by double value.
Definition latitude.h:56
CLatitude()=default
Default constructor.
QString convertToQString(bool i18n=false) const
Cast as QString.
Definition latitude.h:38
QString toWgs84(int fractionalDigits=3) const
To WGS84 string.
Definition latitude.h:32
CEarthAngle< CLatitude > base_type
Base type.
Definition latitude.h:25
CLatitude(const swift::misc::physical_quantities::CAngle &angle)
Constructor.
Definition latitude.h:52
CRTP class template which will generate marshalling operators for a derived class with its own marsha...
Definition mixindbus.h:39
CRTP class template to generate non-member QDataStream streaming operators.
CRTP class template from which a derived class can inherit property indexing functions.
Definition mixinindex.h:40
CRTP class template from which a derived class can inherit common methods dealing with the metatype o...
CRTP class template from which a derived class can inherit string streaming operations.
Definition mixinstring.h:29
Physical unit angle (radians, degrees).
Definition angle.h:23
Specialized class for angles (degrees, radian).
Definition units.h:231
#define SWIFT_MISC_DECLARE_USING_MIXIN_INDEX(DERIVED)
When a derived class and a base class both inherit from mixin::Index, the derived class uses this mac...
Definition mixinindex.h:159
#define SWIFT_MISC_DECLARE_USING_MIXIN_METATYPE(DERIVED)
When a derived class and a base class both inherit from mixin::MetaType, the derived class uses this ...
#define SWIFT_MISC_DECLARE_USING_MIXIN_STRING(DERIVED)
When a derived class and a base class both inherit from mixin::String, the derived class uses this ma...
QString & append(QChar ch)
#define SWIFT_MISC_EXPORT
Export a class or function from the library.