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

Washing Machine: Running Screen updates

parent 0486747e
......@@ -76,6 +76,7 @@ Item {
PropertyChanges {
target: runningScreen
visible: false
activated: false
}
},
State {
......@@ -99,6 +100,7 @@ Item {
PropertyChanges {
target: runningScreen
visible: false
activated: false
}
},
State {
......@@ -122,6 +124,7 @@ Item {
PropertyChanges {
target: runningScreen
visible: false
activated: false
}
},
State {
......@@ -145,6 +148,7 @@ Item {
PropertyChanges {
target: runningScreen
visible: true
activated: true
}
}
......
......@@ -8,6 +8,7 @@ Item {
clip: true
property int runDuration: 20
property bool activated: false
signal startRun
signal pauseRun
......@@ -108,10 +109,9 @@ Item {
horizontalAlignment: Text.AlignHCenter
font.family: "Maven Pro"
property int subminutes: datetimeinstance_running.currentMinuteInt + logic.minutesLeft
property int minutes: subminutes%60
property int hours: (datetimeinstance_running.currentHourInt + (subminutes/60))%24
property int minutes: subminutes % 60
property int hours: (datetimeinstance_running.currentHourInt + (subminutes / 60)) % 24
property string minutesStr: ((minutes < 10) ? ("0" + minutes) : minutes)
property string hoursStr: ((hours < 10) ? ("0" + hours) : hours)
......@@ -176,6 +176,19 @@ Item {
}
states: [
State {
name: "inactive"
when: !running.activated
PropertyChanges {
target: timeline
enabled: false
}
PropertyChanges {
target: text1
visible: false
}
},
State {
name: "running"
when: pausebuttoninstance.isLocked && !lockbuttoninstance.isLocked
......@@ -184,6 +197,11 @@ Item {
target: text1
visible: false
}
PropertyChanges {
target: logic
isRunning: true
}
},
State {
name: "paused"
......@@ -199,10 +217,15 @@ Item {
text: qsTr("Paused!")
visible: true
}
PropertyChanges {
target: logic
isRunning: false
}
},
State {
name: "locked"
when: lockbuttoninstance.isLocked
name: "runningLocked"
when: pausebuttoninstance.isLocked && lockbuttoninstance.isLocked
PropertyChanges {
target: text1
visible: false
......@@ -220,6 +243,37 @@ Item {
enabled: false
}
},
State {
name: "pausedLocked"
when: !pausebuttoninstance.isLocked && lockbuttoninstance.isLocked
PropertyChanges {
target: timeline
enabled: false
}
PropertyChanges {
target: text1
text: qsTr("Paused!")
visible: true
}
PropertyChanges {
target: logic
isRunning: false
}
PropertyChanges {
target: stopbuttoninstance
opacity: 0.203
enabled: false
}
PropertyChanges {
target: pausebuttoninstance
opacity: 0.203
enabled: false
}
},
State {
name: "finished"
PropertyChanges {
......@@ -270,7 +324,7 @@ Item {
/*##^##
Designer {
D{i:0;formeditorZoom:1.66;height:275;width:400}D{i:30}
D{i:0;formeditorZoom:1.66;height:275;width:400}D{i:40}
}
##^##*/
......@@ -9,6 +9,8 @@ Item {
signal runFinished
property alias isRunning: timer.running
property int secondsLeft: 0
Timer {
......
......@@ -10,11 +10,13 @@ Item {
signal startRun
property int runDuration: 20
property bool activated: false
Running {
id: running
runDuration: runningScreen.runDuration
activated: runningScreen.activated
Connections {
target: running
......
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