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

WashingMachine: Time tracking update

parent e60e8f52
......@@ -66,6 +66,7 @@ Item {
}
onApplied: {
presetsScreen.runDuration = washprogram.runDuration
startRun()
}
}
......
......@@ -103,7 +103,7 @@ Item {
width: 104
height: 15
color: "#B8B8B8"
text: "Finishing At: " + hours + ":" + minutes
text: "Finishing At: " + hoursStr + ":" + minutesStr
font.pixelSize: 12
horizontalAlignment: Text.AlignHCenter
font.family: "Maven Pro"
......@@ -112,6 +112,9 @@ Item {
property int subminutes: datetimeinstance_running.currentMinuteInt + logic.minutesLeft
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)
}
Timedate {
......
......@@ -38,6 +38,10 @@ Item {
repeat: true
onTriggered: {
updateTime()
}
function updateTime() {
var currentDate = new Date()
timeContainer.hrsInt = currentDate.getHours()
if (timeContainer.hrsInt < 10) timeContainer.hrsStr = "0" + timeContainer.hrsInt
......@@ -49,4 +53,8 @@ Item {
}
}
}
Component.onCompleted: {
timer.updateTime()
}
}
......@@ -75,6 +75,10 @@ Item {
}
}
function getTimeValue() : int {
return timeModel.get(activeTimeId).value
}
function getColorName(modelIndex : int) : string {
if (modelIndex < colorModel.count)
return colorModel.get(modelIndex).name
......@@ -496,19 +500,24 @@ Item {
id: timeModel
ListElement {
name: "30"
name: "30 min."
value: 30
}
ListElement {
name: "60"
name: "60 min."
value: 60
}
ListElement {
name: "90"
name: "90 min."
value: 90
}
ListElement {
name: "120"
name: "120 min."
value: 120
}
ListElement {
name: "180"
name: "180 min."
value: 180
}
}
......
......@@ -10,6 +10,8 @@ Item {
signal resetSettings
property int runDuration: washProgramSettings.timeInt
Flatbackground {
id: backgroundfull
x: 0
......
......@@ -20,6 +20,8 @@ Item {
property string spinStr: programList.getSpinName(programList.activeSpinId)
property string waterStr: programList.getWaterName(programList.activeWaterId)
property int timeInt: programList.getTimeValue()
signal resetSettingsScreen
onActiveItemChanged: {
......
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