mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:07:02 +08:00
refs #628 Use the metaclass mixins in all value classes.
This commit is contained in:
@@ -81,19 +81,19 @@ namespace BlackMisc
|
||||
QString convertToQString(bool i18n = false) const;
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CActionHotkey)
|
||||
CIdentifier m_identifier; //!< Identifier to which machine this hotkey belongs to
|
||||
CHotkeyCombination m_combination; //!< hotkey combination
|
||||
QString m_action; //!< hotkey action
|
||||
|
||||
BLACK_METACLASS(CActionHotkey,
|
||||
BLACK_METAMEMBER(identifier),
|
||||
BLACK_METAMEMBER(combination),
|
||||
BLACK_METAMEMBER(action)
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Input::CActionHotkey, (
|
||||
attr(o.m_identifier),
|
||||
attr(o.m_combination),
|
||||
attr(o.m_action)
|
||||
))
|
||||
Q_DECLARE_METATYPE(BlackMisc::Input::CActionHotkey)
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -73,17 +73,17 @@ namespace BlackMisc
|
||||
QString convertToQString(bool i18n = false) const;
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CHotkeyCombination)
|
||||
CKeyboardKeyList m_keyboardKeys;
|
||||
CJoystickButtonList m_joystickButtons;
|
||||
|
||||
BLACK_METACLASS(CHotkeyCombination,
|
||||
BLACK_METAMEMBER(keyboardKeys),
|
||||
BLACK_METAMEMBER(joystickButtons)
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Input::CHotkeyCombination, (
|
||||
attr(o.m_keyboardKeys),
|
||||
attr(o.m_joystickButtons)
|
||||
))
|
||||
Q_DECLARE_METATYPE(BlackMisc::Input::CHotkeyCombination)
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -72,15 +72,17 @@ namespace BlackMisc
|
||||
QString convertToQString(bool i18n = false) const;
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CJoystickButton)
|
||||
int m_buttonIndex = m_invalidIndex;
|
||||
|
||||
static constexpr int m_invalidIndex = -1;
|
||||
|
||||
BLACK_METACLASS(CJoystickButton,
|
||||
BLACK_METAMEMBER(buttonIndex)
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Input::CJoystickButton, (o.m_buttonIndex))
|
||||
Q_DECLARE_METATYPE(BlackMisc::Input::CJoystickButton)
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -84,13 +84,15 @@ namespace BlackMisc
|
||||
private:
|
||||
static const QList<KeyCode> &allModifiers();
|
||||
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CKeyboardKey)
|
||||
KeyCode m_keyCode; //!< Key code
|
||||
|
||||
BLACK_METACLASS(CKeyboardKey,
|
||||
BLACK_METAMEMBER(keyCode)
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Input::CKeyboardKey, (o.m_keyCode))
|
||||
Q_DECLARE_METATYPE(BlackMisc::Input::CKeyboardKey)
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user