-
Notifications
You must be signed in to change notification settings - Fork 1
/
WIZ.qml
188 lines (162 loc) · 5.72 KB
/
WIZ.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
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
Item {
anchors.fill: parent
Rectangle{
anchors{
top: parent.top
right: parent.right
}
width: 300
height: linkingCol.childrenRect.height + linkingCol.topPadding + linkingCol.bottomPadding
color: theme.background3
radius: theme.radius
Column{
id: linkingCol
spacing: 5
padding: 10
width: parent.width
Label{
font{
pixelSize: 16
family: theme.primaryfont
weight: Font.Bold
}
color: theme.primarytextcolor
text: "Linking Instructions"
}
Label{
font{
pixelSize: 14
family: theme.secondarytextcolor
}
width: parent.width - 20
color: theme.secondarytextcolor
textFormat: Text.MarkdownText
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text:
"* The Device must be on a 2.4ghz WIFI network. \n
* The local udp network communication must be active."
}
}
}
Column{
width: parent.width
height: parent.height
spacing: 10
Rectangle{
id: scanningItem
height: 50
width: childrenRect.width + 15
visible: service.controllers.length === 0
color: theme.background3
radius: theme.radius
BusyIndicator {
id: scanningIndicator
height: 30
anchors.verticalCenter: parent.verticalCenter
width: parent.height
Material.accent: "#88FFFFFF"
running: scanningItem.visible
}
Column{
width: childrenRect.width
anchors.left: scanningIndicator.right
anchors.verticalCenter: parent.verticalCenter
Text{
color: theme.secondarytextcolor
text: "Searching network for WIZ Devices..."
font.pixelSize: 14
font.family: "Montserrat"
}
Text{
color: theme.secondarytextcolor
text: "This may take several minutes..."
font.pixelSize: 14
font.family: "Montserrat"
}
}
}
Repeater{
model: service.controllers
delegate: Item {
id: root
width: 350
height: content.height
property var device: model.modelData.obj
Rectangle {
width: parent.width
height: parent.height
color: Qt.lighter(theme.background2, 1.3)
radius: 5
}
Column{
id: content
width: parent.width
padding: 15
spacing: 5
Row{
width: parent.width
height: childrenRect.height
Column{
id: leftCol
width: 260
height: childrenRect.height
spacing: 5
Text{
color: theme.primarytextcolor
text: device.modelName
font.pixelSize: 16
font.family: "Poppins"
font.weight: Font.Bold
}
Row{
spacing: 5
Text{
color: theme.secondarytextcolor
text: "Id: " + device.id
}
Text{
color: theme.secondarytextcolor
text: "|"
}
Text{
color: theme.secondarytextcolor
text: "Room ID: " + device.roomid
}
}
Row{
spacing: 5
Text{
color: theme.secondarytextcolor
text: "Ip Address: " + (device.ip != "" ? device.ip : "Unknown")
}
Text{
color: theme.secondarytextcolor
text: "|"
}
Text{
color: theme.secondarytextcolor
text: "Firmware Version: " + device.fwVersion
}
}
Text{
color: theme.secondarytextcolor
text: `Supports DreamView Protocol: `
}
Text{
color: theme.secondarytextcolor
text: ``
}
// Text{
// color: theme.warn
// width: parent.width
// visible: false
// wrapMode: Text.WrapAtWordBoundaryOrAnywhere
// text: `This device doesn't support Govee's Razer, or Dreamview protocols. SignalRGB is unable to control it...`
// }
}
}
}
}
}
}
}