easycoder 250723.2__py2.py3-none-any.whl → 250723.4__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 CHANGED
@@ -11,4 +11,4 @@ from .ec_pyside import *
11
11
  from .ec_timestamp import *
12
12
  from .ec_value import *
13
13
 
14
- __version__ = "250723.2"
14
+ __version__ = "250723.4"
easycoder/close.png ADDED
Binary file
easycoder/ec_keyboard.py CHANGED
@@ -1,4 +1,5 @@
1
1
 
2
+ import os
2
3
  from .ec_handler import Handler
3
4
  from PySide6.QtWidgets import (
4
5
  QDialog,
@@ -11,11 +12,70 @@ from PySide6.QtWidgets import (
11
12
  QSizePolicy,
12
13
  QGraphicsDropShadowEffect
13
14
  )
14
- from PySide6.QtGui import QFont, QIcon
15
- from PySide6.QtCore import Qt, QTimer
15
+ from PySide6.QtGui import QFont, QIcon, QPixmap, QPainter, QColor
16
+ from PySide6.QtCore import Qt, QTimer, Signal, QRect
16
17
 
17
18
  class Keyboard(Handler):
18
-
19
+ iconClicked = Signal()
20
+
21
+ class Border(QWidget):
22
+ iconClicked = Signal()
23
+
24
+ def __init__(self):
25
+ super().__init__()
26
+ self.setFixedHeight(25)
27
+ self._drag_active = False
28
+ self._drag_start_pos = None
29
+
30
+ def paintEvent(self, event):
31
+ painter = QPainter(self)
32
+ painter.setRenderHint(QPainter.Antialiasing)
33
+ # Draw the close icon
34
+ self.pixmap = QPixmap(f'{os.path.dirname(os.path.abspath(__file__))}/close.png').scaled(25, 25, Qt.KeepAspectRatio, Qt.SmoothTransformation)
35
+ x = self.width() - self.pixmap.width()
36
+ y = 0
37
+ painter.drawPixmap(x, y, self.pixmap)
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
+ def mousePressEvent(self, event):
49
+ x = self.width() - self.pixmap.width()
50
+ y = 0
51
+ icon_rect = self.pixmap.rect().translated(x, y)
52
+ if icon_rect.contains(event.pos()):
53
+ self.iconClicked.emit()
54
+ elif self._bar_rect().contains(event.pos()):
55
+ self._drag_active = True
56
+ self._drag_start_pos = event.globalPosition().toPoint()
57
+ self._dialog_start_pos = self.window().pos()
58
+ else:
59
+ super().mousePressEvent(event)
60
+
61
+ def mouseMoveEvent(self, event):
62
+ if self._drag_active:
63
+ delta = event.globalPosition().toPoint() - self._drag_start_pos
64
+ self.window().move(self._dialog_start_pos + delta)
65
+ else:
66
+ super().mouseMoveEvent(event)
67
+
68
+ def mouseReleaseEvent(self, event):
69
+ self._drag_active = False
70
+ super().mouseReleaseEvent(event)
71
+
72
+ def _bar_rect(self):
73
+ bar_width = 100
74
+ bar_height = 20
75
+ bar_x = (self.width() - bar_width) // 2
76
+ bar_y = (self.height() - bar_height) // 2
77
+ return QRect(bar_x, bar_y, bar_width, bar_height)
78
+
19
79
  def __init__(self, program, receiver, parent=None):
20
80
  Handler.__init__(self, program.compiler)
21
81
 
@@ -38,6 +98,10 @@ class Keyboard(Handler):
38
98
 
39
99
  # Add the keyboard
40
100
  layout = QVBoxLayout(dialog)
101
+
102
+ border = self.Border()
103
+ border.iconClicked.connect(dialog.reject)
104
+ layout.addWidget(border)
41
105
  layout.addWidget(VirtualKeyboard(42, receiver, dialog.reject))
42
106
 
43
107
  # Position at bottom of parent window
@@ -1,12 +1,11 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.3
2
2
  Name: easycoder
3
- Version: 250723.2
3
+ Version: 250723.4
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,16 +1,17 @@
1
- easycoder/__init__.py,sha256=P2EY5ob_SPJRwK504X2A_VkgK2slbHWyTaH3_axqkQw,314
1
+ easycoder/__init__.py,sha256=kuHZrjcpfrsKv9HmpPu7wGiC-7X8n58sed54Mp_iDpQ,314
2
+ easycoder/close.png,sha256=3B9ueRNtEu9E4QNmZhdyC4VL6uqKvGmdfeFxIV9aO_Y,9847
2
3
  easycoder/ec_classes.py,sha256=PWPaJuTfaWD4-tgT-2WWOgeFV_jXxlxyKCxvXyylCUU,1824
3
4
  easycoder/ec_compiler.py,sha256=9byLqJZgMHAyFFyD8eGhY77oTsY1GY1aVcVrU4JAbd4,5287
4
5
  easycoder/ec_condition.py,sha256=YXvSBQKEzKGCcgUGo3Qp8iHolXmm2BpEm0NimSDszIM,785
5
6
  easycoder/ec_core.py,sha256=U1iOw0FKqAAvSShiDyFmBc9LlPyDRxzvgXlioSEK-KI,99679
6
7
  easycoder/ec_handler.py,sha256=ohf3xUuWw_Qb5SZnulGtDhvCb11kvWtYfgbQTiOXpIY,2261
7
- easycoder/ec_keyboard.py,sha256=BqqGGdY5fa4aw3zPxdhzeH7FHwzm9H3r76O59BwsaEQ,17027
8
+ easycoder/ec_keyboard.py,sha256=6BFH3JuWq5gtkZd6x1Xi6I7SY19648VWJig54zztre4,19493
8
9
  easycoder/ec_program.py,sha256=SHg8NV9g-DclSWz8pQzgAiElreoYrI1FR1NrZS4_hIA,9968
9
10
  easycoder/ec_pyside.py,sha256=15-brpZnAZTkR111KYllbo7k3qbbqr4Umww_ngzhsmk,42243
10
11
  easycoder/ec_timestamp.py,sha256=myQnnF-mT31_1dpQKv2VEAu4BCcbypvMdzq7_DUi1xc,277
11
12
  easycoder/ec_value.py,sha256=zgDJTJhIg3yOvmnnKIfccIizmIhGbtvL_ghLTL1T5fg,2516
12
- easycoder-250723.2.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
13
- easycoder-250723.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
14
- easycoder-250723.2.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
15
- easycoder-250723.2.dist-info/METADATA,sha256=aAf0ijSJP2H6YlPJNgXaM3uvH1tZvCRviyMkz8ma1uc,6897
16
- easycoder-250723.2.dist-info/RECORD,,
13
+ easycoder-250723.4.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
14
+ easycoder-250723.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
15
+ easycoder-250723.4.dist-info/WHEEL,sha256=ssQ84EZ5gH1pCOujd3iW7HClo_O_aDaClUbX4B8bjKY,100
16
+ easycoder-250723.4.dist-info/METADATA,sha256=calLHfxDl3CH9DOgxzvct872pUb5tOKklO1MgLIy3fQ,6875
17
+ easycoder-250723.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: flit 3.12.0
2
+ Generator: flit 3.10.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any