easycoder 250724.3__tar.gz → 250725.2__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-250724.3 → easycoder-250725.2}/PKG-INFO +3 -2
- {easycoder-250724.3 → easycoder-250725.2}/easycoder/__init__.py +1 -1
- {easycoder-250724.3 → easycoder-250725.2}/easycoder/ec_keyboard.py +22 -41
- {easycoder-250724.3 → easycoder-250725.2}/easycoder/ec_pyside.py +1 -1
- {easycoder-250724.3 → easycoder-250725.2}/.gitignore +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/LICENSE +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/README.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/backdrop.jpg +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/README.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/README.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/boolean.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/empty.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/ends.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/even.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/exists.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/greater.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/hasProperty.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/includes.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/is.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/less.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/list.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/none.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/not.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/numeric.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/object.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/odd.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/starts.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/conditions/string.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/add.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/append.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/assert.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/begin.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/clear.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/close.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/create.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/debug.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/decrement.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/delete.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/divide.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/exit.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/file.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/fork.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/get.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/go.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/gosub.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/if.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/import.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/increment.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/index.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/init.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/input.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/load.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/lock.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/log.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/module.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/multiply.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/negate.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/on.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/open.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/pop.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/post.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/print.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/push.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/put.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/read.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/release.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/replace.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/return.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/run.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/save.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/script.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/send.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/set.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/shuffle.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/split.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/stack.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/stop.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/system.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/take.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/toggle.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/truncate.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/unlock.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/use.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/variable.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/wait.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/while.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/keywords/write.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/arg.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/args.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/cos.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/datime.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/decode.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/element.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/elements.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/empty.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/encode.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/error.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/files.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/float.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/from.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/hash.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/index.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/integer.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/json.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/keys.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/left.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/length.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/lowercase.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/memory.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/modification.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/modulo.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/newline.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/now.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/position.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/property.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/random.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/right.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/sin.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/stringify.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/tab.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/tan.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/timestamp.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/today.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/trim.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/type.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/uppercase.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/value.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/core/values/weekday.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/README.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/keywords/attach.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/keywords/close.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/keywords/create.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/keywords/ellipse.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/keywords/image.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/keywords/move.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/keywords/on.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/keywords/rectangle.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/keywords/render.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/keywords/run.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/keywords/set.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/keywords/text.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/values/attribute.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/doc/graphics/values/window.md +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/easycoder/close.png +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/easycoder/ec_classes.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/easycoder/ec_compiler.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/easycoder/ec_condition.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/easycoder/ec_core.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/easycoder/ec_handler.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/easycoder/ec_program.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/easycoder/ec_timestamp.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/easycoder/ec_value.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/images/Semoigo Dawn.jpg +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/json/graphics-demo.json +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/plugins/ec_keyboard.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/plugins/ec_p100.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/plugins/ec_pyside6.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/plugins/points.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/plugins/sql.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/pyproject.toml +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/scripts/benchmark.ecs +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/scripts/config.ecg +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/scripts/ec_keyboard.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/scripts/findxr.ecs +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/scripts/fizzbuzz.ecs +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/scripts/hello.ecs +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/scripts/points.ecs +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/scripts/test.ecs +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/scripts/tests.ecs +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/test.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/testrc.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/testsql.py +0 -0
- {easycoder-250724.3 → easycoder-250725.2}/testui.py +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version:
|
|
3
|
+
Version: 250725.2
|
|
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: psutil
|
|
@@ -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()
|
|
@@ -64,7 +64,7 @@ class Graphics(Handler):
|
|
|
64
64
|
QTimer.singleShot(100, self.afterShown)
|
|
65
65
|
|
|
66
66
|
def afterShown(self):
|
|
67
|
-
self.record['action']()
|
|
67
|
+
if 'action' in self.record: self.record['action']()
|
|
68
68
|
|
|
69
69
|
#############################################################################
|
|
70
70
|
# Keyword handlers
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|