Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Projet Interface Graphique
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Tiec Aymeric
Projet Interface Graphique
Commits
821766b2
Commit
821766b2
authored
3 months ago
by
Le Tiec Aymeric
Browse files
Options
Downloads
Patches
Plain Diff
Avancement du design de la partie et du main
parent
56ca9b3d
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Jeu_2048/CMakeLists.txt
+1
-0
1 addition, 0 deletions
Jeu_2048/CMakeLists.txt
Jeu_2048/Case.qml
+30
-0
30 additions, 0 deletions
Jeu_2048/Case.qml
Jeu_2048/Main.qml
+78
-6
78 additions, 6 deletions
Jeu_2048/Main.qml
Jeu_2048/Partie.qml
+137
-100
137 additions, 100 deletions
Jeu_2048/Partie.qml
with
246 additions
and
106 deletions
Jeu_2048/CMakeLists.txt
+
1
−
0
View file @
821766b2
...
@@ -22,6 +22,7 @@ qt_add_qml_module(appJeu_2048
...
@@ -22,6 +22,7 @@ qt_add_qml_module(appJeu_2048
QML_FILES Partie.qml
QML_FILES Partie.qml
QML_FILES Menu_de_Controle.qml
QML_FILES Menu_de_Controle.qml
SOURCES game2048.h game2048.cpp
SOURCES game2048.h game2048.cpp
QML_FILES Case.qml
)
)
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
...
...
This diff is collapsed.
Click to expand it.
Jeu_2048/Case.qml
0 → 100644
+
30
−
0
View file @
821766b2
import
QtQuick
Item
{
property
alias
_textText
:
_text
.
text
property
alias
_textColor
:
_text
.
color
property
alias
_textFontpixelSize
:
_text
.
font
.
pixelSize
property
alias
rectangleColor
:
rectangle
.
color
property
alias
rectangleX
:
rectangle
.
x
property
alias
rectangleY
:
rectangle
.
y
Rectangle
{
id
:
rectangle
x
:
0
y
:
0
width
:
100
height
:
100
visible
:
true
color
:
"
#c9c6ac
"
radius
:
16
Text
{
id
:
_text
text
:
qsTr
(
""
)
anchors.verticalCenter
:
parent
.
verticalCenter
font.pixelSize
:
20
anchors.horizontalCenter
:
parent
.
horizontalCenter
font.family
:
"
Tahoma
"
}
}
}
This diff is collapsed.
Click to expand it.
Jeu_2048/Main.qml
+
78
−
6
View file @
821766b2
import
QtQuick
import
QtQuick
Window
{
Window
{
id
:
window
visible
:
true
visible
:
true
width
:
400
color
:
"
#ffffff
"
height
:
400
width
:
600
height
:
900
title
:
qsTr
(
"
2048
"
)
title
:
qsTr
(
"
2048
"
)
Rectangle
{
id
:
rectangle
y
:
100
width
:
400
height
:
200
color
:
"
#edcc5f
"
radius
:
30
anchors.horizontalCenter
:
parent
.
horizontalCenter
Text
{
Text
{
text
:
qsTr
(
"
Hello 2048
"
)
id
:
_text
anchors.centerIn
:
parent
x
:
69
font.pointSize
:
24
color
:
"
#ffffff
"
text
:
qsTr
(
"
2048
"
)
anchors.verticalCenter
:
parent
.
verticalCenter
font.pixelSize
:
80
font.weight
:
Font
.
Bold
font.family
:
"
Tahoma
"
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
Rectangle
{
id
:
rectangle1
x
:
100
y
:
350
width
:
400
height
:
500
color
:
"
#3c3a33
"
radius
:
15
Rectangle
{
id
:
rectangle2
y
:
20
width
:
360
height
:
100
color
:
"
#c9c6ac
"
radius
:
15
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
Rectangle
{
id
:
rectangle3
y
:
140
width
:
360
height
:
100
color
:
"
#c9c6ac
"
radius
:
15
anchors.horizontalCenterOffset
:
0
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
Rectangle
{
id
:
rectangle4
y
:
260
width
:
360
height
:
100
color
:
"
#c9c6ac
"
radius
:
15
anchors.horizontalCenterOffset
:
0
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
Rectangle
{
id
:
rectangle5
x
:
20
y
:
380
width
:
360
height
:
100
color
:
"
#c9c6ac
"
radius
:
15
anchors.horizontalCenterOffset
:
0
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Jeu_2048/Partie.qml
+
137
−
100
View file @
821766b2
...
@@ -4,6 +4,7 @@ Item {
...
@@ -4,6 +4,7 @@ Item {
id
:
_item
id
:
_item
width
:
600
width
:
600
height
:
900
height
:
900
property
alias
_text3Text
:
current_score
.
text
Rectangle
{
Rectangle
{
id
:
background
id
:
background
...
@@ -11,175 +12,126 @@ Item {
...
@@ -11,175 +12,126 @@ Item {
anchors.fill
:
parent
anchors.fill
:
parent
Rectangle
{
Rectangle
{
id
:
gri
lle
id
:
gri
d
y
:
300
y
:
300
width
:
500
width
:
500
height
:
500
height
:
500
color
:
"
#a49381
"
color
:
"
#a49381
"
radius
:
15
anchors.horizontalCenterOffset
:
0
anchors.horizontalCenterOffset
:
0
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
Rectangl
e
{
Cas
e
{
id
:
rectangl
e1
id
:
cas
e1
x
:
20
x
:
20
y
:
20
y
:
20
width
:
100
height
:
100
color
:
"
#c9c6ac
"
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e2
id
:
cas
e2
x
:
140
x
:
140
y
:
20
y
:
20
width
:
100
height
:
100
color
:
"
#c9c6ac
"
rotation
:
0
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e3
id
:
cas
e3
x
:
260
x
:
260
y
:
20
y
:
20
width
:
100
height
:
100
color
:
"
#c9c6ac
"
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e4
id
:
cas
e4
x
:
380
x
:
380
y
:
20
y
:
20
width
:
100
height
:
100
color
:
"
#c9c6ac
"
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e5
id
:
cas
e5
x
:
20
x
:
20
y
:
140
y
:
140
width
:
100
height
:
100
color
:
"
#c9c6ac
"
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e6
id
:
cas
e6
x
:
140
x
:
140
y
:
140
y
:
140
width
:
100
height
:
100
color
:
"
#c9c6ac
"
rotation
:
0
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e7
id
:
cas
e7
x
:
260
x
:
260
y
:
140
y
:
140
width
:
100
height
:
100
color
:
"
#c9c6ac
"
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e8
id
:
cas
e8
x
:
380
x
:
380
y
:
140
y
:
140
width
:
100
height
:
100
color
:
"
#c9c6ac
"
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e9
id
:
cas
e9
x
:
20
x
:
20
y
:
260
y
:
260
width
:
100
height
:
100
color
:
"
#c9c6ac
"
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e10
id
:
cas
e10
x
:
140
x
:
140
y
:
260
y
:
260
width
:
100
height
:
100
color
:
"
#c9c6ac
"
rotation
:
0
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e11
id
:
cas
e11
x
:
260
x
:
260
y
:
260
y
:
260
width
:
100
height
:
100
color
:
"
#c9c6ac
"
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e12
id
:
cas
e12
x
:
380
x
:
380
y
:
260
y
:
260
width
:
100
height
:
100
color
:
"
#c9c6ac
"
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e13
id
:
cas
e13
x
:
20
x
:
20
y
:
380
y
:
380
width
:
100
height
:
100
color
:
"
#c9c6ac
"
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e14
id
:
cas
e14
x
:
140
x
:
140
y
:
380
y
:
380
width
:
100
height
:
100
color
:
"
#c9c6ac
"
rotation
:
0
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e15
id
:
cas
e15
x
:
260
x
:
260
y
:
380
y
:
380
width
:
100
height
:
100
color
:
"
#c9c6ac
"
}
}
Rectangl
e
{
Cas
e
{
id
:
rectangl
e16
id
:
cas
e16
x
:
380
x
:
380
y
:
380
y
:
375
width
:
100
height
:
100
color
:
"
#c9c6ac
"
}
}
}
}
Rectangle
{
Rectangle
{
id
:
rectangle
id
:
icon_
rectangle
x
:
50
x
:
50
y
:
50
y
:
50
width
:
200
width
:
200
height
:
150
height
:
150
color
:
"
#edcc5f
"
color
:
"
#edcc5f
"
radius
:
15
Text
{
Text
{
id
:
_text
id
:
icon
_text
width
:
200
width
:
200
height
:
150
height
:
150
color
:
"
#ffffff
"
text
:
qsTr
(
"
2048
"
)
text
:
qsTr
(
"
2048
"
)
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
font.pixelSize
:
50
font.pixelSize
:
50
...
@@ -192,34 +144,126 @@ Item {
...
@@ -192,34 +144,126 @@ Item {
}
}
Rectangle
{
Rectangle
{
id
:
rectangle
17
id
:
score_
rectangle
x
:
270
x
:
270
y
:
50
y
:
50
width
:
130
width
:
130
height
:
65
height
:
65
color
:
"
#3c3a33
"
color
:
"
#3c3a33
"
radius
:
15
Text
{
id
:
score_text
y
:
2
color
:
"
#c1c1c1
"
text
:
qsTr
(
"
Score
"
)
font.pixelSize
:
20
font.weight
:
Font
.
Bold
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
Text
{
id
:
current_score
y
:
28
color
:
"
#ffffff
"
text
:
qsTr
(
"
0
"
)
font.pixelSize
:
25
font.weight
:
Font
.
ExtraBold
font.family
:
"
Tahoma
"
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
}
Rectangle
{
Rectangle
{
id
:
rectangle
18
id
:
best_
rectangle
x
:
420
x
:
420
y
:
50
y
:
50
width
:
130
width
:
130
height
:
65
height
:
65
color
:
"
#3c3a33
"
color
:
"
#3c3a33
"
radius
:
15
Text
{
id
:
best_text
y
:
2
color
:
"
#c1c1c1
"
text
:
qsTr
(
"
Best
"
)
font.pixelSize
:
20
font.weight
:
Font
.
Bold
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
Text
{
id
:
best_score
y
:
28
color
:
"
#ffffff
"
text
:
qsTr
(
"
0
"
)
font.pixelSize
:
25
font.weight
:
Font
.
ExtraBold
font.family
:
"
Tahoma
"
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
}
Rectangle
{
Rectangle
{
id
:
rectangle
19
id
:
new_
rectangle
x
:
270
x
:
270
y
:
135
y
:
135
width
:
130
width
:
130
height
:
65
height
:
65
color
:
"
#f65e3d
"
color
:
"
#f65e3d
"
radius
:
15
Text
{
id
:
new_text
color
:
"
#ffffff
"
text
:
qsTr
(
"
NEW
"
)
anchors.verticalCenter
:
parent
.
verticalCenter
font.pixelSize
:
30
font.family
:
"
Tahoma
"
font.weight
:
Font
.
ExtraBold
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
MouseArea
{
id
:
new_mouse_area
x
:
0
y
:
0
width
:
130
height
:
65
}
}
Rectangle
{
id
:
undo_rectangle
x
:
420
y
:
135
width
:
130
height
:
65
color
:
"
#f65e3d
"
radius
:
15
Text
{
id
:
undo_text
color
:
"
#ffffff
"
text
:
qsTr
(
"
UNDO
"
)
anchors.verticalCenter
:
parent
.
verticalCenter
font.pixelSize
:
30
font.weight
:
Font
.
ExtraBold
font.family
:
"
Tahoma
"
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
MouseArea
{
id
:
undo_mouse_area
x
:
0
y
:
0
width
:
130
height
:
65
}
}
}
Text
{
Text
{
id
:
_text
1
id
:
join_the_numbers
_text
x
:
50
x
:
50
y
:
225
y
:
225
width
:
500
width
:
500
...
@@ -230,15 +274,8 @@ Item {
...
@@ -230,15 +274,8 @@ Item {
verticalAlignment
:
Text
.
AlignVCenter
verticalAlignment
:
Text
.
AlignVCenter
font.bold
:
true
font.bold
:
true
}
}
}
Rectangle
{
id
:
rectangle20
x
:
420
y
:
135
width
:
130
height
:
65
color
:
"
#f65e3d
"
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment