mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 20:25:29 +08:00
Set "ft" as default unit for altitude formatter
See https://discordapp.com/channels/539048679160676382/539486489977946112/692158405145788437
This commit is contained in:
committed by
Mat Sutcliffe
parent
605ccdbaa8
commit
82f7771882
@@ -350,10 +350,17 @@ namespace BlackGui
|
||||
//! Constructor
|
||||
CAltitudeFormatter(bool flightlevel = false, int alignment = alignRightVCenter(), bool i18n = true) : CDefaultFormatter(alignment, i18n), m_flightLevel(flightlevel) {}
|
||||
|
||||
//! Constructor
|
||||
CAltitudeFormatter(const BlackMisc::PhysicalQuantities::CLengthUnit &unit, bool flightlevel = false, int alignment = alignRightVCenter(), bool i18n = true) : CDefaultFormatter(alignment, i18n), m_unit(unit), m_flightLevel(flightlevel) {}
|
||||
|
||||
//! Set the unit, normally ft/m
|
||||
void setUnit(const BlackMisc::PhysicalQuantities::CLengthUnit &unit);
|
||||
|
||||
//! \copydoc CDefaultFormatter::displayRole
|
||||
virtual BlackMisc::CVariant displayRole(const BlackMisc::CVariant &altitude) const override;
|
||||
|
||||
private:
|
||||
BlackMisc::PhysicalQuantities::CLengthUnit m_unit = BlackMisc::PhysicalQuantities::CLengthUnit::ft();
|
||||
const bool m_flightLevel = false;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user