mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
format latitude and longitude strings with cardinal directions
refs #81
This commit is contained in:
committed by
Mathew Sutcliffe
parent
76e2421ba2
commit
f6905d1d8b
@@ -18,11 +18,15 @@ namespace BlackMisc
|
||||
protected:
|
||||
/*!
|
||||
* \brief Specific string representation
|
||||
* \param i18n
|
||||
* \return
|
||||
*/
|
||||
virtual QString convertToQString() const
|
||||
virtual QString convertToQString(bool i18n = false) const
|
||||
{
|
||||
QString s = "latitude ";
|
||||
return s.append(CEarthAngle::convertToQString());
|
||||
QString s(CEarthAngle::convertToQString(i18n));
|
||||
if (!this->isZeroEpsilonConsidered())
|
||||
s.append(this->isNegativeWithEpsilonConsidered() ? " S" : " N");
|
||||
return s;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
@@ -15,11 +15,15 @@ namespace BlackMisc
|
||||
protected:
|
||||
/*!
|
||||
* \brief Specific string representation
|
||||
* \param i18n
|
||||
* \return
|
||||
*/
|
||||
virtual QString convertToQString() const
|
||||
virtual QString convertToQString(bool i18n = false) const
|
||||
{
|
||||
QString s = "longitude ";
|
||||
return s.append(CEarthAngle::convertToQString());
|
||||
QString s(CEarthAngle::convertToQString(i18n));
|
||||
if (!this->isZeroEpsilonConsidered())
|
||||
s.append(this->isNegativeWithEpsilonConsidered() ? " W" : " E");
|
||||
return s;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user