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
b667e1f6
Commit
b667e1f6
authored
Oct 15, 2010
by
Max-Wilhelm Bruker
Browse files
Merge branch 'master' of
ssh://cockatrice.git.sourceforge.net/gitroot/cockatrice/cockatrice
parents
b4436f24
76512a08
Changes
10
Hide whitespace changes
Inline
Side-by-side
cockatrice/cockatrice.pro
View file @
b667e1f6
...
...
@@ -6,7 +6,6 @@ MOC_DIR = build
OBJECTS_DIR
=
build
RESOURCES
=
cockatrice
.
qrc
QT
+=
network
svg
CONFIG
+=
debug
HEADERS
+=
src
/
counter
.
h
\
src
/
dlg_creategame
.
h
\
...
...
cockatrice/resources/countries/hu.svg
View file @
b667e1f6
<?xml version="1.0" encoding="UTF-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1200"
height=
"600"
>
<rect
fill=
"#ce1126"
width=
"1200"
height=
"200"
/>
<rect
fill=
"#fff"
y=
"200"
width=
"1200"
height=
"200"
/>
<rect
fill=
"#ce1126"
width=
"1200"
height=
"200"
/>
<rect
fill=
"#fff"
y=
"200"
width=
"1200"
height=
"200"
/>
<rect
fill=
"#008751"
y=
"400"
width=
"1200"
height=
"200"
/>
</svg>
\ No newline at end of file
cockatrice/resources/countries/ie.svg
View file @
b667e1f6
<?xml version="1.0" encoding="UTF-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1200"
height=
"600"
>
<rect
fill=
"#009B48"
width=
"400"
height=
"600"
/>
<rect
fill=
"#fff"
x=
"400"
width=
"400"
height=
"600"
/>
<rect
fill=
"#009B48"
width=
"400"
height=
"600"
/>
<rect
fill=
"#fff"
x=
"400"
width=
"400"
height=
"600"
/>
<rect
fill=
"#FF7900"
x=
"800"
width=
"400"
height=
"600"
/>
</svg>
\ No newline at end of file
cockatrice/resources/countries/jp.svg
View file @
b667e1f6
<?xml version="1.0" encoding="UTF-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"900"
height=
"600"
>
<rect
fill=
"#fff"
height=
"600"
width=
"900"
/>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"900"
height=
"600"
>
<rect
fill=
"#fff"
height=
"600"
width=
"900"
/>
<circle
fill=
"#bc002d"
cx=
"450"
cy=
"300"
r=
"180"
/>
</svg>
\ No newline at end of file
cockatrice/resources/countries/nl.svg
View file @
b667e1f6
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"900"
height=
"600"
viewBox=
"0 0 9 6"
>
<rect
fill=
"#21468B"
width=
"9"
height=
"6"
/>
<rect
fill=
"#FFF"
width=
"9"
height=
"4"
/>
<rect
fill=
"#AE1C28"
width=
"9"
height=
"2"
/>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"900"
height=
"600"
viewBox=
"0 0 9 6"
>
<rect
fill=
"#21468B"
width=
"9"
height=
"6"
/>
<rect
fill=
"#FFF"
width=
"9"
height=
"4"
/>
<rect
fill=
"#AE1C28"
width=
"9"
height=
"2"
/>
</svg>
\ No newline at end of file
cockatrice/resources/countries/se.svg
View file @
b667e1f6
<?xml version="1.0" encoding="UTF-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1600"
height=
"1000"
viewBox=
"0 0 16 10"
>
<rect
width=
"16"
height=
"10"
fill=
"#005293"
/>
<rect
width=
"2"
height=
"10"
x=
"5"
fill=
"#FECB00"
/>
<rect
width=
"16"
height=
"2"
y=
"4"
fill=
"#FECB00"
/>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1600"
height=
"1000"
viewBox=
"0 0 16 10"
>
<rect
width=
"16"
height=
"10"
fill=
"#005293"
/>
<rect
width=
"2"
height=
"10"
x=
"5"
fill=
"#FECB00"
/>
<rect
width=
"16"
height=
"2"
y=
"4"
fill=
"#FECB00"
/>
</svg>
cockatrice/resources/countries/tr.svg
View file @
b667e1f6
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1200"
height=
"800"
viewBox=
"0 0 360 240"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<rect
fill=
"#e30a17"
width=
"360"
height=
"240"
/>
<rect
fill=
"#fff"
width=
"8"
height=
"240"
/>
<circle
fill=
"#fff"
cx=
"128"
cy=
"120"
r=
"60"
/>
<circle
fill=
"#e30a17"
cx=
"143"
cy=
"120"
r=
"48"
/>
<g
fill=
"#fff"
transform=
"translate(205,120) scale(30) rotate(-90)"
>
<g
id=
"g2"
>
<polygon
id=
"g1"
points=
"0,0 0,1 .5,1"
transform=
"translate(0,-1) rotate(18)"
/>
<use
xlink:href=
"#g1"
transform=
"scale(-1,1)"
/>
</g>
<use
xlink:href=
"#g2"
transform=
"rotate(72)"
/>
<use
xlink:href=
"#g2"
transform=
"rotate(-72)"
/>
<use
xlink:href=
"#g2"
transform=
"rotate(144)"
/>
<use
xlink:href=
"#g2"
transform=
"rotate(-144)"
/>
</g>
</svg>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1200"
height=
"800"
viewBox=
"0 0 360 240"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<rect
fill=
"#e30a17"
width=
"360"
height=
"240"
/>
<rect
fill=
"#fff"
width=
"8"
height=
"240"
/>
<circle
fill=
"#fff"
cx=
"128"
cy=
"120"
r=
"60"
/>
<circle
fill=
"#e30a17"
cx=
"143"
cy=
"120"
r=
"48"
/>
<g
fill=
"#fff"
transform=
"translate(205,120) scale(30) rotate(-90)"
>
<g
id=
"g2"
>
<polygon
id=
"g1"
points=
"0,0 0,1 .5,1"
transform=
"translate(0,-1) rotate(18)"
/>
<use
xlink:href=
"#g1"
transform=
"scale(-1,1)"
/>
</g>
<use
xlink:href=
"#g2"
transform=
"rotate(72)"
/>
<use
xlink:href=
"#g2"
transform=
"rotate(-72)"
/>
<use
xlink:href=
"#g2"
transform=
"rotate(144)"
/>
<use
xlink:href=
"#g2"
transform=
"rotate(-144)"
/>
</g>
</svg>
cockatrice/resources/countries/us.svg
View file @
b667e1f6
<?xml version="1.0" encoding="UTF-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"1235"
height=
"650"
>
<defs>
<polygon
id=
"pt"
points=
"-0.1624598481164531,0 0,-0.5 0.1624598481164531,0"
transform=
"scale(0.0616)"
fill=
"#FFF"
/>
<g
id=
"star"
><use
xlink:href=
"#pt"
transform=
"rotate(-144)"
/><use
xlink:href=
"#pt"
transform=
"rotate(-72)"
/><use
xlink:href=
"#pt"
/><use
xlink:href=
"#pt"
transform=
"rotate(72)"
/><use
xlink:href=
"#pt"
transform=
"rotate(144)"
/></g>
<g
id=
"s5"
><use
xlink:href=
"#star"
x=
"-0.252"
/><use
xlink:href=
"#star"
x=
"-0.126"
/><use
xlink:href=
"#star"
/><use
xlink:href=
"#star"
x=
"0.126"
/><use
xlink:href=
"#star"
x=
"0.252"
/></g>
<g
id=
"s6"
><use
xlink:href=
"#s5"
x=
"-0.063"
/><use
xlink:href=
"#star"
x=
"0.315"
/></g>
<g
id=
"x4"
><use
xlink:href=
"#s6"
/><use
xlink:href=
"#s5"
y=
"0.054"
/><use
xlink:href=
"#s6"
y=
"0.108"
/><use
xlink:href=
"#s5"
y=
"0.162"
/></g>
<g
id=
"u"
><use
xlink:href=
"#x4"
y=
"-0.216"
/><use
xlink:href=
"#x4"
/><use
xlink:href=
"#s6"
y=
"0.216"
/></g>
<rect
id=
"stripe"
width=
"1235"
height=
"50"
fill=
"#B22234"
/>
</defs>
<?xml version="1.0" encoding="UTF-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"1235"
height=
"650"
>
<defs>
<polygon
id=
"pt"
points=
"-0.1624598481164531,0 0,-0.5 0.1624598481164531,0"
transform=
"scale(0.0616)"
fill=
"#FFF"
/>
<g
id=
"star"
><use
xlink:href=
"#pt"
transform=
"rotate(-144)"
/><use
xlink:href=
"#pt"
transform=
"rotate(-72)"
/><use
xlink:href=
"#pt"
/><use
xlink:href=
"#pt"
transform=
"rotate(72)"
/><use
xlink:href=
"#pt"
transform=
"rotate(144)"
/></g>
<g
id=
"s5"
><use
xlink:href=
"#star"
x=
"-0.252"
/><use
xlink:href=
"#star"
x=
"-0.126"
/><use
xlink:href=
"#star"
/><use
xlink:href=
"#star"
x=
"0.126"
/><use
xlink:href=
"#star"
x=
"0.252"
/></g>
<g
id=
"s6"
><use
xlink:href=
"#s5"
x=
"-0.063"
/><use
xlink:href=
"#star"
x=
"0.315"
/></g>
<g
id=
"x4"
><use
xlink:href=
"#s6"
/><use
xlink:href=
"#s5"
y=
"0.054"
/><use
xlink:href=
"#s6"
y=
"0.108"
/><use
xlink:href=
"#s5"
y=
"0.162"
/></g>
<g
id=
"u"
><use
xlink:href=
"#x4"
y=
"-0.216"
/><use
xlink:href=
"#x4"
/><use
xlink:href=
"#s6"
y=
"0.216"
/></g>
<rect
id=
"stripe"
width=
"1235"
height=
"50"
fill=
"#B22234"
/>
</defs>
<rect
width=
"1235"
height=
"650"
fill=
"#FFF"
/><use
xlink:href=
"#stripe"
/><use
xlink:href=
"#stripe"
y=
"100"
/><use
xlink:href=
"#stripe"
y=
"200"
/><use
xlink:href=
"#stripe"
y=
"300"
/><use
xlink:href=
"#stripe"
y=
"400"
/><use
xlink:href=
"#stripe"
y=
"500"
/><use
xlink:href=
"#stripe"
y=
"600"
/><rect
width=
"494"
height=
"350"
fill=
"#3C3B6E"
/><use
xlink:href=
"#u"
transform=
"translate(247,175) scale(650)"
/></svg>
\ No newline at end of file
cockatrice/src/abstractcarditem.cpp
View file @
b667e1f6
...
...
@@ -118,7 +118,7 @@ void AbstractCardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *
transformPainter
(
painter
,
translatedSize
);
painter
->
setPen
(
textColor
);
painter
->
drawText
(
QRectF
(
2
*
scaleFactor
,
2
*
scaleFactor
,
translatedSize
.
width
()
-
4
*
scaleFactor
,
translatedSize
.
height
()
-
4
*
scaleFactor
),
Qt
::
AlignTop
|
Qt
::
AlignLeft
|
Qt
::
TextWrapAnywhere
,
name
);
painter
->
drawText
(
QRectF
(
4
*
scaleFactor
,
4
*
scaleFactor
,
translatedSize
.
width
()
-
8
*
scaleFactor
,
translatedSize
.
height
()
-
8
*
scaleFactor
),
Qt
::
AlignTop
|
Qt
::
AlignLeft
|
Qt
::
TextWrapAnywhere
,
name
);
}
painter
->
restore
();
...
...
cockatrice/src/carditem.cpp
View file @
b667e1f6
...
...
@@ -172,12 +172,14 @@ void CardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
if
(
!
pt
.
isEmpty
())
{
painter
->
save
();
QSizeF
translatedSize
=
getTranslatedSize
(
painter
);
qreal
scaleFactor
=
translatedSize
.
width
()
/
boundingRect
().
width
();
transformPainter
(
painter
,
translatedSize
);
painter
->
setBackground
(
Qt
::
black
);
painter
->
setBackgroundMode
(
Qt
::
OpaqueMode
);
painter
->
setPen
(
Qt
::
white
);
painter
->
drawText
(
QRectF
(
2
,
2
,
translatedSize
.
width
()
-
4
,
translatedSize
.
height
()
-
4
),
Qt
::
AlignRight
|
Qt
::
AlignBottom
,
pt
);
painter
->
drawText
(
QRectF
(
4
*
scaleFactor
,
4
*
scaleFactor
,
translatedSize
.
width
()
-
8
,
translatedSize
.
height
()
-
8
),
Qt
::
AlignRight
|
Qt
::
AlignBottom
,
pt
);
painter
->
restore
();
}
if
(
getBeingPointedAt
())
...
...
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