Add shortcut for next phase with action (#3548)

* Add shortcut for next phase with action

* zach cleanup

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* cleanup and niceties

* clangify

* rename cleanup

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
This commit is contained in:
Rob Blanckaert 2019-02-03 13:57:41 -08:00 committed by ctrlaltca
parent c1d25bf58b
commit 2bf444e4b7
7 changed files with 304 additions and 253 deletions

View file

@ -24,14 +24,14 @@ PhaseButton::PhaseButton(const QString &_name, QGraphicsItem *parent, QAction *_
connect(activeAnimationTimer, SIGNAL(timeout()), this, SLOT(updateAnimation())); connect(activeAnimationTimer, SIGNAL(timeout()), this, SLOT(updateAnimation()));
activeAnimationTimer->setSingleShot(false); activeAnimationTimer->setSingleShot(false);
} else } else
activeAnimationCounter = 9.0; activeAnimationCounter = 9;
setCacheMode(DeviceCoordinateCache); setCacheMode(DeviceCoordinateCache);
} }
QRectF PhaseButton::boundingRect() const QRectF PhaseButton::boundingRect() const
{ {
return QRectF(0, 0, width, width); return {0, 0, width, width};
} }
void PhaseButton::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) void PhaseButton::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/)
@ -39,21 +39,24 @@ void PhaseButton::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*op
QRectF iconRect = boundingRect().adjusted(3, 3, -3, -3); QRectF iconRect = boundingRect().adjusted(3, 3, -3, -3);
QRectF translatedIconRect = painter->combinedTransform().mapRect(iconRect); QRectF translatedIconRect = painter->combinedTransform().mapRect(iconRect);
qreal scaleFactor = translatedIconRect.width() / iconRect.width(); qreal scaleFactor = translatedIconRect.width() / iconRect.width();
QPixmap iconPixmap = PhasePixmapGenerator::generatePixmap(round(translatedIconRect.height()), name); QPixmap iconPixmap =
PhasePixmapGenerator::generatePixmap(static_cast<int>(round(translatedIconRect.height())), name);
painter->setBrush(QColor(220 * (activeAnimationCounter / 10.0), 220 * (activeAnimationCounter / 10.0), painter->setBrush(QColor(static_cast<int>(220 * (activeAnimationCounter / 10.0)),
220 * (activeAnimationCounter / 10.0))); static_cast<int>(220 * (activeAnimationCounter / 10.0)),
static_cast<int>(220 * (activeAnimationCounter / 10.0))));
painter->setPen(Qt::gray); painter->setPen(Qt::gray);
painter->drawRect(0, 0, width - 1, width - 1); painter->drawRect(0, 0, static_cast<int>(width - 1), static_cast<int>(width - 1));
painter->save(); painter->save();
painter->resetTransform(); painter->resetTransform();
painter->drawPixmap(iconPixmap.rect().translated(round(3 * scaleFactor), round(3 * scaleFactor)), iconPixmap, painter->drawPixmap(iconPixmap.rect().translated(static_cast<int>(round(3 * scaleFactor)),
iconPixmap.rect()); static_cast<int>(round(3 * scaleFactor))),
iconPixmap, iconPixmap.rect());
painter->restore(); painter->restore();
painter->setBrush(QColor(0, 0, 0, 255 * ((10 - activeAnimationCounter) / 15.0))); painter->setBrush(QColor(0, 0, 0, static_cast<int>(255 * ((10 - activeAnimationCounter) / 15.0))));
painter->setPen(Qt::gray); painter->setPen(Qt::gray);
painter->drawRect(0, 0, width - 1, width - 1); painter->drawRect(0, 0, static_cast<int>(width - 1), static_cast<int>(width - 1));
} }
void PhaseButton::setWidth(double _width) void PhaseButton::setWidth(double _width)
@ -105,9 +108,9 @@ void PhaseButton::triggerDoubleClickAction()
PhasesToolbar::PhasesToolbar(QGraphicsItem *parent) PhasesToolbar::PhasesToolbar(QGraphicsItem *parent)
: QGraphicsItem(parent), width(100), height(100), ySpacing(1), symbolSize(8) : QGraphicsItem(parent), width(100), height(100), ySpacing(1), symbolSize(8)
{ {
QAction *aUntapAll = new QAction(this); auto *aUntapAll = new QAction(this);
connect(aUntapAll, SIGNAL(triggered()), this, SLOT(actUntapAll())); connect(aUntapAll, SIGNAL(triggered()), this, SLOT(actUntapAll()));
QAction *aDrawCard = new QAction(this); auto *aDrawCard = new QAction(this);
connect(aDrawCard, SIGNAL(triggered()), this, SLOT(actDrawCard())); connect(aDrawCard, SIGNAL(triggered()), this, SLOT(actDrawCard()));
PhaseButton *untapButton = new PhaseButton("untap", this, aUntapAll); PhaseButton *untapButton = new PhaseButton("untap", this, aUntapAll);
@ -125,10 +128,10 @@ PhasesToolbar::PhasesToolbar(QGraphicsItem *parent)
buttonList << untapButton << upkeepButton << drawButton << main1Button << combatStartButton << combatAttackersButton buttonList << untapButton << upkeepButton << drawButton << main1Button << combatStartButton << combatAttackersButton
<< combatBlockersButton << combatDamageButton << combatEndButton << main2Button << cleanupButton; << combatBlockersButton << combatDamageButton << combatEndButton << main2Button << cleanupButton;
for (int i = 0; i < buttonList.size(); ++i) for (auto &i : buttonList)
connect(buttonList[i], SIGNAL(clicked()), this, SLOT(phaseButtonClicked())); connect(i, SIGNAL(clicked()), this, SLOT(phaseButtonClicked()));
nextTurnButton = new PhaseButton("nextturn", this, 0, false); nextTurnButton = new PhaseButton("nextturn", this, nullptr, false);
connect(nextTurnButton, SIGNAL(clicked()), this, SLOT(actNextTurn())); connect(nextTurnButton, SIGNAL(clicked()), this, SLOT(actNextTurn()));
rearrangeButtons(); rearrangeButtons();
@ -138,7 +141,7 @@ PhasesToolbar::PhasesToolbar(QGraphicsItem *parent)
QRectF PhasesToolbar::boundingRect() const QRectF PhasesToolbar::boundingRect() const
{ {
return QRectF(0, 0, width, height); return {0, 0, width, height};
} }
void PhasesToolbar::retranslateUi() void PhasesToolbar::retranslateUi()
@ -186,8 +189,8 @@ const double PhasesToolbar::marginSize = 3;
void PhasesToolbar::rearrangeButtons() void PhasesToolbar::rearrangeButtons()
{ {
for (int i = 0; i < buttonList.size(); ++i) for (auto &i : buttonList)
buttonList[i]->setWidth(symbolSize); i->setWidth(symbolSize);
nextTurnButton->setWidth(symbolSize); nextTurnButton->setWidth(symbolSize);
double y = marginSize; double y = marginSize;
@ -208,7 +211,7 @@ void PhasesToolbar::rearrangeButtons()
buttonList[10]->setPos(marginSize, y += symbolSize); buttonList[10]->setPos(marginSize, y += symbolSize);
y += ySpacing; y += ySpacing;
y += ySpacing; y += ySpacing;
nextTurnButton->setPos(marginSize, y += symbolSize); nextTurnButton->setPos(marginSize, y + symbolSize);
} }
void PhasesToolbar::setHeight(double _height) void PhasesToolbar::setHeight(double _height)
@ -232,14 +235,21 @@ void PhasesToolbar::setActivePhase(int phase)
buttonList[i]->setActive(i == phase); buttonList[i]->setActive(i == phase);
} }
void PhasesToolbar::triggerPhaseAction(int phase)
{
if (0 <= phase && phase < buttonList.size()) {
buttonList[phase]->triggerDoubleClickAction();
}
}
void PhasesToolbar::phaseButtonClicked() void PhasesToolbar::phaseButtonClicked()
{ {
PhaseButton *button = qobject_cast<PhaseButton *>(sender()); auto *button = qobject_cast<PhaseButton *>(sender());
if (button->getActive()) if (button->getActive())
button->triggerDoubleClickAction(); button->triggerDoubleClickAction();
Command_SetActivePhase cmd; Command_SetActivePhase cmd;
cmd.set_phase(buttonList.indexOf(button)); cmd.set_phase(static_cast<google::protobuf::uint32>(buttonList.indexOf(button)));
emit sendGameCommand(cmd, -1); emit sendGameCommand(cmd, -1);
} }

View file

@ -27,16 +27,16 @@ private:
QAction *doubleClickAction; QAction *doubleClickAction;
double width; double width;
void updatePixmap(QPixmap &pixmap); // void updatePixmap(QPixmap &pixmap);
private slots: private slots:
void updateAnimation(); void updateAnimation();
public: public:
PhaseButton(const QString &_name, explicit PhaseButton(const QString &_name,
QGraphicsItem *parent = 0, QGraphicsItem *parent = nullptr,
QAction *_doubleClickAction = 0, QAction *_doubleClickAction = nullptr,
bool _highlightable = true); bool _highlightable = true);
QRectF boundingRect() const; QRectF boundingRect() const override;
void setWidth(double _width); void setWidth(double _width);
void setActive(bool _active); void setActive(bool _active);
bool getActive() const bool getActive() const
@ -48,9 +48,9 @@ signals:
void clicked(); void clicked();
protected: protected:
void paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/); void paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) override;
void mousePressEvent(QGraphicsSceneMouseEvent *event); void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event); void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
}; };
class PhasesToolbar : public QObject, public QGraphicsItem class PhasesToolbar : public QObject, public QGraphicsItem
@ -67,8 +67,8 @@ private:
void rearrangeButtons(); void rearrangeButtons();
public: public:
PhasesToolbar(QGraphicsItem *parent = 0); explicit PhasesToolbar(QGraphicsItem *parent = nullptr);
QRectF boundingRect() const; QRectF boundingRect() const override;
void retranslateUi(); void retranslateUi();
void setHeight(double _height); void setHeight(double _height);
double getWidth() const double getWidth() const
@ -82,6 +82,7 @@ public:
QString getLongPhaseName(int phase) const; QString getLongPhaseName(int phase) const;
public slots: public slots:
void setActivePhase(int phase); void setActivePhase(int phase);
void triggerPhaseAction(int phase);
private slots: private slots:
void phaseButtonClicked(); void phaseButtonClicked();
void actNextTurn(); void actNextTurn();
@ -91,7 +92,7 @@ signals:
void sendGameCommand(const ::google::protobuf::Message &command, int playerId); void sendGameCommand(const ::google::protobuf::Message &command, int playerId);
protected: protected:
void paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/); void paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/) override;
}; };
#endif #endif

