mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Constructor for PQ by string (e.g. 100km/h),
motivated by MS review https://dev.vatsim-germany.org/issues/212#note-6 refs #212
This commit is contained in:
@@ -23,6 +23,8 @@ namespace BlackMisc
|
||||
CAcceleration(double value, const CAccelerationUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
//! \copydoc CPhysicalQuantity(const QString &unitString)
|
||||
CAcceleration(const QString &unitString) : CPhysicalQuantity(unitString) {}
|
||||
|
||||
//! copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ namespace BlackMisc
|
||||
//! Init by double value
|
||||
CAngle(double value, const CAngleUnit &unit): CPhysicalQuantity(value, unit) {}
|
||||
|
||||
//! \copydoc CPhysicalQuantity(const QString &unitString)
|
||||
CAngle(const QString &unitString) : CPhysicalQuantity(unitString) {}
|
||||
|
||||
/*!
|
||||
* \brief Init as sexagesimal degrees, minutes, seconds
|
||||
* The sign of all parameters must be the same, either all positive or all negative.
|
||||
|
||||
@@ -23,6 +23,8 @@ namespace BlackMisc
|
||||
//! Init by double value
|
||||
CFrequency(double value, const CFrequencyUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
//! \copydoc CPhysicalQuantity(const QString &unitString)
|
||||
CFrequency(const QString &unitString) : CPhysicalQuantity(unitString) {}
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
|
||||
@@ -22,6 +22,9 @@ namespace BlackMisc
|
||||
//! Init by double value
|
||||
CLength(double value, const CLengthUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
//! \copydoc CPhysicalQuantity(const QString &unitString)
|
||||
CLength(const QString &unitString) : CPhysicalQuantity(unitString) {}
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
|
||||
@@ -24,6 +24,9 @@ namespace BlackMisc
|
||||
//! Init by double value
|
||||
CMass(double value, const CMassUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
//! \copydoc CPhysicalQuantity(const QString &unitString)
|
||||
CMass(const QString &unitString) : CPhysicalQuantity(unitString) {}
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
|
||||
@@ -25,6 +25,10 @@ namespace BlackMisc
|
||||
//! Init by double value
|
||||
CPressure(double value, const CPressureUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
//! \copydoc CPhysicalQuantity(const QString &unitString)
|
||||
CPressure(const QString &unitString) : CPhysicalQuantity(unitString) {}
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
|
||||
@@ -25,6 +25,8 @@ namespace BlackMisc
|
||||
//! Init by double value
|
||||
CSpeed(double value, const CSpeedUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
//! \copydoc CPhysicalQuantity(const QString &unitString)
|
||||
CSpeed(const QString &unitString) : CPhysicalQuantity(unitString) {}
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace BlackMisc
|
||||
//! Init by double value
|
||||
CTemperature(double value, const CTemperatureUnit &unit): CPhysicalQuantity(value, unit) {}
|
||||
|
||||
//! \copydoc CPhysicalQuantity(const QString &unitString)
|
||||
CTemperature(const QString &unitString) : CPhysicalQuantity(unitString) {}
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
Reference in New Issue
Block a user