-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTemperatureloggerScreen.qml
More file actions
249 lines (214 loc) · 4.52 KB
/
TemperatureloggerScreen.qml
File metadata and controls
249 lines (214 loc) · 4.52 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
import QtQuick 2.1
import qb.components 1.0
import BasicUIControls 1.0
import GraphUtils 1.0;
Screen {
id: temperatureloggerScreen
screenTitle: "Temperatuurlog afgelopen 24 uur";
Rectangle {
id: graphRect
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
}
color: colors.graphScreenBackground
height: isNxt ? 440 : 350
width: isNxt ? 992 : 768
Rectangle {
id: legendTemp
height: isNxt ? 25 : 20
width: isNxt ? 38 : 30
anchors {
baseline: graphRect.top
baselineOffset: isNxt ? -75 : -60
left: graphRect.left
leftMargin: isNxt ? 38 :30
}
color: "#0000FF"
opacity: 0.5
}
Text {
id: legendTempText
text: "actuele temperatuur"
anchors {
baseline: graphRect.top
baselineOffset: isNxt ? -55 : -45
left: legendTemp.right
leftMargin: isNxt ? 13 : 10
}
font {
family: qfont.bold.name
pixelSize: isNxt ? 18 : 15
}
color: colors.clockTileColor
}
Rectangle {
id: legendSetpoint
height: isNxt ? 25 : 20
width: isNxt ? 38 : 30
anchors {
baseline: graphRect.top
baselineOffset: isNxt ? -75 : -60
left: graphRect.left
leftMargin: isNxt ? 345 : 275
}
color: "#FF0000"
opacity: 0.5
}
Text {
id: legendSetpointText
text: "programma temperatuur"
anchors {
baseline: graphRect.top
baselineOffset: isNxt ? -55 : -45
left: legendSetpoint.right
leftMargin: isNxt ? 13 : 10
}
font {
family: qfont.bold.name
pixelSize: isNxt ? 18 : 15
}
color: colors.clockTileColor
}
Rectangle {
id: legendBuienradar
height: isNxt ? 25 : 20
width: isNxt ? 38 : 30
anchors {
baseline: graphRect.top
baselineOffset: isNxt ? -75 : -60
left: graphRect.left
leftMargin: isNxt ? 660 : 530
}
color: "#FFFF00"
opacity: 0.5
}
Text {
id: legendBuienradarText
text: "buitentemperatuur"
anchors {
baseline: graphRect.top
baselineOffset: isNxt ? -55 : -45
left: legendBuienradar.right
leftMargin: isNxt ? 13 : 10
}
font {
family: qfont.bold.name
pixelSize: isNxt ? 18 : 15
}
color: colors.clockTileColor
}
AreaGraphMod {
id: areaGraph
width: graphRect.width
height: graphRect.height
visible: true
anchors {
top: graphRect.top
left: graphRect.left
}
graphColor: "#0000FF"
graph2Color: "#FF0000"
graph3Color: "#FFFF00"
graphValues: app.arycurrentTemp
graph2Values: app.arycurrentSetpoint
graph3Values: app.arycurrentBuienradar
graphVisible: true
graph2Visible: true
graph3Visible: true
maxValue: 16 // 16 + 12 (offset) = max value is 28
}
Rectangle {
id: nowverticalline
height: isNxt ? graphRect.height - 37 : graphRect.height - 30
width: 1
anchors {
baseline: graphRect.top
left: graphRect.left
leftMargin: app.nowlinexcoordinate
}
color: colors.clockTileColor
}
Text {
id: nowleftlabelid
text: app.nowleftlabel
anchors {
baseline: nowverticalline.top
baselineOffset: -15
right: nowverticalline.left
rightMargin: 5
}
font {
family: qfont.bold.name
pixelSize: isNxt ? 18 : 15
}
color: colors.clockTileColor
}
Image {
id: leftarrow
source: "qrc:/tsc/icon_arrowLeft_shadow.png"
anchors {
baseline: nowverticalline.top
baselineOffset: isNxt ? -38 : -30
right: nowleftlabelid.left
rightMargin: 0
}
}
Text {
id: nowrightlabelid
text: app.nowrightlabel
anchors {
baseline: nowverticalline.top
baselineOffset: -15
left: nowverticalline.right
leftMargin: 5
}
font {
family: qfont.bold.name
pixelSize: isNxt ? 18 : 15
}
color: colors.clockTileColor
}
Image {
id: rightarrow
source: "qrc:/tsc/icon_arrowRight_shadow.png"
anchors {
baseline: nowverticalline.top
baselineOffset: isNxt ? -38 : -30
left: nowrightlabelid.right
leftMargin: 0
}
}
IconButton {
id: upButton;
width: isNxt ? 50 : 40
height: isNxt ? 25 : 20
iconSource: "qrc:/tsc/up.png"
anchors {
right: parent.right
baseline: nowverticalline.top
baselineOffset: 0
}
bottomClickMargin: 3
onClicked: {
app.tempOffset = app.tempOffset - 2;
app.shiftArrays(-2);
}
}
IconButton {
id: downButton;
width: isNxt ? 50 : 40
height: isNxt ? 25 : 20
iconSource: "qrc:/tsc/down.png"
anchors {
bottom: areaGraph.bottom
right: areaGraph.right
}
bottomClickMargin: 3
onClicked: {
app.tempOffset = app.tempOffset + 2;
app.shiftArrays(2);
}
}
}
}