mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
started implementing deck printing
This commit is contained in:
parent
fb03c5cdbb
commit
33cc7a8859
7 changed files with 87 additions and 6 deletions
|
|
@ -94,6 +94,9 @@ WndDeckEditor::WndDeckEditor(CardDatabase *_db, QWidget *parent)
|
|||
aSaveDeckAs = new QAction(tr("&Save deck as..."), this);
|
||||
// aSaveDeckAs->setShortcuts(QKeySequence::SaveAs);
|
||||
connect(aSaveDeckAs, SIGNAL(triggered()), this, SLOT(actSaveDeckAs()));
|
||||
aPrintDeck = new QAction(tr("&Print deck..."), this);
|
||||
aPrintDeck->setShortcuts(QKeySequence::Print);
|
||||
connect(aPrintDeck, SIGNAL(triggered()), this, SLOT(actPrintDeck()));
|
||||
aClose = new QAction(tr("&Close"), this);
|
||||
aClose->setShortcut(tr("Ctrl+Q"));
|
||||
connect(aClose, SIGNAL(triggered()), this, SLOT(close()));
|
||||
|
|
@ -107,6 +110,8 @@ WndDeckEditor::WndDeckEditor(CardDatabase *_db, QWidget *parent)
|
|||
deckMenu->addAction(aSaveDeck);
|
||||
deckMenu->addAction(aSaveDeckAs);
|
||||
deckMenu->addSeparator();
|
||||
deckMenu->addAction(aPrintDeck);
|
||||
deckMenu->addSeparator();
|
||||
deckMenu->addAction(aClose);
|
||||
|
||||
setsMenu = menuBar()->addMenu(tr("&Sets"));
|
||||
|
|
@ -234,6 +239,13 @@ bool WndDeckEditor::actSaveDeckAs()
|
|||
return false;
|
||||
}
|
||||
|
||||
void WndDeckEditor::actPrintDeck()
|
||||
{
|
||||
QPrintPreviewDialog *dlg = new QPrintPreviewDialog(this);
|
||||
connect(dlg, SIGNAL(paintRequested(QPrinter *)), deckModel, SLOT(printDeckList(QPrinter *)));
|
||||
dlg->exec();
|
||||
}
|
||||
|
||||
void WndDeckEditor::actEditSets()
|
||||
{
|
||||
WndSets *w = new WndSets(db, this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue