refactor: Action SwitchDirection => Action::SwitchDirection enum class
This commit is contained in:
parent
1c7d5de01b
commit
ea6f4ce221
2 changed files with 7 additions and 7 deletions
|
|
@ -70,7 +70,7 @@ void Action::loadSettings(QSettings &settings)
|
||||||
settings.endArray();
|
settings.endArray();
|
||||||
|
|
||||||
setSwitchScreenName(settings.value(SettingsKeys::SwitchToScreen).toString());
|
setSwitchScreenName(settings.value(SettingsKeys::SwitchToScreen).toString());
|
||||||
setSwitchDirection(settings.value(SettingsKeys::SwitchDirection, switchLeft).toInt());
|
setSwitchDirection(settings.value(SettingsKeys::SwitchDirection, static_cast<int>(SwitchDirection::left)).toInt());
|
||||||
setLockCursorMode(settings.value(SettingsKeys::LockToScreen, lockCursorToggle).toInt());
|
setLockCursorMode(settings.value(SettingsKeys::LockToScreen, lockCursorToggle).toInt());
|
||||||
setActiveOnRelease(settings.value(SettingsKeys::ActiveOnRelease, false).toBool());
|
setActiveOnRelease(settings.value(SettingsKeys::ActiveOnRelease, false).toBool());
|
||||||
setHaveScreens(settings.value(SettingsKeys::HasScreens, false).toBool());
|
setHaveScreens(settings.value(SettingsKeys::HasScreens, false).toBool());
|
||||||
|
|
|
||||||
|
|
@ -48,12 +48,12 @@ public:
|
||||||
mouseUp,
|
mouseUp,
|
||||||
mousebutton,
|
mousebutton,
|
||||||
};
|
};
|
||||||
enum SwitchDirection
|
enum class SwitchDirection
|
||||||
{
|
{
|
||||||
switchLeft,
|
left,
|
||||||
switchRight,
|
right,
|
||||||
switchUp,
|
up,
|
||||||
switchDown
|
down
|
||||||
};
|
};
|
||||||
enum LockCursorMode
|
enum LockCursorMode
|
||||||
{
|
{
|
||||||
|
|
@ -154,7 +154,7 @@ private:
|
||||||
int m_type = static_cast<int>(Type::keystroke);
|
int m_type = static_cast<int>(Type::keystroke);
|
||||||
QStringList m_typeScreenNames = QStringList();
|
QStringList m_typeScreenNames = QStringList();
|
||||||
QString m_switchScreenName = QString();
|
QString m_switchScreenName = QString();
|
||||||
int m_switchDirection = switchLeft;
|
int m_switchDirection = static_cast<int>(SwitchDirection::left);
|
||||||
int m_lockCursorMode = lockCursorToggle;
|
int m_lockCursorMode = lockCursorToggle;
|
||||||
bool m_activeOnRelease = false;
|
bool m_activeOnRelease = false;
|
||||||
bool m_hasScreens = false;
|
bool m_hasScreens = false;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue