mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Compare commits
3 Commits
3d502eb41a
...
28bd3e49d1
Author | SHA1 | Date | |
---|---|---|---|
28bd3e49d1 | |||
606269fcc1 | |||
65c2e25bc6 |
@ -530,6 +530,7 @@ void MapView::setUnits(Units units)
|
||||
_mapScale->setUnits(units);
|
||||
_cursorCoordinates->setUnits(units);
|
||||
_positionCoordinates->setUnits(units);
|
||||
_motionInfo->setUnits(units);
|
||||
}
|
||||
|
||||
void MapView::setCoordinatesFormat(CoordinatesFormat format)
|
||||
|
@ -83,29 +83,29 @@ void MotionInfoItem::setDigitalZoom(qreal zoom)
|
||||
QString MotionInfoItem::speed(const QLocale &l) const
|
||||
{
|
||||
if (_units == Nautical)
|
||||
return l.toString(MS2KN * _speed) + UNIT_SPACE
|
||||
return l.toString(MS2KN * _speed, 'f', 1) + UNIT_SPACE
|
||||
+ qApp->translate("MotionInfoItem", "kn");
|
||||
else if (_units == Imperial)
|
||||
return l.toString(MS2MIH * _speed) + UNIT_SPACE
|
||||
return l.toString(MS2MIH * _speed, 'f', 1) + UNIT_SPACE
|
||||
+ qApp->translate("MotionInfoItem", "mi/h");
|
||||
else
|
||||
return l.toString(MS2KMH * _speed) + UNIT_SPACE
|
||||
return l.toString(MS2KMH * _speed, 'f', 1) + UNIT_SPACE
|
||||
+ qApp->translate("MotionInfoItem", "km/h");
|
||||
}
|
||||
|
||||
QString MotionInfoItem::verticalSpeed(const QLocale &l) const
|
||||
{
|
||||
if (_units == Nautical || _units == Imperial)
|
||||
return l.toString(MS2FTMIN * _verticalSpeed) + UNIT_SPACE
|
||||
return l.toString(MS2FTMIN * _verticalSpeed, 'f', 0) + UNIT_SPACE
|
||||
+ qApp->translate("MotionInfoItem", "ft/min");
|
||||
else
|
||||
return l.toString(MS2MMIN * _verticalSpeed) + UNIT_SPACE
|
||||
return l.toString(MS2MMIN * _verticalSpeed, 'f', 0) + UNIT_SPACE
|
||||
+ qApp->translate("MotionInfoItem", "m/min");
|
||||
}
|
||||
|
||||
static QString bearing(qreal val, const QLocale &l)
|
||||
{
|
||||
return l.toString(val) + DEGREE_UNIT;
|
||||
return l.toString(val, 'f', 0) + DEGREE_UNIT;
|
||||
}
|
||||
|
||||
QString MotionInfoItem::text() const
|
||||
|
Loading…
Reference in New Issue
Block a user