Initial commit for sideboarding. It's supposed to be fully functional.

This commit is contained in:
Max-Wilhelm Bruker 2010-03-06 17:17:54 +01:00
parent 2ee4bb834d
commit b2f83541e7
18 changed files with 474 additions and 87 deletions

View file

@ -40,6 +40,7 @@ TabGame::TabGame(Client *_client, int _gameId, const QString &_gameDescription,
buttonHBox->addStretch();
deckView = new DeckView;
connect(deckView, SIGNAL(newCardAdded(AbstractCardItem *)), this, SLOT(newCardAdded(AbstractCardItem *)));
connect(deckView, SIGNAL(sideboardPlanChanged()), this, SLOT(sideboardPlanChanged()));
QVBoxLayout *deckViewLayout = new QVBoxLayout;
deckViewLayout->addLayout(buttonHBox);
deckViewLayout->addWidget(deckView);
@ -490,3 +491,9 @@ void TabGame::newCardAdded(AbstractCardItem *card)
{
connect(card, SIGNAL(hovered(AbstractCardItem *)), cardInfo, SLOT(setCard(AbstractCardItem *)));
}
void TabGame::sideboardPlanChanged()
{
QList<MoveCardToZone *> newPlan = deckView->getSideboardPlan();
client->sendCommand(new Command_SetSideboardPlan(gameId, newPlan));
}