Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
3043157a
Commit
3043157a
authored
Jul 11, 2009
by
Max-Wilhelm Bruker
Browse files
bugfix and nicer decklist font
parent
2e50822d
Changes
3
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/decklistmodel.cpp
View file @
3043157a
...
...
@@ -353,10 +353,10 @@ void DeckListModel::printDeckList(QPrinter *printer)
{
QTextDocument
doc
;
/*
QFont font("
Times
");
QFont
font
(
"
Serif
"
);
font
.
setStyleHint
(
QFont
::
Serif
);
doc
.
setDefaultFont
(
font
);
*/
QTextCursor
cursor
(
&
doc
);
QTextBlockFormat
headerBlockFormat
;
...
...
cockatrice/src/window_deckeditor.cpp
View file @
3043157a
...
...
@@ -56,7 +56,7 @@ WndDeckEditor::WndDeckEditor(CardDatabase *_db, QWidget *parent)
QLabel
*
nameLabel
=
new
QLabel
(
tr
(
"Deck &name:"
));
nameEdit
=
new
QLineEdit
;
nameLabel
->
setBuddy
(
nameEdit
);
connect
(
nameEdit
,
SIGNAL
(
textChanged
(
const
QString
&
)),
deckModel
->
getDeckList
()
,
SLOT
(
set
Name
(
const
QString
&
)));
connect
(
nameEdit
,
SIGNAL
(
textChanged
(
const
QString
&
)),
this
,
SLOT
(
update
Name
(
const
QString
&
)));
QLabel
*
commentsLabel
=
new
QLabel
(
tr
(
"&Comments:"
));
commentsEdit
=
new
QTextEdit
;
commentsEdit
->
setMaximumHeight
(
70
);
...
...
@@ -146,9 +146,16 @@ WndDeckEditor::~WndDeckEditor()
}
void
WndDeckEditor
::
updateName
(
const
QString
&
name
)
{
deckModel
->
getDeckList
()
->
setName
(
name
);
setWindowModified
(
true
);
}
void
WndDeckEditor
::
updateComments
()
{
deckModel
->
getDeckList
()
->
setComments
(
commentsEdit
->
toPlainText
());
setWindowModified
(
true
);
}
void
WndDeckEditor
::
updateCardInfoLeft
(
const
QModelIndex
&
current
,
const
QModelIndex
&
/*previous*/
)
...
...
@@ -219,6 +226,7 @@ void WndDeckEditor::actLoadDeck()
deckModel
->
sort
(
1
);
deckView
->
expandAll
();
deckView
->
resizeColumnToContents
(
0
);
setWindowModified
(
false
);
}
}
...
...
cockatrice/src/window_deckeditor.h
View file @
3043157a
...
...
@@ -17,6 +17,7 @@ class QTextEdit;
class
WndDeckEditor
:
public
QMainWindow
{
Q_OBJECT
private
slots
:
void
updateName
(
const
QString
&
name
);
void
updateComments
();
void
updateCardInfoLeft
(
const
QModelIndex
&
current
,
const
QModelIndex
&
previous
);
void
updateCardInfoRight
(
const
QModelIndex
&
current
,
const
QModelIndex
&
previous
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment