import QtQuick 2.2 import Sailfish.Silica 1.0 // Stop ritardato: 3-19 ore, gli unici valori che questa macchina accetta. Dialog { id: dialog property int hours: api.delayHours canAccept: true onAccepted: { api.setDelayHours(hours) api.sendDelay() } Column { width: parent.width spacing: Theme.paddingMedium DialogHeader { title: qsTr("Delayed stop") acceptText: qsTr("Set") } Label { x: Theme.horizontalPageMargin width: parent.width - 2 * Theme.horizontalPageMargin wrapMode: Text.WordWrap color: Theme.secondaryColor font.pixelSize: Theme.fontSizeSmall text: qsTr("The machine will stop on its own after the chosen time, then resume its programme.") } Label { x: Theme.horizontalPageMargin width: parent.width - 2 * Theme.horizontalPageMargin horizontalAlignment: Text.AlignHCenter text: dialog.hours + " h" color: Theme.highlightColor font.pixelSize: Theme.fontSizeLarge } Slider { width: parent.width minimumValue: 3 maximumValue: 19 stepSize: 1 value: dialog.hours valueText: value + " h" onValueChanged: dialog.hours = Math.round(value) } } }