swift
Public Types | Public Member Functions | List of all members
swift::misc::geo::CLongitude Class Reference

Longitude. More...

Inheritance diagram for swift::misc::geo::CLongitude:
[legend]

Public Types

using base_type = CEarthAngle< CLongitude >
 Base type.
 
- Public Types inherited from swift::misc::physical_quantities::CPhysicalQuantity< CAngleUnit, CAngle >
enum  ColumnIndex
 Index.
 
- Public Types inherited from swift::misc::mixin::Index< Derived >
enum  ColumnIndex { IndexPixmap = 10 , IndexIcon , IndexString }
 Base class enums.
 
- Public Types inherited from swift::misc::mixin::Index< CLongitude >
enum  ColumnIndex
 Base class enums.
 

Public Member Functions

QString toWgs84 (int withFragmentSecDigits=3) const
 To WGS84 string.
 
QString convertToQString (bool i18n=false) const
 Cast as QString. More...
 
 CLongitude ()=default
 Default constructor.
 
 CLongitude (const swift::misc::physical_quantities::CAngle &angle)
 Constructor.
 
 CLongitude (double value, const swift::misc::physical_quantities::CAngleUnit &unit)
 Init by double value Longitude measurements range from 0° to (+/–)180°.
 
- Public Member Functions inherited from swift::misc::geo::CEarthAngle< CLongitude >
CEarthAngleoperator+= (const CEarthAngle &latOrLon)
 Plus operator +=.
 
CEarthAngleoperator-= (const CEarthAngle &latOrLon)
 Minus operator-=.
 
CEarthAngleoperator*= (double multiply)
 Multiply operator *=.
 
CLongitude operator+ (const CEarthAngle &latOrLon) const
 Plus operator +.
 
CLongitude operator- (const CEarthAngle &latOrLon) const
 Minus operator -.
 
CLongitude operator* (double multiply) const
 Multiply operator *.
 
CIcons::IconIndex toIcon () const
 As icon, not implemented by all classes. More...
 
QString convertToQString (bool i18n=false) const
 Cast as QString. More...
 
- Public Member Functions inherited from swift::misc::physical_quantities::CAngle
 CAngle ()
 Default constructor.
 
 CAngle (double value, const CAngleUnit &unit)
 Init by double value.
 
 CAngle (const QString &unitString)
 Constructor by parsed string, e.g. 10m. More...
 
 CAngle (int degrees, int minutes, double seconds)
 Init as sexagesimal degrees, minutes, seconds The sign of all parameters must be the same, either all positive or all negative. More...
 
 CAngle (int degrees, double minutes)
 Init as sexagesimal degrees, minutes The sign of both parameters must be the same, either both positive or both negative. More...
 
swift::misc::CIcons::IconIndex toIcon () const
 As icon, not implemented by all classes. More...
 
DegMinSecFractionalSec asSexagesimalDegMinSec (bool range180Degrees=false) const
 As individual values.
 
double piFactor () const
 Value as factor of PI (e.g. 0.5PI)
 
double sin () const
 Sine of angle.
 
double cos () const
 Cosine of angle.
 
double tan () const
 Tangent of angle.
 
void normalizeToPlusMinus180Degrees ()
 Normalize to +- 180deg, [-179.99, 180.0].
 
void normalizeTo360Degrees ()
 Normalize to 0-360, [0, 359,99].
 
CAngle normalizedToPlusMinus180Degrees () const
 As [-179.99, 180.0] normalized angle.
 
CAngle normalizedTo360Degrees () const
 As [0, 359.99] normalized angle.
 
- Public Member Functions inherited from swift::misc::physical_quantities::CPhysicalQuantity< CAngleUnit, CAngle >
int compare (const CAngle &other) const
 Compare with other PQ.
 
const CAngleUnitgetUnit () const
 Unit.
 
void setUnit (const CAngleUnit &unit)
 Simply set unit, do no calclulate conversion. More...
 
void setUnitBySymbol (const QString &unitName)
 Set unit by string.
 
QString getUnitSymbol () const
 Unit.
 
CAngleswitchUnit (const CAngleUnit &newUnit)
 Change unit, and convert value to maintain the same quantity.
 
CAngle switchedUnit (const CAngleUnit &newUnit) const
 Return copy with switched unit.
 
bool isNull () const
 Is quantity null?
 
void setNull ()
 Set null.
 
double value (CAngleUnit unit) const
 Value in given unit.
 
double value () const
 Value in current unit.
 
void setCurrentUnitValue (double value)
 Set value in current unit.
 
int valueInteger (CAngleUnit unit) const
 As integer value.
 
