easycoder 250725.1__tar.gz → 250725.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-250725.1 → easycoder-250725.3}/PKG-INFO +2 -3
- {easycoder-250725.1 → easycoder-250725.3}/easycoder/__init__.py +1 -1
- {easycoder-250725.1 → easycoder-250725.3}/easycoder/ec_compiler.py +1 -1
- {easycoder-250725.1 → easycoder-250725.3}/easycoder/ec_core.py +1 -1
- {easycoder-250725.1 → easycoder-250725.3}/easycoder/ec_keyboard.py +22 -41
- {easycoder-250725.1 → easycoder-250725.3}/easycoder/ec_pyside.py +24 -12
- easycoder-250725.3/testrc.py +7 -0
- easycoder-250725.1/testrc.py +0 -5
- {easycoder-250725.1 → easycoder-250725.3}/.gitignore +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/LICENSE +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/README.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/backdrop.jpg +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/README.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/README.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/boolean.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/empty.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/ends.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/even.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/exists.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/greater.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/hasProperty.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/includes.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/is.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/less.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/list.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/none.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/not.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/numeric.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/object.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/odd.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/starts.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/conditions/string.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/add.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/append.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/assert.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/begin.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/clear.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/close.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/create.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/debug.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/decrement.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/delete.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/divide.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/exit.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/file.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/fork.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/get.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/go.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/gosub.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/if.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/import.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/increment.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/index.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/init.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/input.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/load.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/lock.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/log.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/module.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/multiply.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/negate.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/on.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/open.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/pop.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/post.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/print.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/push.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/put.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/read.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/release.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/replace.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/return.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/run.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/save.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/script.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/send.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/set.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/shuffle.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/split.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/stack.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/stop.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/system.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/take.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/toggle.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/truncate.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/unlock.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/use.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/variable.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/wait.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/while.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/keywords/write.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/arg.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/args.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/cos.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/datime.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/decode.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/element.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/elements.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/empty.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/encode.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/error.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/files.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/float.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/from.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/hash.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/index.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/integer.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/json.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/keys.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/left.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/length.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/lowercase.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/memory.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/modification.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/modulo.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/newline.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/now.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/position.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/property.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/random.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/right.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/sin.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/stringify.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/tab.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/tan.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/timestamp.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/today.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/trim.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/type.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/uppercase.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/value.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/core/values/weekday.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/README.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/keywords/attach.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/keywords/close.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/keywords/create.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/keywords/ellipse.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/keywords/image.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/keywords/move.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/keywords/on.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/keywords/rectangle.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/keywords/render.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/keywords/run.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/keywords/set.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/keywords/text.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/values/attribute.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/doc/graphics/values/window.md +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/easycoder/close.png +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/easycoder/ec_classes.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/easycoder/ec_condition.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/easycoder/ec_handler.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/easycoder/ec_program.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/easycoder/ec_timestamp.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/easycoder/ec_value.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/images/Semoigo Dawn.jpg +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/json/graphics-demo.json +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/plugins/ec_keyboard.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/plugins/ec_p100.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/plugins/ec_pyside6.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/plugins/points.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/plugins/sql.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/pyproject.toml +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/scripts/benchmark.ecs +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/scripts/config.ecg +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/scripts/ec_keyboard.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/scripts/findxr.ecs +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/scripts/fizzbuzz.ecs +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/scripts/hello.ecs +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/scripts/points.ecs +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/scripts/test.ecs +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/scripts/tests.ecs +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/test.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/testsql.py +0 -0
- {easycoder-250725.1 → easycoder-250725.3}/testui.py +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version: 250725.
|
|
3
|
+
Version: 250725.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>
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
-
License-File: LICENSE
|
|
10
9
|
Requires-Dist: pytz
|
|
11
10
|
Requires-Dist: requests
|
|
12
11
|
Requires-Dist: psutil
|
|
@@ -2196,7 +2196,7 @@ class Core(Handler):
|
|
|
2196
2196
|
fmt = self.getRuntimeValue(fmt)
|
|
2197
2197
|
value = {}
|
|
2198
2198
|
value['type'] = 'text'
|
|
2199
|
-
value['content'] = datetime.fromtimestamp(ts
|
|
2199
|
+
value['content'] = datetime.fromtimestamp(ts).strftime(fmt)
|
|
2200
2200
|
return value
|
|
2201
2201
|
|
|
2202
2202
|
def v_decode(self, v):
|
|
@@ -36,22 +36,13 @@ class Keyboard(Handler):
|
|
|
36
36
|
y = 0
|
|
37
37
|
painter.drawPixmap(x, y, self.pixmap)
|
|
38
38
|
|
|
39
|
-
# Draw the drag bar in the center
|
|
40
|
-
bar_width = 100
|
|
41
|
-
bar_height = 20
|
|
42
|
-
bar_x = (self.width() - bar_width) // 2
|
|
43
|
-
bar_y = (self.height() - bar_height) // 2
|
|
44
|
-
painter.setBrush(QColor("#bbb"))
|
|
45
|
-
painter.setPen(Qt.NoPen)
|
|
46
|
-
painter.drawRoundedRect(bar_x, bar_y, bar_width, bar_height, 10, 10)
|
|
47
|
-
|
|
48
39
|
def mousePressEvent(self, event):
|
|
49
40
|
x = self.width() - self.pixmap.width()
|
|
50
41
|
y = 0
|
|
51
42
|
iconRect = self.pixmap.rect().translated(x, y)
|
|
52
43
|
if iconRect.contains(event.pos()):
|
|
53
44
|
self.iconClicked.emit()
|
|
54
|
-
elif self.
|
|
45
|
+
elif QRect(0, 0, self.width(), self.height()).contains(event.pos()):
|
|
55
46
|
if hasattr(self.window().windowHandle(), 'startSystemMove'):
|
|
56
47
|
self.window().windowHandle().startSystemMove()
|
|
57
48
|
else:
|
|
@@ -71,26 +62,23 @@ class Keyboard(Handler):
|
|
|
71
62
|
def mouseReleaseEvent(self, event):
|
|
72
63
|
self._drag_active = False
|
|
73
64
|
super().mouseReleaseEvent(event)
|
|
74
|
-
|
|
75
|
-
def barRect(self):
|
|
76
|
-
bar_width = 100
|
|
77
|
-
bar_height = 20
|
|
78
|
-
bar_x = (self.width() - bar_width) // 2
|
|
79
|
-
bar_y = (self.height() - bar_height) // 2
|
|
80
|
-
return QRect(bar_x, bar_y, bar_width, bar_height)
|
|
81
65
|
|
|
82
|
-
def __init__(self, program, receiver, caller = None, parent=None):
|
|
66
|
+
def __init__(self, program, keyboardType, receiver, caller = None, parent=None):
|
|
83
67
|
super().__init__(program.compiler)
|
|
84
68
|
|
|
85
69
|
self.program = program
|
|
70
|
+
self.keyboardType = keyboardType
|
|
71
|
+
self.receiver = receiver
|
|
86
72
|
|
|
87
73
|
dialog = QDialog(caller)
|
|
74
|
+
self.dialog = dialog
|
|
88
75
|
|
|
89
76
|
# dialog.setWindowTitle('')
|
|
90
77
|
dialog.setWindowFlags(Qt.FramelessWindowHint)
|
|
91
78
|
dialog.setModal(True)
|
|
92
79
|
dialog.setFixedSize(500, 250)
|
|
93
80
|
dialog.setStyleSheet('background-color: white;border:1px solid black;')
|
|
81
|
+
self.originalText = receiver.getContent()
|
|
94
82
|
|
|
95
83
|
# Add drop shadow
|
|
96
84
|
shadow = QGraphicsDropShadowEffect(dialog)
|
|
@@ -103,9 +91,9 @@ class Keyboard(Handler):
|
|
|
103
91
|
layout = QVBoxLayout(dialog)
|
|
104
92
|
|
|
105
93
|
border = self.Border()
|
|
106
|
-
border.iconClicked.connect(
|
|
94
|
+
border.iconClicked.connect(self.reject)
|
|
107
95
|
layout.addWidget(border)
|
|
108
|
-
layout.addWidget(VirtualKeyboard(42, receiver, dialog.
|
|
96
|
+
layout.addWidget(VirtualKeyboard(keyboardType, 42, receiver, dialog.accept))
|
|
109
97
|
|
|
110
98
|
# Position at bottom of parent window
|
|
111
99
|
dialog.show() # Ensure geometry is calculated
|
|
@@ -117,17 +105,15 @@ class Keyboard(Handler):
|
|
|
117
105
|
|
|
118
106
|
dialog.exec()
|
|
119
107
|
|
|
108
|
+
def reject(self):
|
|
109
|
+
self.receiver.setContent(self.originalText)
|
|
110
|
+
self.dialog.reject()
|
|
120
111
|
|
|
121
112
|
class TextReceiver():
|
|
122
113
|
def __init__(self, field):
|
|
123
114
|
self.field = field
|
|
124
115
|
|
|
125
|
-
def
|
|
126
|
-
"""
|
|
127
|
-
Add a character to the text field.
|
|
128
|
-
|
|
129
|
-
:param char: A single character to add to the field.
|
|
130
|
-
"""
|
|
116
|
+
def addCharacter(self, char):
|
|
131
117
|
char = char.replace('&&', '&')
|
|
132
118
|
if len(char) == 1:
|
|
133
119
|
self.field.setText(self.field.text() + char)
|
|
@@ -135,20 +121,14 @@ class TextReceiver():
|
|
|
135
121
|
raise ValueError("Only single characters are allowed.")
|
|
136
122
|
|
|
137
123
|
def backspace(self):
|
|
138
|
-
"""
|
|
139
|
-
Remove the last character from the text field.
|
|
140
|
-
If the field is already empty, do nothing.
|
|
141
|
-
"""
|
|
142
124
|
current_text = self.field.text()
|
|
143
125
|
if current_text:
|
|
144
126
|
self.field.setText(current_text[:-1])
|
|
145
127
|
|
|
146
|
-
def
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
:return: The current text in the field.
|
|
151
|
-
"""
|
|
128
|
+
def setContent(self, text):
|
|
129
|
+
self.field.setText(text)
|
|
130
|
+
|
|
131
|
+
def getContent(self):
|
|
152
132
|
return self.field.text()
|
|
153
133
|
|
|
154
134
|
class KeyboardButton(QPushButton):
|
|
@@ -196,8 +176,9 @@ class KeyboardView(QVBoxLayout):
|
|
|
196
176
|
self.addLayout(row)
|
|
197
177
|
|
|
198
178
|
class VirtualKeyboard(QStackedWidget):
|
|
199
|
-
def __init__(self, buttonHeight, textField, onFinished
|
|
179
|
+
def __init__(self, keyboardType, buttonHeight, textField, onFinished):
|
|
200
180
|
super().__init__()
|
|
181
|
+
self.keyboardType = keyboardType
|
|
201
182
|
self.buttonHeight = buttonHeight
|
|
202
183
|
self.textField = textField
|
|
203
184
|
self.onFinished = onFinished
|
|
@@ -424,7 +405,7 @@ class VirtualKeyboard(QStackedWidget):
|
|
|
424
405
|
# Callback functions
|
|
425
406
|
def onClickChar(self,keycode):
|
|
426
407
|
# print(f"Key pressed: {keycode}")
|
|
427
|
-
self.textField.
|
|
408
|
+
self.textField.addCharacter(keycode)
|
|
428
409
|
|
|
429
410
|
def onClickShift(self,keycode):
|
|
430
411
|
# print("Shift pressed")
|
|
@@ -451,9 +432,9 @@ class VirtualKeyboard(QStackedWidget):
|
|
|
451
432
|
|
|
452
433
|
def onClickSpace(self,keycode):
|
|
453
434
|
# print("Space pressed")
|
|
454
|
-
self.textField.
|
|
435
|
+
self.textField.addCharacter(' ')
|
|
455
436
|
|
|
456
437
|
def onClickEnter(self,keycode):
|
|
457
438
|
# print("Enter pressed")
|
|
458
|
-
|
|
459
|
-
|
|
439
|
+
if self.keyboardType == 'multiline': self.textField.addCharacter('\n')
|
|
440
|
+
else: self.onFinished()
|
|
@@ -73,34 +73,44 @@ class Graphics(Handler):
|
|
|
73
73
|
# (2) add {widget} to {layout}
|
|
74
74
|
# (3) add stretch {widget} to {layout}
|
|
75
75
|
# (4) add stretch to {layout}
|
|
76
|
+
# (5) add spacer {size} to {layout}
|
|
76
77
|
def k_add(self, command):
|
|
77
78
|
def addToLayout():
|
|
78
79
|
if self.nextIsSymbol():
|
|
79
80
|
record = self.getSymbolRecord()
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
if record['keyword'] in ['layout', 'groupbox', 'element']:
|
|
82
|
+
command['layout'] = record['name']
|
|
83
|
+
self.add(command)
|
|
84
|
+
return True
|
|
83
85
|
return False
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if
|
|
87
|
-
# It's either (3) or (4)
|
|
86
|
+
|
|
87
|
+
token = self.peek()
|
|
88
|
+
if token == 'stretch':
|
|
88
89
|
self.nextToken()
|
|
89
|
-
|
|
90
|
+
# It's either (3) or (4)
|
|
91
|
+
if self.nextIs('to'):
|
|
90
92
|
# (4)
|
|
93
|
+
command['stretch'] = False
|
|
91
94
|
command['widget'] = 'stretch'
|
|
92
95
|
return addToLayout()
|
|
93
|
-
# (3)
|
|
94
96
|
if self.isSymbol():
|
|
97
|
+
# (3)
|
|
95
98
|
record = self.getSymbolRecord()
|
|
96
99
|
command['widget'] = record['name']
|
|
97
100
|
command['stretch'] = True
|
|
98
101
|
if self.nextIs('to'):
|
|
99
102
|
return addToLayout()
|
|
100
103
|
return False
|
|
104
|
+
|
|
105
|
+
elif token == 'spacer':
|
|
106
|
+
self.nextToken()
|
|
107
|
+
command['widget'] = 'spacer'
|
|
108
|
+
command['size'] = self.nextValue()
|
|
109
|
+
self.skip('to')
|
|
110
|
+
return addToLayout()
|
|
101
111
|
|
|
102
112
|
# Here it's either (1) or (2)
|
|
103
|
-
elif self.
|
|
113
|
+
elif self.nextIsSymbol():
|
|
104
114
|
record = self.getSymbolRecord()
|
|
105
115
|
if record['extra'] == 'gui':
|
|
106
116
|
if self.isWidget(record['keyword']):
|
|
@@ -134,12 +144,14 @@ class Graphics(Handler):
|
|
|
134
144
|
widget = command['widget']
|
|
135
145
|
if widget == 'stretch':
|
|
136
146
|
layoutRecord['widget'].addStretch()
|
|
147
|
+
elif widget == 'spacer':
|
|
148
|
+
layoutRecord['widget'].addSpacing(self.getRuntimeValue(command['size']))
|
|
137
149
|
else:
|
|
138
150
|
widgetRecord = self.getVariable(widget)
|
|
139
151
|
layoutRecord = self.getVariable(command['layout'])
|
|
140
152
|
widget = widgetRecord['widget']
|
|
141
153
|
layout = layoutRecord['widget']
|
|
142
|
-
stretch =
|
|
154
|
+
stretch = 'stretch' in command
|
|
143
155
|
if widgetRecord['keyword'] == 'layout':
|
|
144
156
|
if layoutRecord['keyword'] == 'groupbox':
|
|
145
157
|
if widgetRecord['keyword'] == 'layout':
|
|
@@ -432,7 +444,7 @@ class Graphics(Handler):
|
|
|
432
444
|
return self.nextPC()
|
|
433
445
|
|
|
434
446
|
def r_createLabel(self, command, record):
|
|
435
|
-
label = QLabel(self.getRuntimeValue(command['text']))
|
|
447
|
+
label = QLabel(str(self.getRuntimeValue(command['text'])))
|
|
436
448
|
if 'size' in command:
|
|
437
449
|
fm = label.fontMetrics()
|
|
438
450
|
c = label.contentsMargins()
|
easycoder-250725.1/testrc.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|