easycoder 250423.2__tar.gz → 250424.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of easycoder might be problematic. Click here for more details.
- {easycoder-250423.2 → easycoder-250424.3}/PKG-INFO +1 -1
- {easycoder-250423.2 → easycoder-250424.3}/config.ecs +88 -19
- {easycoder-250423.2 → easycoder-250424.3}/easycoder/__init__.py +1 -1
- {easycoder-250423.2 → easycoder-250424.3}/easycoder/ec_core.py +1 -1
- {easycoder-250423.2 → easycoder-250424.3}/easycoder/ec_pyside6.py +108 -61
- easycoder-250424.3/test.py +52 -0
- easycoder-250423.2/test.py +0 -52
- {easycoder-250423.2 → easycoder-250424.3}/.gitignore +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/LICENSE +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/README.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/config.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/README.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/README.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/boolean.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/empty.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/ends.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/even.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/exists.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/greater.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/hasProperty.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/includes.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/is.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/less.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/list.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/none.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/not.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/numeric.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/object.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/odd.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/starts.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/conditions/string.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/add.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/append.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/assert.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/begin.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/clear.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/close.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/create.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/debug.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/decrement.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/delete.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/divide.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/exit.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/file.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/fork.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/get.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/go.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/gosub.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/if.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/import.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/increment.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/index.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/init.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/input.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/load.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/lock.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/log.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/module.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/multiply.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/negate.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/open.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/pop.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/post.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/print.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/push.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/put.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/read.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/release.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/replace.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/return.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/run.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/save.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/script.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/set.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/split.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/stack.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/stop.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/system.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/take.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/toggle.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/truncate.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/unlock.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/variable.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/wait.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/while.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/keywords/write.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/arg.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/args.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/cos.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/datime.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/decode.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/element.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/elements.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/empty.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/encode.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/error.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/files.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/float.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/from.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/hash.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/index.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/integer.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/json.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/keys.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/left.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/length.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/lowercase.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/memory.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/modification.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/modulo.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/newline.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/now.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/position.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/property.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/random.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/right.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/sin.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/stringify.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/tab.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/tan.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/timestamp.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/today.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/trim.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/type.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/uppercase.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/value.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/core/values/weekday.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/README.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/keywords/attach.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/keywords/close.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/keywords/create.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/keywords/ellipse.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/keywords/image.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/keywords/move.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/keywords/on.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/keywords/rectangle.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/keywords/render.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/keywords/run.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/keywords/set.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/keywords/text.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/values/attribute.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/doc/graphics/values/window.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/easycoder/README.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/easycoder/ec_classes.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/easycoder/ec_compiler.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/easycoder/ec_condition.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/easycoder/ec_graphics.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/easycoder/ec_gutils.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/easycoder/ec_handler.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/easycoder/ec_program.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/easycoder/ec_timestamp.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/easycoder/ec_value.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/group.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/images/Semoigo Dawn.jpg +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/json/graphics-demo.json +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/ec_keyboard.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/ec_p100.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/ec_pyside6.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/keyboards/4-function.json +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/keyboards/4-function.png +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/keyboards/qwerty-0.json +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/keyboards/qwerty-0.png +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/keyboards/qwerty-1.json +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/keyboards/qwerty-1.png +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/keyboards/qwerty-2.json +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/keyboards/qwerty-2.png +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/keyboards/qwerty-3.json +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/keyboards/qwerty-3.png +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/plugins/points.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/pyproject.toml +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/scripts/README.md +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/scripts/benchmark.ecs +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/scripts/config.ecg +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/scripts/connect.ecg +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/scripts/ec_keyboard.py +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/scripts/findxr.ecs +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/scripts/fizzbuzz.ecs +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/scripts/hello.ecs +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/scripts/points.ecs +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/scripts/test.ecs +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/scripts/testg.ecg +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/scripts/tests.ecs +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/test.ecg +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/test.ecs +0 -0
- {easycoder-250423.2 → easycoder-250424.3}/test.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version:
|
|
3
|
+
Version: 250424.3
|
|
4
4
|
Summary: Rapid scripting in English
|
|
5
5
|
Keywords: compiler,scripting,prototyping,programming,coding,python,low code,hypertalk,computer language,learn to code
|
|
6
6
|
Author-email: Graham Trott <gtanyware@gmail.com>
|
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
use graphics
|
|
6
6
|
|
|
7
7
|
window Window
|
|
8
|
+
window Dialog
|
|
8
9
|
layout MainPanel
|
|
9
10
|
layout LeftPanel
|
|
10
11
|
layout RightPanel
|
|
11
12
|
layout DeviceHPanel
|
|
12
13
|
layout OuterLayout
|
|
13
14
|
layout Layout
|
|
15
|
+
layout VLayout
|
|
16
|
+
layout HLayout
|
|
14
17
|
groupbox Group
|
|
15
18
|
label Label
|
|
16
19
|
label MasterDeviceLabel
|
|
@@ -24,12 +27,16 @@
|
|
|
24
27
|
pushbutton UpdateSlaveButton
|
|
25
28
|
pushbutton DeleteFileButton
|
|
26
29
|
pushbutton ExitButton
|
|
27
|
-
pushbutton
|
|
30
|
+
pushbutton ScanSystemsButton
|
|
28
31
|
pushbutton RemoveSystemButton
|
|
29
32
|
pushbutton SaveHostButton
|
|
30
33
|
pushbutton RelayOffButton
|
|
31
34
|
pushbutton RelayOnButton
|
|
32
35
|
pushbutton SaveWidgetDataButton
|
|
36
|
+
pushbutton SelectHostButton
|
|
37
|
+
pushbutton OKButton
|
|
38
|
+
pushbutton CancelButton
|
|
39
|
+
lineinput LineInput
|
|
33
40
|
lineinput SSIDInput
|
|
34
41
|
lineinput PasswordInput
|
|
35
42
|
lineinput DeviceNameInput
|
|
@@ -42,16 +49,12 @@
|
|
|
42
49
|
combobox SystemsCombo
|
|
43
50
|
checkbox LEDInvertCheckbox
|
|
44
51
|
checkbox RelayInvertCheckbox
|
|
45
|
-
dialog Dialog
|
|
46
52
|
messagebox MessageBox
|
|
47
|
-
variable Name
|
|
48
|
-
variable Value
|
|
49
53
|
|
|
50
54
|
! debug step
|
|
51
55
|
|
|
52
56
|
log `Starting`
|
|
53
57
|
init graphics
|
|
54
|
-
create Window title `RBR-Now configurator` size 700 500
|
|
55
58
|
create MainPanel type QHBoxLayout
|
|
56
59
|
|
|
57
60
|
! Do the left-hand panel
|
|
@@ -105,9 +108,9 @@
|
|
|
105
108
|
add Layout to Group
|
|
106
109
|
create SystemsCombo
|
|
107
110
|
add stretch SystemsCombo to Layout
|
|
108
|
-
create
|
|
109
|
-
on click
|
|
110
|
-
add
|
|
111
|
+
create ScanSystemsButton text `Scan`
|
|
112
|
+
on click ScanSystemsButton go to ScanSystems
|
|
113
|
+
add ScanSystemsButton to Layout
|
|
111
114
|
create RemoveSystemButton text `Remove`
|
|
112
115
|
disable RemoveSystemButton
|
|
113
116
|
on click RemoveSystemButton go to RemoveSystem
|
|
@@ -228,20 +231,29 @@
|
|
|
228
231
|
|
|
229
232
|
add stretch to RightPanel
|
|
230
233
|
|
|
231
|
-
|
|
234
|
+
create Window title `RBR-Now configurator` size 700 500 layout MainPanel
|
|
235
|
+
show Window
|
|
232
236
|
|
|
233
237
|
start graphics
|
|
234
238
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
240
|
+
|
|
241
|
+
variable Config
|
|
242
|
+
variable Name
|
|
243
|
+
variable Value
|
|
244
|
+
variable ReturnValue
|
|
245
|
+
variable Title
|
|
246
|
+
variable Result
|
|
247
|
+
|
|
248
|
+
LoadConfigFile:
|
|
249
|
+
log `Load the config file`
|
|
250
|
+
load Config from `~/.rbr.conf`
|
|
251
|
+
if Config is empty put json `{}` into Config
|
|
241
252
|
stop
|
|
242
253
|
|
|
243
254
|
ResetConfigFile:
|
|
244
255
|
log `Reset the configuration file`
|
|
256
|
+
put json `{}` into Config
|
|
245
257
|
stop
|
|
246
258
|
|
|
247
259
|
ScanNetwork:
|
|
@@ -273,10 +285,23 @@ Exit:
|
|
|
273
285
|
close Window
|
|
274
286
|
exit
|
|
275
287
|
|
|
276
|
-
|
|
277
|
-
log `
|
|
278
|
-
|
|
279
|
-
|
|
288
|
+
ScanSystems:
|
|
289
|
+
log `Scan systems`
|
|
290
|
+
if Config does not have property `host-ssid`
|
|
291
|
+
begin
|
|
292
|
+
put `Enter host SSID` into Title
|
|
293
|
+
gosub to GetRequestedText
|
|
294
|
+
if Result is `OK` set property `host-ssid` of Config to ReturnValue
|
|
295
|
+
if Config does not have property `host-password`
|
|
296
|
+
begin
|
|
297
|
+
put `Enter host password` into Title
|
|
298
|
+
gosub to GetRequestedText
|
|
299
|
+
if Result is `OK` set property `host-password` of Config to ReturnValue
|
|
300
|
+
end
|
|
301
|
+
end
|
|
302
|
+
log Config
|
|
303
|
+
! create Dialog title `Select a system`
|
|
304
|
+
! show Layout in Dialog
|
|
280
305
|
stop
|
|
281
306
|
|
|
282
307
|
RemoveSystem:
|
|
@@ -307,3 +332,47 @@ RelayOn:
|
|
|
307
332
|
log `Turn the relay ON`
|
|
308
333
|
stop
|
|
309
334
|
|
|
335
|
+
! Get requested text
|
|
336
|
+
GetRequestedText:
|
|
337
|
+
create VLayout type QVBoxLayout
|
|
338
|
+
create HLayout type QHBoxLayout
|
|
339
|
+
add HLayout to VLayout
|
|
340
|
+
create LineInput size 40
|
|
341
|
+
add stretch LineInput to HLayout
|
|
342
|
+
create HLayout type QHBoxLayout
|
|
343
|
+
add HLayout to VLayout
|
|
344
|
+
create OKButton text `OK` size 6
|
|
345
|
+
on click OKButton
|
|
346
|
+
begin
|
|
347
|
+
put LineInput into ReturnValue
|
|
348
|
+
put `OK` into Result
|
|
349
|
+
close Dialog
|
|
350
|
+
return
|
|
351
|
+
end
|
|
352
|
+
add OKButton to HLayout
|
|
353
|
+
create CancelButton text `Cancel` size 6
|
|
354
|
+
on click CancelButton
|
|
355
|
+
begin
|
|
356
|
+
put `Cancel` into Result
|
|
357
|
+
close Dialog
|
|
358
|
+
return
|
|
359
|
+
end
|
|
360
|
+
add CancelButton to HLayout
|
|
361
|
+
create Dialog title Title layout VLayout size 300 80
|
|
362
|
+
center Dialog on Window
|
|
363
|
+
show Dialog
|
|
364
|
+
stop
|
|
365
|
+
|
|
366
|
+
SelectSystemFromList:
|
|
367
|
+
create Layout type QVBoxLayout
|
|
368
|
+
create SelectHostButton text `Select`
|
|
369
|
+
on click SelectHostButton
|
|
370
|
+
begin
|
|
371
|
+
log `Select Host SSID`
|
|
372
|
+
close Dialog
|
|
373
|
+
end
|
|
374
|
+
add stretch to Layout
|
|
375
|
+
add SelectHostButton to Layout
|
|
376
|
+
create Dialog title `Host SSID` layout Layout
|
|
377
|
+
show Dialog
|
|
378
|
+
return
|
|
@@ -717,7 +717,7 @@ class Core(Handler):
|
|
|
717
717
|
try:
|
|
718
718
|
with open(filename) as f: content = f.read()
|
|
719
719
|
except:
|
|
720
|
-
|
|
720
|
+
content = ''
|
|
721
721
|
try:
|
|
722
722
|
if filename.endswith('.json'): content = json.loads(content)
|
|
723
723
|
except:
|
|
@@ -30,7 +30,8 @@ from PySide6.QtWidgets import (
|
|
|
30
30
|
QSpacerItem,
|
|
31
31
|
QSizePolicy,
|
|
32
32
|
QDialog,
|
|
33
|
-
QMessageBox
|
|
33
|
+
QMessageBox,
|
|
34
|
+
QDialogButtonBox
|
|
34
35
|
)
|
|
35
36
|
|
|
36
37
|
class Graphics(Handler):
|
|
@@ -132,6 +133,31 @@ class Graphics(Handler):
|
|
|
132
133
|
else: layout.addWidget(widget)
|
|
133
134
|
return self.nextPC()
|
|
134
135
|
|
|
136
|
+
# Center one window on another
|
|
137
|
+
# center {window2} on {window1}
|
|
138
|
+
def k_center(self, command):
|
|
139
|
+
if self.nextIsSymbol():
|
|
140
|
+
record = self.getSymbolRecord()
|
|
141
|
+
if record['keyword'] == 'window':
|
|
142
|
+
command['window2'] = record['name']
|
|
143
|
+
if self.nextIs('on'):
|
|
144
|
+
if self.nextIsSymbol():
|
|
145
|
+
record = self.getSymbolRecord()
|
|
146
|
+
if record['keyword'] == 'window':
|
|
147
|
+
command['window1'] = record['name']
|
|
148
|
+
self.add(command)
|
|
149
|
+
return True
|
|
150
|
+
return False
|
|
151
|
+
|
|
152
|
+
def r_center(self, command):
|
|
153
|
+
window1 = self.getVariable(command['window1'])['window']
|
|
154
|
+
window2 = self.getVariable(command['window2'])['window']
|
|
155
|
+
geo1 = window1.geometry()
|
|
156
|
+
geo2 = window2.geometry()
|
|
157
|
+
geo2.moveCenter(geo1.center())
|
|
158
|
+
window2.setGeometry(geo2)
|
|
159
|
+
return self.nextPC()
|
|
160
|
+
|
|
135
161
|
# Declare a checkbox variable
|
|
136
162
|
def k_checkbox(self, command):
|
|
137
163
|
return self.compileVariable(command, False)
|
|
@@ -140,6 +166,7 @@ class Graphics(Handler):
|
|
|
140
166
|
return self.nextPC()
|
|
141
167
|
|
|
142
168
|
# Close a window
|
|
169
|
+
# close {window}
|
|
143
170
|
def k_close(self, command):
|
|
144
171
|
if self.nextIsSymbol():
|
|
145
172
|
record = self.getSymbolRecord()
|
|
@@ -165,24 +192,30 @@ class Graphics(Handler):
|
|
|
165
192
|
command['title'] = 'Default'
|
|
166
193
|
x = None
|
|
167
194
|
y = None
|
|
168
|
-
w = 640
|
|
169
|
-
h = 480
|
|
195
|
+
w = self.compileConstant(640)
|
|
196
|
+
h = self.compileConstant(480)
|
|
170
197
|
while True:
|
|
171
198
|
token = self.peek()
|
|
172
|
-
if token in ['title', 'at', 'size']:
|
|
199
|
+
if token in ['title', 'at', 'size', 'layout']:
|
|
173
200
|
self.nextToken()
|
|
174
201
|
if token == 'title': command['title'] = self.nextValue()
|
|
175
202
|
elif token == 'at':
|
|
176
203
|
x = self.nextValue()
|
|
177
204
|
y = self.nextValue()
|
|
178
205
|
elif token == 'size':
|
|
179
|
-
|
|
180
|
-
|
|
206
|
+
w = self.nextValue()
|
|
207
|
+
h = self.nextValue()
|
|
208
|
+
elif token == 'layout':
|
|
209
|
+
if self.nextIsSymbol():
|
|
210
|
+
record = self.getSymbolRecord()
|
|
211
|
+
if record['keyword'] == 'layout':
|
|
212
|
+
command['layout'] = record['name']
|
|
213
|
+
else: return False
|
|
181
214
|
else: break
|
|
182
|
-
command['w'] = self.compileConstant(w)
|
|
183
|
-
command['h'] = self.compileConstant(h)
|
|
184
215
|
command['x'] = x
|
|
185
216
|
command['y'] = y
|
|
217
|
+
command['w'] = w
|
|
218
|
+
command['h'] = h
|
|
186
219
|
self.add(command)
|
|
187
220
|
return True
|
|
188
221
|
|
|
@@ -260,38 +293,50 @@ class Graphics(Handler):
|
|
|
260
293
|
return True
|
|
261
294
|
|
|
262
295
|
def k_createDialog(self, command):
|
|
263
|
-
if self.peek() == '
|
|
296
|
+
if self.peek() == 'on':
|
|
264
297
|
self.nextToken()
|
|
265
|
-
|
|
266
|
-
|
|
298
|
+
if self.nextIsSymbol():
|
|
299
|
+
command['window'] = self.getSymbolRecord()['name']
|
|
300
|
+
else: command['window'] = None
|
|
301
|
+
title = ''
|
|
302
|
+
while True:
|
|
303
|
+
if self.peek() == 'title':
|
|
304
|
+
self.nextToken()
|
|
305
|
+
title = self.nextValue()
|
|
306
|
+
elif self.peek() == 'layout':
|
|
307
|
+
self.nextToken()
|
|
308
|
+
if self.nextIsSymbol():
|
|
309
|
+
command['layout'] = self.getSymbolRecord()['name']
|
|
310
|
+
else: break
|
|
267
311
|
command['title'] = title
|
|
268
312
|
self.add(command)
|
|
269
313
|
return True
|
|
270
314
|
|
|
271
315
|
def k_createMessageBox(self, command):
|
|
272
|
-
if self.
|
|
316
|
+
if self.peek() == 'on':
|
|
317
|
+
self.nextToken()
|
|
273
318
|
if self.nextIsSymbol():
|
|
274
319
|
command['window'] = self.getSymbolRecord()['name']
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
return
|
|
320
|
+
else: command['window'] = None
|
|
321
|
+
style = 'question'
|
|
322
|
+
title = ''
|
|
323
|
+
message = ''
|
|
324
|
+
while True:
|
|
325
|
+
if self.peek() == 'style':
|
|
326
|
+
self.nextToken()
|
|
327
|
+
style = self.nextToken()
|
|
328
|
+
elif self.peek() == 'title':
|
|
329
|
+
self.nextToken()
|
|
330
|
+
title = self.nextValue()
|
|
331
|
+
elif self.peek() == 'message':
|
|
332
|
+
self.nextToken()
|
|
333
|
+
message = self.nextValue()
|
|
334
|
+
else: break
|
|
335
|
+
command['style'] = style
|
|
336
|
+
command['title'] = title
|
|
337
|
+
command['message'] = message
|
|
338
|
+
self.add(command)
|
|
339
|
+
return True
|
|
295
340
|
|
|
296
341
|
def k_create(self, command):
|
|
297
342
|
if self.nextIsSymbol():
|
|
@@ -323,6 +368,9 @@ class Graphics(Handler):
|
|
|
323
368
|
if y == None: y = (self.screenHeight - h) / 2
|
|
324
369
|
else: y = self.getRuntimeValue(x)
|
|
325
370
|
window.setGeometry(x, y, w, h)
|
|
371
|
+
container = QWidget()
|
|
372
|
+
container.setLayout(self.getVariable(command['layout'])['widget'])
|
|
373
|
+
window.setCentralWidget(container)
|
|
326
374
|
record['window'] = window
|
|
327
375
|
return self.nextPC()
|
|
328
376
|
|
|
@@ -347,7 +395,7 @@ class Graphics(Handler):
|
|
|
347
395
|
if 'size' in command:
|
|
348
396
|
fm = label.fontMetrics()
|
|
349
397
|
c = label.contentsMargins()
|
|
350
|
-
w = fm.horizontalAdvance('
|
|
398
|
+
w = fm.horizontalAdvance('m') * self.getRuntimeValue(command['size']) +c.left()+c.right()
|
|
351
399
|
label.setMaximumWidth(w)
|
|
352
400
|
record['widget'] = label
|
|
353
401
|
return self.nextPC()
|
|
@@ -357,7 +405,7 @@ class Graphics(Handler):
|
|
|
357
405
|
if 'size' in command:
|
|
358
406
|
fm = pushbutton.fontMetrics()
|
|
359
407
|
c = pushbutton.contentsMargins()
|
|
360
|
-
w = fm.horizontalAdvance('
|
|
408
|
+
w = fm.horizontalAdvance('m') * self.getRuntimeValue(command['size']) +c.left()+c.right()
|
|
361
409
|
pushbutton.setMaximumWidth(w)
|
|
362
410
|
record['widget'] = pushbutton
|
|
363
411
|
return self.nextPC()
|
|
@@ -386,8 +434,14 @@ class Graphics(Handler):
|
|
|
386
434
|
return self.nextPC()
|
|
387
435
|
|
|
388
436
|
def r_createDialog(self, command, record):
|
|
437
|
+
layout = self.getVariable(command['layout'])['widget']
|
|
389
438
|
dialog = QDialog()
|
|
390
439
|
dialog.setWindowTitle(self.getRuntimeValue(command['title']))
|
|
440
|
+
dialog.buttonBox = QDialogButtonBox((QDialogButtonBox.Ok | QDialogButtonBox.Cancel))
|
|
441
|
+
dialog.buttonBox.accepted.connect(dialog.accept)
|
|
442
|
+
dialog.buttonBox.rejected.connect(dialog.reject)
|
|
443
|
+
layout.addWidget(dialog.buttonBox)
|
|
444
|
+
dialog.setLayout(layout)
|
|
391
445
|
record['dialog'] = dialog
|
|
392
446
|
return self.nextPC()
|
|
393
447
|
|
|
@@ -601,22 +655,17 @@ class Graphics(Handler):
|
|
|
601
655
|
groupbox.setFixedHeight(self.getRuntimeValue(command['value']))
|
|
602
656
|
return self.nextPC()
|
|
603
657
|
|
|
604
|
-
#
|
|
605
|
-
# show {
|
|
606
|
-
# show {
|
|
658
|
+
# show {window}
|
|
659
|
+
# show {dialog}
|
|
660
|
+
# show {messagebox} giving {result}}
|
|
607
661
|
def k_show(self, command):
|
|
608
662
|
if self.nextIsSymbol():
|
|
609
663
|
record = self.getSymbolRecord()
|
|
610
664
|
keyword = record['keyword']
|
|
611
|
-
if keyword == '
|
|
612
|
-
command['
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
record = self.getSymbolRecord()
|
|
616
|
-
if record['keyword'] == 'window':
|
|
617
|
-
command['window'] = record['name']
|
|
618
|
-
self.add(command)
|
|
619
|
-
return True
|
|
665
|
+
if keyword == 'window':
|
|
666
|
+
command['window'] = record['name']
|
|
667
|
+
self.add(command)
|
|
668
|
+
return True
|
|
620
669
|
elif keyword == 'dialog':
|
|
621
670
|
command['dialog'] = record['name']
|
|
622
671
|
self.add(command)
|
|
@@ -631,13 +680,7 @@ class Graphics(Handler):
|
|
|
631
680
|
return False
|
|
632
681
|
|
|
633
682
|
def r_show(self, command):
|
|
634
|
-
if '
|
|
635
|
-
dialog = self.getVariable(command['dialog'])['dialog']
|
|
636
|
-
b1 = QPushButton("ok",dialog)
|
|
637
|
-
b1.move(50,50)
|
|
638
|
-
dialog.setWindowModality(Qt.ApplicationModal)
|
|
639
|
-
dialog.exec_()
|
|
640
|
-
elif 'messagebox' in command:
|
|
683
|
+
if 'messagebox' in command:
|
|
641
684
|
data = self.getVariable(command['messagebox'])['data']
|
|
642
685
|
symbolRecord = self.getVariable(command['result'])
|
|
643
686
|
window = self.getVariable(data['window'])['window']
|
|
@@ -657,14 +700,12 @@ class Graphics(Handler):
|
|
|
657
700
|
v['type'] = 'text'
|
|
658
701
|
v['content'] = result
|
|
659
702
|
self.putSymbolValue(symbolRecord, v)
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
windowRecord = self.getVariable(command['window'])
|
|
663
|
-
window = windowRecord['window']
|
|
664
|
-
container = QWidget()
|
|
665
|
-
container.setLayout(layoutRecord['widget'])
|
|
666
|
-
window.setCentralWidget(container)
|
|
703
|
+
elif 'window' in command:
|
|
704
|
+
window = self.getVariable(command['window'])['window']
|
|
667
705
|
window.show()
|
|
706
|
+
elif 'dialog' in command:
|
|
707
|
+
dialog = self.getVariable(command['dialog'])['dialog']
|
|
708
|
+
dialog.exec()
|
|
668
709
|
return self.nextPC()
|
|
669
710
|
|
|
670
711
|
# Start the graphics
|
|
@@ -734,7 +775,13 @@ class Graphics(Handler):
|
|
|
734
775
|
def v_symbol(self, symbolRecord):
|
|
735
776
|
symbolRecord = self.getVariable(symbolRecord['name'])
|
|
736
777
|
keyword = symbolRecord['keyword']
|
|
737
|
-
if keyword == '
|
|
778
|
+
if keyword == 'lineinput':
|
|
779
|
+
lineinput = symbolRecord['widget']
|
|
780
|
+
v = {}
|
|
781
|
+
v['type'] = 'text'
|
|
782
|
+
v['content'] = lineinput.displayText()
|
|
783
|
+
return v
|
|
784
|
+
elif keyword == 'combobox':
|
|
738
785
|
combobox = symbolRecord['widget']
|
|
739
786
|
v = {}
|
|
740
787
|
v['type'] = 'text'
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
|
|
3
|
+
from PySide6.QtWidgets import (QApplication,
|
|
4
|
+
QDialog,
|
|
5
|
+
QMainWindow,
|
|
6
|
+
QPushButton,
|
|
7
|
+
QDialogButtonBox,
|
|
8
|
+
QVBoxLayout,
|
|
9
|
+
QLabel)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class MainWindow(QMainWindow):
|
|
13
|
+
def __init__(self):
|
|
14
|
+
super().__init__()
|
|
15
|
+
|
|
16
|
+
self.setWindowTitle("My App")
|
|
17
|
+
|
|
18
|
+
button = QPushButton("Press me for a dialog!")
|
|
19
|
+
button.clicked.connect(self.button_clicked)
|
|
20
|
+
self.setCentralWidget(button)
|
|
21
|
+
|
|
22
|
+
def button_clicked(self, s):
|
|
23
|
+
print("click", s)
|
|
24
|
+
|
|
25
|
+
dlg = QDialog()
|
|
26
|
+
dlg.setWindowTitle("HELLO!")
|
|
27
|
+
|
|
28
|
+
QBtn = (
|
|
29
|
+
QDialogButtonBox.Ok | QDialogButtonBox.Cancel
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
dlg.buttonBox = QDialogButtonBox(QBtn)
|
|
33
|
+
dlg.buttonBox.accepted.connect(dlg.accept)
|
|
34
|
+
dlg.buttonBox.rejected.connect(dlg.reject)
|
|
35
|
+
|
|
36
|
+
layout = QVBoxLayout()
|
|
37
|
+
message = QLabel("Something happened, is that OK?")
|
|
38
|
+
layout.addWidget(message)
|
|
39
|
+
layout.addWidget(dlg.buttonBox)
|
|
40
|
+
dlg.setLayout(layout)
|
|
41
|
+
|
|
42
|
+
result = dlg.exec()
|
|
43
|
+
print(result)
|
|
44
|
+
if result:
|
|
45
|
+
print("Success!")
|
|
46
|
+
else:
|
|
47
|
+
print("Cancel!")
|
|
48
|
+
|
|
49
|
+
app = QApplication(sys.argv)
|
|
50
|
+
window = MainWindow()
|
|
51
|
+
window.show()
|
|
52
|
+
app.exec()
|
easycoder-250423.2/test.py
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
from PySide6.QtWidgets import (QApplication, QMainWindow, QWidget,
|
|
3
|
-
QVBoxLayout, QHBoxLayout, QLabel,
|
|
4
|
-
QLineEdit, QFormLayout)
|
|
5
|
-
|
|
6
|
-
class InputWindow(QMainWindow):
|
|
7
|
-
def __init__(self):
|
|
8
|
-
super().__init__()
|
|
9
|
-
self.setWindowTitle("Two Column Input Form")
|
|
10
|
-
self.setGeometry(100, 100, 600, 300)
|
|
11
|
-
|
|
12
|
-
# Create main widget and layout
|
|
13
|
-
main_widget = QWidget()
|
|
14
|
-
self.setCentralWidget(main_widget)
|
|
15
|
-
main_layout = QHBoxLayout(main_widget)
|
|
16
|
-
|
|
17
|
-
# Create left column (wider)
|
|
18
|
-
left_column = QWidget()
|
|
19
|
-
left_layout = QFormLayout(left_column)
|
|
20
|
-
left_layout.setContentsMargins(0, 0, 0, 0) # Right margin larger for more width
|
|
21
|
-
left_layout.setSpacing(5)
|
|
22
|
-
|
|
23
|
-
# Add 4 label-input pairs to left column
|
|
24
|
-
left_labels = ["Name:", "Email:", "Address:", "Phone:"]
|
|
25
|
-
for label_text in left_labels:
|
|
26
|
-
line_edit = QLineEdit()
|
|
27
|
-
left_layout.addRow(QLabel(label_text), line_edit)
|
|
28
|
-
|
|
29
|
-
# Create right column (narrower)
|
|
30
|
-
right_column = QWidget()
|
|
31
|
-
right_layout = QFormLayout(right_column)
|
|
32
|
-
right_layout.setContentsMargins(0, 0, 0, 0)
|
|
33
|
-
right_layout.setSpacing(5)
|
|
34
|
-
|
|
35
|
-
# Add 4 label-input pairs to right column
|
|
36
|
-
right_labels = ["ID:", "Department:", "Position:", "Date:"]
|
|
37
|
-
for label_text in right_labels:
|
|
38
|
-
line_edit = QLineEdit()
|
|
39
|
-
right_layout.addRow(QLabel(label_text), line_edit)
|
|
40
|
-
|
|
41
|
-
# Add columns to main layout with stretch factors to control width
|
|
42
|
-
main_layout.addWidget(left_column, stretch=2) # Left column gets 2/3 of space
|
|
43
|
-
main_layout.addWidget(right_column, stretch=1) # Right column gets 1/3 of space
|
|
44
|
-
|
|
45
|
-
# Add some spacing between columns
|
|
46
|
-
main_layout.setSpacing(20)
|
|
47
|
-
|
|
48
|
-
if __name__ == "__main__":
|
|
49
|
-
app = QApplication(sys.argv)
|
|
50
|
-
window = InputWindow()
|
|
51
|
-
window.show()
|
|
52
|
-
sys.exit(app.exec())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|