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:
Klaus Basan
2014-03-10 14:48:56 +01:00
parent 8f6a22e833
commit 34320ad3e1
43 changed files with 1293 additions and 768 deletions

View File

@@ -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