mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +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:
@@ -8,8 +8,8 @@
|
||||
|
||||
#include "blackmisc/valueobject.h"
|
||||
#include "blackmisc/mathvector3dbase.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include <QGenericMatrix>
|
||||
#include <QDBusMetaType>
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -87,6 +87,12 @@ namespace BlackMisc
|
||||
//! \copydoc CValueObject::getValueHash
|
||||
virtual uint getValueHash() const override;
|
||||
|
||||
//! \copydoc CValueObject::toQVariant()
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*derived()); }
|
||||
|
||||
//! \copydoc CValueObject::fromQVariant
|
||||
virtual void fromQVariant(const QVariant &variant) override { BlackMisc::setFromQVariant<ImplMatrix>(derived(), variant); }
|
||||
|
||||
//! \brief Equal operator ==
|
||||
bool operator ==(const ImplMatrix &other) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user