mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
refs #140, changed CValueObject classes to tupel concept
Remarks: Changes looking like an added file result from the shift of namespace voice -> audio
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
#ifndef BLACKMISC_AVHEADING_H
|
||||
#define BLACKMISC_AVHEADING_H
|
||||
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "blackmisc/pqangle.h"
|
||||
|
||||
namespace BlackMisc
|
||||
@@ -29,18 +31,22 @@ namespace BlackMisc
|
||||
};
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CHeading)
|
||||
ReferenceNorth m_north; //!< magnetic or true?
|
||||
|
||||
protected:
|
||||
//! \copydoc CValueObject::convertToQString
|
||||
virtual QString convertToQString(bool i18n = false) const override;
|
||||
|
||||
//! \copydoc CValueObject::marshallToDbus
|
||||
//! \copydoc CValueObject::marshallFromDbus()
|
||||
virtual void marshallToDbus(QDBusArgument &argument) const override;
|
||||
|
||||
//! \copydoc CValueObject::unmarshallFromDbus
|
||||
//! \copydoc CValueObject::unmarshallFromDbus()
|
||||
virtual void unmarshallFromDbus(const QDBusArgument &argument) override;
|
||||
|
||||
//! \copydoc CValueObject::compareImpl
|
||||
virtual int compareImpl(const CValueObject &other) const override;
|
||||
|
||||
public:
|
||||
//! \brief Default constructor: 0 heading true
|
||||
CHeading() : CAngle(0, BlackMisc::PhysicalQuantities::CAngleUnit::rad()), m_north(Magnetic) {}
|
||||
@@ -62,6 +68,9 @@ namespace BlackMisc
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
//! \copydoc CValueObject::getValueHash
|
||||
virtual uint getValueHash() const override;
|
||||
|
||||
//! \brief Equal operator ==
|
||||
bool operator ==(const CHeading &other) const;
|
||||
|
||||
@@ -84,6 +93,8 @@ namespace BlackMisc
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
BLACK_DBUS_ENUM_MARSHALLING(BlackMisc::Aviation::CHeading::ReferenceNorth)
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CHeading, (o.m_north))
|
||||
Q_DECLARE_METATYPE(BlackMisc::Aviation::CHeading)
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user