View file

@ -246,12 +246,14 @@ public:
SequenceEdit *TabGame_phase10; SequenceEdit *TabGame_phase10;
QLabel *lbl_TabGame_aNextTurn; QLabel *lbl_TabGame_aNextTurn;
SequenceEdit *TabGame_aNextPhase; SequenceEdit *TabGame_aNextPhase;
QLabel *lbl_TabGame_aNextPhaseAction;
SequenceEdit *TabGame_aNextPhaseAction;
SequenceEdit *TabGame_aNextTurn; SequenceEdit *TabGame_aNextTurn;
QGroupBox *groupBox_13; QGroupBox *groupBox_13;
QGridLayout *gridLayout_13; QGridLayout *gridLayout_13;
QLabel *lbl_Player_aTap; QLabel *lbl_Player_aTap;
SequenceEdit *Player_aTap; SequenceEdit *Player_aTap;
SequenceEdit *Player_aUntap;
QLabel *lbl_Player_aUntapAll; QLabel *lbl_Player_aUntapAll;
SequenceEdit *Player_aUntapAll; SequenceEdit *Player_aUntapAll;
QLabel *lbl_Player_aDoesntUntap; QLabel *lbl_Player_aDoesntUntap;
@ -1249,6 +1251,11 @@ public:
gridLayout_5->addWidget(lbl_TabGame_aNextPhase, 11, 0, 1, 1); gridLayout_5->addWidget(lbl_TabGame_aNextPhase, 11, 0, 1, 1);
lbl_TabGame_aNextPhaseAction = new QLabel(groupBox_8);
lbl_TabGame_aNextPhaseAction->setObjectName("lbl_TabGame_aNextPhaseAction");
gridLayout_5->addWidget(lbl_TabGame_aNextPhaseAction, 12, 0, 1, 1);
TabGame_phase10 = new SequenceEdit("Player/phase10", groupBox_8); TabGame_phase10 = new SequenceEdit("Player/phase10", groupBox_8);
TabGame_phase10->setObjectName("TabGame_phase10"); TabGame_phase10->setObjectName("TabGame_phase10");
@ -1257,17 +1264,22 @@ public:
lbl_TabGame_aNextTurn = new QLabel(groupBox_8); lbl_TabGame_aNextTurn = new QLabel(groupBox_8);
lbl_TabGame_aNextTurn->setObjectName("lbl_TabGame_aNextTurn"); lbl_TabGame_aNextTurn->setObjectName("lbl_TabGame_aNextTurn");
gridLayout_5->addWidget(lbl_TabGame_aNextTurn, 12, 0, 1, 1); gridLayout_5->addWidget(lbl_TabGame_aNextTurn, 13, 0, 1, 1);
TabGame_aNextPhase = new SequenceEdit("Player/aNextPhase", groupBox_8); TabGame_aNextPhase = new SequenceEdit("Player/aNextPhase", groupBox_8);
TabGame_aNextPhase->setObjectName("TabGame_aNextPhase"); TabGame_aNextPhase->setObjectName("TabGame_aNextPhase");
gridLayout_5->addWidget(TabGame_aNextPhase, 11, 1, 1, 1); gridLayout_5->addWidget(TabGame_aNextPhase, 11, 1, 1, 1);
TabGame_aNextPhaseAction = new SequenceEdit("Player/aNextPhaseAction", groupBox_8);
TabGame_aNextPhaseAction->setObjectName("TabGame_aaNextPhaseAction");
gridLayout_5->addWidget(TabGame_aNextPhaseAction, 12, 1, 1, 1);
TabGame_aNextTurn = new SequenceEdit("Player/aNextTurn", groupBox_8); TabGame_aNextTurn = new SequenceEdit("Player/aNextTurn", groupBox_8);
TabGame_aNextTurn->setObjectName("TabGame_aNextTurn"); TabGame_aNextTurn->setObjectName("TabGame_aNextTurn");
gridLayout_5->addWidget(TabGame_aNextTurn, 12, 1, 1, 1); gridLayout_5->addWidget(TabGame_aNextTurn, 13, 1, 1, 1);
gridLayout_17->addWidget(groupBox_8, 0, 0, 1, 1); gridLayout_17->addWidget(groupBox_8, 0, 0, 1, 1);
@ -1766,7 +1778,7 @@ public:
gridLayout_20->addItem(verticalSpacer_3, 2, 1, 1, 1); gridLayout_20->addItem(verticalSpacer_3, 2, 1, 1, 1);
tabWidget->addTab(tab_3, QString()); tabWidget->addTab(tab_3, QString());
tab_4 = new QWidget(tabWidget); tab_4 = new QWidget(tabWidget);
QGridLayout *grid = new QGridLayout(tab_4); auto *grid = new QGridLayout(tab_4);
grid->addWidget(groupBox_3); grid->addWidget(groupBox_3);
grid->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding), 1, 0); grid->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding), 1, 0);
@ -1782,7 +1794,7 @@ public:
btnResetAll->setIcon(QPixmap("theme:icons/update")); btnResetAll->setIcon(QPixmap("theme:icons/update"));
btnClearAll->setIcon(QPixmap("theme:icons/clearsearch")); btnClearAll->setIcon(QPixmap("theme:icons/clearsearch"));
QHBoxLayout *buttonsLayout = new QHBoxLayout(shortcutsTab); auto *buttonsLayout = new QHBoxLayout(shortcutsTab);
buttonsLayout->addWidget(btnClearAll); buttonsLayout->addWidget(btnClearAll);
buttonsLayout->addWidget(btnResetAll); buttonsLayout->addWidget(btnResetAll);
@ -1822,181 +1834,180 @@ public:
void retranslateUi(QWidget * /*shortcutsTab */) void retranslateUi(QWidget * /*shortcutsTab */)
{ {
groupBox->setTitle(QApplication::translate("shortcutsTab", "Main Window", 0)); groupBox->setTitle(QApplication::translate("shortcutsTab", "Main Window"));
lbl_MainWindow_aDeckEditor->setText(QApplication::translate("shortcutsTab", "Deck editor", 0)); lbl_MainWindow_aDeckEditor->setText(QApplication::translate("shortcutsTab", "Deck editor"));
lbl_MainWindow_aSinglePlayer->setText(QApplication::translate("shortcutsTab", "Local gameplay", 0)); lbl_MainWindow_aSinglePlayer->setText(QApplication::translate("shortcutsTab", "Local gameplay"));
lbl_MainWindow_aWatchReplay->setText(QApplication::translate("shortcutsTab", "Watch replay", 0)); lbl_MainWindow_aWatchReplay->setText(QApplication::translate("shortcutsTab", "Watch replay"));
lbl_MainWindow_aConnect->setText(QApplication::translate("shortcutsTab", "Connect", 0)); lbl_MainWindow_aConnect->setText(QApplication::translate("shortcutsTab", "Connect"));
lbl_MainWindow_aRegister->setText(QApplication::translate("shortcutsTab", "Register", 0)); lbl_MainWindow_aRegister->setText(QApplication::translate("shortcutsTab", "Register"));
lbl_MainWindow_aFullScreen->setText(QApplication::translate("shortcutsTab", "Full screen", 0)); lbl_MainWindow_aFullScreen->setText(QApplication::translate("shortcutsTab", "Full screen"));
lbl_MainWindow_aSettings->setText(QApplication::translate("shortcutsTab", "Settings", 0)); lbl_MainWindow_aSettings->setText(QApplication::translate("shortcutsTab", "Settings"));
lbl_MainWindow_aCheckCardUpdates->setText(QApplication::translate("shortcutsTab", "Check for card updates", 0)); lbl_MainWindow_aCheckCardUpdates->setText(QApplication::translate("shortcutsTab", "Check for card updates"));
lbl_MainWindow_aDisconnect->setText(QApplication::translate("shortcutsTab", "Disconnect", 0)); lbl_MainWindow_aDisconnect->setText(QApplication::translate("shortcutsTab", "Disconnect"));
lbl_MainWindow_aExit->setText(QApplication::translate("shortcutsTab", "Exit", 0)); lbl_MainWindow_aExit->setText(QApplication::translate("shortcutsTab", "Exit"));
groupBox_2->setTitle(QApplication::translate("shortcutsTab", "Deck Editor", 0)); groupBox_2->setTitle(QApplication::translate("shortcutsTab", "Deck Editor"));
lbl_TabDeckEditor_aAnalyzeDeck->setText(QApplication::translate("shortcutsTab", "Analyze deck", 0)); lbl_TabDeckEditor_aAnalyzeDeck->setText(QApplication::translate("shortcutsTab", "Analyze deck"));
lbl_TabDeckEditor_aLoadDeckFromClipboard->setText( lbl_TabDeckEditor_aLoadDeckFromClipboard->setText(
QApplication::translate("shortcutsTab", "Load deck (clipboard)", 0)); QApplication::translate("shortcutsTab", "Load deck (clipboard)"));
lbl_TabDeckEditor_aClearFilterAll->setText(QApplication::translate("shortcutsTab", "Clear all filters", 0)); lbl_TabDeckEditor_aClearFilterAll->setText(QApplication::translate("shortcutsTab", "Clear all filters"));
lbl_TabDeckEditor_aNewDeck->setText(QApplication::translate("shortcutsTab", "New deck", 0)); lbl_TabDeckEditor_aNewDeck->setText(QApplication::translate("shortcutsTab", "New deck"));
lbl_TabDeckEditor_aClearFilterOne->setText(QApplication::translate("shortcutsTab", "Clear selected filter", 0)); lbl_TabDeckEditor_aClearFilterOne->setText(QApplication::translate("shortcutsTab", "Clear selected filter"));
lbl_TabDeckEditor_aOpenCustomFolder->setText( lbl_TabDeckEditor_aOpenCustomFolder->setText(QApplication::translate("shortcutsTab", "Open custom pic folder"));
QApplication::translate("shortcutsTab", "Open custom pic folder", 0)); lbl_TabDeckEditor_aClose->setText(QApplication::translate("shortcutsTab", "Close"));
lbl_TabDeckEditor_aClose->setText(QApplication::translate("shortcutsTab", "Close", 0)); lbl_TabDeckEditor_aPrintDeck->setText(QApplication::translate("shortcutsTab", "Print deck"));
lbl_TabDeckEditor_aPrintDeck->setText(QApplication::translate("shortcutsTab", "Print deck", 0)); lbl_TabDeckEditor_aManageSets->setText(QApplication::translate("shortcutsTab", "Manage sets"));
lbl_TabDeckEditor_aManageSets->setText(QApplication::translate("shortcutsTab", "Manage sets", 0)); lbl_TabDeckEditor_aRemoveCard->setText(QApplication::translate("shortcutsTab", "Delete card"));
lbl_TabDeckEditor_aRemoveCard->setText(QApplication::translate("shortcutsTab", "Delete card", 0)); lbl_TabDeckEditor_aEditTokens->setText(QApplication::translate("shortcutsTab", "Edit tokens"));
lbl_TabDeckEditor_aEditTokens->setText(QApplication::translate("shortcutsTab", "Edit tokens", 0)); lbl_TabDeckEditor_aResetLayout->setText(QApplication::translate("shortcutsTab", "Reset layout"));
lbl_TabDeckEditor_aResetLayout->setText(QApplication::translate("shortcutsTab", "Reset layout", 0)); lbl_TabDeckEditor_aIncrement->setText(QApplication::translate("shortcutsTab", "Add card"));
lbl_TabDeckEditor_aIncrement->setText(QApplication::translate("shortcutsTab", "Add card", 0)); lbl_TabDeckEditor_aSaveDeck->setText(QApplication::translate("shortcutsTab", "Save deck"));
lbl_TabDeckEditor_aSaveDeck->setText(QApplication::translate("shortcutsTab", "Save deck", 0)); lbl_TabDeckEditor_aExportDeckDecklist->setText(QApplication::translate("shortcutsTab", "Export deck"));
lbl_TabDeckEditor_aExportDeckDecklist->setText(QApplication::translate("shortcutsTab", "Export deck", 0)); lbl_TabDeckEditor_aDecrement->setText(QApplication::translate("shortcutsTab", "Remove card"));
lbl_TabDeckEditor_aDecrement->setText(QApplication::translate("shortcutsTab", "Remove card", 0)); lbl_TabDeckEditor_aSaveDeckAs->setText(QApplication::translate("shortcutsTab", "Save deck as"));
lbl_TabDeckEditor_aSaveDeckAs->setText(QApplication::translate("shortcutsTab", "Save deck as", 0)); lbl_TabDeckEditor_aLoadDeck->setText(QApplication::translate("shortcutsTab", "Load deck"));
lbl_TabDeckEditor_aLoadDeck->setText(QApplication::translate("shortcutsTab", "Load deck", 0)); lbl_TabDeckEditor_aSaveDeckToClipboard->setText(QApplication::translate("shortcutsTab", "Save deck (clip)"));
lbl_TabDeckEditor_aSaveDeckToClipboard->setText(QApplication::translate("shortcutsTab", "Save deck (clip)", 0));
lbl_TabDeckEditor_aSaveDeckToClipboardRaw->setText( lbl_TabDeckEditor_aSaveDeckToClipboardRaw->setText(
QApplication::translate("shortcutsTab", "Save deck (clip; no annotations)", 0)); QApplication::translate("shortcutsTab", "Save deck (clip; no annotations)"));
groupBox_3->setTitle(QApplication::translate("shortcutsTab", "Counters", 0)); groupBox_3->setTitle(QApplication::translate("shortcutsTab", "Counters"));
groupBox_4->setTitle(QApplication::translate("shortcutsTab", "Life", 0)); groupBox_4->setTitle(QApplication::translate("shortcutsTab", "Life"));
lbl_abstractCounter_sSet->setText(QApplication::translate("shortcutsTab", "Set", 0)); lbl_abstractCounter_sSet->setText(QApplication::translate("shortcutsTab", "Set"));
lbl_abstractCounter_aInc->setText(QApplication::translate("shortcutsTab", "Add", 0)); lbl_abstractCounter_aInc->setText(QApplication::translate("shortcutsTab", "Add"));
lbl_abstractCounter_aDec->setText(QApplication::translate("shortcutsTab", "Remove", 0)); lbl_abstractCounter_aDec->setText(QApplication::translate("shortcutsTab", "Remove"));
groupBox_5->setTitle(QApplication::translate("shortcutsTab", "Red", 0)); groupBox_5->setTitle(QApplication::translate("shortcutsTab", "Red"));
lbl_Player_aSCRed->setText(QApplication::translate("shortcutsTab", "Set", 0)); lbl_Player_aSCRed->setText(QApplication::translate("shortcutsTab", "Set"));
lbl_Player_aCCRed->setText(QApplication::translate("shortcutsTab", "Add", 0)); lbl_Player_aCCRed->setText(QApplication::translate("shortcutsTab", "Add"));
lbl_Player_aRCRed->setText(QApplication::translate("shortcutsTab", "Remove", 0)); lbl_Player_aRCRed->setText(QApplication::translate("shortcutsTab", "Remove"));
groupBox_6->setTitle(QApplication::translate("shortcutsTab", "Green", 0)); groupBox_6->setTitle(QApplication::translate("shortcutsTab", "Green"));
lbl_Player_aSCGreen->setText(QApplication::translate("shortcutsTab", "Set", 0)); lbl_Player_aSCGreen->setText(QApplication::translate("shortcutsTab", "Set"));
lbl_Player_aCCGreen->setText(QApplication::translate("shortcutsTab", "Add", 0)); lbl_Player_aCCGreen->setText(QApplication::translate("shortcutsTab", "Add"));
lbl_Player_aRCGreen->setText(QApplication::translate("shortcutsTab", "Remove", 0)); lbl_Player_aRCGreen->setText(QApplication::translate("shortcutsTab", "Remove"));
groupBox_7->setTitle(QApplication::translate("shortcutsTab", "Yellow", 0)); groupBox_7->setTitle(QApplication::translate("shortcutsTab", "Yellow"));
lbl_Player_aSCYellow->setText(QApplication::translate("shortcutsTab", "Set", 0)); lbl_Player_aSCYellow->setText(QApplication::translate("shortcutsTab", "Set"));
lbl_Player_aCCYellow->setText(QApplication::translate("shortcutsTab", "Add", 0)); lbl_Player_aCCYellow->setText(QApplication::translate("shortcutsTab", "Add"));
lbl_Player_aRCYellow->setText(QApplication::translate("shortcutsTab", "Remove", 0)); lbl_Player_aRCYellow->setText(QApplication::translate("shortcutsTab", "Remove"));
groupBox_counterStorm->setTitle(QApplication::translate("shortcutsTab", "Storm", 0)); groupBox_counterStorm->setTitle(QApplication::translate("shortcutsTab", "Storm"));
lbl_Player_aSetCStorm->setText(QApplication::translate("shortcutsTab", "Set", 0)); lbl_Player_aSetCStorm->setText(QApplication::translate("shortcutsTab", "Set"));
lbl_Player_aIncCStorm->setText(QApplication::translate("shortcutsTab", "Add", 0)); lbl_Player_aIncCStorm->setText(QApplication::translate("shortcutsTab", "Add"));
lbl_Player_aDecCStorm->setText(QApplication::translate("shortcutsTab", "Remove", 0)); lbl_Player_aDecCStorm->setText(QApplication::translate("shortcutsTab", "Remove"));
groupBox_counterW->setTitle(QApplication::translate("shortcutsTab", "W", 0)); groupBox_counterW->setTitle(QApplication::translate("shortcutsTab", "W"));
lbl_Player_aSetCW->setText(QApplication::translate("shortcutsTab", "Set", 0)); lbl_Player_aSetCW->setText(QApplication::translate("shortcutsTab", "Set"));
lbl_Player_aIncCW->setText(QApplication::translate("shortcutsTab", "Add", 0)); lbl_Player_aIncCW->setText(QApplication::translate("shortcutsTab", "Add"));
lbl_Player_aDecCW->setText(QApplication::translate("shortcutsTab", "Remove", 0)); lbl_Player_aDecCW->setText(QApplication::translate("shortcutsTab", "Remove"));
groupBox_counterU->setTitle(QApplication::translate("shortcutsTab", "U", 0)); groupBox_counterU->setTitle(QApplication::translate("shortcutsTab", "U"));
lbl_Player_aSetCU->setText(QApplication::translate("shortcutsTab", "Set", 0)); lbl_Player_aSetCU->setText(QApplication::translate("shortcutsTab", "Set"));
lbl_Player_aIncCU->setText(QApplication::translate("shortcutsTab", "Add", 0)); lbl_Player_aIncCU->setText(QApplication::translate("shortcutsTab", "Add"));
lbl_Player_aDecCU->setText(QApplication::translate("shortcutsTab", "Remove", 0)); lbl_Player_aDecCU->setText(QApplication::translate("shortcutsTab", "Remove"));
groupBox_counterB->setTitle(QApplication::translate("shortcutsTab", "B", 0)); groupBox_counterB->setTitle(QApplication::translate("shortcutsTab", "B"));
lbl_Player_aSetCB->setText(QApplication::translate("shortcutsTab", "Set", 0)); lbl_Player_aSetCB->setText(QApplication::translate("shortcutsTab", "Set"));
lbl_Player_aIncCB->setText(QApplication::translate("shortcutsTab", "Add", 0)); lbl_Player_aIncCB->setText(QApplication::translate("shortcutsTab", "Add"));
lbl_Player_aDecCB->setText(QApplication::translate("shortcutsTab", "Remove", 0)); lbl_Player_aDecCB->setText(QApplication::translate("shortcutsTab", "Remove"));
groupBox_counterR->setTitle(QApplication::translate("shortcutsTab", "R", 0)); groupBox_counterR->setTitle(QApplication::translate("shortcutsTab", "R"));
lbl_Player_aSetCR->setText(QApplication::translate("shortcutsTab", "Set", 0)); lbl_Player_aSetCR->setText(QApplication::translate("shortcutsTab", "Set"));
lbl_Player_aIncCR->setText(QApplication::translate("shortcutsTab", "Add", 0)); lbl_Player_aIncCR->setText(QApplication::translate("shortcutsTab", "Add"));
lbl_Player_aDecCR->setText(QApplication::translate("shortcutsTab", "Remove", 0)); lbl_Player_aDecCR->setText(QApplication::translate("shortcutsTab", "Remove"));
groupBox_counterG->setTitle(QApplication::translate("shortcutsTab", "G", 0)); groupBox_counterG->setTitle(QApplication::translate("shortcutsTab", "G"));
lbl_Player_aSetCG->setText(QApplication::translate("shortcutsTab", "Set", 0)); lbl_Player_aSetCG->setText(QApplication::translate("shortcutsTab", "Set"));
lbl_Player_aIncCG->setText(QApplication::translate("shortcutsTab", "Add", 0)); lbl_Player_aIncCG->setText(QApplication::translate("shortcutsTab", "Add"));
lbl_Player_aDecCG->setText(QApplication::translate("shortcutsTab", "Remove", 0)); lbl_Player_aDecCG->setText(QApplication::translate("shortcutsTab", "Remove"));
groupBox_counterX->setTitle(QApplication::translate("shortcutsTab", "X", 0)); groupBox_counterX->setTitle(QApplication::translate("shortcutsTab", "X"));
lbl_Player_aSetCX->setText(QApplication::translate("shortcutsTab", "Set", 0)); lbl_Player_aSetCX->setText(QApplication::translate("shortcutsTab", "Set"));
lbl_Player_aIncCX->setText(QApplication::translate("shortcutsTab", "Add", 0)); lbl_Player_aIncCX->setText(QApplication::translate("shortcutsTab", "Add"));
lbl_Player_aDecCX->setText(QApplication::translate("shortcutsTab", "Remove", 0)); lbl_Player_aDecCX->setText(QApplication::translate("shortcutsTab", "Remove"));
lbl_Player_aSCYellow->setText(QApplication::translate("shortcutsTab", "Set", 0)); lbl_Player_aSCYellow->setText(QApplication::translate("shortcutsTab", "Set"));
lbl_Player_aCCYellow->setText(QApplication::translate("shortcutsTab", "Add", 0)); lbl_Player_aCCYellow->setText(QApplication::translate("shortcutsTab", "Add"));
lbl_Player_aRCYellow->setText(QApplication::translate("shortcutsTab", "Remove", 0)); lbl_Player_aRCYellow->setText(QApplication::translate("shortcutsTab", "Remove"));
tabWidget->setTabText(tabWidget->indexOf(tab), tabWidget->setTabText(tabWidget->indexOf(tab),
QApplication::translate("shortcutsTab", "Main Window | Deck Editor", 0)); QApplication::translate("shortcutsTab", "Main Window | Deck Editor"));
groupBox_9->setTitle(QApplication::translate("shortcutsTab", "Power / Toughness", 0)); groupBox_9->setTitle(QApplication::translate("shortcutsTab", "Power / Toughness"));
groupBox_12->setTitle(QApplication::translate("shortcutsTab", "Power and Toughness", 0)); groupBox_12->setTitle(QApplication::translate("shortcutsTab", "Power and Toughness"));
lbl_Player_aIncPT->setText(QApplication::translate("shortcutsTab", "Add (+1/+1)", 0)); lbl_Player_aIncPT->setText(QApplication::translate("shortcutsTab", "Add (+1/+1)"));
lbl_Player_aDecPT->setText(QApplication::translate("shortcutsTab", "Remove (-1/-1)", 0)); lbl_Player_aDecPT->setText(QApplication::translate("shortcutsTab", "Remove (-1/-1)"));
lbl_Player_aResetPT->setText(QApplication::translate("shortcutsTab", "Reset", 0)); lbl_Player_aResetPT->setText(QApplication::translate("shortcutsTab", "Reset"));
lbl_Player_aSetPT->setText(QApplication::translate("shortcutsTab", "Set", 0)); lbl_Player_aSetPT->setText(QApplication::translate("shortcutsTab", "Set"));
groupBox_11->setTitle(QApplication::translate("shortcutsTab", "Toughness", 0)); groupBox_11->setTitle(QApplication::translate("shortcutsTab", "Toughness"));
lbl_Player_aDecT->setText(QApplication::translate("shortcutsTab", "Remove (-0/-1)", 0)); lbl_Player_aDecT->setText(QApplication::translate("shortcutsTab", "Remove (-0/-1)"));
lbl_Player_aIncT->setText(QApplication::translate("shortcutsTab", "Add (+0/+1)", 0)); lbl_Player_aIncT->setText(QApplication::translate("shortcutsTab", "Add (+0/+1)"));
groupBox_10->setTitle(QApplication::translate("shortcutsTab", "Power", 0)); groupBox_10->setTitle(QApplication::translate("shortcutsTab", "Power"));
lbl_Player_aDecP->setText(QApplication::translate("shortcutsTab", "Remove (-1/-0)", 0)); lbl_Player_aDecP->setText(QApplication::translate("shortcutsTab", "Remove (-1/-nullptr)"));
lbl_Player_aIncP->setText(QApplication::translate("shortcutsTab", "Add (+1/+0)", 0)); lbl_Player_aIncP->setText(QApplication::translate("shortcutsTab", "Add (+1/+nullptr)"));
groupBox_8->setTitle(QApplication::translate("shortcutsTab", "Game Phases", 0)); groupBox_8->setTitle(QApplication::translate("shortcutsTab", "Game Phases"));
lbl_TabGame_phase0->setText(QApplication::translate("shortcutsTab", "Untap", 0)); lbl_TabGame_phase0->setText(QApplication::translate("shortcutsTab", "Untap"));
lbl_TabGame_phase1->setText(QApplication::translate("shortcutsTab", "Upkeep", 0)); lbl_TabGame_phase1->setText(QApplication::translate("shortcutsTab", "Upkeep"));
lbl_TabGame_phase2->setText(QApplication::translate("shortcutsTab", "Draw", 0)); lbl_TabGame_phase2->setText(QApplication::translate("shortcutsTab", "Draw"));
lbl_TabGame_phase3->setText(QApplication::translate("shortcutsTab", "Main 1", 0)); lbl_TabGame_phase3->setText(QApplication::translate("shortcutsTab", "Main 1"));
lbl_TabGame_phase4->setText(QApplication::translate("shortcutsTab", "Start combat", 0)); lbl_TabGame_phase4->setText(QApplication::translate("shortcutsTab", "Start combat"));
lbl_TabGame_phase5->setText(QApplication::translate("shortcutsTab", "Attack", 0)); lbl_TabGame_phase5->setText(QApplication::translate("shortcutsTab", "Attack"));
lbl_TabGame_phase6->setText(QApplication::translate("shortcutsTab", "Block", 0)); lbl_TabGame_phase6->setText(QApplication::translate("shortcutsTab", "Block"));
lbl_TabGame_phase7->setText(QApplication::translate("shortcutsTab", "Damage", 0)); lbl_TabGame_phase7->setText(QApplication::translate("shortcutsTab", "Damage"));
lbl_TabGame_phase8->setText(QApplication::translate("shortcutsTab", "End combat", 0)); lbl_TabGame_phase8->setText(QApplication::translate("shortcutsTab", "End combat"));
lbl_TabGame_phase9->setText(QApplication::translate("shortcutsTab", "Main 2", 0)); lbl_TabGame_phase9->setText(QApplication::translate("shortcutsTab", "Main 2"));
lbl_TabGame_phase10->setText(QApplication::translate("shortcutsTab", "End", 0)); lbl_TabGame_phase10->setText(QApplication::translate("shortcutsTab", "End"));
lbl_TabGame_aNextPhase->setText(QApplication::translate("shortcutsTab", "Next phase", 0)); lbl_TabGame_aNextPhase->setText(QApplication::translate("shortcutsTab", "Next phase"));
lbl_TabGame_aNextTurn->setText(QApplication::translate("shortcutsTab", "Next turn", 0)); lbl_TabGame_aNextPhaseAction->setText(QApplication::translate("shortcutsTab", "Next phase action"));
groupBox_13->setTitle(QApplication::translate("shortcutsTab", "Playing Area", 0)); lbl_TabGame_aNextTurn->setText(QApplication::translate("shortcutsTab", "Next turn"));
lbl_Player_aTap->setText(QApplication::translate("shortcutsTab", "Tap / Untap Card", 0)); groupBox_13->setTitle(QApplication::translate("shortcutsTab", "Playing Area"));
lbl_Player_aUntapAll->setText(QApplication::translate("shortcutsTab", "Untap all", 0)); lbl_Player_aTap->setText(QApplication::translate("shortcutsTab", "Tap / Untap Card"));
lbl_Player_aDoesntUntap->setText(QApplication::translate("shortcutsTab", "Toggle untap", 0)); lbl_Player_aUntapAll->setText(QApplication::translate("shortcutsTab", "Untap all"));
lbl_Player_aFlip->setText(QApplication::translate("shortcutsTab", "Flip card", 0)); lbl_Player_aDoesntUntap->setText(QApplication::translate("shortcutsTab", "Toggle untap"));
lbl_Player_aPeek->setText(QApplication::translate("shortcutsTab", "Peek card", 0)); lbl_Player_aFlip->setText(QApplication::translate("shortcutsTab", "Flip card"));
lbl_Player_aPlay->setText(QApplication::translate("shortcutsTab", "Play card", 0)); lbl_Player_aPeek->setText(QApplication::translate("shortcutsTab", "Peek card"));
lbl_Player_aAttach->setText(QApplication::translate("shortcutsTab", "Attach card", 0)); lbl_Player_aPlay->setText(QApplication::translate("shortcutsTab", "Play card"));
lbl_Player_aUnattach->setText(QApplication::translate("shortcutsTab", "Unattach card", 0)); lbl_Player_aAttach->setText(QApplication::translate("shortcutsTab", "Attach card"));
lbl_Player_aClone->setText(QApplication::translate("shortcutsTab", "Clone card", 0)); lbl_Player_aUnattach->setText(QApplication::translate("shortcutsTab", "Unattach card"));
lbl_Player_aCreateToken->setText(QApplication::translate("shortcutsTab", "Create token", 0)); lbl_Player_aClone->setText(QApplication::translate("shortcutsTab", "Clone card"));
lbl_Player_aCreateRelatedTokens->setText( lbl_Player_aCreateToken->setText(QApplication::translate("shortcutsTab", "Create token"));
QApplication::translate("shortcutsTab", "Create all related tokens", 0)); lbl_Player_aCreateRelatedTokens->setText(QApplication::translate("shortcutsTab", "Create all related tokens"));
lbl_Player_aCreateAnotherToken->setText(QApplication::translate("shortcutsTab", "Create another token", 0)); lbl_Player_aCreateAnotherToken->setText(QApplication::translate("shortcutsTab", "Create another token"));
lbl_Player_aSetAnnotation->setText(QApplication::translate("shortcutsTab", "Set annotation", 0)); lbl_Player_aSetAnnotation->setText(QApplication::translate("shortcutsTab", "Set annotation"));
tabWidget->setTabText(tabWidget->indexOf(tab_2), tabWidget->setTabText(tabWidget->indexOf(tab_2),
QApplication::translate("shortcutsTab", "Phases | P/T | Playing Area", 0)); QApplication::translate("shortcutsTab", "Phases | P/T | Playing Area"));
groupBox_moveCard->setTitle(QApplication::translate("shortcutsTab", "Move selected card to", 0)); groupBox_moveCard->setTitle(QApplication::translate("shortcutsTab", "Move selected card to"));
lbl_Player_aMoveToBottomLibrary->setText(QApplication::translate("shortcutsTab", "Bottom library", 0)); lbl_Player_aMoveToBottomLibrary->setText(QApplication::translate("shortcutsTab", "Bottom library"));
lbl_Player_aMoveToTopLibrary->setText(QApplication::translate("shortcutsTab", "Top library", 0)); lbl_Player_aMoveToTopLibrary->setText(QApplication::translate("shortcutsTab", "Top library"));
lbl_Player_aMoveToGraveyard->setText(QApplication::translate("shortcutsTab", "Graveyard", 0)); lbl_Player_aMoveToGraveyard->setText(QApplication::translate("shortcutsTab", "Graveyard"));
lbl_Player_aMoveToExile->setText(QApplication::translate("shortcutsTab", "Exile", 0)); lbl_Player_aMoveToExile->setText(QApplication::translate("shortcutsTab", "Exile"));
lbl_Player_aMoveToHand->setText(QApplication::translate("shortcutsTab", "Hand", 0)); lbl_Player_aMoveToHand->setText(QApplication::translate("shortcutsTab", "Hand"));
lbl_Player_aMoveTopToPlayFaceDown->setText(QApplication::translate("shortcutsTab", "Play face down")); lbl_Player_aMoveTopToPlayFaceDown->setText(QApplication::translate("shortcutsTab", "Play face down"));
groupBox_view->setTitle(QApplication::translate("shortcutsTab", "View", 0)); groupBox_view->setTitle(QApplication::translate("shortcutsTab", "View"));
lbl_Player_aViewGraveyard->setText(QApplication::translate("shortcutsTab", "Graveyard", 0)); lbl_Player_aViewGraveyard->setText(QApplication::translate("shortcutsTab", "Graveyard"));
lbl_Player_aViewLibrary->setText(QApplication::translate("shortcutsTab", "Library", 0)); lbl_Player_aViewLibrary->setText(QApplication::translate("shortcutsTab", "Library"));
lbl_Player_aViewTopCards->setText(QApplication::translate("shortcutsTab", "Top cards of library", 0)); lbl_Player_aViewTopCards->setText(QApplication::translate("shortcutsTab", "Top cards of library"));
lbl_Player_aViewSideboard->setText(QApplication::translate("shortcutsTab", "Sideboard", 0)); lbl_Player_aViewSideboard->setText(QApplication::translate("shortcutsTab", "Sideboard"));
lbl_Player_aViewRfg->setText(QApplication::translate("shortcutsTab", "Exile", 0)); lbl_Player_aViewRfg->setText(QApplication::translate("shortcutsTab", "Exile"));
lbl_GameView_aCloseMostRecentZoneView->setText(QApplication::translate("shortcutsTab", "Close recent view", 0)); lbl_GameView_aCloseMostRecentZoneView->setText(QApplication::translate("shortcutsTab", "Close recent view"));
groupBox_moveDeck->setTitle(QApplication::translate("shortcutsTab", "Move top card to", 0)); groupBox_moveDeck->setTitle(QApplication::translate("shortcutsTab", "Move top card to"));
lbl_Player_aMoveTopCardToGraveyard->setText(QApplication::translate("shortcutsTab", "Graveyard Once", 0)); lbl_Player_aMoveTopCardToGraveyard->setText(QApplication::translate("shortcutsTab", "Graveyard Once"));
lbl_Player_aMoveTopCardsToGraveyard->setText(QApplication::translate("shortcutsTab", "Graveyard Multiple", 0)); lbl_Player_aMoveTopCardsToGraveyard->setText(QApplication::translate("shortcutsTab", "Graveyard Multiple"));
lbl_Player_aMoveTopCardToExile->setText(QApplication::translate("shortcutsTab", "Exile Once", 0)); lbl_Player_aMoveTopCardToExile->setText(QApplication::translate("shortcutsTab", "Exile Once"));
lbl_Player_aMoveTopCardsToExile->setText(QApplication::translate("shortcutsTab", "Exile Multiple", 0)); lbl_Player_aMoveTopCardsToExile->setText(QApplication::translate("shortcutsTab", "Exile Multiple"));
groupBox_gameLobby->setTitle(QApplication::translate("shortcutsTab", "Game Lobby", 0)); groupBox_gameLobby->setTitle(QApplication::translate("shortcutsTab", "Game Lobby"));
lbl_DeckViewContainer_loadRemoteButton->setText(QApplication::translate("shortcutsTab", "Load remote deck", 0)); lbl_DeckViewContainer_loadRemoteButton->setText(QApplication::translate("shortcutsTab", "Load remote deck"));
lbl_DeckViewContainer_loadLocalButton->setText(QApplication::translate("shortcutsTab", "Load local deck", 0)); lbl_DeckViewContainer_loadLocalButton->setText(QApplication::translate("shortcutsTab", "Load local deck"));
groupBox_gameplay->setTitle(QApplication::translate("shortcutsTab", "Gameplay", 0)); groupBox_gameplay->setTitle(QApplication::translate("shortcutsTab", "Gameplay"));
lbl_Player_aDrawArrow->setText(QApplication::translate("shortcutsTab", "Draw arrow", 0)); lbl_Player_aDrawArrow->setText(QApplication::translate("shortcutsTab", "Draw arrow"));
lbl_TabGame_aLeaveGame->setText(QApplication::translate("shortcutsTab", "Leave game", 0)); lbl_TabGame_aLeaveGame->setText(QApplication::translate("shortcutsTab", "Leave game"));
lbl_TabGame_aRemoveLocalArrows->setText(QApplication::translate("shortcutsTab", "Remove local arrows", 0)); lbl_TabGame_aRemoveLocalArrows->setText(QApplication::translate("shortcutsTab", "Remove local arrows"));
lbl_TabGame_aConcede->setText(QApplication::translate("shortcutsTab", "Concede", 0)); lbl_TabGame_aConcede->setText(QApplication::translate("shortcutsTab", "Concede"));
lbl_Player_aRollDie->setText(QApplication::translate("shortcutsTab", "Roll dice", 0)); lbl_Player_aRollDie->setText(QApplication::translate("shortcutsTab", "Roll dice"));
lbl_TabGame_aRotateViewCW->setText(QApplication::translate("shortcutsTab", "Rotate view CW", 0)); lbl_TabGame_aRotateViewCW->setText(QApplication::translate("shortcutsTab", "Rotate view CW"));
lbl_Player_aShuffle->setText(QApplication::translate("shortcutsTab", "Shuffle library", 0)); lbl_Player_aShuffle->setText(QApplication::translate("shortcutsTab", "Shuffle library"));
lbl_TabGame_aRotateViewCCW->setText(QApplication::translate("shortcutsTab", "Rotate view CCW", 0)); lbl_TabGame_aRotateViewCCW->setText(QApplication::translate("shortcutsTab", "Rotate view CCW"));
groupBox_draw->setTitle(QApplication::translate("shortcutsTab", "Drawing", 0)); groupBox_draw->setTitle(QApplication::translate("shortcutsTab", "Drawing"));
lbl_Player_aMulligan->setText(QApplication::translate("shortcutsTab", "Mulligan", 0)); lbl_Player_aMulligan->setText(QApplication::translate("shortcutsTab", "Mulligan"));
lbl_Player_aDrawCard->setText(QApplication::translate("shortcutsTab", "Draw card", 0)); lbl_Player_aDrawCard->setText(QApplication::translate("shortcutsTab", "Draw card"));
lbl_Player_aDrawCards->setText(QApplication::translate("shortcutsTab", "Draw cards", 0)); lbl_Player_aDrawCards->setText(QApplication::translate("shortcutsTab", "Draw cards"));
lbl_Player_aUndoDraw->setText(QApplication::translate("shortcutsTab", "Undo draw", 0)); lbl_Player_aUndoDraw->setText(QApplication::translate("shortcutsTab", "Undo draw"));
lbl_Player_aAlwaysRevealTopCard->setText(QApplication::translate("shortcutsTab", "Always reveal top card", 0)); lbl_Player_aAlwaysRevealTopCard->setText(QApplication::translate("shortcutsTab", "Always reveal top card"));
tabWidget->setTabText(tabWidget->indexOf(tab_3), tabWidget->setTabText(tabWidget->indexOf(tab_3),
QApplication::translate("shortcutsTab", "Gameplay | Draw | Move | View", 0)); QApplication::translate("shortcutsTab", "Gameplay | Draw | Move | View"));
tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("shortcutsTab", "Counters", 0)); tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("shortcutsTab", "Counters"));
faqLabel->setText(QString("<a href='%1'>%2</a>") faqLabel->setText(QString("<a href='%1'>%2</a>")
.arg(WIKI) .arg(WIKI)
.arg(QApplication::translate("shortcutsTab", "How to set custom shortcuts", 0))); .arg(QApplication::translate("shortcutsTab", "How to set custom shortcuts")));
btnResetAll->setText(QApplication::translate("shortcutsTab", "Restore all default shortcuts", 0)); btnResetAll->setText(QApplication::translate("shortcutsTab", "Restore all default shortcuts"));
btnClearAll->setText(QApplication::translate("shortcutsTab", "Clear all shortcuts", 0)); btnClearAll->setText(QApplication::translate("shortcutsTab", "Clear all shortcuts"));
} // retranslateUi } // retranslateUi
}; };

