|
8 | 8 | layout MainPanel
|
9 | 9 | layout LeftPanel
|
10 | 10 | layout RightPanel
|
| 11 | + layout DeviceHPanel |
11 | 12 | layout OuterLayout
|
12 | 13 | layout Layout
|
13 | 14 | groupbox Group
|
14 | 15 | label Label
|
15 | 16 | label MasterDeviceLabel
|
| 17 | + label RelayStateLabel |
| 18 | + label StatusLabel |
16 | 19 | pushbutton ResetConfigButton
|
17 | 20 | pushbutton ScanNetworkButton
|
18 | 21 | pushbutton SelectMasterButton
|
|
22 | 25 | pushbutton DeleteFileButton
|
23 | 26 | pushbutton ExitButton
|
24 | 27 | pushbutton SelectSystemButton
|
| 28 | + pushbutton SaveHostButton |
| 29 | + pushbutton RelayOffButton |
| 30 | + pushbutton RelayOnButton |
| 31 | + pushbutton SaveWidgetDataButton |
25 | 32 | lineinput SSIDInput
|
26 | 33 | lineinput PasswordInput
|
27 | 34 | lineinput DeviceNameInput
|
|
31 | 38 | lineinput DHT22PinInput
|
32 | 39 | lineinput PathInput
|
33 | 40 | listbox SlaveList
|
| 41 | + checkbox LEDInvertCheckbox |
| 42 | + checkbox RelayInvertCheckbox |
34 | 43 |
|
35 | 44 | ! debug step
|
36 | 45 |
|
37 | 46 | log `Starting`
|
38 | 47 | init graphics
|
39 |
| - create Window title `RBR-Now configurator` size 600 500 |
| 48 | + create Window title `RBR-Now configurator` size 700 500 |
40 | 49 | create MainPanel type QHBoxLayout
|
41 | 50 |
|
42 | 51 | create LeftPanel type QVBoxLayout
|
|
69 | 78 | add DeleteSlaveButton to LeftPanel
|
70 | 79 | on click DeleteSlaveButton go to DeleteSlave
|
71 | 80 |
|
| 81 | + add stretch to LeftPanel |
| 82 | + |
72 | 83 | create ExitButton text `Exit`
|
73 | 84 | add ExitButton to LeftPanel
|
74 | 85 | on click ExitButton go to Exit
|
75 | 86 |
|
76 |
| - add stretch to LeftPanel |
77 |
| - |
78 | 87 | create RightPanel type QVBoxLayout
|
79 | 88 | add stretch RightPanel to MainPanel
|
80 | 89 |
|
|
104 | 113 | add Label to Layout
|
105 | 114 | create PasswordInput size 40
|
106 | 115 | add PasswordInput to Layout
|
| 116 | + create SaveHostButton text `Save` |
| 117 | + on click SaveHostButton go to SaveHostInfo |
| 118 | + add SaveHostButton to Layout |
107 | 119 |
|
108 | 120 | ! Create the Master Device group
|
109 | 121 | create Group title `Master device`
|
|
128 | 140 | set the height of Group to 150
|
129 | 141 | add Group to RightPanel
|
130 | 142 |
|
| 143 | + create DeviceHPanel type QHBoxLayout |
| 144 | + add DeviceHPanel to Group |
| 145 | + |
131 | 146 | create OuterLayout type QVBoxLayout
|
132 |
| - add OuterLayout to Group |
| 147 | + add OuterLayout to DeviceHPanel |
133 | 148 |
|
134 | 149 | create Layout type QHBoxLayout
|
135 | 150 | add Layout to OuterLayout
|
|
149 | 164 | add Label to Layout
|
150 | 165 | create LEDPinInput size 5
|
151 | 166 | add LEDPinInput to Layout
|
| 167 | + create LEDInvertCheckbox text `Inverted` |
| 168 | + add LEDInvertCheckbox to Layout |
152 | 169 | add stretch to Layout
|
153 | 170 |
|
154 | 171 | create Layout type QHBoxLayout
|
|
157 | 174 | add Label to Layout
|
158 | 175 | create RelayPinInput size 5
|
159 | 176 | add RelayPinInput to Layout
|
| 177 | + create RelayInvertCheckbox text `Inverted` |
| 178 | + add RelayInvertCheckbox to Layout |
| 179 | + create RelayOffButton size 5 text `-` |
| 180 | + on click RelayOffButton go to RelayOff |
| 181 | + add RelayOffButton to Layout |
| 182 | + create RelayOnButton size 5 text `+` |
| 183 | + on click RelayOnButton go to RelayOn |
| 184 | + add RelayOnButton to Layout |
| 185 | + create RelayStateLabel size 5 text `???` |
| 186 | + add RelayStateLabel to Layout |
160 | 187 | add stretch to Layout
|
161 | 188 |
|
162 | 189 | create Layout type QHBoxLayout
|
|
174 | 201 | create PathInput size 60
|
175 | 202 | add PathInput to Layout
|
176 | 203 | add stretch to Layout
|
| 204 | + |
| 205 | + ! The 'Save' button |
| 206 | + create Layout type QVBoxLayout |
| 207 | + add Layout to DeviceHPanel |
| 208 | + create SaveWidgetDataButton text `Save` |
| 209 | + on click SaveWidgetDataButton go to SaveWidgetData |
| 210 | + add SaveWidgetDataButton to Layout |
| 211 | + |
| 212 | + create StatusLabel text `<font color="#00ff00">OK</font>` |
| 213 | + add StatusLabel to RightPanel |
177 | 214 |
|
178 | 215 | add stretch to RightPanel
|
179 | 216 |
|
@@ -219,3 +256,20 @@ Exit:
|
219 | 256 | SelectSystem:
|
220 | 257 | log `Select the system`
|
221 | 258 | stop
|
| 259 | + |
| 260 | +SaveHostInfo: |
| 261 | + log `Save the host information` |
| 262 | + stop |
| 263 | + |
| 264 | +SaveWidgetData: |
| 265 | + log `Save the widget data` |
| 266 | + stop |
| 267 | + |
| 268 | +RelayOff: |
| 269 | + log `Turn the relay OFF` |
| 270 | + stop |
| 271 | + |
| 272 | +RelayOn: |
| 273 | + log `Turn the relay ON` |
| 274 | + stop |
| 275 | + |
0 commit comments