refactor: Fixes, Use enum instead of cast to int
This commit is contained in:
parent
2b3ecd39c6
commit
8526facbe9
2 changed files with 6 additions and 6 deletions
|
|
@ -145,9 +145,9 @@ protected:
|
||||||
{
|
{
|
||||||
m_SwitchCornerSize = val;
|
m_SwitchCornerSize = val;
|
||||||
}
|
}
|
||||||
void setFix(int f, bool on)
|
void setFix(Fix f, bool on)
|
||||||
{
|
{
|
||||||
m_Fixes[f] = on;
|
m_Fixes[static_cast<int8_t>(f)] = on;
|
||||||
}
|
}
|
||||||
QList<bool> &fixes()
|
QList<bool> &fixes()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -108,10 +108,10 @@ void ScreenSettingsDialog::accept()
|
||||||
m_pScreen->setSwitchCorner(BottomRight, ui_->m_pCheckBoxCornerBottomRight->isChecked());
|
m_pScreen->setSwitchCorner(BottomRight, ui_->m_pCheckBoxCornerBottomRight->isChecked());
|
||||||
m_pScreen->setSwitchCornerSize(ui_->m_pSpinBoxSwitchCornerSize->value());
|
m_pScreen->setSwitchCornerSize(ui_->m_pSpinBoxSwitchCornerSize->value());
|
||||||
|
|
||||||
m_pScreen->setFix(static_cast<int>(CapsLock), ui_->m_pCheckBoxCapsLock->isChecked());
|
m_pScreen->setFix(CapsLock, ui_->m_pCheckBoxCapsLock->isChecked());
|
||||||
m_pScreen->setFix(static_cast<int>(NumLock), ui_->m_pCheckBoxNumLock->isChecked());
|
m_pScreen->setFix(NumLock, ui_->m_pCheckBoxNumLock->isChecked());
|
||||||
m_pScreen->setFix(static_cast<int>(ScrollLock), ui_->m_pCheckBoxScrollLock->isChecked());
|
m_pScreen->setFix(ScrollLock, ui_->m_pCheckBoxScrollLock->isChecked());
|
||||||
m_pScreen->setFix(static_cast<int>(XTest), ui_->m_pCheckBoxXTest->isChecked());
|
m_pScreen->setFix(XTest, ui_->m_pCheckBoxXTest->isChecked());
|
||||||
|
|
||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue