mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-25 08:03:54 -07:00
Rename all count to tally in the feature
This commit is contained in:
parent
11bd4f5640
commit
9c0180c183
6 changed files with 49 additions and 49 deletions
|
|
@ -310,9 +310,9 @@ SettingsCache::SettingsCache()
|
||||||
closeEmptyCardView = settings->value("interface/closeEmptyCardView", true).toBool();
|
closeEmptyCardView = settings->value("interface/closeEmptyCardView", true).toBool();
|
||||||
focusCardViewSearchBar = settings->value("interface/focusCardViewSearchBar", true).toBool();
|
focusCardViewSearchBar = settings->value("interface/focusCardViewSearchBar", true).toBool();
|
||||||
|
|
||||||
showDragSelectionCount = settings->value("interface/showlassoselectioncount", true).toBool();
|
showDragSelectionTally = settings->value("interface/showlassoselectiontally", true).toBool();
|
||||||
showTotalSelectionCount = settings->value("interface/showpersistentselectioncount", true).toBool();
|
showTotalSelectionTally = settings->value("interface/showpersistentselectiontally", true).toBool();
|
||||||
showSubtypeSelectionCount = settings->value("interface/showsubtypeselectioncount", true).toBool();
|
showSubtypeSelectionTally = settings->value("interface/showsubtypeselectiontally", true).toBool();
|
||||||
|
|
||||||
showShortcuts = settings->value("menu/showshortcuts", true).toBool();
|
showShortcuts = settings->value("menu/showshortcuts", true).toBool();
|
||||||
showGameSelectorFilterToolbar = settings->value("menu/showgameselectorfiltertoolbar", true).toBool();
|
showGameSelectorFilterToolbar = settings->value("menu/showgameselectorfiltertoolbar", true).toBool();
|
||||||
|
|
@ -1361,22 +1361,22 @@ void SettingsCache::setRoundCardCorners(bool _roundCardCorners)
|
||||||
emit roundCardCornersChanged(roundCardCorners);
|
emit roundCardCornersChanged(roundCardCorners);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsCache::setShowDragSelectionCount(QT_STATE_CHANGED_T _showDragSelectionCount)
|
void SettingsCache::setShowDragSelectionTally(QT_STATE_CHANGED_T _showDragSelectionTally)
|
||||||
{
|
{
|
||||||
showDragSelectionCount = static_cast<bool>(_showDragSelectionCount);
|
showDragSelectionTally = static_cast<bool>(_showDragSelectionTally);
|
||||||
settings->setValue("interface/showlassoselectioncount", showDragSelectionCount);
|
settings->setValue("interface/showlassoselectiontally", showDragSelectionTally);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsCache::setShowTotalSelectionCount(QT_STATE_CHANGED_T _showTotalSelectionCount)
|
void SettingsCache::setShowTotalSelectionTally(QT_STATE_CHANGED_T _showTotalSelectionTally)
|
||||||
{
|
{
|
||||||
showTotalSelectionCount = static_cast<bool>(_showTotalSelectionCount);
|
showTotalSelectionTally = static_cast<bool>(_showTotalSelectionTally);
|
||||||
settings->setValue("interface/showpersistentselectioncount", showTotalSelectionCount);
|
settings->setValue("interface/showpersistentselectiontally", showTotalSelectionTally);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsCache::setShowSubtypeSelectionCount(QT_STATE_CHANGED_T _showSubtypeSelectionCount)
|
void SettingsCache::setShowSubtypeSelectionTally(QT_STATE_CHANGED_T _showSubtypeSelectionTally)
|
||||||
{
|
{
|
||||||
showSubtypeSelectionCount = static_cast<bool>(_showSubtypeSelectionCount);
|
showSubtypeSelectionTally = static_cast<bool>(_showSubtypeSelectionTally);
|
||||||
settings->setValue("interface/showsubtypeselectioncount", showSubtypeSelectionCount);
|
settings->setValue("interface/showsubtypeselectiontally", showSubtypeSelectionTally);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsCache::loadPaths()
|
void SettingsCache::loadPaths()
|
||||||
|
|
|
||||||
|
|
@ -347,9 +347,9 @@ private:
|
||||||
bool isPortableBuild;
|
bool isPortableBuild;
|
||||||
bool roundCardCorners;
|
bool roundCardCorners;
|
||||||
bool showStatusBar;
|
bool showStatusBar;
|
||||||
bool showDragSelectionCount;
|
bool showDragSelectionTally;
|
||||||
bool showTotalSelectionCount;
|
bool showTotalSelectionTally;
|
||||||
bool showSubtypeSelectionCount;
|
bool showSubtypeSelectionTally;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SettingsCache();
|
SettingsCache();
|
||||||
|
|
@ -465,17 +465,17 @@ public:
|
||||||
{
|
{
|
||||||
return showStatusBar;
|
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
|
[[nodiscard]] bool getNotificationsEnabled() const
|
||||||
{
|
{
|
||||||
|
|
@ -1158,8 +1158,8 @@ public slots:
|
||||||
void setUpdateReleaseChannelIndex(int value);
|
void setUpdateReleaseChannelIndex(int value);
|
||||||
void setMaxFontSize(int _max);
|
void setMaxFontSize(int _max);
|
||||||
void setRoundCardCorners(bool _roundCardCorners);
|
void setRoundCardCorners(bool _roundCardCorners);
|
||||||
void setShowDragSelectionCount(QT_STATE_CHANGED_T _showDragSelectionCount);
|
void setShowDragSelectionTally(QT_STATE_CHANGED_T _showDragSelectionTally);
|
||||||
void setShowTotalSelectionCount(QT_STATE_CHANGED_T _showTotalSelectionCount);
|
void setShowTotalSelectionTally(QT_STATE_CHANGED_T _showTotalSelectionTally);
|
||||||
void setShowSubtypeSelectionCount(QT_STATE_CHANGED_T _showSubtypeSelectionCount);
|
void setShowSubtypeSelectionTally(QT_STATE_CHANGED_T _showSubtypeSelectionTally);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ GameView::GameView(GameScene *scene, QWidget *parent) : QGraphicsView(scene, par
|
||||||
connect(scene, &GameScene::sigStartRubberBand, this, &GameView::startRubberBand);
|
connect(scene, &GameScene::sigStartRubberBand, this, &GameView::startRubberBand);
|
||||||
connect(scene, &GameScene::sigResizeRubberBand, this, &GameView::resizeRubberBand);
|
connect(scene, &GameScene::sigResizeRubberBand, this, &GameView::resizeRubberBand);
|
||||||
connect(scene, &GameScene::sigStopRubberBand, this, &GameView::stopRubberBand);
|
connect(scene, &GameScene::sigStopRubberBand, this, &GameView::stopRubberBand);
|
||||||
connect(scene, &QGraphicsScene::selectionChanged, this, [this]() { updateSelectionCount(); });
|
connect(scene, &QGraphicsScene::selectionChanged, this, [this]() { updateSelectionTally(); });
|
||||||
|
|
||||||
aCloseMostRecentZoneView = new QAction(this);
|
aCloseMostRecentZoneView = new QAction(this);
|
||||||
|
|
||||||
|
|
@ -95,7 +95,7 @@ void GameView::resizeEvent(QResizeEvent *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSceneRect(scene()->sceneRect());
|
updateSceneRect(scene()->sceneRect());
|
||||||
updateSelectionCount(event->size());
|
updateSelectionTally(event->size());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameView::updateSceneRect(const QRectF &rect)
|
void GameView::updateSceneRect(const QRectF &rect)
|
||||||
|
|
@ -126,7 +126,7 @@ void GameView::resizeRubberBand(const QPointF &cursorPoint, int selectedCount)
|
||||||
QRect rect = QRect(mapFromScene(selectionOrigin), cursor).normalized();
|
QRect rect = QRect(mapFromScene(selectionOrigin), cursor).normalized();
|
||||||
rubberBand->setGeometry(rect);
|
rubberBand->setGeometry(rect);
|
||||||
|
|
||||||
if (!SettingsCache::instance().getShowDragSelectionCount()) {
|
if (!SettingsCache::instance().getShowDragSelectionTally()) {
|
||||||
dragCountLabel->hide();
|
dragCountLabel->hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -206,7 +206,7 @@ void GameView::rebuildSubtypeLabels(const QList<SubtypeEntry> &entries)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameView::updateSelectionCount(const QSize &viewSize)
|
void GameView::updateSelectionTally(const QSize &viewSize)
|
||||||
{
|
{
|
||||||
constexpr int kMarginInPixels = 10;
|
constexpr int kMarginInPixels = 10;
|
||||||
constexpr int kSpacingBetweenLabels = 4;
|
constexpr int kSpacingBetweenLabels = 4;
|
||||||
|
|
@ -216,7 +216,7 @@ void GameView::updateSelectionCount(const QSize &viewSize)
|
||||||
|
|
||||||
int count = scene()->selectedItems().count();
|
int count = scene()->selectedItems().count();
|
||||||
|
|
||||||
if (!SettingsCache::instance().getShowTotalSelectionCount() || count <= 1) {
|
if (!SettingsCache::instance().getShowTotalSelectionTally() || count <= 1) {
|
||||||
totalCountLabel->hide();
|
totalCountLabel->hide();
|
||||||
} else {
|
} else {
|
||||||
totalCountLabel->setText(QString::number(count));
|
totalCountLabel->setText(QString::number(count));
|
||||||
|
|
@ -228,7 +228,7 @@ void GameView::updateSelectionCount(const QSize &viewSize)
|
||||||
totalCountLabel->show();
|
totalCountLabel->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SettingsCache::instance().getShowSubtypeSelectionCount() || count <= 1) {
|
if (!SettingsCache::instance().getShowSubtypeSelectionTally() || count <= 1) {
|
||||||
subtypeCountContainer->hide();
|
subtypeCountContainer->hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ private slots:
|
||||||
void resizeRubberBand(const QPointF &cursorPoint, int selectedCount);
|
void resizeRubberBand(const QPointF &cursorPoint, int selectedCount);
|
||||||
void stopRubberBand();
|
void stopRubberBand();
|
||||||
void refreshShortcuts();
|
void refreshShortcuts();
|
||||||
void updateSelectionCount(const QSize &viewSize = QSize());
|
void updateSelectionTally(const QSize &viewSize = QSize());
|
||||||
public slots:
|
public slots:
|
||||||
void updateSceneRect(const QRectF &rect);
|
void updateSceneRect(const QRectF &rect);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,17 +60,17 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
|
||||||
connect(&annotateTokensCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
|
connect(&annotateTokensCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
|
||||||
&SettingsCache::setAnnotateTokens);
|
&SettingsCache::setAnnotateTokens);
|
||||||
|
|
||||||
showDragSelectionCountCheckBox.setChecked(SettingsCache::instance().getShowDragSelectionCount());
|
showDragSelectionTallyCheckBox.setChecked(SettingsCache::instance().getShowDragSelectionTally());
|
||||||
connect(&showDragSelectionCountCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
|
connect(&showDragSelectionTallyCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
|
||||||
&SettingsCache::setShowDragSelectionCount);
|
&SettingsCache::setShowDragSelectionTally);
|
||||||
|
|
||||||
showTotalSelectionCountCheckBox.setChecked(SettingsCache::instance().getShowTotalSelectionCount());
|
showTotalSelectionTallyCheckBox.setChecked(SettingsCache::instance().getShowTotalSelectionTally());
|
||||||
connect(&showTotalSelectionCountCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
|
connect(&showTotalSelectionTallyCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
|
||||||
&SettingsCache::setShowTotalSelectionCount);
|
&SettingsCache::setShowTotalSelectionTally);
|
||||||
|
|
||||||
showSubtypeSelectionCountCheckBox.setChecked(SettingsCache::instance().getShowSubtypeSelectionCount());
|
showSubtypeSelectionTallyCheckBox.setChecked(SettingsCache::instance().getShowSubtypeSelectionTally());
|
||||||
connect(&showSubtypeSelectionCountCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
|
connect(&showSubtypeSelectionTallyCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
|
||||||
&SettingsCache::setShowSubtypeSelectionCount);
|
&SettingsCache::setShowSubtypeSelectionTally);
|
||||||
|
|
||||||
useTearOffMenusCheckBox.setChecked(SettingsCache::instance().getUseTearOffMenus());
|
useTearOffMenusCheckBox.setChecked(SettingsCache::instance().getUseTearOffMenus());
|
||||||
connect(&useTearOffMenusCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
|
connect(&useTearOffMenusCheckBox, &QCheckBox::QT_STATE_CHANGED, &SettingsCache::instance(),
|
||||||
|
|
@ -84,9 +84,9 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
|
||||||
generalGrid->addWidget(&closeEmptyCardViewCheckBox, 4, 0);
|
generalGrid->addWidget(&closeEmptyCardViewCheckBox, 4, 0);
|
||||||
generalGrid->addWidget(&focusCardViewSearchBarCheckBox, 5, 0);
|
generalGrid->addWidget(&focusCardViewSearchBarCheckBox, 5, 0);
|
||||||
generalGrid->addWidget(&annotateTokensCheckBox, 6, 0);
|
generalGrid->addWidget(&annotateTokensCheckBox, 6, 0);
|
||||||
generalGrid->addWidget(&showDragSelectionCountCheckBox, 7, 0);
|
generalGrid->addWidget(&showDragSelectionTallyCheckBox, 7, 0);
|
||||||
generalGrid->addWidget(&showTotalSelectionCountCheckBox, 8, 0);
|
generalGrid->addWidget(&showTotalSelectionTallyCheckBox, 8, 0);
|
||||||
generalGrid->addWidget(&showSubtypeSelectionCountCheckBox, 9, 0);
|
generalGrid->addWidget(&showSubtypeSelectionTallyCheckBox, 9, 0);
|
||||||
generalGrid->addWidget(&useTearOffMenusCheckBox, 10, 0);
|
generalGrid->addWidget(&useTearOffMenusCheckBox, 10, 0);
|
||||||
|
|
||||||
generalGroupBox = new QGroupBox;
|
generalGroupBox = new QGroupBox;
|
||||||
|
|
@ -209,9 +209,9 @@ void UserInterfaceSettingsPage::retranslateUi()
|
||||||
closeEmptyCardViewCheckBox.setText(tr("Close card view window when last card is removed"));
|
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"));
|
focusCardViewSearchBarCheckBox.setText(tr("Auto focus search bar when card view window is opened"));
|
||||||
annotateTokensCheckBox.setText(tr("Annotate card text on tokens"));
|
annotateTokensCheckBox.setText(tr("Annotate card text on tokens"));
|
||||||
showDragSelectionCountCheckBox.setText(tr("Show selection counter during drag selection"));
|
showDragSelectionTallyCheckBox.setText(tr("Show selection tally during drag selection"));
|
||||||
showTotalSelectionCountCheckBox.setText(tr("Show total selection counter"));
|
showTotalSelectionTallyCheckBox.setText(tr("Show total selection tally"));
|
||||||
showSubtypeSelectionCountCheckBox.setText(tr("Show subtype breakdown in selection counter"));
|
showSubtypeSelectionTallyCheckBox.setText(tr("Show subtype breakdown in selection tally"));
|
||||||
useTearOffMenusCheckBox.setText(tr("Use tear-off menus, allowing right click menus to persist on screen"));
|
useTearOffMenusCheckBox.setText(tr("Use tear-off menus, allowing right click menus to persist on screen"));
|
||||||
notificationsGroupBox->setTitle(tr("Notifications settings"));
|
notificationsGroupBox->setTitle(tr("Notifications settings"));
|
||||||
notificationsEnabledCheckBox.setText(tr("Enable notifications in taskbar"));
|
notificationsEnabledCheckBox.setText(tr("Enable notifications in taskbar"));
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ private:
|
||||||
QCheckBox closeEmptyCardViewCheckBox;
|
QCheckBox closeEmptyCardViewCheckBox;
|
||||||
QCheckBox focusCardViewSearchBarCheckBox;
|
QCheckBox focusCardViewSearchBarCheckBox;
|
||||||
QCheckBox annotateTokensCheckBox;
|
QCheckBox annotateTokensCheckBox;
|
||||||
QCheckBox showDragSelectionCountCheckBox;
|
QCheckBox showDragSelectionTallyCheckBox;
|
||||||
QCheckBox showTotalSelectionCountCheckBox;
|
QCheckBox showTotalSelectionTallyCheckBox;
|
||||||
QCheckBox showSubtypeSelectionCountCheckBox;
|
QCheckBox showSubtypeSelectionTallyCheckBox;
|
||||||
QCheckBox useTearOffMenusCheckBox;
|
QCheckBox useTearOffMenusCheckBox;
|
||||||
QCheckBox tapAnimationCheckBox;
|
QCheckBox tapAnimationCheckBox;
|
||||||
QCheckBox openDeckInNewTabCheckBox;
|
QCheckBox openDeckInNewTabCheckBox;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue