Deck editor

This commit is contained in:
Max-Wilhelm Bruker 2009-05-23 20:04:14 +02:00
parent bb30012fbb
commit 3ae865178b
10 changed files with 175 additions and 43 deletions

View file

@ -37,7 +37,7 @@ void DlgStartGame::actLoad()
{
if (!tableModel->getDeckList()->loadDialog(this))
return;
tableView->reset();
emit newDeckLoaded(getDeckList());
}
@ -45,8 +45,9 @@ void DlgStartGame::actLoad()
QStringList DlgStartGame::getDeckList() const
{
QStringList result;
for (int i = 0; i < tableModel->rowCount(); i++) {
DecklistRow *temp = tableModel->getRow(i);
DeckList *deckList = tableModel->getDeckList();
for (int i = 0; i < deckList->size(); i++) {
DecklistRow *temp = deckList->at(i);
for (int j = 0; j < temp->getNumber(); j++)
result << QString("%1%2").arg(temp->isSideboard() ? "SB:" : "").arg(temp->getCard());
}