1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-27 21:24:47 +01:00

Compare commits

..

No commits in common. "28bd3e49d10d3bcb1cd2887c0838a20144957c15" and "3d502eb41a241d44f25e4b27e20e76c6a47bc1f5" have entirely different histories.

2 changed files with 6 additions and 7 deletions

View File

@ -530,7 +530,6 @@ void MapView::setUnits(Units units)
_mapScale->setUnits(units); _mapScale->setUnits(units);
_cursorCoordinates->setUnits(units); _cursorCoordinates->setUnits(units);
_positionCoordinates->setUnits(units); _positionCoordinates->setUnits(units);
_motionInfo->setUnits(units);
} }
void MapView::setCoordinatesFormat(CoordinatesFormat format) void MapView::setCoordinatesFormat(CoordinatesFormat format)

View File

@ -83,29 +83,29 @@ void MotionInfoItem::setDigitalZoom(qreal zoom)
QString MotionInfoItem::speed(const QLocale &l) const QString MotionInfoItem::speed(const QLocale &l) const
{ {
if (_units == Nautical) if (_units == Nautical)
return l.toString(MS2KN * _speed, 'f', 1) + UNIT_SPACE return l.toString(MS2KN * _speed) + UNIT_SPACE
+ qApp->translate("MotionInfoItem", "kn"); + qApp->translate("MotionInfoItem", "kn");
else if (_units == Imperial) else if (_units == Imperial)
return l.toString(MS2MIH * _speed, 'f', 1) + UNIT_SPACE return l.toString(MS2MIH * _speed) + UNIT_SPACE
+ qApp->translate("MotionInfoItem", "mi/h"); + qApp->translate("MotionInfoItem", "mi/h");
else else
return l.toString(MS2KMH * _speed, 'f', 1) + UNIT_SPACE return l.toString(MS2KMH * _speed) + UNIT_SPACE
+ qApp->translate("MotionInfoItem", "km/h"); + qApp->translate("MotionInfoItem", "km/h");
} }
QString MotionInfoItem::verticalSpeed(const QLocale &l) const QString MotionInfoItem::verticalSpeed(const QLocale &l) const
{ {
if (_units == Nautical || _units == Imperial) if (_units == Nautical || _units == Imperial)
return l.toString(MS2FTMIN * _verticalSpeed, 'f', 0) + UNIT_SPACE return l.toString(MS2FTMIN * _verticalSpeed) + UNIT_SPACE
+ qApp->translate("MotionInfoItem", "ft/min"); + qApp->translate("MotionInfoItem", "ft/min");
else else
return l.toString(MS2MMIN * _verticalSpeed, 'f', 0) + UNIT_SPACE return l.toString(MS2MMIN * _verticalSpeed) + UNIT_SPACE
+ qApp->translate("MotionInfoItem", "m/min"); + qApp->translate("MotionInfoItem", "m/min");
} }
static QString bearing(qreal val, const QLocale &l) static QString bearing(qreal val, const QLocale &l)
{ {
return l.toString(val, 'f', 0) + DEGREE_UNIT; return l.toString(val) + DEGREE_UNIT;
} }
QString MotionInfoItem::text() const QString MotionInfoItem::text() const