View file

@ -86,8 +86,8 @@ QString ShortcutsSettings::getShortcutString(const QString &name) const
QString ShortcutsSettings::stringifySequence(const QList<QKeySequence> &Sequence) const QString ShortcutsSettings::stringifySequence(const QList<QKeySequence> &Sequence) const
{ {
QStringList stringSequence; QStringList stringSequence;
for (int i = 0; i < Sequence.size(); ++i) { for (const auto &i : Sequence) {
stringSequence.append(Sequence.at(i).toString(QKeySequence::PortableText)); stringSequence.append(i.toString(QKeySequence::PortableText));
} }
return stringSequence.join(sep); return stringSequence.join(sep);

View file

@ -143,6 +143,7 @@ private:
{"Player/aConcede", parseSequenceString("F2")}, {"Player/aConcede", parseSequenceString("F2")},
{"Player/aLeaveGame", parseSequenceString("Ctrl+Q")}, {"Player/aLeaveGame", parseSequenceString("Ctrl+Q")},
{"Player/aNextPhase", parseSequenceString("Ctrl+Space;Tab")}, {"Player/aNextPhase", parseSequenceString("Ctrl+Space;Tab")},
{"Player/aNextPhaseAction", parseSequenceString("Shift+Tab")},
{"Player/aNextTurn", parseSequenceString("Ctrl+Return;Ctrl+Enter")}, {"Player/aNextTurn", parseSequenceString("Ctrl+Return;Ctrl+Enter")},
{"Player/aRemoveLocalArrows", parseSequenceString("Ctrl+R")}, {"Player/aRemoveLocalArrows", parseSequenceString("Ctrl+R")},
{"Player/aRotateViewCCW", parseSequenceString("")}, {"Player/aRotateViewCCW", parseSequenceString("")},

View file

@ -95,7 +95,7 @@ void ToggleButton::setState(bool _state)
} }
DeckViewContainer::DeckViewContainer(int _playerId, TabGame *parent) DeckViewContainer::DeckViewContainer(int _playerId, TabGame *parent)
: QWidget(0), parentGame(parent), playerId(_playerId) : QWidget(nullptr), parentGame(parent), playerId(_playerId)
{ {
loadLocalButton = new QPushButton; loadLocalButton = new QPushButton;
loadRemoteButton = new QPushButton; loadRemoteButton = new QPushButton;
@ -112,7 +112,7 @@ DeckViewContainer::DeckViewContainer(int _playerId, TabGame *parent)
connect(sideboardLockButton, SIGNAL(clicked()), this, SLOT(sideboardLockButtonClicked())); connect(sideboardLockButton, SIGNAL(clicked()), this, SLOT(sideboardLockButtonClicked()));
connect(sideboardLockButton, SIGNAL(stateChanged()), this, SLOT(updateSideboardLockButtonText())); connect(sideboardLockButton, SIGNAL(stateChanged()), this, SLOT(updateSideboardLockButtonText()));
QHBoxLayout *buttonHBox = new QHBoxLayout; auto *buttonHBox = new QHBoxLayout;
buttonHBox->addWidget(loadLocalButton); buttonHBox->addWidget(loadLocalButton);
buttonHBox->addWidget(loadRemoteButton); buttonHBox->addWidget(loadRemoteButton);
buttonHBox->addWidget(readyStartButton); buttonHBox->addWidget(readyStartButton);
@ -123,7 +123,7 @@ DeckViewContainer::DeckViewContainer(int _playerId, TabGame *parent)
connect(deckView, SIGNAL(newCardAdded(AbstractCardItem *)), this, SIGNAL(newCardAdded(AbstractCardItem *))); connect(deckView, SIGNAL(newCardAdded(AbstractCardItem *)), this, SIGNAL(newCardAdded(AbstractCardItem *)));
connect(deckView, SIGNAL(sideboardPlanChanged()), this, SLOT(sideboardPlanChanged())); connect(deckView, SIGNAL(sideboardPlanChanged()), this, SLOT(sideboardPlanChanged()));
QVBoxLayout *deckViewLayout = new QVBoxLayout; auto *deckViewLayout = new QVBoxLayout;
deckViewLayout->addLayout(buttonHBox); deckViewLayout->addLayout(buttonHBox);
deckViewLayout->addWidget(deckView); deckViewLayout->addWidget(deckView);
deckViewLayout->setContentsMargins(0, 0, 0, 0); deckViewLayout->setContentsMargins(0, 0, 0, 0);
@ -209,6 +209,9 @@ void TabGame::refreshShortcuts()
if (aNextPhase) { if (aNextPhase) {
aNextPhase->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aNextPhase")); aNextPhase->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aNextPhase"));
} }
if (aNextPhaseAction) {
aNextPhaseAction->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aNextPhaseAction"));
}
if (aNextTurn) { if (aNextTurn) {
aNextTurn->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aNextTurn")); aNextTurn->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aNextTurn"));
} }
@ -299,8 +302,8 @@ void DeckViewContainer::sideboardPlanChanged()
{ {
Command_SetSideboardPlan cmd; Command_SetSideboardPlan cmd;
const QList<MoveCard_ToZone> &newPlan = deckView->getSideboardPlan(); const QList<MoveCard_ToZone> &newPlan = deckView->getSideboardPlan();
for (int i = 0; i < newPlan.size(); ++i) for (const auto &i : newPlan)
cmd.add_move_list()->CopyFrom(newPlan.at(i)); cmd.add_move_list()->CopyFrom(i);
parentGame->sendGameCommand(cmd, playerId); parentGame->sendGameCommand(cmd, playerId);
} }
@ -330,7 +333,8 @@ void DeckViewContainer::setDeck(const DeckLoader &deck)
TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay) TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
: Tab(_tabSupervisor), secondsElapsed(0), hostId(-1), localPlayerId(-1), : Tab(_tabSupervisor), secondsElapsed(0), hostId(-1), localPlayerId(-1),
isLocalGame(_tabSupervisor->getIsLocalGame()), spectator(true), gameStateKnown(false), resuming(false), isLocalGame(_tabSupervisor->getIsLocalGame()), spectator(true), gameStateKnown(false), resuming(false),
currentPhase(-1), activeCard(0), gameClosed(false), replay(_replay), currentReplayStep(0), sayLabel(0), sayEdit(0) currentPhase(-1), activeCard(nullptr), gameClosed(false), replay(_replay), currentReplayStep(0),
sayLabel(nullptr), sayEdit(nullptr)
{ {
// THIS CTOR IS USED ON REPLAY // THIS CTOR IS USED ON REPLAY
gameInfo.CopyFrom(replay->game_info()); gameInfo.CopyFrom(replay->game_info());
@ -389,8 +393,8 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor,
const QMap<int, QString> &_roomGameTypes) const QMap<int, QString> &_roomGameTypes)
: Tab(_tabSupervisor), clients(_clients), gameInfo(event.game_info()), roomGameTypes(_roomGameTypes), : Tab(_tabSupervisor), clients(_clients), gameInfo(event.game_info()), roomGameTypes(_roomGameTypes),
hostId(event.host_id()), localPlayerId(event.player_id()), isLocalGame(_tabSupervisor->getIsLocalGame()), hostId(event.host_id()), localPlayerId(event.player_id()), isLocalGame(_tabSupervisor->getIsLocalGame()),
spectator(event.spectator()), gameStateKnown(false), resuming(event.resuming()), currentPhase(-1), activeCard(0), spectator(event.spectator()), gameStateKnown(false), resuming(event.resuming()), currentPhase(-1),
gameClosed(false), replay(0), replayDock(0) activeCard(nullptr), gameClosed(false), replay(nullptr), replayDock(nullptr)
{ {
// THIS CTOR IS USED ON GAMES // THIS CTOR IS USED ON GAMES
gameInfo.set_started(false); gameInfo.set_started(false);
@ -486,6 +490,9 @@ void TabGame::retranslateUi()
if (aNextPhase) { if (aNextPhase) {
aNextPhase->setText(tr("Next &phase")); aNextPhase->setText(tr("Next &phase"));
} }
if (aNextPhaseAction) {
aNextPhaseAction->setText(tr("Next phase with &action"));
}
if (aNextTurn) { if (aNextTurn) {
aNextTurn->setText(tr("Next &turn")); aNextTurn->setText(tr("Next &turn"));
} }
@ -554,7 +561,7 @@ void TabGame::closeRequest()
void TabGame::replayNextEvent() void TabGame::replayNextEvent()
{ {
processGameEventContainer(replay->event_list(timelineWidget->getCurrentEvent()), 0); processGameEventContainer(replay->event_list(timelineWidget->getCurrentEvent()), nullptr);
} }
void TabGame::replayFinished() void TabGame::replayFinished()
@ -671,7 +678,7 @@ void TabGame::actPhaseAction()
{ {
int phase = phaseActions.indexOf(static_cast<QAction *>(sender())); int phase = phaseActions.indexOf(static_cast<QAction *>(sender()));
Command_SetActivePhase cmd; Command_SetActivePhase cmd;
cmd.set_phase(phase); cmd.set_phase(static_cast<google::protobuf::uint32>(phase));
sendGameCommand(cmd); sendGameCommand(cmd);
} }
@ -681,10 +688,29 @@ void TabGame::actNextPhase()
if (++phase >= phasesToolbar->phaseCount()) if (++phase >= phasesToolbar->phaseCount())
phase = 0; phase = 0;
Command_SetActivePhase cmd; Command_SetActivePhase cmd;
cmd.set_phase(phase); cmd.set_phase(static_cast<google::protobuf::uint32>(phase));
sendGameCommand(cmd); sendGameCommand(cmd);
} }
void TabGame::actNextPhaseAction()
{
int phase = currentPhase + 1;
if (phase >= phasesToolbar->phaseCount()) {
phase = 0;
}
if (phase == 0) {
Command_NextTurn cmd;
sendGameCommand(cmd);
} else {
Command_SetActivePhase cmd;
cmd.set_phase(static_cast<google::protobuf::uint32>(phase));
sendGameCommand(cmd);
}
phasesToolbar->triggerPhaseAction(phase);
}
void TabGame::actNextTurn() void TabGame::actNextTurn()
{ {
sendGameCommand(Command_NextTurn()); sendGameCommand(Command_NextTurn());
@ -725,7 +751,7 @@ void TabGame::actCompleterChanged()
Player *TabGame::addPlayer(int playerId, const ServerInfo_User &info) Player *TabGame::addPlayer(int playerId, const ServerInfo_User &info)
{ {
bool local = ((clients.size() > 1) || (playerId == localPlayerId)); bool local = ((clients.size() > 1) || (playerId == localPlayerId));
Player *newPlayer = new Player(info, playerId, local, this); auto *newPlayer = new Player(info, playerId, local, this);
connect(newPlayer, SIGNAL(openDeckEditor(const DeckLoader *)), this, SIGNAL(openDeckEditor(const DeckLoader *))); connect(newPlayer, SIGNAL(openDeckEditor(const DeckLoader *)), this, SIGNAL(openDeckEditor(const DeckLoader *)));
QString newPlayerName = "@" + newPlayer->getName(); QString newPlayerName = "@" + newPlayer->getName();
if (sayEdit && !autocompleteUserList.contains(newPlayerName)) { if (sayEdit && !autocompleteUserList.contains(newPlayerName)) {
@ -741,7 +767,7 @@ Player *TabGame::addPlayer(int playerId, const ServerInfo_User &info)
if (clients.size() == 1) if (clients.size() == 1)
newPlayer->setShortcutsActive(); newPlayer->setShortcutsActive();
DeckViewContainer *deckView = new DeckViewContainer(playerId, this); auto *deckView = new DeckViewContainer(playerId, this);
connect(deckView, SIGNAL(newCardAdded(AbstractCardItem *)), this, SLOT(newCardAdded(AbstractCardItem *))); connect(deckView, SIGNAL(newCardAdded(AbstractCardItem *)), this, SLOT(newCardAdded(AbstractCardItem *)));
deckViewContainers.insert(playerId, deckView); deckViewContainers.insert(playerId, deckView);
deckViewContainerLayout->addWidget(deckView); deckViewContainerLayout->addWidget(deckView);
@ -762,7 +788,7 @@ void TabGame::processGameEventContainer(const GameEventContainer &cont, Abstract
for (int i = 0; i < eventListSize; ++i) { for (int i = 0; i < eventListSize; ++i) {
const GameEvent &event = cont.event_list(i); const GameEvent &event = cont.event_list(i);
const int playerId = event.player_id(); const int playerId = event.player_id();
const GameEvent::GameEventType eventType = static_cast<GameEvent::GameEventType>(getPbExtension(event)); const auto eventType = static_cast<GameEvent::GameEventType>(getPbExtension(event));
if (spectators.contains(playerId)) { if (spectators.contains(playerId)) {
switch (eventType) { switch (eventType) {
case GameEvent::GAME_SAY: case GameEvent::GAME_SAY:
@ -834,7 +860,7 @@ AbstractClient *TabGame::getClientForPlayer(int playerId) const
return clients.at(playerId); return clients.at(playerId);
} else if (clients.isEmpty()) } else if (clients.isEmpty())
return 0; return nullptr;
else else
return clients.first(); return clients.first();
} }
@ -871,7 +897,7 @@ void TabGame::commandFinished(const Response &response)
PendingCommand *TabGame::prepareGameCommand(const ::google::protobuf::Message &cmd) PendingCommand *TabGame::prepareGameCommand(const ::google::protobuf::Message &cmd)
{ {
CommandContainer cont; CommandContainer cont;
cont.set_game_id(gameInfo.game_id()); cont.set_game_id(static_cast<google::protobuf::uint32>(gameInfo.game_id()));
GameCommand *c = cont.add_game_command(); GameCommand *c = cont.add_game_command();
c->GetReflection()->MutableMessage(c, cmd.GetDescriptor()->FindExtensionByName("ext"))->CopyFrom(cmd); c->GetReflection()->MutableMessage(c, cmd.GetDescriptor()->FindExtensionByName("ext"))->CopyFrom(cmd);
return new PendingCommand(cont); return new PendingCommand(cont);
@ -880,13 +906,11 @@ PendingCommand *TabGame::prepareGameCommand(const ::google::protobuf::Message &c
PendingCommand *TabGame::prepareGameCommand(const QList<const ::google::protobuf::Message *> &cmdList) PendingCommand *TabGame::prepareGameCommand(const QList<const ::google::protobuf::Message *> &cmdList)
{ {
CommandContainer cont; CommandContainer cont;
cont.set_game_id(gameInfo.game_id()); cont.set_game_id(static_cast<google::protobuf::uint32>(gameInfo.game_id()));
for (int i = 0; i < cmdList.size(); ++i) { for (auto i : cmdList) {
GameCommand *c = cont.add_game_command(); GameCommand *c = cont.add_game_command();
c->GetReflection() c->GetReflection()->MutableMessage(c, i->GetDescriptor()->FindExtensionByName("ext"))->CopyFrom(*i);
->MutableMessage(c, cmdList[i]->GetDescriptor()->FindExtensionByName("ext")) delete i;
->CopyFrom(*cmdList[i]);
delete cmdList[i];
} }
return new PendingCommand(cont); return new PendingCommand(cont);
} }
@ -1040,8 +1064,7 @@ void TabGame::eventPlayerPropertiesChanged(const Event_PlayerPropertiesChanged &
const ServerInfo_PlayerProperties &prop = event.player_properties(); const ServerInfo_PlayerProperties &prop = event.player_properties();
playerListWidget->updatePlayerProperties(prop, eventPlayerId); playerListWidget->updatePlayerProperties(prop, eventPlayerId);
const GameEventContext::ContextType contextType = const auto contextType = static_cast<GameEventContext::ContextType>(getPbExtension(context));
static_cast<GameEventContext::ContextType>(getPbExtension(context));
switch (contextType) { switch (contextType) {
case GameEventContext::READY_START: { case GameEventContext::READY_START: {
bool ready = prop.ready_start(); bool ready = prop.ready_start();
@ -1195,7 +1218,7 @@ Player *TabGame::setActivePlayer(int id)
{ {
Player *player = players.value(id, 0); Player *player = players.value(id, 0);
if (!player) if (!player)
return 0; return nullptr;
activePlayer = id; activePlayer = id;
playerListWidget->setActivePlayer(id); playerListWidget->setActivePlayer(id);
QMapIterator<int, Player *> i(players); QMapIterator<int, Player *> i(players);
@ -1259,11 +1282,11 @@ CardItem *TabGame::getCard(int playerId, const QString &zoneName, int cardId) co
{ {
Player *player = players.value(playerId, 0); Player *player = players.value(playerId, 0);
if (!player) if (!player)
return 0; return nullptr;
CardZone *zone = player->getZones().value(zoneName, 0); CardZone *zone = player->getZones().value(zoneName, 0);
if (!zone) if (!zone)
return 0; return nullptr;
return zone->getCard(cardId, QString()); return zone->getCard(cardId, QString());
} }
@ -1271,7 +1294,7 @@ CardItem *TabGame::getCard(int playerId, const QString &zoneName, int cardId) co
QString TabGame::getTabText() const QString TabGame::getTabText() const
{ {
QString gameTypeInfo; QString gameTypeInfo;
if (gameTypes.size() != 0) { if (!gameTypes.empty()) {
gameTypeInfo = gameTypes.at(0); gameTypeInfo = gameTypes.at(0);
if (gameTypes.size() > 1) if (gameTypes.size() > 1)
gameTypeInfo.append("..."); gameTypeInfo.append("...");
@ -1312,7 +1335,7 @@ Player *TabGame::getActiveLocalPlayer() const
return temp; return temp;
} }
return 0; return nullptr;
} }
void TabGame::updateCardMenu(AbstractCardItem *card) void TabGame::updateCardMenu(AbstractCardItem *card)
@ -1329,6 +1352,8 @@ void TabGame::createMenuItems()
{ {
aNextPhase = new QAction(this); aNextPhase = new QAction(this);
connect(aNextPhase, SIGNAL(triggered()), this, SLOT(actNextPhase())); connect(aNextPhase, SIGNAL(triggered()), this, SLOT(actNextPhase()));
aNextPhaseAction = new QAction(this);
connect(aNextPhaseAction, SIGNAL(triggered()), this, SLOT(actNextPhaseAction()));
aNextTurn = new QAction(this); aNextTurn = new QAction(this);
connect(aNextTurn, SIGNAL(triggered()), this, SLOT(actNextTurn())); connect(aNextTurn, SIGNAL(triggered()), this, SLOT(actNextTurn()));
aRemoveLocalArrows = new QAction(this); aRemoveLocalArrows = new QAction(this);
@ -1343,7 +1368,7 @@ void TabGame::createMenuItems()
connect(aConcede, SIGNAL(triggered()), this, SLOT(actConcede())); connect(aConcede, SIGNAL(triggered()), this, SLOT(actConcede()));
aLeaveGame = new QAction(this); aLeaveGame = new QAction(this);
connect(aLeaveGame, SIGNAL(triggered()), this, SLOT(actLeaveGame())); connect(aLeaveGame, SIGNAL(triggered()), this, SLOT(actLeaveGame()));
aCloseReplay = 0; aCloseReplay = nullptr;
phasesMenu = new QMenu(this); phasesMenu = new QMenu(this);
for (int i = 0; i < phasesToolbar->phaseCount(); ++i) { for (int i = 0; i < phasesToolbar->phaseCount(); ++i) {
@ -1355,6 +1380,7 @@ void TabGame::createMenuItems()
phasesMenu->addSeparator(); phasesMenu->addSeparator();
phasesMenu->addAction(aNextPhase); phasesMenu->addAction(aNextPhase);
phasesMenu->addAction(aNextPhaseAction);
gameMenu = new QMenu(this); gameMenu = new QMenu(this);
playersSeparator = gameMenu->addSeparator(); playersSeparator = gameMenu->addSeparator();
@ -1373,19 +1399,20 @@ void TabGame::createMenuItems()
void TabGame::createReplayMenuItems() void TabGame::createReplayMenuItems()
{ {
aNextPhase = 0; aNextPhase = nullptr;
aNextTurn = 0; aNextPhaseAction = nullptr;
aRemoveLocalArrows = 0; aNextTurn = nullptr;
aRotateViewCW = 0; aRemoveLocalArrows = nullptr;
aRotateViewCCW = 0; aRotateViewCW = nullptr;
aResetLayout = 0; aRotateViewCCW = nullptr;
aGameInfo = 0; aResetLayout = nullptr;
aConcede = 0; aGameInfo = nullptr;
aLeaveGame = 0; aConcede = nullptr;
aLeaveGame = nullptr;
aCloseReplay = new QAction(this); aCloseReplay = new QAction(this);
connect(aCloseReplay, SIGNAL(triggered()), this, SLOT(actLeaveGame())); connect(aCloseReplay, SIGNAL(triggered()), this, SLOT(actLeaveGame()));
phasesMenu = 0; phasesMenu = nullptr;
gameMenu = new QMenu(this); gameMenu = new QMenu(this);
gameMenu->addAction(aCloseReplay); gameMenu->addAction(aCloseReplay);
addTabMenu(gameMenu); addTabMenu(gameMenu);
@ -1659,7 +1686,7 @@ void TabGame::createCardInfoDock(bool bReplay)
void TabGame::createPlayerListDock(bool bReplay) void TabGame::createPlayerListDock(bool bReplay)
{ {
if (bReplay) { if (bReplay) {
playerListWidget = new PlayerListWidget(0, 0, this); playerListWidget = new PlayerListWidget(nullptr, nullptr, this);
} else { } else {
playerListWidget = new PlayerListWidget(tabSupervisor, clients.first(), this); playerListWidget = new PlayerListWidget(tabSupervisor, clients.first(), this);
connect(playerListWidget, SIGNAL(openMessageDialog(QString, bool)), this, connect(playerListWidget, SIGNAL(openMessageDialog(QString, bool)), this,

View file

@ -163,8 +163,8 @@ private:
QAction *playersSeparator; QAction *playersSeparator;
QMenu *gameMenu, *phasesMenu, *viewMenu, *cardInfoDockMenu, *messageLayoutDockMenu, *playerListDockMenu, QMenu *gameMenu, *phasesMenu, *viewMenu, *cardInfoDockMenu, *messageLayoutDockMenu, *playerListDockMenu,
*replayDockMenu; *replayDockMenu;
QAction *aGameInfo, *aConcede, *aLeaveGame, *aCloseReplay, *aNextPhase, *aNextTurn, *aRemoveLocalArrows, QAction *aGameInfo, *aConcede, *aLeaveGame, *aCloseReplay, *aNextPhase, *aNextPhaseAction, *aNextTurn,
*aRotateViewCW, *aRotateViewCCW, *aResetLayout, *aResetReplayLayout; *aRemoveLocalArrows, *aRotateViewCW, *aRotateViewCCW, *aResetLayout, *aResetReplayLayout;
QAction *aCardInfoDockVisible, *aCardInfoDockFloating, *aMessageLayoutDockVisible, *aMessageLayoutDockFloating, QAction *aCardInfoDockVisible, *aCardInfoDockFloating, *aMessageLayoutDockVisible, *aMessageLayoutDockFloating,
*aPlayerListDockVisible, *aPlayerListDockFloating, *aReplayDockVisible, *aReplayDockFloating; *aPlayerListDockVisible, *aPlayerListDockFloating, *aReplayDockVisible, *aReplayDockFloating;
QList<QAction *> phaseActions; QList<QAction *> phaseActions;
@ -233,6 +233,7 @@ private slots:
void actSay(); void actSay();
void actPhaseAction(); void actPhaseAction();
void actNextPhase(); void actNextPhase();
void actNextPhaseAction();
void actNextTurn(); void actNextTurn();
void addMentionTag(QString value); void addMentionTag(QString value);
@ -246,7 +247,7 @@ private slots:
void actResetLayout(); void actResetLayout();
void freeDocksSize(); void freeDocksSize();
bool eventFilter(QObject *o, QEvent *e); bool eventFilter(QObject *o, QEvent *e) override;
void dockVisibleTriggered(); void dockVisibleTriggered();
void dockFloatingTriggered(); void dockFloatingTriggered();
void dockTopLevelChanged(bool topLevel); void dockTopLevelChanged(bool topLevel);
@ -257,10 +258,10 @@ public:
const Event_GameJoined &event, const Event_GameJoined &event,
const QMap<int, QString> &_roomGameTypes); const QMap<int, QString> &_roomGameTypes);
TabGame(TabSupervisor *_tabSupervisor, GameReplay *replay); TabGame(TabSupervisor *_tabSupervisor, GameReplay *replay);
~TabGame(); ~TabGame() override;
void retranslateUi(); void retranslateUi() override;
void updatePlayerListDockTitle(); void updatePlayerListDockTitle();
void closeRequest(); void closeRequest() override;
const QMap<int, Player *> &getPlayers() const const QMap<int, Player *> &getPlayers() const
{ {
return players; return players;
@ -278,7 +279,7 @@ public:
{ {
return gameInfo.game_id(); return gameInfo.game_id();
} }
QString getTabText() const; QString getTabText() const override;
bool getSpectator() const bool getSpectator() const
{ {
return spectator; return spectator;