-
Notifications
You must be signed in to change notification settings - Fork 0
/
HomeView.qml
43 lines (36 loc) · 988 Bytes
/
HomeView.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
import QtQuick 2.0
Rectangle{
anchors.fill : parent
border.width: 2
border.color: "orange"
signal viewSelected(string cmdName)
Column{
id:mainMenu
spacing: 3
anchors.centerIn: parent
HomeMenuButton{
id:slViewButton
buttonLabel: "String Light Control"
commandName: "sl"
}
HomeMenuButton{
id:byViewButton
buttonLabel: "Backyard View"
commandName: "by"
}
RelayControlButton{
id:lightRelayControl
buttonLabel: "Living Room Light"
commandName: "lvRmLght"
relayAddress: "relaycontrol.local"
relayNumber:0
}
Component.onCompleted: {
byViewButton.buttonPressed.connect(menuHandler);
slViewButton.buttonPressed.connect(menuHandler)
}
function menuHandler(cmdName){
viewSelected(cmdName);
}
}
}