diff --git a/cockatrice/CMakeLists.txt b/cockatrice/CMakeLists.txt index bc2833b58..9dfb81f3c 100644 --- a/cockatrice/CMakeLists.txt +++ b/cockatrice/CMakeLists.txt @@ -82,7 +82,7 @@ set(cockatrice_SOURCES src/game_graphics/game_scene.cpp src/game/game_state.cpp src/game_graphics/game_view.cpp - src/game/selection_subtype_counter.cpp + src/game/selection_subtype_tally.cpp src/game_graphics/hand_counter.cpp src/game_graphics/log/message_log_widget.cpp src/game/phase.cpp diff --git a/cockatrice/src/game/selection_subtype_counter.cpp b/cockatrice/src/game/selection_subtype_tally.cpp similarity index 95% rename from cockatrice/src/game/selection_subtype_counter.cpp rename to cockatrice/src/game/selection_subtype_tally.cpp index b30f9438b..0d83a1670 100644 --- a/cockatrice/src/game/selection_subtype_counter.cpp +++ b/cockatrice/src/game/selection_subtype_tally.cpp @@ -1,11 +1,11 @@ -#include "selection_subtype_counter.h" +#include "selection_subtype_tally.h" #include "board/card_item.h" #include #include -namespace SelectionSubtypeCounter +namespace SelectionSubtypeTally { QStringList extractSubtypesFromFace(const QString &faceType) @@ -117,7 +117,7 @@ QString formatAsHtml(const QList &groups) QStringLiteral(""); } -QString buildSubtypeCountText(const QList &cards) +QString buildSubtypeTallyText(const QList &cards) { QList groups = countSubtypes(cards); if (groups.isEmpty()) { @@ -126,4 +126,4 @@ QString buildSubtypeCountText(const QList &cards) return formatAsHtml(groups); } -} // namespace SelectionSubtypeCounter +} // namespace SelectionSubtypeTally diff --git a/cockatrice/src/game/selection_subtype_counter.h b/cockatrice/src/game/selection_subtype_tally.h similarity index 67% rename from cockatrice/src/game/selection_subtype_counter.h rename to cockatrice/src/game/selection_subtype_tally.h index 08dc389a7..3c2f2092b 100644 --- a/cockatrice/src/game/selection_subtype_counter.h +++ b/cockatrice/src/game/selection_subtype_tally.h @@ -1,5 +1,5 @@ -#ifndef SELECTION_SUBTYPE_COUNTER_H -#define SELECTION_SUBTYPE_COUNTER_H +#ifndef SELECTION_SUBTYPE_TALLY_H +#define SELECTION_SUBTYPE_TALLY_H #include #include @@ -20,12 +20,12 @@ struct MainTypeGroup QList subtypes; }; -namespace SelectionSubtypeCounter +namespace SelectionSubtypeTally { QStringList extractSubtypesFromFace(const QString &faceType); QList countSubtypes(const QList &cards); QString formatAsHtml(const QList &groups); -QString buildSubtypeCountText(const QList &cards); -} // namespace SelectionSubtypeCounter +QString buildSubtypeTallyText(const QList &cards); +} // namespace SelectionSubtypeTally #endif diff --git a/cockatrice/src/game_graphics/game_view.cpp b/cockatrice/src/game_graphics/game_view.cpp index 83ee92099..3c268db37 100644 --- a/cockatrice/src/game_graphics/game_view.cpp +++ b/cockatrice/src/game_graphics/game_view.cpp @@ -2,7 +2,7 @@ #include "../client/settings/cache_settings.h" #include "game_scene.h" -#include "selection_subtype_counter.h" +#include "selection_subtype_tally.h" #include #include @@ -172,13 +172,13 @@ void GameView::refreshShortcuts() SettingsCache::instance().shortcuts().getShortcut("Player/aCloseMostRecentZoneView")); } -QString GameView::buildSubtypeCountText() const +QString GameView::buildSubtypeTallyText() const { GameScene *gameScene = dynamic_cast(scene()); if (!gameScene) { return QString(); } - return SelectionSubtypeCounter::buildSubtypeCountText(gameScene->selectedCards()); + return SelectionSubtypeTally::buildSubtypeTallyText(gameScene->selectedCards()); } void GameView::updateSelectionCount(const QSize &viewSize) @@ -208,7 +208,7 @@ void GameView::updateSelectionCount(const QSize &viewSize) return; } - QString subtypeText = buildSubtypeCountText(); + QString subtypeText = buildSubtypeTallyText(); if (subtypeText.isEmpty()) { subtypeCountLabel->hide(); diff --git a/cockatrice/src/game_graphics/game_view.h b/cockatrice/src/game_graphics/game_view.h index fb51ce230..1d8e586b9 100644 --- a/cockatrice/src/game_graphics/game_view.h +++ b/cockatrice/src/game_graphics/game_view.h @@ -24,8 +24,8 @@ private: QLabel *subtypeCountLabel; ///< Label displaying subtype breakdown for selected cards QPointF selectionOrigin; - /** @brief Builds formatted text showing subtype counts for all selected cards */ - QString buildSubtypeCountText() const; + /** @brief Builds formatted text showing subtype tally for all selected cards */ + QString buildSubtypeTallyText() const; protected: void resizeEvent(QResizeEvent *event) override;