refactor: Action SwitchDirection => Action::SwitchDirection enum class
This commit is contained in:
@ -70,7 +70,7 @@ void Action::loadSettings(QSettings &settings)
|
||||
settings.endArray();
|
||||
|
||||
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());
|
||||
setActiveOnRelease(settings.value(SettingsKeys::ActiveOnRelease, false).toBool());
|
||||
setHaveScreens(settings.value(SettingsKeys::HasScreens, false).toBool());
|
||||
|
||||
@ -48,12 +48,12 @@ public:
|
||||
mouseUp,
|
||||
mousebutton,
|
||||
};
|
||||
enum SwitchDirection
|
||||
enum class SwitchDirection
|
||||
{
|
||||
switchLeft,
|
||||
switchRight,
|
||||
switchUp,
|
||||
switchDown
|
||||
left,
|
||||
right,
|
||||
up,
|
||||
down
|
||||
};
|
||||
enum LockCursorMode
|
||||
{
|
||||
@ -154,7 +154,7 @@ private:
|
||||
int m_type = static_cast<int>(Type::keystroke);
|
||||
QStringList m_typeScreenNames = QStringList();
|
||||
QString m_switchScreenName = QString();
|
||||
int m_switchDirection = switchLeft;
|
||||
int m_switchDirection = static_cast<int>(SwitchDirection::left);
|
||||
int m_lockCursorMode = lockCursorToggle;
|
||||
bool m_activeOnRelease = false;
|
||||
bool m_hasScreens = false;
|
||||
|
||||
Reference in New Issue
Block a user