mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +08:00
Formatting, help text beautifyHelpMessage, improved convertToQString
This commit is contained in:
committed by
Mathew Sutcliffe
parent
a34be02e07
commit
c1482dca36
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QtGlobal>
|
||||
#include <QStringBuilder>
|
||||
#include <cmath>
|
||||
|
||||
using namespace BlackMisc::Aviation;
|
||||
@@ -144,6 +145,14 @@ namespace BlackMisc
|
||||
return 0;
|
||||
}
|
||||
|
||||
QString ICoordinateGeodetic::convertToQString(bool i18n) const
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
return this->latitudeAsString() % QLatin1Char(' ') %
|
||||
this->longitudeAsString() % QLatin1Char(' ') %
|
||||
this->geodeticHeightAsString();
|
||||
}
|
||||
|
||||
CVariant CCoordinateGeodetic::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
|
||||
{
|
||||
if (index.isMyself()) { return CVariant::from(*this); }
|
||||
@@ -328,6 +337,13 @@ namespace BlackMisc
|
||||
return 0;
|
||||
}
|
||||
|
||||
QString ICoordinateWithRelativePosition::convertToQString(bool i18n) const
|
||||
{
|
||||
return m_relativeBearing.toQString(i18n) % QLatin1Char(' ') %
|
||||
m_relativeDistance.toQString(i18n) % QLatin1Char(' ') %
|
||||
ICoordinateGeodetic::convertToQString(i18n);
|
||||
}
|
||||
|
||||
ICoordinateWithRelativePosition::ICoordinateWithRelativePosition()
|
||||
{ }
|
||||
|
||||
|
||||
@@ -104,6 +104,9 @@ namespace BlackMisc
|
||||
//! Compare by index
|
||||
int comparePropertyByIndex(const CPropertyIndex &index, const ICoordinateGeodetic &compareValue) const;
|
||||
|
||||
//! \copydoc BlackMisc::Mixin::String::toQString
|
||||
QString convertToQString(bool i18n = false) const;
|
||||
|
||||
protected:
|
||||
//! Can given index be handled?
|
||||
static bool canHandleIndex(const BlackMisc::CPropertyIndex &index);
|
||||
@@ -165,6 +168,9 @@ namespace BlackMisc
|
||||
//! Compare by index
|
||||
int comparePropertyByIndex(const CPropertyIndex &index, const ICoordinateWithRelativePosition &compareValue) const;
|
||||
|
||||
//! \copydoc BlackMisc::Mixin::String::toQString
|
||||
QString convertToQString(bool i18n = false) const;
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
ICoordinateWithRelativePosition();
|
||||
|
||||
Reference in New Issue
Block a user