Repository navigation
Expand file tree
/
Copy pathRetoonScreen.qml
More file actions
72 lines (64 loc) · 2.08 KB
/
Copy pathRetoonScreen.qml
File metadata and controls
72 lines (64 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
// ReToon setup screen: says what is there, and one button that puts
// everything in place and restarts the Toon into ReToon.
//
import QtQuick 2.1
import qb.components 1.0
Screen {
id: retoonScreen
screenTitle: "ReToon"
property bool busy: app.setupState === "working" || app.setupState === "restarting"
onShown: app.request("check")
Text {
id: intro
anchors {
top: parent.top
topMargin: isNxt ? 40 : 32
left: parent.left
leftMargin: isNxt ? 60 : 48
right: parent.right
rightMargin: anchors.leftMargin
}
font {
family: qfont.regular.name
pixelSize: isNxt ? 22 : 18
}
color: "#565656"
wrapMode: Text.WordWrap
text: "ReToon turns this Toon into an open wall panel and thermostat that works with Home Assistant. " +
"It is installed next to the original software: nothing is removed, and you can come back here " +
"from the ReToon web interface (Settings, System, Starting up).\n\n" +
"The button below puts ReToon in place, takes over the " + (isNxt ? "WiFi" : "network") + " settings of this Toon and restarts it. " +
"After the restart the address of the web interface is shown on the screen (tap the Home Assistant icon)."
}
Text {
id: statusLine
anchors {
top: intro.bottom
topMargin: isNxt ? 30 : 24
left: intro.left
right: intro.right
}
font {
family: qfont.semiBold.name
pixelSize: isNxt ? 24 : 19
}
color: app.setupState === "error" ? "#c0392b" : "#303030"
wrapMode: Text.WordWrap
text: app.setupText === "" ? "Looking at what is on this Toon..." :
(retoonScreen.busy && app.setupStep > 0 ? "Step " + app.setupStep + " of " + app.setupSteps + ": " : "") + app.setupText
}
StandardButton {
id: goButton
text: app.setupState === "ready" ? "Start ReToon" : "Install and start ReToon"
height: isNxt ? 50 : 40
enabled: !retoonScreen.busy && (app.setupState === "ready" || app.setupState === "needed" || app.setupState === "error")
anchors {
top: statusLine.bottom
topMargin: isNxt ? 30 : 24
left: intro.left
}
topClickMargin: 2
onClicked: app.request("install")
}
}