easycoder 250724.2__py2.py3-none-any.whl → 250724.3__py2.py3-none-any.whl
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/__init__.py +1 -1
- easycoder/ec_keyboard.py +7 -7
- easycoder/ec_pyside.py +18 -13
- {easycoder-250724.2.dist-info → easycoder-250724.3.dist-info}/METADATA +2 -3
- {easycoder-250724.2.dist-info → easycoder-250724.3.dist-info}/RECORD +8 -8
- {easycoder-250724.2.dist-info → easycoder-250724.3.dist-info}/WHEEL +1 -1
- {easycoder-250724.2.dist-info/licenses → easycoder-250724.3.dist-info}/LICENSE +0 -0
- {easycoder-250724.2.dist-info → easycoder-250724.3.dist-info}/entry_points.txt +0 -0
easycoder/__init__.py
CHANGED
easycoder/ec_keyboard.py
CHANGED
|
@@ -48,10 +48,10 @@ class Keyboard(Handler):
|
|
|
48
48
|
def mousePressEvent(self, event):
|
|
49
49
|
x = self.width() - self.pixmap.width()
|
|
50
50
|
y = 0
|
|
51
|
-
|
|
52
|
-
if
|
|
51
|
+
iconRect = self.pixmap.rect().translated(x, y)
|
|
52
|
+
if iconRect.contains(event.pos()):
|
|
53
53
|
self.iconClicked.emit()
|
|
54
|
-
elif self.
|
|
54
|
+
elif self._barRect().contains(event.pos()):
|
|
55
55
|
if hasattr(self.window().windowHandle(), 'startSystemMove'):
|
|
56
56
|
self.window().windowHandle().startSystemMove()
|
|
57
57
|
else:
|
|
@@ -72,19 +72,19 @@ class Keyboard(Handler):
|
|
|
72
72
|
self._drag_active = False
|
|
73
73
|
super().mouseReleaseEvent(event)
|
|
74
74
|
|
|
75
|
-
def
|
|
75
|
+
def _barRect(self):
|
|
76
76
|
bar_width = 100
|
|
77
77
|
bar_height = 20
|
|
78
78
|
bar_x = (self.width() - bar_width) // 2
|
|
79
79
|
bar_y = (self.height() - bar_height) // 2
|
|
80
80
|
return QRect(bar_x, bar_y, bar_width, bar_height)
|
|
81
81
|
|
|
82
|
-
def __init__(self, program, receiver, parent=None):
|
|
83
|
-
|
|
82
|
+
def __init__(self, program, receiver, caller = None, parent=None):
|
|
83
|
+
super().__init__(program.compiler)
|
|
84
84
|
|
|
85
85
|
self.program = program
|
|
86
86
|
|
|
87
|
-
dialog = QDialog()
|
|
87
|
+
dialog = QDialog(caller)
|
|
88
88
|
|
|
89
89
|
# dialog.setWindowTitle('')
|
|
90
90
|
dialog.setWindowFlags(Qt.FramelessWindowHint)
|
easycoder/ec_pyside.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
from .ec_handler import Handler
|
|
3
3
|
from .ec_classes import RuntimeError
|
|
4
|
-
from .ec_keyboard import Keyboard
|
|
4
|
+
from .ec_keyboard import Keyboard, TextReceiver
|
|
5
5
|
from PySide6.QtCore import Qt, QTimer
|
|
6
6
|
from PySide6.QtGui import QPixmap
|
|
7
7
|
from PySide6.QtWidgets import (
|
|
@@ -40,7 +40,7 @@ from PySide6.QtWidgets import (
|
|
|
40
40
|
class Graphics(Handler):
|
|
41
41
|
|
|
42
42
|
def __init__(self, compiler):
|
|
43
|
-
|
|
43
|
+
super().__init__(compiler)
|
|
44
44
|
self.blocked = False
|
|
45
45
|
self.runOnTick = 0
|
|
46
46
|
self.vkb = False
|
|
@@ -54,6 +54,18 @@ class Graphics(Handler):
|
|
|
54
54
|
def isWidget(self, keyword):
|
|
55
55
|
return keyword in ['layout', 'groupbox', 'label', 'pushbutton', 'checkbox', 'lineinput', 'listbox', 'combobox']
|
|
56
56
|
|
|
57
|
+
class ECDialog(QDialog):
|
|
58
|
+
def __init__(self, parent, record):
|
|
59
|
+
super().__init__(parent)
|
|
60
|
+
self.record = record
|
|
61
|
+
|
|
62
|
+
def showEvent(self, event):
|
|
63
|
+
super().showEvent(event)
|
|
64
|
+
QTimer.singleShot(100, self.afterShown)
|
|
65
|
+
|
|
66
|
+
def afterShown(self):
|
|
67
|
+
self.record['action']()
|
|
68
|
+
|
|
57
69
|
#############################################################################
|
|
58
70
|
# Keyword handlers
|
|
59
71
|
|
|
@@ -471,7 +483,10 @@ class Graphics(Handler):
|
|
|
471
483
|
return self.nextPC()
|
|
472
484
|
|
|
473
485
|
def r_createDialog(self, command, record):
|
|
474
|
-
|
|
486
|
+
win = command['window']
|
|
487
|
+
if win != None:
|
|
488
|
+
win = self.getVariable(win)['window']
|
|
489
|
+
dialog = self.ECDialog(win, record)
|
|
475
490
|
mainLayout = QVBoxLayout(dialog)
|
|
476
491
|
dialog.setWindowTitle(self.getRuntimeValue(command['title']))
|
|
477
492
|
dialogType = command['type'].lower()
|
|
@@ -973,7 +988,6 @@ class Graphics(Handler):
|
|
|
973
988
|
if dialog.dialogType == 'confirm':
|
|
974
989
|
record['result'] = True if dialog.exec() == QDialog.Accepted else False
|
|
975
990
|
elif dialog.dialogType == 'lineedit':
|
|
976
|
-
if self.vkb: print('Show virtual keyboard')
|
|
977
991
|
if dialog.exec() == QDialog.Accepted:
|
|
978
992
|
record['result'] = dialog.lineEdit.text()
|
|
979
993
|
else: record['result'] = dialog.value
|
|
@@ -1003,15 +1017,6 @@ class Graphics(Handler):
|
|
|
1003
1017
|
self.app.lastWindowClosed.connect(on_last_window_closed)
|
|
1004
1018
|
self.app.exec()
|
|
1005
1019
|
|
|
1006
|
-
# use virtual keyboard
|
|
1007
|
-
def k_use(self, command):
|
|
1008
|
-
if self.nextIs('virtual'):
|
|
1009
|
-
if self.nextIs('keyboard'):
|
|
1010
|
-
print('Use the virtual keyboard')
|
|
1011
|
-
self.vkb = True
|
|
1012
|
-
return True
|
|
1013
|
-
return False
|
|
1014
|
-
|
|
1015
1020
|
# Declare a window variable
|
|
1016
1021
|
def k_window(self, command):
|
|
1017
1022
|
return self.compileVariable(command)
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: easycoder
|
|
3
|
-
Version: 250724.
|
|
3
|
+
Version: 250724.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
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
easycoder/__init__.py,sha256=
|
|
1
|
+
easycoder/__init__.py,sha256=M8IkggB_M0aTh27z26QB4eRMZKocG1mQ6lN2hRbwhh4,314
|
|
2
2
|
easycoder/close.png,sha256=3B9ueRNtEu9E4QNmZhdyC4VL6uqKvGmdfeFxIV9aO_Y,9847
|
|
3
3
|
easycoder/ec_classes.py,sha256=PWPaJuTfaWD4-tgT-2WWOgeFV_jXxlxyKCxvXyylCUU,1824
|
|
4
4
|
easycoder/ec_compiler.py,sha256=9byLqJZgMHAyFFyD8eGhY77oTsY1GY1aVcVrU4JAbd4,5287
|
|
5
5
|
easycoder/ec_condition.py,sha256=YXvSBQKEzKGCcgUGo3Qp8iHolXmm2BpEm0NimSDszIM,785
|
|
6
6
|
easycoder/ec_core.py,sha256=JHcxmD2xq4Fy35CVkOWJOikKO31eV22EwiRwqxg-ILs,97786
|
|
7
7
|
easycoder/ec_handler.py,sha256=ohf3xUuWw_Qb5SZnulGtDhvCb11kvWtYfgbQTiOXpIY,2261
|
|
8
|
-
easycoder/ec_keyboard.py,sha256=
|
|
8
|
+
easycoder/ec_keyboard.py,sha256=S-afXSZMEAoyjbq9OhhoR-6uskRVMsEH4nHeePu8XIA,19682
|
|
9
9
|
easycoder/ec_program.py,sha256=SHg8NV9g-DclSWz8pQzgAiElreoYrI1FR1NrZS4_hIA,9968
|
|
10
|
-
easycoder/ec_pyside.py,sha256=
|
|
10
|
+
easycoder/ec_pyside.py,sha256=t7OpcB9NftMsoY7lFmXbrJF8e6yRe19tmHkRMQay5GM,42399
|
|
11
11
|
easycoder/ec_timestamp.py,sha256=myQnnF-mT31_1dpQKv2VEAu4BCcbypvMdzq7_DUi1xc,277
|
|
12
12
|
easycoder/ec_value.py,sha256=zgDJTJhIg3yOvmnnKIfccIizmIhGbtvL_ghLTL1T5fg,2516
|
|
13
|
-
easycoder-250724.
|
|
14
|
-
easycoder-250724.
|
|
15
|
-
easycoder-250724.
|
|
16
|
-
easycoder-250724.
|
|
17
|
-
easycoder-250724.
|
|
13
|
+
easycoder-250724.3.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
|
|
14
|
+
easycoder-250724.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
15
|
+
easycoder-250724.3.dist-info/WHEEL,sha256=ssQ84EZ5gH1pCOujd3iW7HClo_O_aDaClUbX4B8bjKY,100
|
|
16
|
+
easycoder-250724.3.dist-info/METADATA,sha256=MR-wOamC05_Ycy2WGquxPz7zCPuSwAySmZRUU_AqvKo,6875
|
|
17
|
+
easycoder-250724.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|