-
Notifications
You must be signed in to change notification settings - Fork 0
/
P_Aerator.qml
83 lines (69 loc) · 1.7 KB
/
P_Aerator.qml
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
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.12
import "."
Page {
id: aeratorPage
title: qsTr("Aerator Status")
property int state: 3
width: MyStyle.panelWidth
height: MyStyle.panelHeight
//needed to restore the values of the components when Drawer re-inits the page
onFocusChanged: {
c_Aerator.c_state = MyGlobal.aeratorState
c_Aerator.c_value = MyGlobal.aeratorValue
c_Aerator.c_measure = MyGlobal.aeratorMeasure
c_Aerator.c_srcName = MyGlobal.aeratorSrcName
}
Component.onCompleted: {
console.log("Aerator LOADED")
drawState++
}
background: Rectangle {
color: MyStyle.backColor
}
Grid {
id: grid
anchors {
fill: parent;
margins: 0
}
columns: 3
columnSpacing: MyStyle.columnSpacing
leftPadding: MyStyle.columnSpacing
topPadding: MyStyle.rowSpacing
rowSpacing: MyStyle.rowSpacing
Comp {
id: c_Aerator
c_objectName: "c_Aerator"
c_value: qsTr("37")
c_measure: qsTr(" psi")
c_srcName: "Images/bubbles_100x100.png"
Connections {
target: MyGlobal
onAeratorStateChanged: {
c_Aerator.c_state = MyGlobal.aeratorState
}
}
Connections {
target: MyGlobal
onAeratorValueChanged: {
c_Aerator.c_value = MyGlobal.aeratorValue
}
}
Connections {
target: MyGlobal
onAeratorSrcNameChanged: {
c_Aerator.c_srcName = MyGlobal.aeratorSrcName
}
}
Connections {
target: MyGlobal
onAeratorMeasureChanged: {
c_Aerator.c_measure = MyGlobal.aeratorMeasure
}
}
}
}
}