Commit f57fabd1 authored by Aleksei German's avatar Aleksei German
Browse files

Washing Machine Demo with programs

parent 862ab5a6
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.13.2, 2020-12-10T12:36:43. -->
<!-- Written by QtCreator 4.13.2, 2020-12-15T14:26:41. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
......
......@@ -38,32 +38,32 @@ Item {
Image {
id: currenticonoff
x: 12
y: 9
anchors.verticalCenter: parent.verticalCenter
source: "assets/currenticonoff.png"
anchors.horizontalCenter: parent.horizontalCenter
}
Image {
id: unlockediconon
x: 12
y: 9
anchors.verticalCenter: parent.verticalCenter
source: "assets/unlockediconon.png"
anchors.horizontalCenter: parent.horizontalCenter
fillMode: Image.PreserveAspectFit
}
Image {
id: lockediconon
x: 12
y: 9
anchors.verticalCenter: parent.verticalCenter
source: "assets/lockediconon.png"
anchors.horizontalCenter: parent.horizontalCenter
fillMode: Image.PreserveAspectFit
}
Image {
id: unlockediconoff
x: 12
y: 9
anchors.verticalCenter: parent.verticalCenter
source: "assets/unlockediconoff.png"
anchors.horizontalCenter: parent.horizontalCenter
fillMode: Image.PreserveAspectFit
}
......
......@@ -21,6 +21,8 @@ Item {
Presets {
id: presets
visible: true
Connections {
target: presets
onPresetSelected: {
......@@ -45,9 +47,24 @@ Item {
console.log("start run")
startRun()
}
onDetailsClicked: {
presetsScreen.state = "WashProgram"
}
}
}
Washprogram {
id: washprogram
visible: false
Connections {
target: washprogram
}
}
Connections {
target: presetsScreen
onVisibleChanged: {
......@@ -64,6 +81,7 @@ Item {
width: 47
height: 30
}
states: [
State {
name: "PresetsList"
......@@ -77,6 +95,11 @@ Item {
target: quickstart
visible: false
}
PropertyChanges {
target: washprogram
visible: false
}
},
State {
name: "Quickstart"
......@@ -90,6 +113,29 @@ Item {
target: presets
visible: false
}
PropertyChanges {
target: washprogram
visible: false
}
},
State {
name: "WashProgram"
PropertyChanges {
target: quickstart
visible: false
}
PropertyChanges {
target: presets
visible: false
}
PropertyChanges {
target: washprogram
visible: true
}
}
]
}
......
......@@ -6,7 +6,7 @@ Item {
height: 275
property int runDuration: 0
signal canceled
signal detailsClicked
signal applied
Flatbackground {
......@@ -17,24 +17,6 @@ Item {
height: 275
}
// QuickStartButton {
// id: quickstartcancel
// x: 93
// y: 103
// width: 86
// height: 86
// presetlabelText: "Details"
// }
// QuickStartButton {
// id: quickstartgo
// x: 217
// y: 103
// width: 86
// height: 86
// presetlabelText: "GO"
// }
Bigbutton {
id: quickstartdetails
x: 93
......@@ -48,7 +30,7 @@ Item {
onClicked: {
console.log("Details Clicked")
canceled()
detailsClicked()
}
}
}
......
......@@ -119,16 +119,16 @@ Item {
LockButton {
id: lockbuttoninstance
x: 10
y: 10
x: 16
y: 16
width: 43
height: 43
}
LockButton {
id: pausebuttoninstance
x: 345
y: 221
x: 342
y: 213
width: 43
height: 43
unlockedicononSource: "assets/resumeiconon.png"
......@@ -139,8 +139,8 @@ Item {
Smallbutton {
id: stopbuttoninstance
x: 7
y: 221
x: 16
y: 213
width: 43
height: 43
lockedicononSource: "assets/closeiconoff.png"
......@@ -149,7 +149,8 @@ Item {
Connections {
target: stopbuttoninstance
onClicked: stopRun()
onStateChanged: if (stopbuttoninstance.state == "complete") stopRun()
onStateChanged: if (stopbuttoninstance.state == "complete")
stopRun()
}
}
......@@ -199,10 +200,10 @@ Item {
visible: false
}
PropertyChanges {
target: lockbuttoninstance
enabled: true
}
// PropertyChanges {
// target: lockbuttoninstance
// enabled: true
// }
PropertyChanges {
target: stopbuttoninstance
......@@ -216,11 +217,11 @@ Item {
enabled: false
}
PropertyChanges {
target: finishingatlabel
x: 148
y: 255
}
// PropertyChanges {
// target: finishingatlabel
// x: 148
// y: 255
// }
},
State {
name: "finished"
......@@ -229,6 +230,12 @@ Item {
visible: true
text: qsTr("Ready!")
}
PropertyChanges {
target: pausebuttoninstance
opacity: 0.203
enabled: false
}
}
]
......@@ -266,7 +273,7 @@ Item {
/*##^##
Designer {
D{i:0;formeditorZoom:1.66;height:275;width:400}D{i:29}
D{i:0;formeditorZoom:1.66;height:275;width:400}D{i:30}
}
##^##*/
......@@ -5,7 +5,6 @@ Item {
id: smallbutton
width: 43
height: 43
// state: "default"
property alias currenticonoffY: currenticonoff.y
property alias currenticonoffX: currenticonoff.x
property alias lockedicononY: lockediconon.y
......@@ -18,8 +17,6 @@ Item {
id: multiSegmentArc
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
// x: -10
// y: -10
maskColor: "#333333"
timelineCurrentFrame: 0
arcSegment1Source: "assets/smallArcSegment1.png"
......@@ -139,6 +136,11 @@ Item {
target: currenticonoff
visible: true
}
PropertyChanges {
target: multiSegmentArc
visible: false
}
},
State {
name: "pressed"
......@@ -173,6 +175,11 @@ Item {
target: currenticonoff
visible: false
}
PropertyChanges {
target: multiSegmentArc
visible: true
}
},
State {
name: "complete"
......@@ -206,6 +213,11 @@ Item {
target: currenticonoff
visible: false
}
PropertyChanges {
target: multiSegmentArc
visible: true
}
}
]
}
......
......@@ -2,7 +2,7 @@ import QtQuick 2.8
Item {
id: washprogramgrid
width: 269
width: 270
height: 270
Image {
......@@ -18,9 +18,11 @@ Item {
y: 92
width: 85
height: 84
currentvaluelabelText: "60°"
washprogramiconY: 12
temperatureiconoffY: 12
currentvaluelabelText: "60°"
washprogramiconSource: "assets/washprogramicon.png"
temperatureiconoffSource: "assets/temperatureiconoff.png"
}
Washprogramitem {
......@@ -41,7 +43,7 @@ Item {
Washprogramitem {
id: washprogramtemp2
x: 86
y: 8
y: 7
width: 85
height: 84
currentvaluelabelText: "Heavy"
......@@ -56,7 +58,7 @@ Item {
Washprogramitem {
id: washprogramtemp3
x: 172
y: 8
y: 7
width: 85
height: 84
currentvaluelabelText: "Cotton"
......
......@@ -12,6 +12,8 @@ Item {
property alias washprogramiconSource: washprogramicon.source
property alias currentvaluelabelText: currentvaluelabel.text
property bool toggled
Image {
id: hoverbackground
x: 0
......@@ -37,7 +39,6 @@ Item {
font.pixelSize: 14
horizontalAlignment: Text.AlignHCenter
font.family: "Maven Pro"
// font.styleName: "Regular"
}
Image {
......@@ -58,11 +59,16 @@ Item {
MouseArea {
id: mouseArea
anchors.fill: parent
Connections {
target: mouseArea
onClicked: washprogramitem.toggled = true
}
}
states: [
State {
name: "default"
when: !mouseArea.pressed
when: !toggled && !mouseArea.pressed
PropertyChanges {
target: hoverbackground
......@@ -73,11 +79,45 @@ Item {
target: washprogramicon
visible: false
}
PropertyChanges {
target: temperatureiconoff
visible: true
}
},
State {
name: "pressed"
when: mouseArea.pressed
PropertyChanges {
target: hoverbackground
visible: true
}
PropertyChanges {
target: washprogramicon
visible: true
}
PropertyChanges {
target: temperatureiconoff
visible: false
}
},
State {
name: "active"
when: toggled
PropertyChanges {
target: hoverbackground
visible: false
}
PropertyChanges {
target: washprogramicon
visible: true
}
PropertyChanges {
target: temperatureiconoff
visible: false
......@@ -88,7 +128,7 @@ Item {
/*##^##
Designer {
D{i:0;height:84;width:85}D{i:6}
D{i:0;height:84;width:85}
}
##^##*/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment