mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
nice decklist printing
This commit is contained in:
parent
c9f680f25f
commit
5d40996c0b
3 changed files with 83 additions and 21 deletions
|
|
@ -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 ¤t, const QModelIndex &/*previous*/)
|
||||
{
|
||||
cardInfo->setCard(current.sibling(current.row(), 0).data().toString());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue