mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 09:15:34 +08:00
refs #314, fromQVariant / location of toQVariant
* renamed fromQVariant to convertFromQVariant, the "from" methods imply the object is changed (fromJson, fromString ..) * implemented fromQVariant - changing the object by QVariant * moved toQVariant into PQ template * free function setFromQVariant
This commit is contained in:
@@ -90,9 +90,6 @@ namespace BlackMisc
|
||||
//! Flight level?
|
||||
bool isFlightLevel() const { return FlightLevel == this->m_datum; }
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
//! Get reference datum (MSL or AGL)
|
||||
ReferenceDatum getReferenceDatum() const { return m_datum; }
|
||||
|
||||
@@ -108,6 +105,12 @@ namespace BlackMisc
|
||||
//! \copydoc CValueObject::fromJson
|
||||
void fromJson(const QJsonObject &json) override;
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
//! \copydoc CValueObject::fromQVariant
|
||||
virtual void fromQVariant(const QVariant &variant) override { BlackMisc::setFromQVariant(this, variant); }
|
||||
|
||||
//! \copydoc CValueObject::parseFromString(const QString &value)
|
||||
void parseFromString(const QString &value) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user