Skip to content
Snippets Groups Projects
Commit 55df0f1e authored by Poncet Thomas's avatar Poncet Thomas
Browse files

Fin travail lundi

parent 2d532c75
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,16 @@ Item { ...@@ -4,6 +4,16 @@ Item {
id: monCarre id: monCarre
width: 154 width: 154
height: 154 height: 154
property alias case9: case9
property alias case8: case8
property alias case7: case7
property alias case6: case6
property alias case5: case5
property alias case4: case4
property alias case3: case3
property alias case2: case2
property alias case1: case1
Rectangle { Rectangle {
id: backgroudcarre id: backgroudcarre
...@@ -16,6 +26,7 @@ Item { ...@@ -16,6 +26,7 @@ Item {
id: case1 id: case1
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top anchors.top: parent.top
chiffreText: qsTr("9")
anchors.leftMargin: 2 anchors.leftMargin: 2
anchors.topMargin: 2 anchors.topMargin: 2
} }
...@@ -24,6 +35,7 @@ Item { ...@@ -24,6 +35,7 @@ Item {
id: case2 id: case2
x: 50 x: 50
anchors.top: parent.top anchors.top: parent.top
chiffreText: qsTr("9")
anchors.topMargin: 2 anchors.topMargin: 2
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
...@@ -34,6 +46,7 @@ Item { ...@@ -34,6 +46,7 @@ Item {
y: 0 y: 0
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
chiffreText: qsTr("9")
anchors.rightMargin: 2 anchors.rightMargin: 2
anchors.topMargin: 2 anchors.topMargin: 2
} }
...@@ -44,6 +57,7 @@ Item { ...@@ -44,6 +57,7 @@ Item {
y: 50 y: 50
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
chiffreText: qsTr("9")
anchors.leftMargin: 2 anchors.leftMargin: 2
} }
...@@ -52,21 +66,23 @@ Item { ...@@ -52,21 +66,23 @@ Item {
x: 50 x: 50
y: 50 y: 50
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
chiffreText: "9"
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
Case { Case {
id: case6 id: case6
x: 122 x: 0
y: 83 y: 102
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right anchors.right: parent.right
chiffreText: qsTr("9")
anchors.rightMargin: 2 anchors.rightMargin: 2
} }
Case { Case {
id: case7 id: case7
y: 106 y: 106
...@@ -95,6 +111,7 @@ Item { ...@@ -95,6 +111,7 @@ Item {
anchors.bottomMargin: 2 anchors.bottomMargin: 2
anchors.rightMargin: 2 anchors.rightMargin: 2
} }
} }
} }
...@@ -4,6 +4,15 @@ Item { ...@@ -4,6 +4,15 @@ Item {
id: maGrille id: maGrille
width: 466 width: 466
height: 466 height: 466
property alias carre9: carre9
property alias carre8: carre8
property alias carre7: carre7
property alias carre6: carre6
property alias carre5: carre5
property alias carre4: carre4
property alias carre3: carre3
property alias carre2: carre2
property alias carre1: carre1
Rectangle { Rectangle {
id: backgroundGrille id: backgroundGrille
...@@ -12,23 +21,41 @@ Item { ...@@ -12,23 +21,41 @@ Item {
anchors.fill: parent anchors.fill: parent
Carre { Carre {
id: carre id: carre1
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top anchors.top: parent.top
case9.chiffreText: qsTr("9")
case8.chiffreText: qsTr("9")
case7.chiffreText: qsTr("9")
case6.chiffreText: qsTr("9")
case5.chiffreText: qsTr("9")
case4.chiffreText: qsTr("9")
case3.chiffreText: qsTr("9")
case2.chiffreText: qsTr("9")
case1.chiffreText: qsTr("9")
anchors.leftMargin: 2 anchors.leftMargin: 2
anchors.topMargin: 2 anchors.topMargin: 2
} }
Carre { Carre {
id: carre1 id: carre2
x: 178 x: 178
anchors.top: parent.top anchors.top: parent.top
case9.chiffreText: qsTr("")
case8.chiffreText: qsTr("")
case7.chiffreText: qsTr("")
case6.chiffreText: qsTr("")
case5.chiffreText: qsTr("")
case4.chiffreText: qsTr("")
case3.chiffreText: qsTr("")
case2.chiffreText: qsTr("")
case1.chiffreText: qsTr("9")
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 2 anchors.topMargin: 2
} }
Carre { Carre {
id: carre2 id: carre3
x: 347 x: 347
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
...@@ -37,7 +64,7 @@ Item { ...@@ -37,7 +64,7 @@ Item {
} }
Carre { Carre {
id: carre3 id: carre4
y: 191 y: 191
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
...@@ -45,7 +72,7 @@ Item { ...@@ -45,7 +72,7 @@ Item {
} }
Carre { Carre {
id: carre4 id: carre5
x: 279 x: 279
y: 219 y: 219
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
...@@ -53,7 +80,7 @@ Item { ...@@ -53,7 +80,7 @@ Item {
} }
Carre { Carre {
id: carre5 id: carre6
x: 361 x: 361
y: 199 y: 199
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
...@@ -62,7 +89,7 @@ Item { ...@@ -62,7 +89,7 @@ Item {
} }
Carre { Carre {
id: carre6 id: carre7
y: 338 y: 338
anchors.left: parent.left anchors.left: parent.left
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
...@@ -71,7 +98,7 @@ Item { ...@@ -71,7 +98,7 @@ Item {
} }
Carre { Carre {
id: carre7 id: carre8
x: 225 x: 225
y: 330 y: 330
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
...@@ -80,7 +107,7 @@ Item { ...@@ -80,7 +107,7 @@ Item {
} }
Carre { Carre {
id: carre8 id: carre9
x: 316 x: 316
y: 316 y: 316
anchors.right: parent.right anchors.right: parent.right
......
erase.png 0 → 100644
erase.png

7.39 KiB

...@@ -12,6 +12,13 @@ Window { ...@@ -12,6 +12,13 @@ Window {
color: "#eae1c3" color: "#eae1c3"
anchors.fill: parent anchors.fill: parent
focus: true focus: true
Keys.onPressed: {
switch (event.key) {
case Qt.Key_A:
grille.carre4.case2.chiffreText=qsTr("0")
break;
}
}
Grille { Grille {
id: grille id: grille
...@@ -38,6 +45,7 @@ Window { ...@@ -38,6 +45,7 @@ Window {
x: 425 x: 425
y: 620 y: 620
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
chiffreText: "6"
anchors.horizontalCenterOffset: 30 anchors.horizontalCenterOffset: 30
anchors.bottomMargin: 30 anchors.bottomMargin: 30
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
...@@ -48,6 +56,7 @@ Window { ...@@ -48,6 +56,7 @@ Window {
x: 392 x: 392
y: 620 y: 620
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
chiffreText: "5"
anchors.horizontalCenterOffset: -30 anchors.horizontalCenterOffset: -30
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 30 anchors.bottomMargin: 30
...@@ -58,6 +67,7 @@ Window { ...@@ -58,6 +67,7 @@ Window {
x: 331 x: 331
y: 620 y: 620
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
chiffreText: "4"
anchors.horizontalCenterOffset: -90 anchors.horizontalCenterOffset: -90
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 30 anchors.bottomMargin: 30
...@@ -68,6 +78,7 @@ Window { ...@@ -68,6 +78,7 @@ Window {
x: 266 x: 266
y: 620 y: 620
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
chiffreText: "3"
anchors.horizontalCenterOffset: -150 anchors.horizontalCenterOffset: -150
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 30 anchors.bottomMargin: 30
...@@ -78,6 +89,7 @@ Window { ...@@ -78,6 +89,7 @@ Window {
x: 201 x: 201
y: 620 y: 620
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
chiffreText: "2"
anchors.horizontalCenterOffset: -210 anchors.horizontalCenterOffset: -210
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 30 anchors.bottomMargin: 30
...@@ -88,6 +100,7 @@ Window { ...@@ -88,6 +100,7 @@ Window {
x: 98 x: 98
y: 627 y: 627
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
chiffreText: "1"
anchors.horizontalCenterOffset: -270 anchors.horizontalCenterOffset: -270
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 30 anchors.bottomMargin: 30
...@@ -98,6 +111,7 @@ Window { ...@@ -98,6 +111,7 @@ Window {
x: 545 x: 545
y: 627 y: 627
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
chiffreText: "7"
anchors.horizontalCenterOffset: 90 anchors.horizontalCenterOffset: 90
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 30 anchors.bottomMargin: 30
...@@ -108,6 +122,7 @@ Window { ...@@ -108,6 +122,7 @@ Window {
x: 621 x: 621
y: 627 y: 627
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
chiffreText: "8"
anchors.horizontalCenterOffset: 150 anchors.horizontalCenterOffset: 150
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 30 anchors.bottomMargin: 30
...@@ -128,10 +143,22 @@ Window { ...@@ -128,10 +143,22 @@ Window {
x: 781 x: 781
y: 620 y: 620
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
chiffreText: " "
anchors.horizontalCenterOffset: 270 anchors.horizontalCenterOffset: 270
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 30 anchors.bottomMargin: 30
}
Image {
id: gomme
anchors.fill: parent
source: "erase.png"
anchors.rightMargin: 2
anchors.leftMargin: 2
anchors.bottomMargin: 2
anchors.topMargin: 2
fillMode: Image.PreserveAspectFit
} }
} }
}
}
...@@ -4,5 +4,6 @@ ...@@ -4,5 +4,6 @@
<file>Case.qml</file> <file>Case.qml</file>
<file>Grille.qml</file> <file>Grille.qml</file>
<file>Carre.qml</file> <file>Carre.qml</file>
<file>erase.png</file>
</qresource> </qresource>
</RCC> </RCC>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment