nice decklist printing

This commit is contained in:
Max-Wilhelm Bruker 2009-06-27 20:53:24 +02:00
parent c9f680f25f
commit 5d40996c0b
3 changed files with 83 additions and 21 deletions

View file

@ -58,9 +58,10 @@ WndDeckEditor::WndDeckEditor(CardDatabase *_db, QWidget *parent)
nameLabel->setBuddy(nameEdit);
connect(nameEdit, SIGNAL(textChanged(const QString &)), deckModel->getDeckList(), SLOT(setName(const QString &)));
QLabel *commentsLabel = new QLabel(tr("&Comments:"));
commentsEdit = new QLineEdit;
commentsEdit = new QTextEdit;
commentsEdit->setMaximumHeight(70);
commentsLabel->setBuddy(commentsEdit);
connect(commentsEdit, SIGNAL(textChanged(const QString &)), deckModel->getDeckList(), SLOT(setComments(const QString &)));
connect(commentsEdit, SIGNAL(textChanged()), this, SLOT(updateComments()));
QGridLayout *grid = new QGridLayout;
grid->addWidget(nameLabel, 0, 0);
grid->addWidget(nameEdit, 0, 1);
@ -145,6 +146,11 @@ WndDeckEditor::~WndDeckEditor()
}
void WndDeckEditor::updateComments()
{
deckModel->getDeckList()->setComments(commentsEdit->toPlainText());
}
void WndDeckEditor::updateCardInfoLeft(const QModelIndex &current, const QModelIndex &/*previous*/)
{
cardInfo->setCard(current.sibling(current.row(), 0).data().toString());