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
afa8b538
Commit
afa8b538
authored
Jul 07, 2015
by
Zach H
Browse files
show colors of cards
parent
f199e207
Changes
3
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/cardframe.cpp
View file @
afa8b538
...
...
@@ -9,11 +9,8 @@
#include
<QVBoxLayout>
CardFrame
::
CardFrame
(
int
width
,
int
height
,
const
QString
&
cardName
,
QWidget
*
parent
)
:
QTabWidget
(
parent
)
,
info
(
0
)
,
cardTextOnly
(
false
)
CardFrame
::
CardFrame
(
int
width
,
int
height
,
const
QString
&
cardName
,
QWidget
*
parent
)
:
QTabWidget
(
parent
),
info
(
0
),
cardTextOnly
(
false
)
{
setFixedWidth
(
width
);
setMinimumHeight
(
height
);
...
...
cockatrice/src/cardinfotext.cpp
View file @
afa8b538
...
...
@@ -8,8 +8,7 @@
#include
"main.h"
CardInfoText
::
CardInfoText
(
QWidget
*
parent
)
:
QFrame
(
parent
)
,
info
(
0
)
:
QFrame
(
parent
),
info
(
0
)
{
nameLabel1
=
new
QLabel
;
nameLabel2
=
new
QLabel
;
...
...
@@ -17,6 +16,9 @@ CardInfoText::CardInfoText(QWidget *parent)
manacostLabel1
=
new
QLabel
;
manacostLabel2
=
new
QLabel
;
manacostLabel2
->
setWordWrap
(
true
);
colorLabel1
=
new
QLabel
;
colorLabel2
=
new
QLabel
;
colorLabel2
->
setWordWrap
(
true
);
cardtypeLabel1
=
new
QLabel
;
cardtypeLabel2
=
new
QLabel
;
cardtypeLabel2
->
setWordWrap
(
true
);
...
...
@@ -34,6 +36,8 @@ CardInfoText::CardInfoText(QWidget *parent)
grid
->
addWidget
(
nameLabel2
,
row
++
,
1
);
grid
->
addWidget
(
manacostLabel1
,
row
,
0
);
grid
->
addWidget
(
manacostLabel2
,
row
++
,
1
);
grid
->
addWidget
(
colorLabel1
,
row
,
0
);
grid
->
addWidget
(
colorLabel2
,
row
++
,
1
);
grid
->
addWidget
(
cardtypeLabel1
,
row
,
0
);
grid
->
addWidget
(
cardtypeLabel2
,
row
++
,
1
);
grid
->
addWidget
(
powtoughLabel1
,
row
,
0
);
...
...
@@ -51,6 +55,7 @@ void CardInfoText::setCard(CardInfo *card)
{
nameLabel2
->
setText
(
card
->
getName
());
manacostLabel2
->
setText
(
card
->
getManaCost
());
colorLabel2
->
setText
(
card
->
getColors
().
join
(
""
));
cardtypeLabel2
->
setText
(
card
->
getCardType
());
powtoughLabel2
->
setText
(
card
->
getPowTough
());
loyaltyLabel2
->
setText
(
card
->
getLoyalty
()
>
0
?
QString
::
number
(
card
->
getLoyalty
())
:
QString
());
...
...
@@ -61,6 +66,7 @@ void CardInfoText::retranslateUi()
{
nameLabel1
->
setText
(
tr
(
"Name:"
));
manacostLabel1
->
setText
(
tr
(
"Mana cost:"
));
colorLabel1
->
setText
(
tr
(
"Color(s):"
));
cardtypeLabel1
->
setText
(
tr
(
"Card type:"
));
powtoughLabel1
->
setText
(
tr
(
"P / T:"
));
loyaltyLabel1
->
setText
(
tr
(
"Loyalty:"
));
...
...
cockatrice/src/cardinfotext.h
View file @
afa8b538
...
...
@@ -13,6 +13,7 @@ class CardInfoText : public QFrame {
private:
QLabel
*
nameLabel1
,
*
nameLabel2
;
QLabel
*
manacostLabel1
,
*
manacostLabel2
;
QLabel
*
colorLabel1
,
*
colorLabel2
;
QLabel
*
cardtypeLabel1
,
*
cardtypeLabel2
;
QLabel
*
powtoughLabel1
,
*
powtoughLabel2
;
QLabel
*
loyaltyLabel1
,
*
loyaltyLabel2
;
...
...
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