easycoder 251215.2__py2.py3-none-any.whl → 260111.1__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.
- easycoder/__init__.py +4 -3
- easycoder/debugger/ec_dbg_value_display copy.py +1 -1
- easycoder/debugger/ec_dbg_value_display.py +12 -11
- easycoder/debugger/ec_dbg_watchlist.py +146 -12
- easycoder/debugger/ec_debug.py +85 -8
- easycoder/ec_classes.py +228 -25
- easycoder/ec_compiler.py +29 -8
- easycoder/ec_core.py +364 -242
- easycoder/ec_gclasses.py +20 -9
- easycoder/ec_graphics.py +42 -26
- easycoder/ec_handler.py +4 -3
- easycoder/ec_mqtt.py +248 -0
- easycoder/ec_program.py +63 -28
- easycoder/ec_psutil.py +1 -1
- easycoder/ec_value.py +57 -36
- easycoder/pre/README.md +3 -0
- easycoder/pre/__init__.py +17 -0
- easycoder/pre/debugger/__init__.py +5 -0
- easycoder/pre/debugger/ec_dbg_value_display copy.py +195 -0
- easycoder/pre/debugger/ec_dbg_value_display.py +24 -0
- easycoder/pre/debugger/ec_dbg_watch_list copy.py +219 -0
- easycoder/pre/debugger/ec_dbg_watchlist.py +293 -0
- easycoder/pre/debugger/ec_debug.py +1014 -0
- easycoder/pre/ec_border.py +67 -0
- easycoder/pre/ec_classes.py +470 -0
- easycoder/pre/ec_compiler.py +291 -0
- easycoder/pre/ec_condition.py +27 -0
- easycoder/pre/ec_core.py +2772 -0
- easycoder/pre/ec_gclasses.py +230 -0
- easycoder/pre/ec_graphics.py +1682 -0
- easycoder/pre/ec_handler.py +79 -0
- easycoder/pre/ec_keyboard.py +439 -0
- easycoder/pre/ec_program.py +557 -0
- easycoder/pre/ec_psutil.py +48 -0
- easycoder/pre/ec_timestamp.py +11 -0
- easycoder/pre/ec_value.py +124 -0
- easycoder/pre/icons/close.png +0 -0
- easycoder/pre/icons/exit.png +0 -0
- easycoder/pre/icons/run.png +0 -0
- easycoder/pre/icons/step.png +0 -0
- easycoder/pre/icons/stop.png +0 -0
- easycoder/pre/icons/tick.png +0 -0
- {easycoder-251215.2.dist-info → easycoder-260111.1.dist-info}/METADATA +1 -1
- easycoder-260111.1.dist-info/RECORD +59 -0
- easycoder-251215.2.dist-info/RECORD +0 -31
- {easycoder-251215.2.dist-info → easycoder-260111.1.dist-info}/WHEEL +0 -0
- {easycoder-251215.2.dist-info → easycoder-260111.1.dist-info}/entry_points.txt +0 -0
- {easycoder-251215.2.dist-info → easycoder-260111.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
from .ec_classes import ECObject
|
|
2
|
+
|
|
3
|
+
###############################################################################
|
|
4
|
+
# A generic graphic element
|
|
5
|
+
class ECGElement(ECObject):
|
|
6
|
+
def __init__(self):
|
|
7
|
+
super().__init__()
|
|
8
|
+
|
|
9
|
+
# By default, classes that inherit from here do not belong to this package
|
|
10
|
+
def isCoreClass(self):
|
|
11
|
+
return False
|
|
12
|
+
|
|
13
|
+
###############################################################################
|
|
14
|
+
# A generic widget (other packages should inherit from this)
|
|
15
|
+
class ECWidget(ECGElement):
|
|
16
|
+
def __init__(self):
|
|
17
|
+
super().__init__()
|
|
18
|
+
|
|
19
|
+
###############################################################################
|
|
20
|
+
# A core widget (only classes in this package should inherit from this)
|
|
21
|
+
class ECCoreWidget(ECWidget):
|
|
22
|
+
def __init__(self):
|
|
23
|
+
super().__init__()
|
|
24
|
+
|
|
25
|
+
# This is a core class
|
|
26
|
+
def isCoreClass(self):
|
|
27
|
+
return True
|
|
28
|
+
|
|
29
|
+
###############################################################################
|
|
30
|
+
# A simple panel widget
|
|
31
|
+
class ECPanel(ECCoreWidget):
|
|
32
|
+
def __init__(self):
|
|
33
|
+
super().__init__()
|
|
34
|
+
|
|
35
|
+
# This type of widget is clearable
|
|
36
|
+
def isClearable(self):
|
|
37
|
+
return True
|
|
38
|
+
|
|
39
|
+
###############################################################################
|
|
40
|
+
# A widget with a text value
|
|
41
|
+
class ECTextWidget(ECCoreWidget):
|
|
42
|
+
def __init__(self):
|
|
43
|
+
super().__init__()
|
|
44
|
+
|
|
45
|
+
# This type of widget has a runtime value
|
|
46
|
+
def hasRuntimeValue(self):
|
|
47
|
+
return True
|
|
48
|
+
|
|
49
|
+
# Get the text of the widget
|
|
50
|
+
def getText(self):
|
|
51
|
+
return self.getContent() # type: ignore
|
|
52
|
+
|
|
53
|
+
# Check if the object is empty
|
|
54
|
+
def isEmpty(self):
|
|
55
|
+
return self.getText() == ""
|
|
56
|
+
|
|
57
|
+
###############################################################################
|
|
58
|
+
# A layout variable
|
|
59
|
+
class ECLayout(ECCoreWidget):
|
|
60
|
+
def __init__(self):
|
|
61
|
+
super().__init__()
|
|
62
|
+
|
|
63
|
+
###############################################################################
|
|
64
|
+
# A group variable
|
|
65
|
+
class ECGroup(ECCoreWidget):
|
|
66
|
+
def __init__(self):
|
|
67
|
+
super().__init__()
|
|
68
|
+
|
|
69
|
+
###############################################################################
|
|
70
|
+
# A label variable
|
|
71
|
+
class ECLabel(ECTextWidget):
|
|
72
|
+
def __init__(self):
|
|
73
|
+
super().__init__()
|
|
74
|
+
|
|
75
|
+
# This is a core class
|
|
76
|
+
def isCoreClass(self):
|
|
77
|
+
return True
|
|
78
|
+
|
|
79
|
+
###############################################################################
|
|
80
|
+
# A pushbutton variable
|
|
81
|
+
class ECPushButton(ECTextWidget):
|
|
82
|
+
def __init__(self):
|
|
83
|
+
super().__init__()
|
|
84
|
+
|
|
85
|
+
# This is a core class
|
|
86
|
+
def isCoreClass(self):
|
|
87
|
+
return True
|
|
88
|
+
|
|
89
|
+
###############################################################################
|
|
90
|
+
# A checkbox variable
|
|
91
|
+
class ECCheckBox(ECCoreWidget):
|
|
92
|
+
def __init__(self):
|
|
93
|
+
super().__init__()
|
|
94
|
+
|
|
95
|
+
# This object has a runtime value
|
|
96
|
+
def hasRuntimeValue(self):
|
|
97
|
+
return True
|
|
98
|
+
|
|
99
|
+
# Get the content of the value at the current index
|
|
100
|
+
def getContent(self):
|
|
101
|
+
v = self.getValue()
|
|
102
|
+
if v is None: return None
|
|
103
|
+
return v.getContent().isChecked()
|
|
104
|
+
|
|
105
|
+
###############################################################################
|
|
106
|
+
# A line input widget
|
|
107
|
+
class ECLineInput(ECTextWidget):
|
|
108
|
+
def __init__(self):
|
|
109
|
+
super().__init__()
|
|
110
|
+
|
|
111
|
+
# This object has a runtime value
|
|
112
|
+
def hasRuntimeValue(self):
|
|
113
|
+
return True
|
|
114
|
+
|
|
115
|
+
# Get the text of the widget
|
|
116
|
+
def getText(self):
|
|
117
|
+
return self.getValue().getContent().text() # type: ignore
|
|
118
|
+
|
|
119
|
+
# Get the content of the value at the current index
|
|
120
|
+
def getContent(self):
|
|
121
|
+
v = self.getValue()
|
|
122
|
+
if v is None: return None
|
|
123
|
+
return v.getContent().text()
|
|
124
|
+
|
|
125
|
+
###############################################################################
|
|
126
|
+
# A multiline widget
|
|
127
|
+
class ECMultiline(ECTextWidget):
|
|
128
|
+
def __init__(self):
|
|
129
|
+
super().__init__()
|
|
130
|
+
|
|
131
|
+
###############################################################################
|
|
132
|
+
# A listbox variable
|
|
133
|
+
class ECListBox(ECCoreWidget):
|
|
134
|
+
def __init__(self):
|
|
135
|
+
super().__init__()
|
|
136
|
+
|
|
137
|
+
# This type of widget has a runtime value
|
|
138
|
+
def hasRuntimeValue(self):
|
|
139
|
+
return True
|
|
140
|
+
|
|
141
|
+
# This type of widget is mutable.
|
|
142
|
+
def isMutable(self):
|
|
143
|
+
return True
|
|
144
|
+
|
|
145
|
+
# This type of widget is clearable
|
|
146
|
+
def isClearable(self):
|
|
147
|
+
return True
|
|
148
|
+
|
|
149
|
+
# Get the selected item in the list box
|
|
150
|
+
def getContent(self):
|
|
151
|
+
widget = self.getValue() # type: ignore
|
|
152
|
+
content = widget.selectedItems()[0].text() if widget.selectedItems() else None # type: ignore
|
|
153
|
+
return content
|
|
154
|
+
|
|
155
|
+
# Get the text of the widget
|
|
156
|
+
def getText(self):
|
|
157
|
+
return self.getContent() # type: ignore
|
|
158
|
+
|
|
159
|
+
# Get the count of items in the list box
|
|
160
|
+
def getCount(self):
|
|
161
|
+
v = self.getContent().count() # type: ignore
|
|
162
|
+
return v
|
|
163
|
+
|
|
164
|
+
# Get the index of the selected item
|
|
165
|
+
def getIndex(self):
|
|
166
|
+
widget = self.getValue() # type: ignore
|
|
167
|
+
index = widget.currentRow() # type: ignore
|
|
168
|
+
return index
|
|
169
|
+
|
|
170
|
+
###############################################################################
|
|
171
|
+
# A combo box variable
|
|
172
|
+
class ECComboBox(ECCoreWidget):
|
|
173
|
+
def __init__(self):
|
|
174
|
+
super().__init__()
|
|
175
|
+
|
|
176
|
+
# This type of widget has a runtime value
|
|
177
|
+
def hasRuntimeValue(self):
|
|
178
|
+
return True
|
|
179
|
+
|
|
180
|
+
# This type of widget is mutable.
|
|
181
|
+
def isMutable(self):
|
|
182
|
+
return True
|
|
183
|
+
|
|
184
|
+
# This type of widget is clearable
|
|
185
|
+
def isClearable(self):
|
|
186
|
+
return True
|
|
187
|
+
|
|
188
|
+
# Get the count of items in the combo box
|
|
189
|
+
def getCount(self):
|
|
190
|
+
v = self.getContent().count() # type: ignore
|
|
191
|
+
return v
|
|
192
|
+
|
|
193
|
+
# Get the text of the widget
|
|
194
|
+
def getText(self):
|
|
195
|
+
return self.getValue().getContent().text() # type: ignore
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
###############################################################################
|
|
199
|
+
# A window variable
|
|
200
|
+
class ECWindow(ECGElement):
|
|
201
|
+
def __init__(self):
|
|
202
|
+
super().__init__()
|
|
203
|
+
|
|
204
|
+
# This is a core class
|
|
205
|
+
def isCoreClass(self):
|
|
206
|
+
return True
|
|
207
|
+
|
|
208
|
+
###############################################################################
|
|
209
|
+
# A dialog variable
|
|
210
|
+
class ECDialog(ECGElement):
|
|
211
|
+
def __init__(self):
|
|
212
|
+
super().__init__()
|
|
213
|
+
|
|
214
|
+
# This is a core class
|
|
215
|
+
def isCoreClass(self):
|
|
216
|
+
return True
|
|
217
|
+
|
|
218
|
+
# This type of widget has a runtime value
|
|
219
|
+
def hasRuntimeValue(self):
|
|
220
|
+
return True
|
|
221
|
+
|
|
222
|
+
def getReturnValue(self):
|
|
223
|
+
dialog = self.getValue().getContent() # type: ignore
|
|
224
|
+
return dialog.result
|
|
225
|
+
|
|
226
|
+
###############################################################################
|
|
227
|
+
# A message box variable
|
|
228
|
+
class ECMessageBox(ECGElement):
|
|
229
|
+
def __init__(self):
|
|
230
|
+
super().__init__()
|