easycoder 250508.2__tar.gz → 250518.1__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.

Files changed (187) hide show
  1. easycoder-250518.1/.gitignore +4 -0
  2. {easycoder-250508.2 → easycoder-250518.1}/PKG-INFO +3 -3
  3. {easycoder-250508.2 → easycoder-250518.1}/easycoder/__init__.py +1 -1
  4. {easycoder-250508.2 → easycoder-250518.1}/easycoder/ec_core.py +3 -3
  5. {easycoder-250508.2 → easycoder-250518.1}/easycoder/ec_pyside.py +26 -14
  6. {easycoder-250508.2 → easycoder-250518.1}/pyproject.toml +1 -0
  7. {easycoder-250508.2 → easycoder-250518.1}/scripts/config.ecg +1 -1
  8. easycoder-250518.1/testrc.py +3 -0
  9. easycoder-250518.1/ui.py +84 -0
  10. easycoder-250508.2/.gitignore +0 -1
  11. easycoder-250508.2/plugins/keyboards/4-function.json +0 -62
  12. easycoder-250508.2/plugins/keyboards/4-function.png +0 -0
  13. easycoder-250508.2/plugins/keyboards/qwerty-0.json +0 -179
  14. easycoder-250508.2/plugins/keyboards/qwerty-0.png +0 -0
  15. easycoder-250508.2/plugins/keyboards/qwerty-1.json +0 -179
  16. easycoder-250508.2/plugins/keyboards/qwerty-1.png +0 -0
  17. easycoder-250508.2/plugins/keyboards/qwerty-2.json +0 -179
  18. easycoder-250508.2/plugins/keyboards/qwerty-2.png +0 -0
  19. easycoder-250508.2/plugins/keyboards/qwerty-3.json +0 -180
  20. easycoder-250508.2/plugins/keyboards/qwerty-3.png +0 -0
  21. easycoder-250508.2/q1.py +0 -50
  22. easycoder-250508.2/q2.py +0 -70
  23. easycoder-250508.2/rbrconf.ecs +0 -1686
  24. easycoder-250508.2/rbrconf.py +0 -3
  25. easycoder-250508.2/scripts/README.md +0 -16
  26. easycoder-250508.2/scripts/connect.ecg +0 -62
  27. easycoder-250508.2/scripts/testg.ecg +0 -48
  28. easycoder-250508.2/test.ecs +0 -13
  29. easycoder-250508.2/test.py +0 -3
  30. easycoder-250508.2/test.txt +0 -2
  31. {easycoder-250508.2 → easycoder-250518.1}/LICENSE +0 -0
  32. {easycoder-250508.2 → easycoder-250518.1}/README.md +0 -0
  33. {easycoder-250508.2 → easycoder-250518.1}/doc/README.md +0 -0
  34. {easycoder-250508.2 → easycoder-250518.1}/doc/core/README.md +0 -0
  35. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/boolean.md +0 -0
  36. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/empty.md +0 -0
  37. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/ends.md +0 -0
  38. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/even.md +0 -0
  39. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/exists.md +0 -0
  40. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/greater.md +0 -0
  41. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/hasProperty.md +0 -0
  42. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/includes.md +0 -0
  43. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/is.md +0 -0
  44. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/less.md +0 -0
  45. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/list.md +0 -0
  46. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/none.md +0 -0
  47. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/not.md +0 -0
  48. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/numeric.md +0 -0
  49. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/object.md +0 -0
  50. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/odd.md +0 -0
  51. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/starts.md +0 -0
  52. {easycoder-250508.2 → easycoder-250518.1}/doc/core/conditions/string.md +0 -0
  53. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/add.md +0 -0
  54. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/append.md +0 -0
  55. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/assert.md +0 -0
  56. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/begin.md +0 -0
  57. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/clear.md +0 -0
  58. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/close.md +0 -0
  59. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/create.md +0 -0
  60. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/debug.md +0 -0
  61. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/decrement.md +0 -0
  62. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/delete.md +0 -0
  63. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/divide.md +0 -0
  64. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/exit.md +0 -0
  65. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/file.md +0 -0
  66. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/fork.md +0 -0
  67. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/get.md +0 -0
  68. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/go.md +0 -0
  69. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/gosub.md +0 -0
  70. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/if.md +0 -0
  71. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/import.md +0 -0
  72. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/increment.md +0 -0
  73. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/index.md +0 -0
  74. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/init.md +0 -0
  75. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/input.md +0 -0
  76. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/load.md +0 -0
  77. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/lock.md +0 -0
  78. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/log.md +0 -0
  79. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/module.md +0 -0
  80. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/multiply.md +0 -0
  81. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/negate.md +0 -0
  82. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/open.md +0 -0
  83. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/pop.md +0 -0
  84. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/post.md +0 -0
  85. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/print.md +0 -0
  86. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/push.md +0 -0
  87. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/put.md +0 -0
  88. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/read.md +0 -0
  89. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/release.md +0 -0
  90. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/replace.md +0 -0
  91. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/return.md +0 -0
  92. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/run.md +0 -0
  93. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/save.md +0 -0
  94. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/script.md +0 -0
  95. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/set.md +0 -0
  96. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/split.md +0 -0
  97. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/stack.md +0 -0
  98. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/stop.md +0 -0
  99. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/system.md +0 -0
  100. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/take.md +0 -0
  101. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/toggle.md +0 -0
  102. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/truncate.md +0 -0
  103. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/unlock.md +0 -0
  104. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/variable.md +0 -0
  105. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/wait.md +0 -0
  106. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/while.md +0 -0
  107. {easycoder-250508.2 → easycoder-250518.1}/doc/core/keywords/write.md +0 -0
  108. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/arg.md +0 -0
  109. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/args.md +0 -0
  110. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/cos.md +0 -0
  111. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/datime.md +0 -0
  112. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/decode.md +0 -0
  113. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/element.md +0 -0
  114. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/elements.md +0 -0
  115. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/empty.md +0 -0
  116. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/encode.md +0 -0
  117. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/error.md +0 -0
  118. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/files.md +0 -0
  119. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/float.md +0 -0
  120. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/from.md +0 -0
  121. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/hash.md +0 -0
  122. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/index.md +0 -0
  123. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/integer.md +0 -0
  124. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/json.md +0 -0
  125. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/keys.md +0 -0
  126. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/left.md +0 -0
  127. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/length.md +0 -0
  128. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/lowercase.md +0 -0
  129. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/memory.md +0 -0
  130. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/modification.md +0 -0
  131. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/modulo.md +0 -0
  132. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/newline.md +0 -0
  133. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/now.md +0 -0
  134. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/position.md +0 -0
  135. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/property.md +0 -0
  136. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/random.md +0 -0
  137. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/right.md +0 -0
  138. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/sin.md +0 -0
  139. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/stringify.md +0 -0
  140. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/tab.md +0 -0
  141. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/tan.md +0 -0
  142. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/timestamp.md +0 -0
  143. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/today.md +0 -0
  144. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/trim.md +0 -0
  145. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/type.md +0 -0
  146. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/uppercase.md +0 -0
  147. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/value.md +0 -0
  148. {easycoder-250508.2 → easycoder-250518.1}/doc/core/values/weekday.md +0 -0
  149. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/README.md +0 -0
  150. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/keywords/attach.md +0 -0
  151. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/keywords/close.md +0 -0
  152. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/keywords/create.md +0 -0
  153. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/keywords/ellipse.md +0 -0
  154. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/keywords/image.md +0 -0
  155. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/keywords/move.md +0 -0
  156. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/keywords/on.md +0 -0
  157. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/keywords/rectangle.md +0 -0
  158. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/keywords/render.md +0 -0
  159. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/keywords/run.md +0 -0
  160. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/keywords/set.md +0 -0
  161. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/keywords/text.md +0 -0
  162. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/values/attribute.md +0 -0
  163. {easycoder-250508.2 → easycoder-250518.1}/doc/graphics/values/window.md +0 -0
  164. {easycoder-250508.2 → easycoder-250518.1}/easycoder/README.md +0 -0
  165. {easycoder-250508.2 → easycoder-250518.1}/easycoder/ec_classes.py +0 -0
  166. {easycoder-250508.2 → easycoder-250518.1}/easycoder/ec_compiler.py +0 -0
  167. {easycoder-250508.2 → easycoder-250518.1}/easycoder/ec_condition.py +0 -0
  168. {easycoder-250508.2 → easycoder-250518.1}/easycoder/ec_graphics.py +0 -0
  169. {easycoder-250508.2 → easycoder-250518.1}/easycoder/ec_gutils.py +0 -0
  170. {easycoder-250508.2 → easycoder-250518.1}/easycoder/ec_handler.py +0 -0
  171. {easycoder-250508.2 → easycoder-250518.1}/easycoder/ec_program.py +0 -0
  172. {easycoder-250508.2 → easycoder-250518.1}/easycoder/ec_timestamp.py +0 -0
  173. {easycoder-250508.2 → easycoder-250518.1}/easycoder/ec_value.py +0 -0
  174. {easycoder-250508.2 → easycoder-250518.1}/images/Semoigo Dawn.jpg +0 -0
  175. {easycoder-250508.2 → easycoder-250518.1}/json/graphics-demo.json +0 -0
  176. {easycoder-250508.2 → easycoder-250518.1}/plugins/ec_keyboard.py +0 -0
  177. {easycoder-250508.2 → easycoder-250518.1}/plugins/ec_p100.py +0 -0
  178. {easycoder-250508.2 → easycoder-250518.1}/plugins/ec_pyside6.py +0 -0
  179. {easycoder-250508.2 → easycoder-250518.1}/plugins/points.py +0 -0
  180. {easycoder-250508.2 → easycoder-250518.1}/scripts/benchmark.ecs +0 -0
  181. {easycoder-250508.2 → easycoder-250518.1}/scripts/ec_keyboard.py +0 -0
  182. {easycoder-250508.2 → easycoder-250518.1}/scripts/findxr.ecs +0 -0
  183. {easycoder-250508.2 → easycoder-250518.1}/scripts/fizzbuzz.ecs +0 -0
  184. {easycoder-250508.2 → easycoder-250518.1}/scripts/hello.ecs +0 -0
  185. {easycoder-250508.2 → easycoder-250518.1}/scripts/points.ecs +0 -0
  186. {easycoder-250508.2 → easycoder-250518.1}/scripts/test.ecs +0 -0
  187. {easycoder-250508.2 → easycoder-250518.1}/scripts/tests.ecs +0 -0
@@ -0,0 +1,4 @@
1
+ */__pycache__/*
2
+ *.code-workspace
3
+ *.py
4
+ *.ecs
@@ -1,13 +1,13 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.3
2
2
  Name: easycoder
3
- Version: 250508.2
3
+ Version: 250518.1
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
10
+ Requires-Dist: requests
11
11
  Requires-Dist: pyside6
12
12
  Project-URL: Home, https://github.com/easycoder/easycoder-py
13
13
 
@@ -9,4 +9,4 @@ from .ec_program import *
9
9
  from .ec_timestamp import *
10
10
  from .ec_value import *
11
11
 
12
- __version__ = "250508.2"
12
+ __version__ = "250518.1"
@@ -1,6 +1,6 @@
1
- import json, math, hashlib, threading, os, subprocess, sys, requests, time, numbers, base64, binascii, random
1
+ import json, math, hashlib, threading, os, subprocess, sys, time, numbers, base64, binascii, random, requests
2
2
  from psutil import Process
3
- from datetime import datetime, timezone
3
+ from datetime import datetime
4
4
  from random import randrange
5
5
  from .ec_classes import FatalError, RuntimeWarning, RuntimeError, AssertionError, NoValueError, NoValueRuntimeError, Condition, Object
6
6
  from .ec_handler import Handler
@@ -381,7 +381,7 @@ class Core(Handler):
381
381
 
382
382
  def r_exit(self, command):
383
383
  if self.program.graphics != None:
384
- self.program.graphics.force_exit()
384
+ self.program.graphics.force_exit(None)
385
385
  return -1
386
386
 
387
387
  # Declare a file variable
@@ -37,11 +37,6 @@ from PySide6.QtWidgets import (
37
37
 
38
38
  class Graphics(Handler):
39
39
 
40
- class MainWindow(QMainWindow):
41
-
42
- def __init__(self):
43
- super().__init__()
44
-
45
40
  def __init__(self, compiler):
46
41
  Handler.__init__(self, compiler)
47
42
 
@@ -375,20 +370,17 @@ class Graphics(Handler):
375
370
  return False
376
371
 
377
372
  def r_createWindow(self, command, record):
378
- window = self.MainWindow()
373
+ window = QMainWindow()
379
374
  window.setWindowTitle(self.getRuntimeValue(command['title']))
380
375
  w = self.getRuntimeValue(command['w'])
381
376
  h = self.getRuntimeValue(command['h'])
382
377
  x = command['x']
383
378
  y = command['y']
384
- if x == None: x = (self.screenWidth - w) / 2
379
+ if x == None: x = (self.program.screenWidth - w) / 2
385
380
  else: x = self.getRuntimeValue(x)
386
- if y == None: y = (self.screenHeight - h) / 2
381
+ if y == None: y = (self.program.screenHeight - h) / 2
387
382
  else: y = self.getRuntimeValue(x)
388
383
  window.setGeometry(x, y, w, h)
389
- container = QWidget()
390
- container.setLayout(self.getVariable(command['layout'])['widget'])
391
- window.setCentralWidget(container)
392
384
  record['window'] = window
393
385
  return self.nextPC()
394
386
 
@@ -545,9 +537,9 @@ class Graphics(Handler):
545
537
  def r_init(self, command):
546
538
  self.app = QApplication(sys.argv)
547
539
  screen = QApplication.screens()[0].size().toTuple()
548
- self.screenWidth = screen[0]
549
- self.screenHeight = screen[1]
550
- print(f'Screen: {self.screenWidth}x{self.screenHeight}')
540
+ self.program.screenWidth = screen[0]
541
+ self.program.screenHeight = screen[1]
542
+ print(f'Screen: {self.program.screenWidth}x{self.program.screenHeight}')
551
543
  return self.nextPC()
552
544
 
553
545
  # Declare a label variable
@@ -712,6 +704,7 @@ class Graphics(Handler):
712
704
  return self.nextPC()
713
705
 
714
706
  # set [the] width/height [of] {widget} [to] {value}
707
+ # set [the] layout of {window} to {layout}
715
708
  # set [the] text [of] {label}/{button}/{lineinput} [to] {text}
716
709
  # set [the] color [of] {label}/{button}/{lineinput} [to] {color}
717
710
  # set [the] state [of] {checkbox} [to] {color}
@@ -730,6 +723,18 @@ class Graphics(Handler):
730
723
  command['value'] = self.nextValue()
731
724
  self.add(command)
732
725
  return True
726
+ elif token == 'layout':
727
+ self.skip('of')
728
+ if self.nextIsSymbol():
729
+ record = self.getSymbolRecord()
730
+ if record['keyword'] == 'window':
731
+ command['name'] = record['name']
732
+ self.skip('to')
733
+ if self.nextIsSymbol():
734
+ record = self.getSymbolRecord()
735
+ command['layout'] = record['name']
736
+ self.add(command)
737
+ return True
733
738
  elif token == 'text':
734
739
  self.skip('of')
735
740
  if self.nextIsSymbol():
@@ -790,6 +795,13 @@ class Graphics(Handler):
790
795
  elif what == 'width':
791
796
  widget = self.getVariable(command['name'])['widget']
792
797
  widget.setFixedWidth(self.getRuntimeValue(command['value']))
798
+ elif what == 'layout':
799
+ window = self.getVariable(command['name'])['window']
800
+ layout = self.getVariable(command['layout'])
801
+ content = self.getVariable(command['layout'])['widget']
802
+ container = QWidget()
803
+ container.setLayout(content)
804
+ window.setCentralWidget(container)
793
805
  elif what == 'text':
794
806
  record = self.getVariable(command['name'])
795
807
  widget = self.getVariable(command['name'])['widget']
@@ -13,6 +13,7 @@ keywords = ["compiler", "scripting", "prototyping", "programming", "coding", "py
13
13
  dynamic = ["version"]
14
14
  dependencies = [
15
15
  "pytz",
16
+ "requests",
16
17
  "pyside6"
17
18
  ]
18
19
 
@@ -98,7 +98,7 @@
98
98
  add Row to Layout
99
99
 
100
100
  create Window `RBR XR Config`
101
- layout Layout
101
+ set the layout of Window to Layout
102
102
 
103
103
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
104
104
  ! Event handlers for the main window
@@ -0,0 +1,3 @@
1
+ from easycoder import Program
2
+
3
+ Program('../../rbr/rbrconf.ecs').start()
@@ -0,0 +1,84 @@
1
+ from PySide6.QtWidgets import (
2
+ QApplication, QMainWindow, QVBoxLayout, QLabel, QPushButton, QWidget, QHBoxLayout, QSpacerItem, QSizePolicy
3
+ )
4
+ from PySide6.QtGui import QPixmap, QFont, QPalette, QBrush
5
+ from PySide6.QtCore import Qt
6
+ import sys
7
+
8
+ class MainWindow(QMainWindow):
9
+ def __init__(self):
10
+ super().__init__()
11
+ self.setWindowTitle("Custom UI")
12
+ self.setFixedSize(600, 1024) # Set the window size to 600x1024
13
+
14
+ # Set the background image
15
+ palette = QPalette()
16
+ background_pixmap = QPixmap("/home/graham/dev/rbr/ui/main/backdrop.jpg")
17
+ palette.setBrush(QPalette.Window, QBrush(background_pixmap))
18
+ self.setPalette(palette)
19
+
20
+ # Main layout
21
+ main_widget = QWidget()
22
+ main_layout = QVBoxLayout(main_widget)
23
+ main_layout.setSpacing(10) # Set spacing between rows to 10
24
+
25
+ # Create 5 rows
26
+ for _ in range(5):
27
+ row = self.create_row()
28
+ main_layout.addWidget(row)
29
+
30
+ # Add a stretch below the last row
31
+ main_layout.addSpacerItem(QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding))
32
+
33
+ self.setCentralWidget(main_widget)
34
+
35
+ def create_row(self):
36
+ """Create a single row with the specified elements."""
37
+ row_widget = QWidget()
38
+ row_widget.setFixedHeight(1024 // 12) # Each row is 1/12 the height of the window
39
+ row_widget.setStyleSheet("background-color: #ffffcc; border: 2px solid gray;") # Set background and border
40
+
41
+ row_layout = QHBoxLayout(row_widget)
42
+ row_layout.setContentsMargins(10, 0, 10, 0) # Add margins for spacing
43
+ row_layout.setSpacing(10) # Add spacing between elements
44
+
45
+ # Icon 1: Clock
46
+ clock_icon = QLabel()
47
+ clock_pixmap = QPixmap("/home/graham/dev/rbr/ui/main/clock.png").scaled(1024 // 12 * 3 // 4, 1024 // 12 * 3 // 4, Qt.KeepAspectRatio, Qt.SmoothTransformation)
48
+ clock_icon.setPixmap(clock_pixmap)
49
+ clock_icon.setStyleSheet("border-left: none; border-right: none;")
50
+
51
+ # Name label
52
+ name_label = QLabel("Room Name")
53
+ name_label.setAlignment(Qt.AlignVCenter | Qt.AlignLeft)
54
+ name_label.setStyleSheet("background-color: transparent; border: none;") # Transparent background
55
+ font = QFont()
56
+ font.setPointSize(16) # Adjust font size to fit at least 20 characters
57
+ font.setBold(True) # Make the font bold
58
+ name_label.setFont(font)
59
+
60
+ # Button with white text and blue background
61
+ button = QPushButton("20.0°C")
62
+ button.setStyleSheet("color: white; background-color: blue; border: none;")
63
+ button.setFixedSize(80, 40) # Adjust button size
64
+ button.setFont(font) # Use the same font as the label
65
+
66
+ # Icon 2: Edit
67
+ edit_icon = QLabel()
68
+ edit_pixmap = QPixmap("/home/graham/dev/rbr/ui/main/edit.png").scaled(1024 // 12 * 3 // 4, 1024 // 12 * 3 // 4, Qt.KeepAspectRatio, Qt.SmoothTransformation)
69
+ edit_icon.setPixmap(edit_pixmap)
70
+ edit_icon.setStyleSheet("border-left: none; border-right: none;")
71
+
72
+ # Add elements to the row layout
73
+ row_layout.addWidget(clock_icon)
74
+ row_layout.addWidget(name_label, 1) # Expand the name label to use all spare space
75
+ row_layout.addWidget(button)
76
+ row_layout.addWidget(edit_icon)
77
+
78
+ return row_widget
79
+
80
+ if __name__ == "__main__":
81
+ app = QApplication(sys.argv)
82
+ window = MainWindow()
83
+ window.show()
84
+ sys.exit(app.exec())
@@ -1 +0,0 @@
1
- */__pycache__/*
@@ -1,62 +0,0 @@
1
- {
2
- "face": "plugins/keyboards/4-function.png",
3
- "rows":
4
- [
5
- [
6
- {
7
- "id": "1"
8
- },
9
- {
10
- "id": "2"
11
- },
12
- {
13
- "id": "3"
14
- },
15
- {
16
- "id": "+"
17
- }
18
- ],
19
- [
20
- {
21
- "id": "4"
22
- },
23
- {
24
- "id": "5"
25
- },
26
- {
27
- "id": "6"
28
- },
29
- {
30
- "id": "-"
31
- }
32
- ],
33
- [
34
- {
35
- "id": "7"
36
- },
37
- {
38
- "id": "8"
39
- },
40
- {
41
- "id": "9"
42
- },
43
- {
44
- "id": "*"
45
- }
46
- ],
47
- [
48
- {
49
- "id": "0"
50
- },
51
- {
52
- "id": "C"
53
- },
54
- {
55
- "id": "="
56
- },
57
- {
58
- "id": "/"
59
- }
60
- ]
61
- ]
62
- }
@@ -1,179 +0,0 @@
1
- {
2
- "face": "plugins/keyboards/qwerty-0.png",
3
- "rows":
4
- [
5
- [
6
- {
7
- "id": "`"
8
- },
9
- {
10
- "id": "1"
11
- },
12
- {
13
- "id": "2"
14
- },
15
- {
16
- "id": "3"
17
- },
18
- {
19
- "id": "4"
20
- },
21
- {
22
- "id": "5"
23
- },
24
- {
25
- "id": "6"
26
- },
27
- {
28
- "id": "7"
29
- },
30
- {
31
- "id": "8"
32
- },
33
- {
34
- "id": "9"
35
- },
36
- {
37
- "id": "0"
38
- },
39
- {
40
- "id": "-"
41
- },
42
- {
43
- "id": "="
44
- },
45
- {
46
- "id": "bs",
47
- "span": "1.5"
48
- }
49
- ],
50
- [
51
- {
52
- "id": "tab",
53
- "span": "1.5"
54
- },
55
- {
56
- "id": "q"
57
- },
58
- {
59
- "id": "w"
60
- },
61
- {
62
- "id": "e"
63
- },
64
- {
65
- "id": "r"
66
- },
67
- {
68
- "id": "t"
69
- },
70
- {
71
- "id": "y"
72
- },
73
- {
74
- "id": "u"
75
- },
76
- {
77
- "id": "i"
78
- },
79
- {
80
- "id": "o"
81
- },
82
- {
83
- "id": "p"
84
- },
85
- {
86
- "id": "["
87
- },
88
- {
89
- "id": "]"
90
- },
91
- {
92
- "id": "\\"
93
- }
94
- ],
95
- [
96
- {
97
- "id": "caps",
98
- "span": "2.0"
99
- },
100
- {
101
- "id": "a"
102
- },
103
- {
104
- "id": "s"
105
- },
106
- {
107
- "id": "d"
108
- },
109
- {
110
- "id": "f"
111
- },
112
- {
113
- "id": "g"
114
- },
115
- {
116
- "id": "h"
117
- },
118
- {
119
- "id": "j"
120
- },
121
- {
122
- "id": "k"
123
- },
124
- {
125
- "id": "l"
126
- },
127
- {
128
- "id": ";"
129
- },
130
- {
131
- "id": "'"
132
- },
133
- {
134
- "id": "enter",
135
- "span": "1.5"
136
- }
137
- ],
138
- [
139
- {
140
- "id": "shift",
141
- "span": "2.5"
142
- },
143
- {
144
- "id": "z"
145
- },
146
- {
147
- "id": "x"
148
- },
149
- {
150
- "id": "c"
151
- },
152
- {
153
- "id": "v"
154
- },
155
- {
156
- "id": "b"
157
- },
158
- {
159
- "id": "n"
160
- },
161
- {
162
- "id": "m"
163
- },
164
- {
165
- "id": ","
166
- },
167
- {
168
- "id": "."
169
- },
170
- {
171
- "id": "/"
172
- },
173
- {
174
- "id": "space",
175
- "span": "2.0"
176
- }
177
- ]
178
- ]
179
- }
@@ -1,179 +0,0 @@
1
- {
2
- "face": "plugins/keyboards/qwerty-1.png",
3
- "rows":
4
- [
5
- [
6
- {
7
- "id": "`"
8
- },
9
- {
10
- "id": "1"
11
- },
12
- {
13
- "id": "2"
14
- },
15
- {
16
- "id": "3"
17
- },
18
- {
19
- "id": "4"
20
- },
21
- {
22
- "id": "5"
23
- },
24
- {
25
- "id": "6"
26
- },
27
- {
28
- "id": "7"
29
- },
30
- {
31
- "id": "8"
32
- },
33
- {
34
- "id": "9"
35
- },
36
- {
37
- "id": "0"
38
- },
39
- {
40
- "id": "-"
41
- },
42
- {
43
- "id": "="
44
- },
45
- {
46
- "id": "bs",
47
- "span": "1.5"
48
- }
49
- ],
50
- [
51
- {
52
- "id": "tab",
53
- "span": "1.5"
54
- },
55
- {
56
- "id": "Q"
57
- },
58
- {
59
- "id": "W"
60
- },
61
- {
62
- "id": "E"
63
- },
64
- {
65
- "id": "R"
66
- },
67
- {
68
- "id": "T"
69
- },
70
- {
71
- "id": "Y"
72
- },
73
- {
74
- "id": "U"
75
- },
76
- {
77
- "id": "I"
78
- },
79
- {
80
- "id": "O"
81
- },
82
- {
83
- "id": "P"
84
- },
85
- {
86
- "id": "["
87
- },
88
- {
89
- "id": "]"
90
- },
91
- {
92
- "id": "\\"
93
- }
94
- ],
95
- [
96
- {
97
- "id": "caps",
98
- "span": "2.0"
99
- },
100
- {
101
- "id": "A"
102
- },
103
- {
104
- "id": "S"
105
- },
106
- {
107
- "id": "D"
108
- },
109
- {
110
- "id": "F"
111
- },
112
- {
113
- "id": "G"
114
- },
115
- {
116
- "id": "H"
117
- },
118
- {
119
- "id": "J"
120
- },
121
- {
122
- "id": "K"
123
- },
124
- {
125
- "id": "L"
126
- },
127
- {
128
- "id": ";"
129
- },
130
- {
131
- "id": "'"
132
- },
133
- {
134
- "id": "enter",
135
- "span": "1.5"
136
- }
137
- ],
138
- [
139
- {
140
- "id": "shift",
141
- "span": "2.5"
142
- },
143
- {
144
- "id": "Z"
145
- },
146
- {
147
- "id": "X"
148
- },
149
- {
150
- "id": "C"
151
- },
152
- {
153
- "id": "V"
154
- },
155
- {
156
- "id": "B"
157
- },
158
- {
159
- "id": "N"
160
- },
161
- {
162
- "id": "M"
163
- },
164
- {
165
- "id": ","
166
- },
167
- {
168
- "id": "."
169
- },
170
- {
171
- "id": "/"
172
- },
173
- {
174
- "id": "space",
175
- "span": "2.0"
176
- }
177
- ]
178
- ]
179
- }