refs #415, mixin style lists

This commit is contained in:
Klaus Basan
2015-05-18 20:33:34 +02:00
parent 6d5c3d85a1
commit bad3ed3ea8
48 changed files with 126 additions and 528 deletions

View File

@@ -23,12 +23,14 @@ namespace BlackMisc
{
namespace Settings
{
/*!
* Value object encapsulating a list of keyboard keys.
*/
class BLACKMISC_EXPORT CSettingKeyboardHotkeyList : public CSequence<CSettingKeyboardHotkey>
//! Value object encapsulating a list of keyboard keys.
class BLACKMISC_EXPORT CSettingKeyboardHotkeyList :
public CSequence<CSettingKeyboardHotkey>,
public BlackMisc::Mixin::MetaType<CSettingKeyboardHotkeyList>
{
public:
BLACKMISC_DECLARE_USING_MIXIN_METATYPE(CSettingKeyboardHotkeyList)
//! Default constructor
CSettingKeyboardHotkeyList();
@@ -41,21 +43,10 @@ namespace BlackMisc
//! Key for given function
BlackMisc::Settings::CSettingKeyboardHotkey keyForFunction(const CHotkeyFunction &function) const;
/*!
* Fill the list with hotkeys
* \param reset true, list will be be reset, otherwise values will not be overridde
*/
//! Fill the list with hotkeys
//! \param reset true, list will be be reset, otherwise values will not be overridde
void initAsHotkeyList(bool reset = true);
//! \copydoc CValueObject::toQVariant
QVariant toQVariant() const { return QVariant::fromValue(*this); }
//! \copydoc CValueObject::convertFromQVariant
void convertFromQVariant(const QVariant &variant) { BlackMisc::setFromQVariant(this, variant); }
//! Register metadata
static void registerMetadata();
};
} //namespace