mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 08:14:47 -07:00
Deck editor
This commit is contained in:
parent
bb30012fbb
commit
3ae865178b
10 changed files with 175 additions and 43 deletions
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue