From 72324f355d8164abfae1fb98284fb2a54bb32bab Mon Sep 17 00:00:00 2001 From: Max-Wilhelm Bruker Date: Tue, 29 Sep 2009 17:26:30 +0200 Subject: [PATCH] fixed moving an entire zone to another --- cockatrice/src/player.cpp | 101 ++++++++++------ cockatrice/src/player.h | 4 +- cockatrice/translations/cockatrice_de.ts | 145 ++++++++++++----------- cockatrice/translations/cockatrice_en.ts | 145 ++++++++++++----------- 4 files changed, 217 insertions(+), 178 deletions(-) diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp index 781889c6..4aeb4cd1 100644 --- a/cockatrice/src/player.cpp +++ b/cockatrice/src/player.cpp @@ -49,31 +49,47 @@ Player::Player(const QString &_name, int _id, bool _local, CardDatabase *_db, Cl updateBoundingRect(); if (local) { - aMoveToTopLibrary = new QAction(this); - aMoveToTopLibrary->setData(QList() << "deck" << 0); - aMoveToBottomLibrary = new QAction(this); - aMoveToBottomLibrary->setData(QList() << "deck" << -1); - aMoveToHand = new QAction(this); - aMoveToHand->setData(QList() << "hand" << 0); - aMoveToGraveyard = new QAction(this); - aMoveToGraveyard->setData(QList() << "grave" << 0); - aMoveToRfg = new QAction(this); - aMoveToRfg->setData(QList() << "rfg" << 0); + aMoveHandToTopLibrary = new QAction(this); + aMoveHandToTopLibrary->setData(QList() << "deck" << 0); + aMoveHandToBottomLibrary = new QAction(this); + aMoveHandToBottomLibrary->setData(QList() << "deck" << -1); + aMoveHandToGrave = new QAction(this); + aMoveHandToGrave->setData(QList() << "grave" << 0); + aMoveHandToRfg = new QAction(this); + aMoveHandToRfg->setData(QList() << "rfg" << 0); - connect(aMoveToTopLibrary, SIGNAL(triggered()), hand, SLOT(moveAllToZone())); - connect(aMoveToBottomLibrary, SIGNAL(triggered()), hand, SLOT(moveAllToZone())); - connect(aMoveToGraveyard, SIGNAL(triggered()), hand, SLOT(moveAllToZone())); - connect(aMoveToRfg, SIGNAL(triggered()), hand, SLOT(moveAllToZone())); + connect(aMoveHandToTopLibrary, SIGNAL(triggered()), hand, SLOT(moveAllToZone())); + connect(aMoveHandToBottomLibrary, SIGNAL(triggered()), hand, SLOT(moveAllToZone())); + connect(aMoveHandToGrave, SIGNAL(triggered()), hand, SLOT(moveAllToZone())); + connect(aMoveHandToRfg, SIGNAL(triggered()), hand, SLOT(moveAllToZone())); - connect(aMoveToTopLibrary, SIGNAL(triggered()), grave, SLOT(moveAllToZone())); - connect(aMoveToBottomLibrary, SIGNAL(triggered()), grave, SLOT(moveAllToZone())); - connect(aMoveToHand, SIGNAL(triggered()), grave, SLOT(moveAllToZone())); - connect(aMoveToRfg, SIGNAL(triggered()), grave, SLOT(moveAllToZone())); + aMoveGraveToTopLibrary = new QAction(this); + aMoveGraveToTopLibrary->setData(QList() << "deck" << 0); + aMoveGraveToBottomLibrary = new QAction(this); + aMoveGraveToBottomLibrary->setData(QList() << "deck" << -1); + aMoveGraveToHand = new QAction(this); + aMoveGraveToHand->setData(QList() << "hand" << 0); + aMoveGraveToRfg = new QAction(this); + aMoveGraveToRfg->setData(QList() << "rfg" << 0); + + connect(aMoveGraveToTopLibrary, SIGNAL(triggered()), grave, SLOT(moveAllToZone())); + connect(aMoveGraveToBottomLibrary, SIGNAL(triggered()), grave, SLOT(moveAllToZone())); + connect(aMoveGraveToHand, SIGNAL(triggered()), grave, SLOT(moveAllToZone())); + connect(aMoveGraveToRfg, SIGNAL(triggered()), grave, SLOT(moveAllToZone())); - connect(aMoveToTopLibrary, SIGNAL(triggered()), rfg, SLOT(moveAllToZone())); - connect(aMoveToBottomLibrary, SIGNAL(triggered()), rfg, SLOT(moveAllToZone())); - connect(aMoveToHand, SIGNAL(triggered()), rfg, SLOT(moveAllToZone())); - connect(aMoveToGraveyard, SIGNAL(triggered()), rfg, SLOT(moveAllToZone())); + aMoveRfgToTopLibrary = new QAction(this); + aMoveRfgToTopLibrary->setData(QList() << "deck" << 0); + aMoveRfgToBottomLibrary = new QAction(this); + aMoveRfgToBottomLibrary->setData(QList() << "deck" << -1); + aMoveRfgToHand = new QAction(this); + aMoveRfgToHand->setData(QList() << "hand" << 0); + aMoveRfgToGrave = new QAction(this); + aMoveRfgToGrave->setData(QList() << "grave" << 0); + + connect(aMoveRfgToTopLibrary, SIGNAL(triggered()), rfg, SLOT(moveAllToZone())); + connect(aMoveRfgToBottomLibrary, SIGNAL(triggered()), rfg, SLOT(moveAllToZone())); + connect(aMoveRfgToHand, SIGNAL(triggered()), rfg, SLOT(moveAllToZone())); + connect(aMoveRfgToGrave, SIGNAL(triggered()), rfg, SLOT(moveAllToZone())); aViewLibrary = new QAction(this); connect(aViewLibrary, SIGNAL(triggered()), this, SLOT(actViewLibrary())); @@ -103,10 +119,10 @@ Player::Player(const QString &_name, int _id, bool _local, CardDatabase *_db, Cl if (local) { handMenu = playerMenu->addMenu(QString()); - handMenu->addAction(aMoveToTopLibrary); - handMenu->addAction(aMoveToBottomLibrary); - handMenu->addAction(aMoveToGraveyard); - handMenu->addAction(aMoveToRfg); + handMenu->addAction(aMoveHandToTopLibrary); + handMenu->addAction(aMoveHandToBottomLibrary); + handMenu->addAction(aMoveHandToGrave); + handMenu->addAction(aMoveHandToRfg); hand->setMenu(handMenu); libraryMenu = playerMenu->addMenu(QString()); @@ -133,16 +149,16 @@ Player::Player(const QString &_name, int _id, bool _local, CardDatabase *_db, Cl if (local) { graveMenu->addSeparator(); - graveMenu->addAction(aMoveToTopLibrary); - graveMenu->addAction(aMoveToBottomLibrary); - graveMenu->addAction(aMoveToHand); - graveMenu->addAction(aMoveToRfg); + graveMenu->addAction(aMoveGraveToTopLibrary); + graveMenu->addAction(aMoveGraveToBottomLibrary); + graveMenu->addAction(aMoveGraveToHand); + graveMenu->addAction(aMoveGraveToRfg); rfgMenu->addSeparator(); - rfgMenu->addAction(aMoveToTopLibrary); - rfgMenu->addAction(aMoveToBottomLibrary); - rfgMenu->addAction(aMoveToHand); - rfgMenu->addAction(aMoveToGraveyard); + rfgMenu->addAction(aMoveRfgToTopLibrary); + rfgMenu->addAction(aMoveRfgToBottomLibrary); + rfgMenu->addAction(aMoveRfgToHand); + rfgMenu->addAction(aMoveRfgToGrave); sbMenu = playerMenu->addMenu(QString()); sbMenu->addAction(aViewSideboard); @@ -203,11 +219,18 @@ void Player::retranslateUi() rfgMenu->setTitle(tr("&Exile")); if (local) { - aMoveToTopLibrary->setText(tr("Move to &top of library")); - aMoveToBottomLibrary->setText(tr("Move to &bottom of library")); - aMoveToHand->setText(tr("Move to &hand")); - aMoveToGraveyard->setText(tr("Move to g&raveyard")); - aMoveToRfg->setText(tr("Move to &exile")); + aMoveHandToTopLibrary->setText(tr("Move to &top of library")); + aMoveHandToBottomLibrary->setText(tr("Move to &bottom of library")); + aMoveHandToGrave->setText(tr("Move to g&raveyard")); + aMoveHandToRfg->setText(tr("Move to &exile")); + aMoveGraveToTopLibrary->setText(tr("Move to &top of library")); + aMoveGraveToBottomLibrary->setText(tr("Move to &bottom of library")); + aMoveGraveToHand->setText(tr("Move to &hand")); + aMoveGraveToRfg->setText(tr("Move to &exile")); + aMoveRfgToTopLibrary->setText(tr("Move to &top of library")); + aMoveRfgToBottomLibrary->setText(tr("Move to &bottom of library")); + aMoveRfgToHand->setText(tr("Move to &hand")); + aMoveRfgToGrave->setText(tr("Move to g&raveyard")); aViewLibrary->setText(tr("&View library")); aViewLibrary->setShortcut(tr("F3")); aViewTopCards->setText(tr("View &top cards of library...")); diff --git a/cockatrice/src/player.h b/cockatrice/src/player.h index 8877f000..3a0a8f5c 100644 --- a/cockatrice/src/player.h +++ b/cockatrice/src/player.h @@ -54,7 +54,9 @@ private slots: void updateBoundingRect(); private: QMenu *playerMenu, *handMenu, *graveMenu, *rfgMenu, *libraryMenu, *sbMenu, *countersMenu, *sayMenu; - QAction *aMoveToTopLibrary, *aMoveToBottomLibrary, *aMoveToHand, *aMoveToGraveyard, *aMoveToRfg, + QAction *aMoveHandToTopLibrary, *aMoveHandToBottomLibrary, *aMoveHandToGrave, *aMoveHandToRfg, + *aMoveGraveToTopLibrary, *aMoveGraveToBottomLibrary, *aMoveGraveToHand, *aMoveGraveToRfg, + *aMoveRfgToTopLibrary, *aMoveRfgToBottomLibrary, *aMoveRfgToHand, *aMoveRfgToGrave, *aViewLibrary, *aViewTopCards, *aViewGraveyard, *aViewRfg, *aViewSideboard, *aDrawCard, *aDrawCards, *aShuffle, *aUntapAll, *aRollDie, *aCreateToken; diff --git a/cockatrice/translations/cockatrice_de.ts b/cockatrice/translations/cockatrice_de.ts index ca0839a1..beebaf7c 100644 --- a/cockatrice/translations/cockatrice_de.ts +++ b/cockatrice/translations/cockatrice_de.ts @@ -284,32 +284,32 @@ Counter - + &Set counter... Zähler &setzen... - + Ctrl+L Ctrl+L - + F11 F11 - + F12 F12 - + Set counter Zähler setzen - + New value for counter '%1': Neuer Wert für den Zähler '%1': @@ -912,77 +912,77 @@ MainWindow - + Error Fehler - + Server timeout Server Zeitüberschreitung - + &Connect... &Verbinden... - + &Disconnect Verbindung &trennen - + &Restart game... Spiel neu sta&rten... - + F2 F2 - + &Leave game Spiel ver&lassen - + &Deck editor &Deck-Editor - + &Full screen &Vollbild - + Ctrl+F Ctrl+F - + &Settings... &Einstellungen... - + &Exit &Beenden - + Close most recent zone view Letzte Zonenansicht schließen - + Esc Esc - + &Cockatrice &Cockatrice @@ -999,12 +999,12 @@ &Karte - + &Say: &Sagen: - + Cockatrice Cockatrice @@ -1656,37 +1656,41 @@ Player - + + + Move to &top of library Oben auf die Biblio&thek legen - + + + Move to &bottom of library Unter die &Bibliothek legen - + &View library &Zeige Bibliothek - + F3 F3 - + View &top cards of library... Zeige die oberen Kar&ten der Bibliothek... - + &View graveyard &Zeige Friedhof - + F4 F4 @@ -1695,27 +1699,27 @@ Zeige ent&fernte Karten - + &View sideboard Zeige &Sideboard - + Player "%1" Spieler "%1" - + &Hand &Hand - + &Library Bib&liothek - + &Graveyard &Friedhof @@ -1724,87 +1728,90 @@ Entfe&rnte Karten - + &Sideboard &Sideboard - + View top cards of library Zeige die obersten Karten der Bibliothek - + Number of cards: Anzahl der Karten: - + &Draw card Karte &ziehen - + &View exile &Zeige Exil - + &Exile &Exil - + + Move to &hand auf die &Hand nehmen - + + Move to g&raveyard auf den &Friedhof legen - + + Move to &exile ins &Exil schicken - + Ctrl+D Ctrl+D - + D&raw cards... Ka&rten ziehen... - + Ctrl+E Ctrl+E - + &Shuffle Mi&schen - + Ctrl+S Ctrl+S - + &Counters &Zähler - + &Untap all permanents &Enttappe alle bleibenden Karten - + Ctrl+U Ctrl+U @@ -1833,67 +1840,67 @@ Ctrl+L - + R&oll die... &Würfeln... - + Ctrl+I Ctrl+I - + &Create token... &Token erstellen... - + Ctrl+T Ctrl+T - + S&ay &Sagen - + F5 F5 - + F6 F6 - + F7 F7 - + F8 F8 - + F9 F9 - + F10 F10 - + Draw cards Karten ziehen - + Number: Anzahl: @@ -1906,22 +1913,22 @@ Neue Lebenspunkte insgesamt: - + Roll die Würfeln - + Number of sides: Anzahl der Seiten: - + Create token Token erstellen - + Name: Name: diff --git a/cockatrice/translations/cockatrice_en.ts b/cockatrice/translations/cockatrice_en.ts index bdcb980e..eafe8ea6 100644 --- a/cockatrice/translations/cockatrice_en.ts +++ b/cockatrice/translations/cockatrice_en.ts @@ -249,32 +249,32 @@ Counter - + &Set counter... - + Ctrl+L - + F11 - + F12 - + Set counter - + New value for counter '%1': @@ -702,87 +702,87 @@ MainWindow - + Error - + Server timeout - + &Connect... - + &Disconnect - + &Restart game... - + F2 - + &Leave game - + &Deck editor - + &Full screen - + Ctrl+F - + &Settings... - + &Exit - + Close most recent zone view - + Esc - + &Cockatrice - + &Say: - + Cockatrice @@ -1194,232 +1194,239 @@ Player - + + + Move to &top of library - + + + Move to &bottom of library - + &View library - + F3 - + View &top cards of library... - + &View graveyard - + F4 - + &View sideboard - + Player "%1" - + &Hand - + &Library - + &Graveyard - + &Sideboard - + View top cards of library - + Number of cards: - + &Draw card - + &View exile - + &Exile - + + Move to &hand - + + Move to g&raveyard - + + Move to &exile - + Ctrl+D - + D&raw cards... - + Ctrl+E - + &Shuffle - + Ctrl+S - + &Counters - + &Untap all permanents - + Ctrl+U - + R&oll die... - + Ctrl+I - + &Create token... - + Ctrl+T - + S&ay - + F5 - + F6 - + F7 - + F8 - + F9 - + F10 - + Draw cards - + Number: - + Roll die - + Number of sides: - + Create token - + Name: