diff --git a/cockatrice/src/client/settings/cache_settings.cpp b/cockatrice/src/client/settings/cache_settings.cpp index 5fe252618..0f725f388 100644 --- a/cockatrice/src/client/settings/cache_settings.cpp +++ b/cockatrice/src/client/settings/cache_settings.cpp @@ -311,9 +311,9 @@ SettingsCache::SettingsCache() focusCardViewSearchBar = settings->value("interface/focusCardViewSearchBar", true).toBool(); keepGameChatFocus = settings->value("interface/keepGameChatFocus", false).toBool(); - showDragSelectionCount = settings->value("interface/showlassoselectioncount", true).toBool(); - showTotalSelectionCount = settings->value("interface/showpersistentselectioncount", true).toBool(); - showSubtypeSelectionCount = settings->value("interface/showsubtypeselectioncount", true).toBool(); + showDragSelectionTally = settings->value("interface/showlassoselectiontally", true).toBool(); + showTotalSelectionTally = settings->value("interface/showpersistentselectiontally", true).toBool(); + showSubtypeSelectionTally = settings->value("interface/showsubtypeselectiontally", true).toBool(); showShortcuts = settings->value("menu/showshortcuts", true).toBool(); showGameSelectorFilterToolbar = settings->value("menu/showgameselectorfiltertoolbar", true).toBool(); @@ -1376,22 +1376,22 @@ void SettingsCache::setRoundCardCorners(bool _roundCardCorners) emit roundCardCornersChanged(roundCardCorners); } -void SettingsCache::setShowDragSelectionCount(QT_STATE_CHANGED_T _showDragSelectionCount) +void SettingsCache::setShowDragSelectionTally(QT_STATE_CHANGED_T _showDragSelectionTally) { - showDragSelectionCount = static_cast(_showDragSelectionCount); - settings->setValue("interface/showlassoselectioncount", showDragSelectionCount); + showDragSelectionTally = static_cast(_showDragSelectionTally); + settings->setValue("interface/showlassoselectiontally", showDragSelectionTally); } -void SettingsCache::setShowTotalSelectionCount(QT_STATE_CHANGED_T _showTotalSelectionCount) +void SettingsCache::setShowTotalSelectionTally(QT_STATE_CHANGED_T _showTotalSelectionTally) { - showTotalSelectionCount = static_cast(_showTotalSelectionCount); - settings->setValue("interface/showpersistentselectioncount", showTotalSelectionCount); + showTotalSelectionTally = static_cast(_showTotalSelectionTally); + settings->setValue("interface/showpersistentselectiontally", showTotalSelectionTally); } -void SettingsCache::setShowSubtypeSelectionCount(QT_STATE_CHANGED_T _showSubtypeSelectionCount) +void SettingsCache::setShowSubtypeSelectionTally(QT_STATE_CHANGED_T _showSubtypeSelectionTally) { - showSubtypeSelectionCount = static_cast(_showSubtypeSelectionCount); - settings->setValue("interface/showsubtypeselectioncount", showSubtypeSelectionCount); + showSubtypeSelectionTally = static_cast(_showSubtypeSelectionTally); + settings->setValue("interface/showsubtypeselectiontally", showSubtypeSelectionTally); } void SettingsCache::loadPaths() diff --git a/cockatrice/src/client/settings/cache_settings.h b/cockatrice/src/client/settings/cache_settings.h index 43c4a8271..378500f01 100644 --- a/cockatrice/src/client/settings/cache_settings.h +++ b/cockatrice/src/client/settings/cache_settings.h @@ -351,9 +351,9 @@ private: bool isPortableBuild; bool roundCardCorners; bool showStatusBar; - bool showDragSelectionCount; - bool showTotalSelectionCount; - bool showSubtypeSelectionCount; + bool showDragSelectionTally; + bool showTotalSelectionTally; + bool showSubtypeSelectionTally; public: SettingsCache(); @@ -469,17 +469,17 @@ public: { return showStatusBar; } - [[nodiscard]] bool getShowDragSelectionCount() const + [[nodiscard]] bool getShowDragSelectionTally() const { - return showDragSelectionCount; + return showDragSelectionTally; } - [[nodiscard]] bool getShowTotalSelectionCount() const + [[nodiscard]] bool getShowTotalSelectionTally() const { - return showTotalSelectionCount; + return showTotalSelectionTally; } - [[nodiscard]] bool getShowSubtypeSelectionCount() const + [[nodiscard]] bool getShowSubtypeSelectionTally() const { - return showSubtypeSelectionCount; + return showSubtypeSelectionTally; } [[nodiscard]] bool getNotificationsEnabled() const { @@ -1172,8 +1172,8 @@ public slots: void setUpdateReleaseChannelIndex(int value); void setMaxFontSize(int _max); void setRoundCardCorners(bool _roundCardCorners); - void setShowDragSelectionCount(QT_STATE_CHANGED_T _showDragSelectionCount); - void setShowTotalSelectionCount(QT_STATE_CHANGED_T _showTotalSelectionCount); - void setShowSubtypeSelectionCount(QT_STATE_CHANGED_T _showSubtypeSelectionCount); + void setShowDragSelectionTally(QT_STATE_CHANGED_T _showDragSelectionTally); + void setShowTotalSelectionTally(QT_STATE_CHANGED_T _showTotalSelectionTally); + void setShowSubtypeSelectionTally(QT_STATE_CHANGED_T _showSubtypeSelectionTally); }; #endif diff --git a/cockatrice/src/game_graphics/game_view.cpp b/cockatrice/src/game_graphics/game_view.cpp index 304556a21..9e5717249 100644 --- a/cockatrice/src/game_graphics/game_view.cpp +++ b/cockatrice/src/game_graphics/game_view.cpp @@ -128,7 +128,7 @@ void GameView::resizeRubberBand(const QPointF &cursorPoint, int selectedCount) QRect rect = QRect(mapFromScene(selectionOrigin), cursor).normalized(); rubberBand->setGeometry(rect); - if (!SettingsCache::instance().getShowDragSelectionCount()) { + if (!SettingsCache::instance().getShowDragSelectionTally()) { dragCountLabel->hide(); return; } @@ -218,7 +218,7 @@ void GameView::updateTotalSelectionCount(const QSize &viewSize) int count = scene()->selectedItems().count(); - if (!SettingsCache::instance().getShowTotalSelectionCount() || count <= 1) { + if (!SettingsCache::instance().getShowTotalSelectionTally() || count <= 1) { totalCountLabel->hide(); } else { totalCountLabel->setText(QString::number(count)); @@ -230,7 +230,7 @@ void GameView::updateTotalSelectionCount(const QSize &viewSize) totalCountLabel->show(); } - if (!SettingsCache::instance().getShowSubtypeSelectionCount() || count <= 1) { + if (!SettingsCache::instance().getShowSubtypeSelectionTally() || count <= 1) { subtypeCountContainer->hide(); return; } diff --git a/cockatrice/src/interface/widgets/settings_page/user_interface_settings_page.cpp b/cockatrice/src/interface/widgets/settings_page/user_interface_settings_page.cpp index 9261ba011..1bccc0a7f 100644 --- a/cockatrice/src/interface/widgets/settings_page/user_interface_settings_page.cpp +++ b/cockatrice/src/interface/widgets/settings_page/user_interface_settings_page.cpp @@ -60,17 +60,17 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage() connect(&annotateTokensCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(), &SettingsCache::setAnnotateTokens); - showDragSelectionCountCheckBox.setChecked(SettingsCache::instance().getShowDragSelectionCount()); - connect(&showDragSelectionCountCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(), - &SettingsCache::setShowDragSelectionCount); + showDragSelectionTallyCheckBox.setChecked(SettingsCache::instance().getShowDragSelectionTally()); + connect(&showDragSelectionTallyCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(), + &SettingsCache::setShowDragSelectionTally); - showTotalSelectionCountCheckBox.setChecked(SettingsCache::instance().getShowTotalSelectionCount()); - connect(&showTotalSelectionCountCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(), - &SettingsCache::setShowTotalSelectionCount); + showTotalSelectionTallyCheckBox.setChecked(SettingsCache::instance().getShowTotalSelectionTally()); + connect(&showTotalSelectionTallyCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(), + &SettingsCache::setShowTotalSelectionTally); - showSubtypeSelectionCountCheckBox.setChecked(SettingsCache::instance().getShowSubtypeSelectionCount()); - connect(&showSubtypeSelectionCountCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(), - &SettingsCache::setShowSubtypeSelectionCount); + showSubtypeSelectionTallyCheckBox.setChecked(SettingsCache::instance().getShowSubtypeSelectionTally()); + connect(&showSubtypeSelectionTallyCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(), + &SettingsCache::setShowSubtypeSelectionTally); useTearOffMenusCheckBox.setChecked(SettingsCache::instance().getUseTearOffMenus()); connect(&useTearOffMenusCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(), @@ -88,9 +88,9 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage() generalGrid->addWidget(&closeEmptyCardViewCheckBox, 4, 0); generalGrid->addWidget(&focusCardViewSearchBarCheckBox, 5, 0); generalGrid->addWidget(&annotateTokensCheckBox, 6, 0); - generalGrid->addWidget(&showDragSelectionCountCheckBox, 7, 0); - generalGrid->addWidget(&showTotalSelectionCountCheckBox, 8, 0); - generalGrid->addWidget(&showSubtypeSelectionCountCheckBox, 9, 0); + generalGrid->addWidget(&showDragSelectionTallyCheckBox, 7, 0); + generalGrid->addWidget(&showTotalSelectionTallyCheckBox, 8, 0); + generalGrid->addWidget(&showSubtypeSelectionTallyCheckBox, 9, 0); generalGrid->addWidget(&useTearOffMenusCheckBox, 10, 0); generalGrid->addWidget(&keepGameChatFocusCheckBox, 11, 0); @@ -214,9 +214,9 @@ void UserInterfaceSettingsPage::retranslateUi() closeEmptyCardViewCheckBox.setText(tr("Close card view window when last card is removed")); focusCardViewSearchBarCheckBox.setText(tr("Auto focus search bar when card view window is opened")); annotateTokensCheckBox.setText(tr("Annotate card text on tokens")); - showDragSelectionCountCheckBox.setText(tr("Show selection counter during drag selection")); - showTotalSelectionCountCheckBox.setText(tr("Show total selection counter")); - showSubtypeSelectionCountCheckBox.setText(tr("Show subtype breakdown in selection counter")); + showDragSelectionTallyCheckBox.setText(tr("Show selection tally during drag selection")); + showTotalSelectionTallyCheckBox.setText(tr("Show total selection tally")); + showSubtypeSelectionTallyCheckBox.setText(tr("Show subtype breakdown in selection tally")); useTearOffMenusCheckBox.setText(tr("Use tear-off menus, allowing right click menus to persist on screen")); keepGameChatFocusCheckBox.setText( tr("Keep game chat focused when clicking in game (Note: disables card view search bar)")); diff --git a/cockatrice/src/interface/widgets/settings_page/user_interface_settings_page.h b/cockatrice/src/interface/widgets/settings_page/user_interface_settings_page.h index cddd840fd..1bab87cb2 100644 --- a/cockatrice/src/interface/widgets/settings_page/user_interface_settings_page.h +++ b/cockatrice/src/interface/widgets/settings_page/user_interface_settings_page.h @@ -27,9 +27,9 @@ private: QCheckBox closeEmptyCardViewCheckBox; QCheckBox focusCardViewSearchBarCheckBox; QCheckBox annotateTokensCheckBox; - QCheckBox showDragSelectionCountCheckBox; - QCheckBox showTotalSelectionCountCheckBox; - QCheckBox showSubtypeSelectionCountCheckBox; + QCheckBox showDragSelectionTallyCheckBox; + QCheckBox showTotalSelectionTallyCheckBox; + QCheckBox showSubtypeSelectionTallyCheckBox; QCheckBox useTearOffMenusCheckBox; QCheckBox keepGameChatFocusCheckBox; QCheckBox tapAnimationCheckBox;