int valueInteger () const
 As integer value in current unit.
 
QString valueIntegerAsString (CAngleUnit unit) const
 As integer value.
 
QString valueIntegerAsString () const
 As integer value in current unit.
 
bool isInteger () const
 Is value an integer.
 
double valueRounded (CAngleUnit unit, int digits=-1) const
 Rounded value in given unit. More...
 
double valueRounded (int digits=-1) const
 Rounded value in current unit. More...
 
QString valueRoundedAsString (CAngleUnit unit, int digits=-1) const
 Rounded value in given unit. More...
 
QString valueRoundedWithUnit (const CAngleUnit &unit, int digits=-1, bool withGroupSeparator=false, bool i18n=false) const
 Value to QString with the given unit, e.g. "5.00m". More...
 
QString valueRoundedWithUnit (int digits=-1, bool withGroupSeparator=false, bool i18n=false) const
 Value to QString with the current unit, e.g. "5.00m". More...
 
void roundToEpsilon ()
 Round current value in current unit to epsilon. More...
 
void setValueSameUnit (double value)
 Change value without changing unit.
 
void addValueSameUnit (double value)
 Add to the value in the current unit.
 
void substractValueSameUnit (double value)
 Substract from the value in the current unit.
 
CPhysicalQuantityoperator*= (double multiply)
 Multiply operator *=.
 
CPhysicalQuantityoperator/= (double divide)
 Divide operator /=.
 
CAngle operator* (double multiply) const
 Operator *.
 
CAngle operator/ (double divide) const
 Operator /.
 
CAngle operator- () const
 Unary operator -.
 
CPhysicalQuantityoperator+= (const CPhysicalQuantity &other)
 Plus operator +=.
 
CPhysicalQuantityoperator-= (const CPhysicalQuantity &other)
 Minus operator-=.
 
bool isZeroEpsilonConsidered () const
 Quantity value <= epsilon.
 
bool isPositiveWithEpsilonConsidered () const
 Value >= 0 epsilon considered.
 
bool isNegativeWithEpsilonConsidered () const
 Value <= 0 epsilon considered.
 
const CAnglemakePositive ()
 Make value always positive.
 
const CAnglemakeNegative ()
 Make value always negative.
 
CAngle abs () const
 Absolute value (always >=0)
 
void marshallToDbus (QDBusArgument &argument) const
 Marshall without begin/endStructure, for when composed within another object. More...
 
void marshallToDbus (QDBusArgument &argument, LosslessTag) const
 Marshal to DBus, preserving the measurement unit.
 
void unmarshallFromDbus (const QDBusArgument &argument)
 Unmarshall without begin/endStructure, for when composed within another object. More...
 
void unmarshallFromDbus (const QDBusArgument &argument, LosslessTag)
 Unmarshal from DBus, with preserved measurement unit.
 
void marshalToDataStream (QDataStream &stream) const
 Marshal a value to a QDataStream. More...
 
void unmarshalFromDataStream (QDataStream &stream)
 Unmarshal a value from a QDataStream. More...
 
size_t getValueHash () const
 qHash overload, needed for storing value in a QSet. More...
 
QJsonObject toJson () const
 Cast to JSON object. More...
 
void convertFromJson (const QJsonObject &json)
 Assign from JSON object. More...
 
QVariant propertyByIndex (CPropertyIndexRef index) const
 Property by index. More...
 
void setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant)
 Set property by index. More...
 
int comparePropertyByIndex (CPropertyIndexRef index, const CAngle &pq) const
 Compare for index. More...
 
QString convertToQString (bool i18n=false) const
 Cast as QString. More...
 
void parseFromString (const QString &value)
 Parse value from string.
 
void parseFromString (const QString &value, CPqString::SeparatorMode mode)
 Parse to string, with specified separator.
 
void parseFromString (const QString &value, CPqString::SeparatorMode mode, const CAngleUnit &defaultUnitIfMissing)
 Parse to string, with specified separator.
 
- Public Member Functions inherited from swift::misc::mixin::Index< Derived >
CPropertyIndexList apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false)
 Update by variant map. More...
 
void setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant)
 Set property by index.
 
QVariant propertyByIndex (CPropertyIndexRef index) const
 Property by index.
 
int comparePropertyByIndex (CPropertyIndexRef index, const Derived &compareValue) const
 Compare for index.
 
bool equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const
 Is given variant equal to value of property index?
 
- Public Member Functions inherited from swift::misc::mixin::MetaType< Derived >
int getMetaTypeId () const
 Returns the Qt meta type ID of this object. More...
 
QString getClassName () const
 Class name.
 
