refactor: Action SwitchDirection => Action::SwitchDirection enum class

This commit is contained in:
sithlord48
2025-08-14 19:41:13 -04:00
committed by Nick Bolton
parent 1c7d5de01b
commit ea6f4ce221
2 changed files with 7 additions and 7 deletions

View File

@ -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());

View File

@ -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;