configurable set priority for card pictures

This commit is contained in:
Max-Wilhelm Bruker 2009-06-20 20:09:19 +02:00
parent e0d773e4e5
commit fb03c5cdbb
10 changed files with 242 additions and 17 deletions

View file

@ -1,5 +1,6 @@
#include <QtGui>
#include "window_deckeditor.h"
#include "window_sets.h"
#include "carddatabase.h"
#include "carddatabasemodel.h"
#include "decklistmodel.h"
@ -97,6 +98,9 @@ WndDeckEditor::WndDeckEditor(CardDatabase *_db, QWidget *parent)
aClose->setShortcut(tr("Ctrl+Q"));
connect(aClose, SIGNAL(triggered()), this, SLOT(close()));
aEditSets = new QAction(tr("&Edit sets..."), this);
connect(aEditSets, SIGNAL(triggered()), this, SLOT(actEditSets()));
deckMenu = menuBar()->addMenu(tr("&Deck"));
deckMenu->addAction(aNewDeck);
deckMenu->addAction(aLoadDeck);
@ -105,6 +109,9 @@ WndDeckEditor::WndDeckEditor(CardDatabase *_db, QWidget *parent)
deckMenu->addSeparator();
deckMenu->addAction(aClose);
setsMenu = menuBar()->addMenu(tr("&Sets"));
setsMenu->addAction(aEditSets);
aAddCard = new QAction(tr("Add card to &maindeck"), this);
connect(aAddCard, SIGNAL(triggered()), this, SLOT(actAddCard()));
aAddCard->setShortcut(tr("Ctrl+M"));
@ -227,6 +234,13 @@ bool WndDeckEditor::actSaveDeckAs()
return false;
}
void WndDeckEditor::actEditSets()
{
WndSets *w = new WndSets(db, this);
w->setWindowModality(Qt::WindowModal);
w->show();
}
void WndDeckEditor::recursiveExpand(const QModelIndex &index)
{
if (index.parent().isValid())