easycoder 251013.1__tar.gz → 251016.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-251013.1 → easycoder-251016.1}/PKG-INFO +1 -1
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/__init__.py +1 -1
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/ec_keyboard.py +13 -3
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/ec_pyside.py +48 -11
- {easycoder-251013.1 → easycoder-251016.1}/.gitignore +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/LICENSE +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/README.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/backdrop.jpg +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/README.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/README.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/boolean.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/empty.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/ends.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/even.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/exists.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/greater.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/hasProperty.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/includes.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/is.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/less.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/list.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/none.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/not.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/numeric.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/object.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/odd.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/starts.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/conditions/string.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/add.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/append.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/assert.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/begin.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/clear.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/close.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/create.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/debug.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/decrement.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/delete.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/divide.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/exit.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/file.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/fork.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/get.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/go.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/gosub.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/if.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/import.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/increment.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/index.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/init.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/input.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/load.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/lock.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/log.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/module.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/multiply.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/negate.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/on.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/open.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/pop.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/post.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/print.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/push.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/put.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/read.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/release.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/replace.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/return.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/run.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/save.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/script.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/send.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/set.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/shuffle.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/split.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/stack.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/stop.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/system.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/take.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/toggle.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/truncate.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/unlock.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/use.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/variable.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/wait.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/while.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/keywords/write.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/arg.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/args.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/cos.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/datime.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/decode.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/element.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/elements.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/empty.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/encode.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/error.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/files.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/float.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/from.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/hash.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/index.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/integer.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/json.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/keys.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/left.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/length.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/lowercase.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/memory.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/modification.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/modulo.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/newline.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/now.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/position.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/property.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/random.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/right.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/sin.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/stringify.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/tab.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/tan.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/timestamp.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/today.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/trim.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/type.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/uppercase.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/value.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/core/values/weekday.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/README.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/keywords/attach.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/keywords/close.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/keywords/create.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/keywords/ellipse.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/keywords/image.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/keywords/move.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/keywords/on.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/keywords/rectangle.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/keywords/render.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/keywords/run.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/keywords/set.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/keywords/text.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/values/attribute.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/doc/graphics/values/window.md +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/close.png +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/ec_border.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/ec_classes.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/ec_compiler.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/ec_condition.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/ec_core.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/ec_handler.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/ec_program.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/ec_timestamp.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/ec_value.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/easycoder/tick.png +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/images/Semoigo Dawn.jpg +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/json/graphics-demo.json +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/plugins/ec_keyboard.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/plugins/ec_p100.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/plugins/ec_pyside6.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/plugins/points.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/plugins/sql.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/pyproject.toml +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/scripts/benchmark.ecs +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/scripts/ec_keyboard.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/scripts/fizzbuzz.ecs +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/scripts/hello.ecs +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/scripts/points.ecs +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/scripts/test.ecs +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/scripts/tests.ecs +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/test.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/testrc.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/testsql.py +0 -0
- {easycoder-251013.1 → easycoder-251016.1}/testui.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version:
|
|
3
|
+
Version: 251016.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>
|
|
@@ -158,6 +158,8 @@ class KeyboardView(QVBoxLayout):
|
|
|
158
158
|
for row in rows:
|
|
159
159
|
self.addLayout(row)
|
|
160
160
|
|
|
161
|
+
###############################################################################
|
|
162
|
+
# VirtualKeyboard Class
|
|
161
163
|
class VirtualKeyboard(QStackedWidget):
|
|
162
164
|
def __init__(self, keyboardType, buttonHeight, receiver, onFinished):
|
|
163
165
|
super().__init__()
|
|
@@ -173,6 +175,8 @@ class VirtualKeyboard(QStackedWidget):
|
|
|
173
175
|
self.addKeyboardLayout2()
|
|
174
176
|
self.addKeyboardLayout3()
|
|
175
177
|
|
|
178
|
+
###########################################################################
|
|
179
|
+
# Add the first keyboard layout (lowercase letters)
|
|
176
180
|
def addKeyboardLayout0(self):
|
|
177
181
|
rowList = []
|
|
178
182
|
|
|
@@ -214,7 +218,7 @@ class VirtualKeyboard(QStackedWidget):
|
|
|
214
218
|
KeyboardButton(self.buttonHeight * 1.5, self.buttonHeight, self.onClickNumbers, None, 'img/numbers.png'),
|
|
215
219
|
QSpacerItem(self.buttonHeight * 0.05, 0, QSizePolicy.Fixed, QSizePolicy.Minimum),
|
|
216
220
|
KeyboardButton(self.buttonHeight, self.buttonHeight, self.onClickChar, ","),
|
|
217
|
-
KeyboardButton(self.buttonHeight * 5, self.buttonHeight, self.onClickSpace, None, '
|
|
221
|
+
KeyboardButton(self.buttonHeight * 5, self.buttonHeight, self.onClickSpace, None, 'keyboard/space.png'),
|
|
218
222
|
KeyboardButton(self.buttonHeight, self.buttonHeight, self.onClickChar, "."),
|
|
219
223
|
QSpacerItem(self.buttonHeight * 0.05, 0, QSizePolicy.Fixed, QSizePolicy.Minimum),
|
|
220
224
|
KeyboardButton(self.buttonHeight * 1.5, self.buttonHeight, self.onClickEnter, None, 'img/enter.png'),
|
|
@@ -228,6 +232,8 @@ class VirtualKeyboard(QStackedWidget):
|
|
|
228
232
|
container.setLayout(keyboardView)
|
|
229
233
|
self.addWidget(container)
|
|
230
234
|
|
|
235
|
+
###########################################################################
|
|
236
|
+
# Add the second keyboard layout (uppercase letters)
|
|
231
237
|
def addKeyboardLayout1(self):
|
|
232
238
|
rowList = []
|
|
233
239
|
|
|
@@ -283,6 +289,8 @@ class VirtualKeyboard(QStackedWidget):
|
|
|
283
289
|
container.setLayout(keyboardView)
|
|
284
290
|
self.addWidget(container)
|
|
285
291
|
|
|
292
|
+
###########################################################################
|
|
293
|
+
# Add the third keyboard layout (numbers and symbols)
|
|
286
294
|
def addKeyboardLayout2(self):
|
|
287
295
|
rowList = []
|
|
288
296
|
|
|
@@ -320,11 +328,11 @@ class VirtualKeyboard(QStackedWidget):
|
|
|
320
328
|
KeyboardButton(self.buttonHeight * 1.5, self.buttonHeight, self.onClickLetters, None, 'img/letters.png'),
|
|
321
329
|
QSpacerItem(self.buttonHeight * 0.05, 0, QSizePolicy.Fixed, QSizePolicy.Minimum),
|
|
322
330
|
KeyboardButton(self.buttonHeight, self.buttonHeight, self.onClickChar, ","),
|
|
323
|
-
KeyboardButton(self.buttonHeight *
|
|
331
|
+
KeyboardButton(self.buttonHeight * 5.2, self.buttonHeight, self.onClickSpace, None, 'keyboard/space.png'),
|
|
324
332
|
KeyboardButton(self.buttonHeight, self.buttonHeight, self.onClickChar, "."),
|
|
325
333
|
QSpacerItem(self.buttonHeight * 0.05, 0, QSizePolicy.Fixed, QSizePolicy.Minimum),
|
|
326
334
|
KeyboardButton(self.buttonHeight * 1.5, self.buttonHeight, self.onClickEnter, None, 'img/enter.png'),
|
|
327
|
-
QSpacerItem(
|
|
335
|
+
QSpacerItem(10, 40, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
|
328
336
|
])
|
|
329
337
|
rowList.append(row4)
|
|
330
338
|
|
|
@@ -334,6 +342,8 @@ class VirtualKeyboard(QStackedWidget):
|
|
|
334
342
|
container.setLayout(keyboardView)
|
|
335
343
|
self.addWidget(container)
|
|
336
344
|
|
|
345
|
+
###########################################################################
|
|
346
|
+
# Add the fourth keyboard layout (additional symbols)
|
|
337
347
|
def addKeyboardLayout3(self):
|
|
338
348
|
rowList = []
|
|
339
349
|
|
|
@@ -114,7 +114,7 @@ class Graphics(Handler):
|
|
|
114
114
|
# (2) add {widget} to {layout}
|
|
115
115
|
# (3) add stretch {widget} to {layout}
|
|
116
116
|
# (4) add stretch to {layout}
|
|
117
|
-
# (5) add spacer {size} to {layout}
|
|
117
|
+
# (5) add spacer [size] {size} to {layout}
|
|
118
118
|
# (6) add {widget} at {col} {row} in {grid layout}
|
|
119
119
|
def k_add(self, command):
|
|
120
120
|
def addToLayout():
|
|
@@ -146,6 +146,7 @@ class Graphics(Handler):
|
|
|
146
146
|
|
|
147
147
|
elif token == 'spacer':
|
|
148
148
|
self.nextToken()
|
|
149
|
+
self.skip('size')
|
|
149
150
|
command['widget'] = 'spacer'
|
|
150
151
|
command['size'] = self.nextValue()
|
|
151
152
|
self.skip('to')
|
|
@@ -370,17 +371,18 @@ class Graphics(Handler):
|
|
|
370
371
|
return True
|
|
371
372
|
|
|
372
373
|
def k_createPushbutton(self, command):
|
|
373
|
-
text = ''
|
|
374
374
|
while True:
|
|
375
375
|
token = self.peek()
|
|
376
376
|
if token == 'text':
|
|
377
377
|
self.nextToken()
|
|
378
|
-
text = self.nextValue()
|
|
378
|
+
command['text'] = self.nextValue()
|
|
379
|
+
elif token == 'icon':
|
|
380
|
+
self.nextToken()
|
|
381
|
+
command['icon'] = self.nextValue()
|
|
379
382
|
elif token == 'size':
|
|
380
383
|
self.nextToken()
|
|
381
384
|
command['size'] = self.nextValue()
|
|
382
385
|
else: break
|
|
383
|
-
command['text'] = text
|
|
384
386
|
self.add(command)
|
|
385
387
|
return True
|
|
386
388
|
|
|
@@ -566,14 +568,27 @@ class Graphics(Handler):
|
|
|
566
568
|
return self.nextPC()
|
|
567
569
|
|
|
568
570
|
def r_createPushbutton(self, command, record):
|
|
569
|
-
text = self.getRuntimeValue(command['text'])
|
|
570
|
-
pushbutton = QPushButton(text)
|
|
571
|
-
pushbutton.setAccessibleName(text)
|
|
572
571
|
if 'size' in command:
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
572
|
+
size = self.getRuntimeValue(command['size'])
|
|
573
|
+
else: size = None
|
|
574
|
+
if 'icon' in command:
|
|
575
|
+
iconPath = self.getRuntimeValue(command['icon'])
|
|
576
|
+
pixmap = QPixmap(iconPath)
|
|
577
|
+
if pixmap.isNull():
|
|
578
|
+
RuntimeError(self.program, f'Icon not found: {iconPath}')
|
|
579
|
+
icon = pixmap.scaledToHeight(size if size != None else 24, Qt.SmoothTransformation)
|
|
580
|
+
pushbutton = QPushButton()
|
|
581
|
+
pushbutton.setIcon(icon)
|
|
582
|
+
pushbutton.setIconSize(icon.size())
|
|
583
|
+
elif 'text' in command:
|
|
584
|
+
text = self.getRuntimeValue(command['text'])
|
|
585
|
+
pushbutton = QPushButton(text)
|
|
586
|
+
pushbutton.setAccessibleName(text)
|
|
587
|
+
if size != None:
|
|
588
|
+
fm = pushbutton.fontMetrics()
|
|
589
|
+
c = pushbutton.contentsMargins()
|
|
590
|
+
w = fm.horizontalAdvance('m') * self.getRuntimeValue(command['size']) + c.left()+c.right()
|
|
591
|
+
pushbutton.setMaximumWidth(w)
|
|
577
592
|
self.putSymbolValue(record, pushbutton)
|
|
578
593
|
record['widget'] = pushbutton
|
|
579
594
|
return self.nextPC()
|
|
@@ -758,6 +773,21 @@ class Graphics(Handler):
|
|
|
758
773
|
def r_group(self, command):
|
|
759
774
|
return self.nextPC()
|
|
760
775
|
|
|
776
|
+
# hide {widget}
|
|
777
|
+
def k_hide(self, command):
|
|
778
|
+
if self.nextIsSymbol():
|
|
779
|
+
record = self.getSymbolRecord()
|
|
780
|
+
if self.isWidget(record['keyword']):
|
|
781
|
+
command['widget'] = record['name']
|
|
782
|
+
self.add(command)
|
|
783
|
+
return True
|
|
784
|
+
return False
|
|
785
|
+
|
|
786
|
+
def r_hide(self, command):
|
|
787
|
+
record = self.getVariable(command['widget'])
|
|
788
|
+
if 'widget' in record: record['widget'].hide()
|
|
789
|
+
return self.nextPC()
|
|
790
|
+
|
|
761
791
|
# Initialize the graphics environment
|
|
762
792
|
def k_init(self, command):
|
|
763
793
|
if self.nextIs('graphics'):
|
|
@@ -1218,6 +1248,10 @@ class Graphics(Handler):
|
|
|
1218
1248
|
command['result'] = self.getSymbolRecord()['name']
|
|
1219
1249
|
self.add(command)
|
|
1220
1250
|
return True
|
|
1251
|
+
elif self.isWidget(keyword):
|
|
1252
|
+
command['name'] = record['name']
|
|
1253
|
+
self.add(command)
|
|
1254
|
+
return True
|
|
1221
1255
|
return False
|
|
1222
1256
|
|
|
1223
1257
|
def r_show(self, command):
|
|
@@ -1271,6 +1305,9 @@ class Graphics(Handler):
|
|
|
1271
1305
|
if dialog.exec() == QDialog.Accepted:
|
|
1272
1306
|
record['result'] = dialog.textEdit.toPlainText()
|
|
1273
1307
|
else: record['result'] = dialog.value
|
|
1308
|
+
elif 'name' in command:
|
|
1309
|
+
record = self.getVariable(command['name'])
|
|
1310
|
+
if 'widget' in record: record['widget'].show()
|
|
1274
1311
|
return self.nextPC()
|
|
1275
1312
|
|
|
1276
1313
|
# Start the graphics
|
|
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
|
|
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
|