mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 18:25:42 +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:
|
protected:
|
||||||
/*!
|
/*!
|
||||||
* \brief Specific string representation
|
* \brief Specific string representation
|
||||||
|
* \param i18n
|
||||||
|
* \return
|
||||||
*/
|
*/
|
||||||
virtual QString convertToQString() const
|
virtual QString convertToQString(bool i18n = false) const
|
||||||
{
|
{
|
||||||
QString s = "latitude ";
|
QString s(CEarthAngle::convertToQString(i18n));
|
||||||
return s.append(CEarthAngle::convertToQString());
|
if (!this->isZeroEpsilonConsidered())
|
||||||
|
s.append(this->isNegativeWithEpsilonConsidered() ? " S" : " N");
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -15,11 +15,15 @@ namespace BlackMisc
|
|||||||
protected:
|
protected:
|
||||||
/*!
|
/*!
|
||||||
* \brief Specific string representation
|
* \brief Specific string representation
|
||||||
|
* \param i18n
|
||||||
|
* \return
|
||||||
*/
|
*/
|
||||||
virtual QString convertToQString() const
|
virtual QString convertToQString(bool i18n = false) const
|
||||||
{
|
{
|
||||||
QString s = "longitude ";
|
QString s(CEarthAngle::convertToQString(i18n));
|
||||||
return s.append(CEarthAngle::convertToQString());
|
if (!this->isZeroEpsilonConsidered())
|
||||||
|
s.append(this->isNegativeWithEpsilonConsidered() ? " W" : " E");
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user