mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 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:
@@ -55,14 +55,17 @@ namespace BlackMisc
|
||||
degrees + minutes / 100.0,
|
||||
CAngleUnit::sexagesimalDegMin()) {}
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
//! Virtual destructor
|
||||
virtual ~CAngle() {}
|
||||
|
||||
//! \copydoc CValueObject::toIcon
|
||||
virtual BlackMisc::CIcon toIcon() const override;
|
||||
|
||||
//! Virtual destructor
|
||||
virtual ~CAngle() {}
|
||||
//! \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); }
|
||||
|
||||
//! Value as factor of PI (e.g. 0.5PI)
|
||||
double piFactor() const;
|
||||
@@ -70,8 +73,6 @@ namespace BlackMisc
|
||||
//! PI as convenience method
|
||||
static const double &PI();
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user