easycoder 250518.1__tar.gz → 250522.1__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-250518.1 → easycoder-250522.1}/PKG-INFO +3 -2
- easycoder-250522.1/backdrop.jpg +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/easycoder/__init__.py +1 -1
- {easycoder-250518.1 → easycoder-250522.1}/easycoder/ec_compiler.py +3 -2
- {easycoder-250518.1 → easycoder-250522.1}/easycoder/ec_core.py +9 -2
- {easycoder-250518.1 → easycoder-250522.1}/easycoder/ec_pyside.py +33 -12
- {easycoder-250518.1 → easycoder-250522.1}/testrc.py +2 -0
- easycoder-250518.1/ui.py +0 -84
- {easycoder-250518.1 → easycoder-250522.1}/.gitignore +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/LICENSE +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/README.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/README.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/README.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/boolean.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/empty.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/ends.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/even.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/exists.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/greater.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/hasProperty.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/includes.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/is.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/less.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/list.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/none.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/not.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/numeric.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/object.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/odd.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/starts.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/conditions/string.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/add.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/append.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/assert.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/begin.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/clear.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/close.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/create.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/debug.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/decrement.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/delete.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/divide.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/exit.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/file.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/fork.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/get.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/go.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/gosub.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/if.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/import.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/increment.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/index.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/init.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/input.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/load.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/lock.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/log.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/module.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/multiply.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/negate.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/open.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/pop.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/post.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/print.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/push.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/put.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/read.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/release.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/replace.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/return.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/run.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/save.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/script.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/set.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/split.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/stack.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/stop.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/system.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/take.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/toggle.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/truncate.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/unlock.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/variable.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/wait.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/while.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/keywords/write.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/arg.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/args.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/cos.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/datime.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/decode.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/element.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/elements.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/empty.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/encode.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/error.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/files.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/float.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/from.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/hash.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/index.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/integer.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/json.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/keys.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/left.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/length.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/lowercase.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/memory.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/modification.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/modulo.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/newline.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/now.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/position.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/property.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/random.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/right.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/sin.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/stringify.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/tab.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/tan.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/timestamp.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/today.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/trim.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/type.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/uppercase.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/value.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/core/values/weekday.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/README.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/keywords/attach.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/keywords/close.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/keywords/create.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/keywords/ellipse.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/keywords/image.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/keywords/move.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/keywords/on.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/keywords/rectangle.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/keywords/render.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/keywords/run.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/keywords/set.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/keywords/text.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/values/attribute.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/doc/graphics/values/window.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/easycoder/README.md +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/easycoder/ec_classes.py +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/easycoder/ec_condition.py +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/easycoder/ec_graphics.py +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/easycoder/ec_gutils.py +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/easycoder/ec_handler.py +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/easycoder/ec_program.py +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/easycoder/ec_timestamp.py +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/easycoder/ec_value.py +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/images/Semoigo Dawn.jpg +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/json/graphics-demo.json +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/plugins/ec_keyboard.py +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/plugins/ec_p100.py +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/plugins/ec_pyside6.py +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/plugins/points.py +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/pyproject.toml +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/scripts/benchmark.ecs +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/scripts/config.ecg +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/scripts/ec_keyboard.py +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/scripts/findxr.ecs +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/scripts/fizzbuzz.ecs +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/scripts/hello.ecs +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/scripts/points.ecs +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/scripts/test.ecs +0 -0
- {easycoder-250518.1 → easycoder-250522.1}/scripts/tests.ecs +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version:
|
|
3
|
+
Version: 250522.1
|
|
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>
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
License-File: LICENSE
|
|
9
10
|
Requires-Dist: pytz
|
|
10
11
|
Requires-Dist: requests
|
|
11
12
|
Requires-Dist: pyside6
|
|
Binary file
|
|
@@ -16,6 +16,7 @@ class Compiler:
|
|
|
16
16
|
self.program.compiler = self
|
|
17
17
|
self.addCommand = self.program.add
|
|
18
18
|
self.compileConstant = self.value.compileConstant
|
|
19
|
+
self.debugCompile = False
|
|
19
20
|
|
|
20
21
|
def getPC(self):
|
|
21
22
|
return len(self.program.code)
|
|
@@ -174,7 +175,7 @@ class Compiler:
|
|
|
174
175
|
self.rewindTo(mark)
|
|
175
176
|
else:
|
|
176
177
|
self.rewindTo(mark)
|
|
177
|
-
FatalError(self, f'Unable to compile this "{token}" command
|
|
178
|
+
FatalError(self, f'Unable to compile this "{token}" command')
|
|
178
179
|
|
|
179
180
|
# Compile a single command
|
|
180
181
|
def compileOne(self):
|
|
@@ -196,7 +197,7 @@ class Compiler:
|
|
|
196
197
|
while True:
|
|
197
198
|
token = self.tokens[self.index]
|
|
198
199
|
keyword = token.token
|
|
199
|
-
|
|
200
|
+
if self.debugCompile: print(self.script.lines[token.lino])
|
|
200
201
|
# print(f'{keyword} - {line}')
|
|
201
202
|
# if keyword != 'else':
|
|
202
203
|
if self.compileOne() == True:
|
|
@@ -202,7 +202,11 @@ class Core(Handler):
|
|
|
202
202
|
# Debug the script
|
|
203
203
|
def k_debug(self, command):
|
|
204
204
|
token = self.peek()
|
|
205
|
-
if token
|
|
205
|
+
if token == 'compile':
|
|
206
|
+
self.compiler.debugCompile = True
|
|
207
|
+
self.nextToken()
|
|
208
|
+
return True
|
|
209
|
+
elif token in ['step', 'stop', 'program', 'custom']:
|
|
206
210
|
command['mode'] = token
|
|
207
211
|
self.nextToken()
|
|
208
212
|
elif token == 'stack':
|
|
@@ -222,7 +226,9 @@ class Core(Handler):
|
|
|
222
226
|
return True
|
|
223
227
|
|
|
224
228
|
def r_debug(self, command):
|
|
225
|
-
if command['mode'] == '
|
|
229
|
+
if command['mode'] == 'compile':
|
|
230
|
+
self.program.debugStep = True
|
|
231
|
+
elif command['mode'] == 'step':
|
|
226
232
|
self.program.debugStep = True
|
|
227
233
|
elif command['mode'] == 'stop':
|
|
228
234
|
self.program.debugStep = False
|
|
@@ -1455,6 +1461,7 @@ class Core(Handler):
|
|
|
1455
1461
|
content = value['content'].split(self.getRuntimeValue(command['on']))
|
|
1456
1462
|
elements = len(content)
|
|
1457
1463
|
target['elements'] = elements
|
|
1464
|
+
target['index'] = 0
|
|
1458
1465
|
target['value'] = [None] * elements
|
|
1459
1466
|
|
|
1460
1467
|
for index, item in enumerate(content):
|
|
@@ -39,6 +39,7 @@ class Graphics(Handler):
|
|
|
39
39
|
|
|
40
40
|
def __init__(self, compiler):
|
|
41
41
|
Handler.__init__(self, compiler)
|
|
42
|
+
self.blocked = False
|
|
42
43
|
|
|
43
44
|
def getName(self):
|
|
44
45
|
return 'graphics'
|
|
@@ -83,15 +84,18 @@ class Graphics(Handler):
|
|
|
83
84
|
elif self.isSymbol():
|
|
84
85
|
record = self.getSymbolRecord()
|
|
85
86
|
if record['extra'] == 'gui':
|
|
86
|
-
if
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
if record['keyword'] in ['layout', 'groupbox', 'label', 'pushbutton', 'checkbox', 'lineinput', 'listbox', 'combobox']:
|
|
88
|
+
if self.peek() == 'to':
|
|
89
|
+
# (2)
|
|
90
|
+
record = self.getSymbolRecord()
|
|
91
|
+
command['widget'] = record['name']
|
|
92
|
+
self.nextToken()
|
|
93
|
+
return addToLayout()
|
|
94
|
+
else: return False
|
|
93
95
|
# (1)
|
|
94
|
-
|
|
96
|
+
value = self.getValue()
|
|
97
|
+
if value == None: return False
|
|
98
|
+
command['value'] = value
|
|
95
99
|
self.skip('to')
|
|
96
100
|
if self.nextIsSymbol():
|
|
97
101
|
record = self.getSymbolRecord()
|
|
@@ -705,10 +709,12 @@ class Graphics(Handler):
|
|
|
705
709
|
|
|
706
710
|
# set [the] width/height [of] {widget} [to] {value}
|
|
707
711
|
# set [the] layout of {window} to {layout}
|
|
712
|
+
# set [the] spacing of {layout} to {value}
|
|
708
713
|
# set [the] text [of] {label}/{button}/{lineinput} [to] {text}
|
|
709
714
|
# set [the] color [of] {label}/{button}/{lineinput} [to] {color}
|
|
710
715
|
# set [the] state [of] {checkbox} [to] {color}
|
|
711
716
|
# set {listbox} to {list}
|
|
717
|
+
# set blocked true/false
|
|
712
718
|
def k_set(self, command):
|
|
713
719
|
self.skip('the')
|
|
714
720
|
token = self.nextToken()
|
|
@@ -735,6 +741,16 @@ class Graphics(Handler):
|
|
|
735
741
|
command['layout'] = record['name']
|
|
736
742
|
self.add(command)
|
|
737
743
|
return True
|
|
744
|
+
elif token == 'spacing':
|
|
745
|
+
self.skip('of')
|
|
746
|
+
if self.nextIsSymbol():
|
|
747
|
+
record = self.getSymbolRecord()
|
|
748
|
+
if record['keyword'] == 'layout':
|
|
749
|
+
command['name'] = record['name']
|
|
750
|
+
self.skip('to')
|
|
751
|
+
command['value'] = self.nextValue()
|
|
752
|
+
self.add(command)
|
|
753
|
+
return True
|
|
738
754
|
elif token == 'text':
|
|
739
755
|
self.skip('of')
|
|
740
756
|
if self.nextIsSymbol():
|
|
@@ -776,6 +792,9 @@ class Graphics(Handler):
|
|
|
776
792
|
command['value'] = self.nextValue()
|
|
777
793
|
self.add(command)
|
|
778
794
|
return True
|
|
795
|
+
elif token == 'blocked':
|
|
796
|
+
self.blocked = True if self.nextToken() == 'true' else False
|
|
797
|
+
return True
|
|
779
798
|
elif self.isSymbol():
|
|
780
799
|
record = self.getSymbolRecord()
|
|
781
800
|
if record['keyword'] == 'listbox':
|
|
@@ -797,11 +816,13 @@ class Graphics(Handler):
|
|
|
797
816
|
widget.setFixedWidth(self.getRuntimeValue(command['value']))
|
|
798
817
|
elif what == 'layout':
|
|
799
818
|
window = self.getVariable(command['name'])['window']
|
|
800
|
-
layout = self.getVariable(command['layout'])
|
|
801
819
|
content = self.getVariable(command['layout'])['widget']
|
|
802
820
|
container = QWidget()
|
|
803
821
|
container.setLayout(content)
|
|
804
822
|
window.setCentralWidget(container)
|
|
823
|
+
elif what == 'spacing':
|
|
824
|
+
layout = self.getVariable(command['name'])['widget']
|
|
825
|
+
layout.setSpacing(self.getRuntimeValue(command['value']))
|
|
805
826
|
elif what == 'text':
|
|
806
827
|
record = self.getVariable(command['name'])
|
|
807
828
|
widget = self.getVariable(command['name'])['widget']
|
|
@@ -891,14 +912,14 @@ class Graphics(Handler):
|
|
|
891
912
|
def r_start(self, command):
|
|
892
913
|
def on_last_window_closed():
|
|
893
914
|
self.program.kill()
|
|
894
|
-
def
|
|
915
|
+
def init():
|
|
895
916
|
self.program.flush(self.nextPC())
|
|
896
917
|
def flush():
|
|
897
|
-
self.program.flushCB()
|
|
918
|
+
if not self.blocked: self.program.flushCB()
|
|
898
919
|
timer = QTimer()
|
|
899
920
|
timer.timeout.connect(flush)
|
|
900
921
|
timer.start(10)
|
|
901
|
-
QTimer.singleShot(500,
|
|
922
|
+
QTimer.singleShot(500, init)
|
|
902
923
|
self.app.lastWindowClosed.connect(on_last_window_closed)
|
|
903
924
|
self.app.exec()
|
|
904
925
|
|
easycoder-250518.1/ui.py
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
from PySide6.QtWidgets import (
|
|
2
|
-
QApplication, QMainWindow, QVBoxLayout, QLabel, QPushButton, QWidget, QHBoxLayout, QSpacerItem, QSizePolicy
|
|
3
|
-
)
|
|
4
|
-
from PySide6.QtGui import QPixmap, QFont, QPalette, QBrush
|
|
5
|
-
from PySide6.QtCore import Qt
|
|
6
|
-
import sys
|
|
7
|
-
|
|
8
|
-
class MainWindow(QMainWindow):
|
|
9
|
-
def __init__(self):
|
|
10
|
-
super().__init__()
|
|
11
|
-
self.setWindowTitle("Custom UI")
|
|
12
|
-
self.setFixedSize(600, 1024) # Set the window size to 600x1024
|
|
13
|
-
|
|
14
|
-
# Set the background image
|
|
15
|
-
palette = QPalette()
|
|
16
|
-
background_pixmap = QPixmap("/home/graham/dev/rbr/ui/main/backdrop.jpg")
|
|
17
|
-
palette.setBrush(QPalette.Window, QBrush(background_pixmap))
|
|
18
|
-
self.setPalette(palette)
|
|
19
|
-
|
|
20
|
-
# Main layout
|
|
21
|
-
main_widget = QWidget()
|
|
22
|
-
main_layout = QVBoxLayout(main_widget)
|
|
23
|
-
main_layout.setSpacing(10) # Set spacing between rows to 10
|
|
24
|
-
|
|
25
|
-
# Create 5 rows
|
|
26
|
-
for _ in range(5):
|
|
27
|
-
row = self.create_row()
|
|
28
|
-
main_layout.addWidget(row)
|
|
29
|
-
|
|
30
|
-
# Add a stretch below the last row
|
|
31
|
-
main_layout.addSpacerItem(QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding))
|
|
32
|
-
|
|
33
|
-
self.setCentralWidget(main_widget)
|
|
34
|
-
|
|
35
|
-
def create_row(self):
|
|
36
|
-
"""Create a single row with the specified elements."""
|
|
37
|
-
row_widget = QWidget()
|
|
38
|
-
row_widget.setFixedHeight(1024 // 12) # Each row is 1/12 the height of the window
|
|
39
|
-
row_widget.setStyleSheet("background-color: #ffffcc; border: 2px solid gray;") # Set background and border
|
|
40
|
-
|
|
41
|
-
row_layout = QHBoxLayout(row_widget)
|
|
42
|
-
row_layout.setContentsMargins(10, 0, 10, 0) # Add margins for spacing
|
|
43
|
-
row_layout.setSpacing(10) # Add spacing between elements
|
|
44
|
-
|
|
45
|
-
# Icon 1: Clock
|
|
46
|
-
clock_icon = QLabel()
|
|
47
|
-
clock_pixmap = QPixmap("/home/graham/dev/rbr/ui/main/clock.png").scaled(1024 // 12 * 3 // 4, 1024 // 12 * 3 // 4, Qt.KeepAspectRatio, Qt.SmoothTransformation)
|
|
48
|
-
clock_icon.setPixmap(clock_pixmap)
|
|
49
|
-
clock_icon.setStyleSheet("border-left: none; border-right: none;")
|
|
50
|
-
|
|
51
|
-
# Name label
|
|
52
|
-
name_label = QLabel("Room Name")
|
|
53
|
-
name_label.setAlignment(Qt.AlignVCenter | Qt.AlignLeft)
|
|
54
|
-
name_label.setStyleSheet("background-color: transparent; border: none;") # Transparent background
|
|
55
|
-
font = QFont()
|
|
56
|
-
font.setPointSize(16) # Adjust font size to fit at least 20 characters
|
|
57
|
-
font.setBold(True) # Make the font bold
|
|
58
|
-
name_label.setFont(font)
|
|
59
|
-
|
|
60
|
-
# Button with white text and blue background
|
|
61
|
-
button = QPushButton("20.0°C")
|
|
62
|
-
button.setStyleSheet("color: white; background-color: blue; border: none;")
|
|
63
|
-
button.setFixedSize(80, 40) # Adjust button size
|
|
64
|
-
button.setFont(font) # Use the same font as the label
|
|
65
|
-
|
|
66
|
-
# Icon 2: Edit
|
|
67
|
-
edit_icon = QLabel()
|
|
68
|
-
edit_pixmap = QPixmap("/home/graham/dev/rbr/ui/main/edit.png").scaled(1024 // 12 * 3 // 4, 1024 // 12 * 3 // 4, Qt.KeepAspectRatio, Qt.SmoothTransformation)
|
|
69
|
-
edit_icon.setPixmap(edit_pixmap)
|
|
70
|
-
edit_icon.setStyleSheet("border-left: none; border-right: none;")
|
|
71
|
-
|
|
72
|
-
# Add elements to the row layout
|
|
73
|
-
row_layout.addWidget(clock_icon)
|
|
74
|
-
row_layout.addWidget(name_label, 1) # Expand the name label to use all spare space
|
|
75
|
-
row_layout.addWidget(button)
|
|
76
|
-
row_layout.addWidget(edit_icon)
|
|
77
|
-
|
|
78
|
-
return row_widget
|
|
79
|
-
|
|
80
|
-
if __name__ == "__main__":
|
|
81
|
-
app = QApplication(sys.argv)
|
|
82
|
-
window = MainWindow()
|
|
83
|
-
window.show()
|
|
84
|
-
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
|
|
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
|
|
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
|
|
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
|
|
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
|