bool isA (int metaTypeId) const
 Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses.
 
- Public Member Functions inherited from swift::misc::mixin::String< Derived >
QString toQString (bool i18n=false) const
 Cast as QString.
 
std::string toStdString (bool i18n=false) const
 To std string.
 
QString stringForStreaming () const
 String for streaming operators.
 
- Public Member Functions inherited from swift::misc::mixin::Icon< Derived, IconIndex >
CIcons::IconIndex toIcon () const
 As icon, not implemented by all classes.
 
- Public Member Functions inherited from swift::misc::mixin::MetaType< CLongitude >
int getMetaTypeId () const
 Returns the Qt meta type ID of this object. More...
 
QString getClassName () const
 Class name.
 
bool isA (int metaTypeId) const
 Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses.
 
- Public Member Functions inherited from swift::misc::mixin::String< CLongitude >
QString toQString (bool i18n=false) const
 Cast as QString.
 
std::string toStdString (bool i18n=false) const
 To std string.
 
QString stringForStreaming () const
 String for streaming operators.
 
- Public Member Functions inherited from swift::misc::mixin::Index< CLongitude >
CPropertyIndexList apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false)
 Update by variant map. More...
 
void setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant)
 Set property by index.
 
QVariant propertyByIndex (CPropertyIndexRef index) const
 Property by index.
 
int comparePropertyByIndex (CPropertyIndexRef index, const CLongitude &compareValue) const
 Compare for index.
 
bool equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const
 Is given variant equal to value of property index?
 

Additional Inherited Members

- Static Public Member Functions inherited from swift::misc::geo::CEarthAngle< CLongitude >
static CLongitude fromWgs84 (const QString &wgsCoordinate)
 Latitude / Longitude from a WGS string such as. More...
 
- Static Public Member Functions inherited from swift::misc::physical_quantities::CAngle
static void unifySign (int degrees, int &minutes, double &seconds)
 Minutes and secods will get same sign as degrees.
 
static void unifySign (int degrees, int &minutes)
 Minutes will get same sign as degrees.
 
static const double & PI ()
 PI as convenience method.
 
static double normalizeDegrees180 (double degrees, int roundDigits=-1)
 Normalize: -180< degrees ≤180.
 
static double normalizeDegrees360 (double degrees, int roundDigits=-1)
 Normalize: 0≤ degrees <360.
 
- Static Public Member Functions inherited from swift::misc::physical_quantities::CPhysicalQuantity< CAngleUnit, CAngle >
static int compare (const CAngle &a, const CAngle &b)
 Implementation of compare.
 
static const CAnglemaxValue (const CAngle &pq1, const CAngle &pq2)
 Maximum of 2 quantities.
 
static const CAngleminValue (const CAngle &pq1, const CAngle &pq2)
 Minimum of 2 quantities.
 
static const CAnglenull ()
 NULL PQ.
 
static CAngle parsedFromString (const QString &value, CPqString::SeparatorMode mode=CPqString::SeparatorBestGuess)
 Parsed from given string.
 
static CAngle parsedFromString (const QString &value, CPqString::SeparatorMode mode, const CAngleUnit &defaultUnitIfMissing)
 Parsed from given string.
 
- Static Public Member Functions inherited from swift::misc::mixin::MetaType< Derived >
static void registerMetadata ()
 Register metadata.
 
- Static Public Member Functions inherited from swift::misc::mixin::MetaType< CLongitude >
static void registerMetadata ()
 Register metadata.
 
- Protected Member Functions inherited from swift::misc::geo::CEarthAngle< CLongitude >
 CEarthAngle ()
 Default constructor.
 
 CEarthAngle (double value, const swift::misc::physical_quantities::CAngleUnit &unit)
 Init by double value.
 
 CEarthAngle (const swift::misc::physical_quantities::CAngle &angle)
 Init by CAngle value.
 
QString toWgs84 (const QChar pos, const QChar neg, int fractionalDigits=3) const
 To WGS84 string.
 
- Protected Member Functions inherited from swift::misc::physical_quantities::CPhysicalQuantity< CAngleUnit, CAngle >
 CPhysicalQuantity (double value, CAngleUnit unit)
 Constructor with double.
 
 CPhysicalQuantity (const QString &unitString)
 Constructor by parsed string, e.g. 10m.
 

Detailed Description

Longitude.

Definition at line 15 of file longitude.h.

Member Function Documentation

◆ convertToQString()

QString swift::misc::geo::CLongitude::convertToQString ( bool  i18n = false) const
inline

Cast as QString.

Definition at line 38 of file longitude.h.


The documentation for this class was generated from the following file: