[Settings] Shuffle some settings around (#7084)

* [Settings] Shuffle some settings around

Took 21 minutes


Took 1 hour 25 minutes

* [Settings] Camel case everything

* Revert debug schema change

* Add new classes

* Fix card counters writing to global

* Fix CI tests

* Fix Windows CI

* interface() is a protected keyword for MSVC

Took 5 minutes

Took 5 seconds

* [Settings] Keep menu settings on the appearance settings page

Leave the 'Menu settings' group box on the appearance settings page for
now; relocating it to the user interface settings page will be done in a
separate PR.

Took 6 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2026-08-08 22:27:41 +02:00 committed by GitHub
parent bf6b2a90bc
commit adf574e038
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
79 changed files with 1899 additions and 1123 deletions

View file

@ -7,7 +7,7 @@ InterfaceSettings::InterfaceSettings(const QString &settingPath, QObject *parent
bool InterfaceSettings::getUseTearOffMenus() const
{
return getValue("usetearoffmenus", QString(), QString(), true).toBool();
return getValue("useTearOffMenus", QString(), QString(), true).toBool();
}
int InterfaceSettings::getCardViewInitialRowsMax() const
@ -37,22 +37,22 @@ bool InterfaceSettings::getKeepGameChatFocus() const
bool InterfaceSettings::getNotificationsEnabled() const
{
return getValue("notificationsenabled", QString(), QString(), true).toBool();
return getValue("enabled", "interface", "notifications", true).toBool();
}
bool InterfaceSettings::getSpectatorNotificationsEnabled() const
{
return getValue("specnotificationsenabled", QString(), QString(), false).toBool();
return getValue("spectatorsEnabled", "interface", "notifications", false).toBool();
}
bool InterfaceSettings::getBuddyConnectNotificationsEnabled() const
{
return getValue("buddyconnectnotificationsenabled", QString(), QString(), true).toBool();
return getValue("buddyConnectEnabled", "interface", "notifications", true).toBool();
}
bool InterfaceSettings::getDoubleClickToPlay() const
{
return getValue("doubleclicktoplay", QString(), QString(), true).toBool();
return getValue("doubleClickToPlay", QString(), QString(), true).toBool();
}
bool InterfaceSettings::getClickPlaysAllSelected() const
@ -62,7 +62,7 @@ bool InterfaceSettings::getClickPlaysAllSelected() const
bool InterfaceSettings::getPlayToStack() const
{
return getValue("playtostack", QString(), QString(), true).toBool();
return getValue("playToStack", QString(), QString(), true).toBool();
}
bool InterfaceSettings::getDoNotDeleteArrowsInSubPhases() const
@ -72,22 +72,22 @@ bool InterfaceSettings::getDoNotDeleteArrowsInSubPhases() const
int InterfaceSettings::getStartingHandSize() const
{
return getValue("startinghandsize", QString(), QString(), 7).toInt();
return getValue("startingHandSize", QString(), QString(), 7).toInt();
}
bool InterfaceSettings::getAnnotateTokens() const
{
return getValue("annotatetokens", QString(), QString(), false).toBool();
return getValue("annotateTokens", QString(), QString(), false).toBool();
}
bool InterfaceSettings::getShowDragSelectionCount() const
{
return getValue("showlassoselectioncount", QString(), QString(), true).toBool();
return getValue("showLassoSelectionCount", QString(), QString(), true).toBool();
}
bool InterfaceSettings::getShowTotalSelectionCount() const
{
return getValue("showpersistentselectioncount", QString(), QString(), true).toBool();
return getValue("showPersistentSelectionCount", QString(), QString(), true).toBool();
}
int InterfaceSettings::getTallyType() const
@ -102,17 +102,12 @@ bool InterfaceSettings::getHorizontalHand() const
bool InterfaceSettings::getInvertVerticalCoordinate() const
{
return getValue("invert_vertical", "table", QString(), false).toBool();
return getValue("invertVertical", "table", QString(), false).toBool();
}
int InterfaceSettings::getMinPlayersForMultiColumnLayout() const
{
return getValue("min_players_multicolumn", QString(), QString(), 4).toInt();
}
bool InterfaceSettings::getOpenDeckInNewTab() const
{
return getValue("openDeckInNewTab", "editor", QString(), false).toBool();
return getValue("minPlayersMulticolumn", QString(), QString(), 4).toInt();
}
int InterfaceSettings::getRewindBufferingMs() const
@ -125,39 +120,44 @@ qreal InterfaceSettings::getFastForwardSpeed() const
return getValue("fastForwardSpeed", "replay", QString(), 10).toReal();
}
bool InterfaceSettings::getStyleUserList() const
{
return getValue("styleUserList", "appearance", QString(), true).toBool();
}
bool InterfaceSettings::getLeftJustified() const
{
return getValue("leftjustified", QString(), QString(), false).toBool();
return getValue("leftJustified", QString(), QString(), false).toBool();
}
int InterfaceSettings::getZoneViewGroupByIndex() const
{
return getValue("groupby", "zoneview", QString(), 1).toInt();
return getValue("groupBy", "zoneview", QString(), 1).toInt();
}
int InterfaceSettings::getZoneViewSortByIndex() const
{
return getValue("sortby", "zoneview", QString(), 1).toInt();
return getValue("sortBy", "zoneview", QString(), 1).toInt();
}
bool InterfaceSettings::getZoneViewPileView() const
{
return getValue("pileview", "zoneview", QString(), true).toBool();
return getValue("pileView", "zoneview", QString(), true).toBool();
}
QString InterfaceSettings::getKnownMissingFeatures()
bool InterfaceSettings::getShowStatusBar() const
{
return getValue("knownmissingfeatures", QString(), QString(), "").toString();
return getValue("showStatusBar", QString(), QString(), false).toBool();
}
bool InterfaceSettings::getShowShortcuts() const
{
return getValue("showShortcuts", QString(), QString(), true).toBool();
}
bool InterfaceSettings::getShowGameSelectorFilterToolbar() const
{
return getValue("showGameSelectorFilterToolbar", QString(), QString(), true).toBool();
}
void InterfaceSettings::setUseTearOffMenus(bool _useTearOffMenus)
{
setValue(_useTearOffMenus, "usetearoffmenus");
setValue(_useTearOffMenus, "useTearOffMenus");
emit useTearOffMenusChanged(_useTearOffMenus);
}
@ -189,22 +189,22 @@ void InterfaceSettings::setKeepGameChatFocus(bool value)
void InterfaceSettings::setNotificationsEnabled(bool _notificationsEnabled)
{
setValue(_notificationsEnabled, "notificationsenabled");
setValue(_notificationsEnabled, "enabled", "interface", "notifications");
}
void InterfaceSettings::setSpectatorNotificationsEnabled(bool _spectatorNotificationsEnabled)
{
setValue(_spectatorNotificationsEnabled, "specnotificationsenabled");
setValue(_spectatorNotificationsEnabled, "spectatorsEnabled", "interface", "notifications");
}
void InterfaceSettings::setBuddyConnectNotificationsEnabled(bool _buddyConnectNotificationsEnabled)
{
setValue(_buddyConnectNotificationsEnabled, "buddyconnectnotificationsenabled");
setValue(_buddyConnectNotificationsEnabled, "buddyConnectEnabled", "interface", "notifications");
}
void InterfaceSettings::setDoubleClickToPlay(bool _doubleClickToPlay)
{
setValue(_doubleClickToPlay, "doubleclicktoplay");
setValue(_doubleClickToPlay, "doubleClickToPlay");
}
void InterfaceSettings::setClickPlaysAllSelected(bool _clickPlaysAllSelected)
@ -214,7 +214,7 @@ void InterfaceSettings::setClickPlaysAllSelected(bool _clickPlaysAllSelected)
void InterfaceSettings::setPlayToStack(bool _playToStack)
{
setValue(_playToStack, "playtostack");
setValue(_playToStack, "playToStack");
}
void InterfaceSettings::setDoNotDeleteArrowsInSubPhases(bool _doNotDeleteArrowsInSubPhases)
@ -224,22 +224,22 @@ void InterfaceSettings::setDoNotDeleteArrowsInSubPhases(bool _doNotDeleteArrowsI
void InterfaceSettings::setStartingHandSize(int _startingHandSize)
{
setValue(_startingHandSize, "startinghandsize");
setValue(_startingHandSize, "startingHandSize");
}
void InterfaceSettings::setAnnotateTokens(bool _annotateTokens)
{
setValue(_annotateTokens, "annotatetokens");
setValue(_annotateTokens, "annotateTokens");
}
void InterfaceSettings::setShowDragSelectionCount(bool _showDragSelectionCount)
{
setValue(_showDragSelectionCount, "showlassoselectioncount");
setValue(_showDragSelectionCount, "showLassoSelectionCount");
}
void InterfaceSettings::setShowTotalSelectionCount(bool _showTotalSelectionCount)
{
setValue(_showTotalSelectionCount, "showpersistentselectioncount");
setValue(_showTotalSelectionCount, "showPersistentSelectionCount");
}
void InterfaceSettings::setTallyType(int value)
@ -259,21 +259,16 @@ void InterfaceSettings::setHorizontalHand(bool _horizontalHand)
void InterfaceSettings::setInvertVerticalCoordinate(bool _invertVerticalCoordinate)
{
setValue(_invertVerticalCoordinate, "invert_vertical", "table");
setValue(_invertVerticalCoordinate, "invertVertical", "table");
emit invertVerticalCoordinateChanged();
}
void InterfaceSettings::setMinPlayersForMultiColumnLayout(int _minPlayersForMultiColumnLayout)
{
setValue(_minPlayersForMultiColumnLayout, "min_players_multicolumn");
setValue(_minPlayersForMultiColumnLayout, "minPlayersMulticolumn");
emit minPlayersForMultiColumnLayoutChanged();
}
void InterfaceSettings::setOpenDeckInNewTab(bool _openDeckInNewTab)
{
setValue(_openDeckInNewTab, "openDeckInNewTab", "editor");
}
void InterfaceSettings::setRewindBufferingMs(int _rewindBufferingMs)
{
setValue(_rewindBufferingMs, "rewindBufferingMs", "replay");
@ -284,34 +279,40 @@ void InterfaceSettings::setFastForwardSpeed(qreal _value)
setValue(_value, "fastForwardSpeed", "replay");
}
void InterfaceSettings::setStyleUserList(bool _styleUserList)
{
setValue(_styleUserList, "styleUserList", "appearance");
emit styleUserListChanged();
}
void InterfaceSettings::setLeftJustified(bool _leftJustified)
{
setValue(_leftJustified, "leftjustified");
setValue(_leftJustified, "leftJustified");
emit handJustificationChanged();
}
void InterfaceSettings::setZoneViewGroupByIndex(int _zoneViewGroupByIndex)
{
setValue(_zoneViewGroupByIndex, "groupby", "zoneview");
setValue(_zoneViewGroupByIndex, "groupBy", "zoneview");
}
void InterfaceSettings::setZoneViewSortByIndex(int _zoneViewSortByIndex)
{
setValue(_zoneViewSortByIndex, "sortby", "zoneview");
setValue(_zoneViewSortByIndex, "sortBy", "zoneview");
}
void InterfaceSettings::setZoneViewPileView(bool _zoneViewPileView)
{
setValue(_zoneViewPileView, "pileview", "zoneview");
setValue(_zoneViewPileView, "pileView", "zoneview");
}
void InterfaceSettings::setKnownMissingFeatures(const QString &_knownMissingFeatures)
void InterfaceSettings::setShowStatusBar(bool _showStatusBar)
{
setValue(_knownMissingFeatures, "knownmissingfeatures");
setValue(_showStatusBar, "showStatusBar");
emit showStatusBarChanged(_showStatusBar);
}
void InterfaceSettings::setShowShortcuts(bool _showShortcuts)
{
setValue(_showShortcuts, "showShortcuts");
}
void InterfaceSettings::setShowGameSelectorFilterToolbar(bool _showGameSelectorFilterToolbar)
{
setValue(_showGameSelectorFilterToolbar, "showGameSelectorFilterToolbar");
emit showGameSelectorFilterToolbarChanged(_showGameSelectorFilterToolbar);
}