mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
refs #345 First wave of value classes using the CValueObjectStdTuple CRTP class template.
This commit is contained in:
@@ -22,7 +22,7 @@ namespace BlackMisc
|
||||
namespace Event
|
||||
{
|
||||
//! Value object encapsulating a hotkey function for distribution
|
||||
class CEventHotkeyFunction : public BlackMisc::CValueObject
|
||||
class CEventHotkeyFunction : public CValueObjectStdTuple<CEventHotkeyFunction>
|
||||
{
|
||||
public:
|
||||
//! Default constructor.
|
||||
@@ -31,18 +31,6 @@ namespace BlackMisc
|
||||
//! Constructor.
|
||||
CEventHotkeyFunction(CHotkeyFunction func, bool argument);
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
//! \copydoc CValueObject::convertFromQVariant
|
||||
virtual void convertFromQVariant(const QVariant &variant) override { BlackMisc::setFromQVariant(this, variant); }
|
||||
|
||||
//! \copydoc CValueObject::getValueHash
|
||||
virtual uint getValueHash() const override;
|
||||
|
||||
//! Register metadata
|
||||
static void registerMetadata();
|
||||
|
||||
//! Get the event originator
|
||||
const COriginator &getEventOriginator() const {return m_eventOriginator;}
|
||||
|
||||
@@ -56,21 +44,6 @@ namespace BlackMisc
|
||||
//! \copydoc CValueObject::convertToQString
|
||||
virtual QString convertToQString(bool i18n = false) const override;
|
||||
|
||||
//! \copydoc CValueObject::getMetaTypeId
|
||||
virtual int getMetaTypeId() const override;
|
||||
|
||||
//! \copydoc CValueObject::isA
|
||||
virtual bool isA(int metaTypeId) const override;
|
||||
|
||||
//! \copydoc CValueObject::compareImpl
|
||||
virtual int compareImpl(const CValueObject &other) const override;
|
||||
|
||||
//! \copydoc CValueObject::marshallToDbus
|
||||
virtual void marshallToDbus(QDBusArgument &argument) const override;
|
||||
|
||||
//! \copydoc CValueObject::unmarshallFromDbus
|
||||
virtual void unmarshallFromDbus(const QDBusArgument &argument) override;
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CEventHotkeyFunction)
|
||||
COriginator m_eventOriginator;
|
||||
|
||||
Reference in New Issue
Block a user