bec-widgets 0.90.0__py3-none-any.whl → 0.91.0__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.
Files changed (89) hide show
  1. CHANGELOG.md +20 -18
  2. PKG-INFO +1 -1
  3. bec_widgets/assets/designer_icons/code.png +0 -0
  4. bec_widgets/assets/designer_icons/color_button.png +0 -0
  5. bec_widgets/assets/designer_icons/device_box.png +0 -0
  6. bec_widgets/assets/designer_icons/device_combo_box.png +0 -0
  7. bec_widgets/assets/designer_icons/device_line_edit.png +0 -0
  8. bec_widgets/assets/designer_icons/dock_area.png +0 -0
  9. bec_widgets/assets/designer_icons/games.png +0 -0
  10. bec_widgets/assets/designer_icons/position_indicator.png +0 -0
  11. bec_widgets/assets/designer_icons/queue.png +0 -0
  12. bec_widgets/assets/designer_icons/ring_progress.png +0 -0
  13. bec_widgets/assets/designer_icons/scan_control.png +0 -0
  14. bec_widgets/assets/designer_icons/spinner.png +0 -0
  15. bec_widgets/assets/designer_icons/status.png +0 -0
  16. bec_widgets/assets/designer_icons/stop.png +0 -0
  17. bec_widgets/assets/designer_icons/text.png +0 -0
  18. bec_widgets/assets/designer_icons/toggle.png +0 -0
  19. bec_widgets/assets/designer_icons/web.png +0 -0
  20. bec_widgets/assets/status_icons/error.svg +3 -0
  21. bec_widgets/assets/status_icons/not_connected.svg +3 -0
  22. bec_widgets/assets/status_icons/refresh.svg +3 -0
  23. bec_widgets/assets/status_icons/running.svg +3 -0
  24. bec_widgets/assets/status_icons/warning.svg +3 -0
  25. bec_widgets/assets/toolbar_icons/attach_all.svg +3 -0
  26. bec_widgets/assets/toolbar_icons/device_box.svg +3 -0
  27. bec_widgets/assets/toolbar_icons/image.svg +3 -0
  28. bec_widgets/assets/toolbar_icons/motor_map.svg +3 -0
  29. bec_widgets/assets/toolbar_icons/progress.svg +3 -0
  30. bec_widgets/assets/toolbar_icons/queue.svg +3 -0
  31. bec_widgets/assets/toolbar_icons/restore_state.svg +3 -0
  32. bec_widgets/assets/toolbar_icons/ring_progress.svg +3 -0
  33. bec_widgets/assets/toolbar_icons/save_state.svg +3 -0
  34. bec_widgets/assets/toolbar_icons/scan_control.svg +3 -0
  35. bec_widgets/assets/toolbar_icons/status.svg +3 -0
  36. bec_widgets/assets/toolbar_icons/terminal.svg +3 -0
  37. bec_widgets/assets/toolbar_icons/waveform.svg +3 -0
  38. bec_widgets/cli/client.py +1 -1
  39. bec_widgets/examples/plugin_example_pyside/tictactoeplugin.py +8 -2
  40. bec_widgets/qt_utils/toolbar.py +52 -2
  41. bec_widgets/utils/generate_designer_plugin.py +1 -1
  42. bec_widgets/widgets/bec_queue/bec_queue_plugin.py +7 -2
  43. bec_widgets/widgets/bec_status_box/bec_status_box_plugin.py +7 -2
  44. bec_widgets/widgets/bec_status_box/status_item.py +14 -8
  45. bec_widgets/widgets/color_button/color_button_plugin.py +3 -2
  46. bec_widgets/widgets/device_box/device_box_plugin.py +6 -1
  47. bec_widgets/widgets/device_combobox/{device_combobox_plugin.py → device_combo_box_plugin.py} +5 -3
  48. bec_widgets/widgets/device_combobox/device_combobox.py +0 -1
  49. bec_widgets/widgets/device_combobox/{register_device_combobox.py → register_device_combo_box.py} +1 -1
  50. bec_widgets/widgets/device_line_edit/device_line_edit_plugin.py +5 -3
  51. bec_widgets/widgets/dock/dock.py +5 -2
  52. bec_widgets/widgets/dock/dock_area.py +139 -29
  53. bec_widgets/widgets/dock/dock_area.pyproject +1 -0
  54. bec_widgets/widgets/dock/dock_area_plugin.py +59 -0
  55. bec_widgets/widgets/dock/register_dock_area.py +15 -0
  56. bec_widgets/widgets/position_indicator/__init__.py +0 -0
  57. bec_widgets/widgets/position_indicator/position_indicator_plugin.py +7 -2
  58. bec_widgets/widgets/ring_progress_bar/register_ring_progress_bar.py +15 -0
  59. bec_widgets/widgets/ring_progress_bar/ring_progress_bar.pyproject +1 -0
  60. bec_widgets/widgets/ring_progress_bar/ring_progress_bar_plugin.py +58 -0
  61. bec_widgets/widgets/scan_control/register_scan_control.py +15 -0
  62. bec_widgets/widgets/scan_control/scan_control.pyproject +1 -0
  63. bec_widgets/widgets/scan_control/scan_control_plugin.py +58 -0
  64. bec_widgets/widgets/spinner/spinner_widget_plugin.py +7 -2
  65. bec_widgets/widgets/stop_button/stop_button_plugin.py +5 -3
  66. bec_widgets/widgets/text_box/register_text_box.py +15 -0
  67. bec_widgets/widgets/text_box/text_box.pyproject +1 -0
  68. bec_widgets/widgets/text_box/text_box_plugin.py +58 -0
  69. bec_widgets/widgets/toggle/toggle_switch_plugin.py +7 -2
  70. bec_widgets/widgets/vscode/register_vs_code_editor.py +15 -0
  71. bec_widgets/widgets/vscode/vs_code_editor.pyproject +1 -0
  72. bec_widgets/widgets/vscode/vs_code_editor_plugin.py +59 -0
  73. bec_widgets/widgets/waveform/bec_waveform_widget_plugin.py +1 -1
  74. bec_widgets/widgets/website/register_website_widget.py +15 -0
  75. bec_widgets/widgets/website/website_widget.pyproject +1 -0
  76. bec_widgets/widgets/website/website_widget_plugin.py +58 -0
  77. {bec_widgets-0.90.0.dist-info → bec_widgets-0.91.0.dist-info}/METADATA +1 -1
  78. {bec_widgets-0.90.0.dist-info → bec_widgets-0.91.0.dist-info}/RECORD +85 -35
  79. pyproject.toml +1 -1
  80. tests/unit_tests/test_bec_dock.py +70 -30
  81. bec_widgets/widgets/color_button/assets/color_button.png +0 -0
  82. bec_widgets/widgets/device_combobox/assets/device_combobox_icon.png +0 -0
  83. bec_widgets/widgets/device_line_edit/assets/line_edit_icon.png +0 -0
  84. bec_widgets/widgets/stop_button/assets/stop.png +0 -0
  85. /bec_widgets/assets/designer_icons/{BECWaveformWidget.png → waveform.png} +0 -0
  86. /bec_widgets/widgets/device_combobox/{device_combobox.pyproject → device_combo_box.pyproject} +0 -0
  87. {bec_widgets-0.90.0.dist-info → bec_widgets-0.91.0.dist-info}/WHEEL +0 -0
  88. {bec_widgets-0.90.0.dist-info → bec_widgets-0.91.0.dist-info}/entry_points.txt +0 -0
  89. {bec_widgets-0.90.0.dist-info → bec_widgets-0.91.0.dist-info}/licenses/LICENSE +0 -0
CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.91.0 (2024-07-23)
4
+
5
+ ### Feature
6
+
7
+ * feat(dock_area): plugin added ([`a16b87a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/a16b87ac28d164230dd2e8020f50ff3a63cd407e))
8
+
9
+ * feat(dock_area): Added toolbar to dock area to add widgets without CLI interactions ([`cce1367`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/cce1367a72fca7206d351894bd1831b7bbfa7ec6))
10
+
11
+ * feat(toolbar): expandable menu actions ([`28f26e9`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/28f26e92a46063db1a194be552156a5d3b2c43e7))
12
+
13
+ ### Fix
14
+
15
+ * fix(status_item): icons changed to material design ([`1b9c55a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/1b9c55a46a0dfd8678c8e95ff64dd6e8cfb9233e))
16
+
17
+ * fix(plugins): Qt Designer plugins icons adjusted ([`f4844d2`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/f4844d2e067ce75dc64b89b230d7932b308ddfc2))
18
+
19
+ ### Test
20
+
21
+ * test(dock_area): tests extended ([`06fab0e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/06fab0eab926cef5677d4988fd1fce09da342dd8))
22
+
3
23
  ## v0.90.0 (2024-07-23)
4
24
 
5
25
  ### Feature
@@ -122,26 +142,8 @@ curve Dialog colormap WIP ([`33495cf`](https://gitlab.psi.ch/bec/bec_widgets/-/c
122
142
 
123
143
  * fix: add missing close() call, ensure jupyter console client.shutdown() is called in closeEvent ([`e52ee26`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e52ee2604cb35096f1bd833ca9516d8a34197d35))
124
144
 
125
- * fix: BECWidget checks if it is a widget, and implements closeEvent and cleanup ([`d64758f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/d64758f268cad69e6a17bd52dc9913a6367d3cde))
126
-
127
- * fix: add exit handlers for BECConnection objects ([`6202d22`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6202d224fe85c103a4c33bd8c255f18cfd027303))
128
-
129
145
  ### Refactor
130
146
 
131
147
  * refactor: BECWidget is a mixin based on BECConnector, for each QWidget in BEC
132
148
 
133
149
  Handles closeEvent() and RPC registering/unregistering ([`c7feb69`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c7feb6952d590b569f7b0cba3b019a9af0ce0c93))
134
-
135
- ## v0.87.0 (2024-07-17)
136
-
137
- ### Feature
138
-
139
- * feat(qt_utils): added warning utility with simple API to setup warning message ([`787f749`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/787f74949bac27aaa51cbb43911919071481707c))
140
-
141
- * feat(qt_utils): added error handle utility with popup messageBoxes ([`196ef7a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/196ef7afe11a1b5dcc536f8859dc3b6044ea628e))
142
-
143
- ### Unknown
144
-
145
- * tests: add unit tests for error and warning message boxes ([`8f104cf`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8f104cf4024d3a4516e6aba5daa8fb78c85e2bfd))
146
-
147
- ## v0.86.0 (2024-07-17)
PKG-INFO CHANGED
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.90.0
3
+ Version: 0.91.0
4
4
  Summary: BEC Widgets
5
5
  Project-URL: Bug Tracker, https://gitlab.psi.ch/bec/bec_widgets/issues
6
6
  Project-URL: Homepage, https://gitlab.psi.ch/bec/bec_widgets
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#EA3323">
2
+ <path d="M479.85-265.87q19.8 0 32.69-12.46 12.9-12.46 12.9-32.26 0-19.8-12.75-32.98-12.74-13.17-32.54-13.17-19.8 0-32.69 13.16-12.9 13.15-12.9 32.95 0 19.8 12.75 32.28 12.74 12.48 32.54 12.48Zm-36.46-166.56h79.22v-262.61h-79.22v262.61Zm36.95 366.56q-86.2 0-161.5-32.39-75.3-32.4-131.74-88.84-56.44-56.44-88.84-131.73-32.39-75.3-32.39-161.59t32.39-161.67q32.4-75.37 88.75-131.34t131.69-88.62q75.34-32.65 161.67-32.65 86.34 0 161.78 32.61 75.45 32.6 131.37 88.5 55.93 55.89 88.55 131.45 32.63 75.56 32.63 161.87 0 86.29-32.65 161.58t-88.62 131.48q-55.97 56.18-131.42 88.76-75.46 32.58-161.67 32.58Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#EA3323">
2
+ <path d="m759.04-283.09-63.13-62q49.31-9.43 84.44-46.02 35.13-36.59 35.13-86.14 0-55.49-39.42-95.08-39.43-39.58-94.93-39.58h-153.3v-79.79h152.74q89.28 0 151.7 62.71Q894.7-566.28 894.7-477q0 63.7-38.26 115.96-38.27 52.26-97.4 77.95ZM596.83-443.61l-65.66-66.78h110.05v66.78h-44.39ZM804.96-56 58.48-802.48 106-850l746.48 746.48L804.96-56ZM443.22-265.87H279.43q-89.28 0-151.7-62.42Q65.3-390.72 65.3-480q0-72.57 43.09-129.54 43.09-56.98 112.09-76.07l70.13 70.7h-11.18q-55.73 0-95.32 39.3-39.59 39.31-39.59 95.61t39.66 95.61q39.66 39.3 95.5 39.3h163.54v79.22ZM319.35-446.61v-66.78h77.3l66.78 66.78H319.35Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFF55">
2
+ <path d="M478.3-145.87q-138.65 0-236.39-97.74-97.74-97.74-97.74-236.25t97.74-236.68q97.74-98.16 236.39-98.16 88.4 0 155.45 35.76 67.04 35.76 115.86 98.9V-814.7h66.78v274.92H540.91V-606h165.74q-38.56-57.74-95.3-93.33-56.74-35.58-133.05-35.58-106.88 0-180.89 73.98-74.02 73.99-74.02 180.83 0 106.84 74.02 180.93 74.02 74.08 180.91 74.08 80.16 0 147.74-46.08 67.59-46.09 95.16-121.83H803q-29.56 110.65-119.67 178.89-90.1 68.24-205.03 68.24Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#75FB4C">
2
+ <path d="m419.87-289.52 289.22-289.22-57.31-56.87L419.87-403.7 304.96-518.61l-56.31 56.87 171.22 172.22Zm60.21 223.65q-85.47 0-161.01-32.39-75.53-32.4-131.97-88.84-56.44-56.44-88.84-131.89-32.39-75.46-32.39-160.93 0-86.47 32.39-162.01 32.4-75.53 88.75-131.5t131.85-88.62q75.5-32.65 161.01-32.65 86.52 0 162.12 32.61 75.61 32.6 131.53 88.5 55.93 55.89 88.55 131.45Q894.7-566.58 894.7-480q0 85.55-32.65 161.07-32.65 75.53-88.62 131.9-55.97 56.37-131.42 88.77-75.46 32.39-161.93 32.39Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#F19E39">
2
+ <path d="M27.56-112.65 480-894.7l452.44 782.05H27.56Zm456.62-125.48q13.15 0 22.61-9.64 9.47-9.65 9.47-22.8t-9.64-22.33q-9.65-9.19-22.8-9.19t-22.61 9.36q-9.47 9.36-9.47 22.51 0 13.15 9.64 22.62 9.65 9.47 22.8 9.47ZM454-348h60v-219.48h-60V-348Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="m145.26-88.13-57.13-57.13 137.39-137.39H105.87v-79.22h256v256h-79.22v-119.65L145.26-88.13Zm669.48 0L677.91-225.52v119.65h-79.78v-256H854.7v79.22H734.48l137.39 137.39-57.13 57.13Zm-708.87-510v-79.78h119.65L88.13-814.74l57.13-57.13 137.39 137.39V-854.7h79.22v256.57h-256Zm492.26 0V-854.7h79.78v120.22l137.83-138.39 57.13 57.13-138.39 137.83H854.7v79.78H598.13Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M403.39-158.74 82.13-480l321.26-321.26v642.52Zm153.22 0v-642.52L878.44-480 556.61-158.74Zm81.57-195.74L763.13-480 638.18-605.52v251.04Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M185.09-105.87q-32.51 0-55.87-23.35-23.35-23.36-23.35-55.87v-589.82q0-32.74 23.35-56.26 23.36-23.53 55.87-23.53h589.82q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26v589.82q0 32.51-23.53 55.87-23.52 23.35-56.26 23.35H185.09Zm43.56-166.04h503.7L578-481.48l-132 171-93-127-124.35 165.57Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M443.78-28.43v-75Q305.65-118 211.54-212.11q-94.11-94.11-108.11-231.67h-75v-72.44h75Q118-654.35 212.11-748.46q94.11-94.11 231.67-108.11v-75h72.44v75q137.56 14 231.67 108.11Q842-654.35 856.57-516.22h75v72.44h-75q-14 137.56-108.11 231.67Q654.35-118 516.22-103.43v75h-72.44Zm36.12-152.66q123.4 0 211.21-87.7 87.8-87.71 87.8-211.11 0-123.4-87.7-211.21-87.71-87.8-211.11-87.8-123.4 0-211.21 87.7-87.8 87.71-87.8 211.11 0 123.4 87.7 211.21 87.71 87.8 211.11 87.8ZM480-330q-63 0-106.5-43.5T330-480q0-63 43.5-106.5T480-630q63 0 106.5 43.5T630-480q0 63-43.5 106.5T480-330Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M480-65.87q-87.51 0-162.97-31.89-75.47-31.89-131.43-87.84-55.95-55.96-87.84-131.43Q65.87-392.49 65.87-480q0-87.47 31.88-162.87 31.89-75.39 87.75-131.51 55.87-56.11 131.41-88.21Q392.44-894.7 480-894.7q15.96 0 27.78 12.16 11.83 12.16 11.83 28.07 0 15.9-11.83 27.73-11.82 11.83-27.78 11.83-139.31 0-237.11 97.8-97.8 97.8-97.8 237.1 0 139.31 97.8 237.12 97.8 97.8 237.1 97.8 139.31 0 237.12-97.8 97.8-97.8 97.8-237.11 0-15.96 11.83-27.78 11.83-11.83 27.73-11.83 15.91 0 28.07 11.83Q894.7-495.96 894.7-480q0 87.56-32.14 163.1-32.14 75.54-88.11 131.44-55.97 55.9-131.44 87.74Q567.55-65.87 480-65.87Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M854.7-105.87H105.87v-209.61H854.7v209.61Zm0-269.61H105.87v-209.04H854.7v209.04Zm0-269.04H105.87V-854.7H854.7v210.18Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M336.04-487.39 145.09-678.35v156.65H65.87v-293H358.3v79.79H201.22l191.39 190.95-56.57 56.57ZM145.09-145.87q-32.51 0-55.87-23.35-23.35-23.36-23.35-55.87V-451.7h79.22v226.61H493v79.22H145.09Zm669.82-278.3v-310.74H428.3v-79.79h386.61q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26v310.74h-79.79Zm79.79 60v218.87H553v-218.87h341.7Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M479.87-54q-87.96 0-165.74-33.42-77.79-33.43-135.53-91.18-57.75-57.74-91.18-135.66Q54-392.17 54-480.13q0-87.96 33.42-165.74 33.43-77.79 91.18-135.53 57.74-57.75 135.62-91.18Q392.09-906 480-906h36.22v340.7q24.82 10.69 40.8 33.52Q573-508.96 573-480.17q0 38.43-27.38 65.8Q518.24-387 479.79-387q-38.44 0-65.62-27.37Q387-441.74 387-480.17q0-28.79 15.98-51.61 15.98-22.83 40.8-33.52v-97.22Q378.22-650.39 336-599.76q-42.22 50.63-42.22 119.5 0 78.19 54.12 132.33 54.12 54.15 132.02 54.15 77.91 0 132.1-54.09 54.2-54.1 54.2-131.79 0-42.47-16.28-77.88-16.29-35.42-45.42-60.98l52.05-52.05q38.18 35.64 60.7 84.75 22.51 49.11 22.51 105.82 0 108.57-75.58 183.9-75.59 75.32-184.13 75.32-108.55 0-183.92-75.32-75.37-75.33-75.37-183.89 0-99.62 63.68-172.01 63.67-72.39 159.32-85.65v-93.22Q309.39-817.61 218.2-717.8 127-617.98 127-480.14q0 147.23 103.1 250.18Q333.19-127 480.14-127t249.9-103.02Q833-333.04 833-479.81q0-76.45-29.58-141.91-29.57-65.46-80.81-114.89l51.48-51.48q61.05 58.34 96.48 137.6Q906-571.23 906-479.73q0 87.82-33.42 165.6-33.43 77.79-91.18 135.53-57.74 57.75-135.66 91.18Q567.83-54 479.87-54Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M185.87-98.52v-681.39q0-32.74 23.35-56.26 23.36-23.53 55.87-23.53h429.82q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26v681.39L480-224.17 185.87-98.52Zm79.22-120.39L480-309.18l214.91 90.27v-561H265.09v561Zm0-561h429.82-429.82Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M185.09-105.87q-32.93 0-56.08-23.14-23.14-23.15-23.14-56.08v-589.82q0-33.16 23.14-56.47 23.15-23.32 56.08-23.32h589.82q33.16 0 56.47 23.32 23.32 23.31 23.32 56.47v589.82q0 32.93-23.32 56.08-23.31 23.14-56.47 23.14H185.09Zm439.21-79.22h71l79.61-79.61v-40.39H744.3l-120 120ZM281-389.48l141-140 90 90L725.52-654 679-700.52l-167 167-90-90L234.48-436 281-389.48Zm-95.91 204.39h34.56l120-120h-71l-83.56 83.57v36.43Zm350.91 0 120-120h-71l-120 120h71Zm-159.87 0 120-120h-71l-120 120h71Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M286.83-277h60v-205h-60v205Zm326.91 0h60v-420h-60v420ZM450-277h60v-118h-60v118Zm0-205h60v-60h-60v60ZM185.09-105.87q-32.51 0-55.87-23.35-23.35-23.36-23.35-55.87v-589.82q0-32.74 23.35-56.26 23.36-23.53 55.87-23.53h589.82q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26v589.82q0 32.51-23.53 55.87-23.52 23.35-56.26 23.35H185.09Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M145.09-145.87q-32.51 0-55.87-23.35-23.35-23.36-23.35-55.87v-509.82q0-32.74 23.35-56.26 23.36-23.53 55.87-23.53h669.82q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26v509.82q0 32.51-23.53 55.87-23.52 23.35-56.26 23.35H145.09Zm0-79.22h669.82v-425.82H145.09v425.82ZM300-292l-42-42 103-104-104-104 43-42 146 146-146 146Zm190 4v-60h220v60H490Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M126-206.43 66.43-266 380-579.57 539.43-419.7l298-335 56.14 54.57-352.44 399.26L380-460.43l-254 254Z"/>
3
+ </svg>
bec_widgets/cli/client.py CHANGED
@@ -351,7 +351,7 @@ class BECDockArea(RPCBase, BECGuiClientMixin):
351
351
  name: "str" = None,
352
352
  position: "Literal['bottom', 'top', 'left', 'right', 'above', 'below']" = None,
353
353
  relative_to: "BECDock | None" = None,
354
- closable: "bool" = False,
354
+ closable: "bool" = True,
355
355
  floating: "bool" = False,
356
356
  prefix: "str" = "dock",
357
357
  widget: "str | QWidget | None" = None,
@@ -1,11 +1,14 @@
1
1
  # Copyright (C) 2022 The Qt Company Ltd.
2
2
  # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
+ import os
3
4
 
4
5
  from qtpy.QtDesigner import QDesignerCustomWidgetInterface
5
6
  from qtpy.QtGui import QIcon
6
7
  from tictactoe import TicTacToe
7
8
  from tictactoetaskmenu import TicTacToeTaskMenuFactory
8
9
 
10
+ import bec_widgets
11
+
9
12
  DOM_XML = """
10
13
  <ui language='c++'>
11
14
  <widget class='TicTacToe' name='ticTacToe'>
@@ -24,6 +27,8 @@ DOM_XML = """
24
27
  </ui>
25
28
  """
26
29
 
30
+ MODULE_PATH = os.path.dirname(bec_widgets.__file__)
31
+
27
32
 
28
33
  class TicTacToePlugin(QDesignerCustomWidgetInterface): # pragma: no cover
29
34
  def __init__(self):
@@ -38,10 +43,11 @@ class TicTacToePlugin(QDesignerCustomWidgetInterface): # pragma: no cover
38
43
  return DOM_XML
39
44
 
40
45
  def group(self):
41
- return ""
46
+ return "Games"
42
47
 
43
48
  def icon(self):
44
- return QIcon()
49
+ icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "games.png")
50
+ return QIcon(icon_path)
45
51
 
46
52
  def includeFile(self):
47
53
  return "tictactoe"
@@ -5,7 +5,7 @@ from collections import defaultdict
5
5
 
6
6
  from qtpy.QtCore import QSize
7
7
  from qtpy.QtGui import QAction, QIcon
8
- from qtpy.QtWidgets import QHBoxLayout, QLabel, QToolBar, QToolButton, QWidget
8
+ from qtpy.QtWidgets import QHBoxLayout, QLabel, QMenu, QToolBar, QToolButton, QWidget
9
9
 
10
10
  import bec_widgets
11
11
 
@@ -98,6 +98,52 @@ class DeviceSelectionAction(ToolBarAction):
98
98
  self.device_combobox.setStyleSheet(f"QComboBox {{ background-color: {color}; }}")
99
99
 
100
100
 
101
+ class ExpandableMenuAction(ToolBarAction):
102
+ """
103
+ Action for an expandable menu in the toolbar.
104
+
105
+ Args:
106
+ label (str): The label for the menu.
107
+ actions (dict): A dictionary of actions to populate the menu.
108
+ icon_path (str, optional): The path to the icon file. Defaults to None.
109
+
110
+ """
111
+
112
+ def __init__(self, label: str, actions: dict, icon_path: str = None):
113
+ super().__init__(icon_path, label)
114
+ self.actions = actions
115
+ self.widgets = defaultdict(dict)
116
+
117
+ def add_to_toolbar(self, toolbar: QToolBar, target: QWidget):
118
+ button = QToolButton(toolbar)
119
+ if self.icon_path:
120
+ button.setIcon(QIcon(self.icon_path))
121
+ button.setText(self.tooltip)
122
+ button.setPopupMode(QToolButton.InstantPopup)
123
+ button.setStyleSheet(
124
+ """
125
+ QToolButton {
126
+ font-size: 14px;
127
+ }
128
+ QMenu {
129
+ font-size: 14px;
130
+ }
131
+ """
132
+ )
133
+ menu = QMenu(button)
134
+ for action_id, action in self.actions.items():
135
+ sub_action = QAction(action.tooltip, target)
136
+ if action.icon_path:
137
+ icon = QIcon()
138
+ icon.addFile(action.icon_path, size=QSize(20, 20))
139
+ sub_action.setIcon(icon)
140
+ sub_action.setCheckable(action.checkable)
141
+ menu.addAction(sub_action)
142
+ self.widgets[action_id] = sub_action
143
+ button.setMenu(menu)
144
+ toolbar.addWidget(button)
145
+
146
+
101
147
  class ModularToolBar(QToolBar):
102
148
  """Modular toolbar with optional automatic initialization.
103
149
  Args:
@@ -108,7 +154,11 @@ class ModularToolBar(QToolBar):
108
154
  """
109
155
 
110
156
  def __init__(
111
- self, parent=None, actions=None, target_widget=None, color: str = "rgba(255, 255, 255, 0)"
157
+ self,
158
+ parent=None,
159
+ actions: dict | None = None,
160
+ target_widget=None,
161
+ color: str = "rgba(255, 255, 255, 0)",
112
162
  ):
113
163
  super().__init__(parent)
114
164
 
@@ -4,7 +4,7 @@ import re
4
4
 
5
5
  from qtpy.QtCore import QObject
6
6
 
7
- EXCLUDED_PLUGINS = ["BECConnector", "BECDockArea", "BECDock"]
7
+ EXCLUDED_PLUGINS = ["BECConnector", "BECDockArea", "BECDock", "BECFigure"]
8
8
 
9
9
 
10
10
  class DesignerPluginInfo:
@@ -1,9 +1,11 @@
1
1
  # Copyright (C) 2022 The Qt Company Ltd.
2
2
  # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
+ import os
3
4
 
4
5
  from qtpy.QtDesigner import QDesignerCustomWidgetInterface
5
6
  from qtpy.QtGui import QIcon
6
7
 
8
+ import bec_widgets
7
9
  from bec_widgets.widgets.bec_queue.bec_queue import BECQueue
8
10
 
9
11
  DOM_XML = """
@@ -13,6 +15,8 @@ DOM_XML = """
13
15
  </ui>
14
16
  """
15
17
 
18
+ MODULE_PATH = os.path.dirname(bec_widgets.__file__)
19
+
16
20
 
17
21
  class BECQueuePlugin(QDesignerCustomWidgetInterface): # pragma: no cover
18
22
  def __init__(self):
@@ -27,10 +31,11 @@ class BECQueuePlugin(QDesignerCustomWidgetInterface): # pragma: no cover
27
31
  return DOM_XML
28
32
 
29
33
  def group(self):
30
- return ""
34
+ return "BEC Services"
31
35
 
32
36
  def icon(self):
33
- return QIcon()
37
+ icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "device_line_edit.png")
38
+ return QIcon(icon_path)
34
39
 
35
40
  def includeFile(self):
36
41
  return "bec_queue"
@@ -1,9 +1,11 @@
1
1
  # Copyright (C) 2022 The Qt Company Ltd.
2
2
  # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
+ import os
3
4
 
4
5
  from qtpy.QtDesigner import QDesignerCustomWidgetInterface
5
6
  from qtpy.QtGui import QIcon
6
7
 
8
+ import bec_widgets
7
9
  from bec_widgets.widgets.bec_status_box.bec_status_box import BECStatusBox
8
10
 
9
11
  DOM_XML = """
@@ -13,6 +15,8 @@ DOM_XML = """
13
15
  </ui>
14
16
  """
15
17
 
18
+ MODULE_PATH = os.path.dirname(bec_widgets.__file__)
19
+
16
20
 
17
21
  class BECStatusBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
18
22
  def __init__(self):
@@ -27,10 +31,11 @@ class BECStatusBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
27
31
  return DOM_XML
28
32
 
29
33
  def group(self):
30
- return ""
34
+ return "BEC Services"
31
35
 
32
36
  def icon(self):
33
- return QIcon()
37
+ icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "status.png")
38
+ return QIcon(icon_path)
34
39
 
35
40
  def includeFile(self):
36
41
  return "bec_status_box"
@@ -2,24 +2,30 @@
2
2
  The widget is bound to be used with the BECStatusBox widget."""
3
3
 
4
4
  import enum
5
+ import os
5
6
  from datetime import datetime
6
7
 
7
8
  from bec_lib.utils.import_utils import lazy_import_from
8
9
  from qtpy.QtCore import Qt, Slot
9
- from qtpy.QtWidgets import QDialog, QHBoxLayout, QLabel, QStyle, QVBoxLayout, QWidget
10
+ from qtpy.QtGui import QIcon
11
+ from qtpy.QtWidgets import QDialog, QHBoxLayout, QLabel, QVBoxLayout, QWidget
12
+
13
+ import bec_widgets
10
14
 
11
15
  # TODO : Put normal imports back when Pydantic gets faster
12
16
  BECStatus = lazy_import_from("bec_lib.messages", ("BECStatus",))
13
17
 
18
+ MODULE_PATH = os.path.dirname(bec_widgets.__file__)
19
+
14
20
 
15
21
  class IconsEnum(enum.Enum):
16
22
  """Enum class for icons in the status item widget."""
17
23
 
18
- RUNNING = "SP_DialogApplyButton"
19
- BUSY = "SP_BrowserReload"
20
- IDLE = "SP_MessageBoxWarning"
21
- ERROR = "SP_DialogCancelButton"
22
- NOTCONNECTED = "SP_TitleBarContextHelpButton"
24
+ RUNNING = os.path.join(MODULE_PATH, "assets", "status_icons", "running.svg")
25
+ BUSY = os.path.join(MODULE_PATH, "assets", "status_icons", "refresh.svg")
26
+ IDLE = os.path.join(MODULE_PATH, "assets", "status_icons", "warning.svg")
27
+ ERROR = os.path.join(MODULE_PATH, "assets", "status_icons", "error.svg")
28
+ NOTCONNECTED = os.path.join(MODULE_PATH, "assets", "status_icons", "not_connected.svg")
23
29
 
24
30
 
25
31
  class StatusItem(QWidget):
@@ -91,8 +97,8 @@ class StatusItem(QWidget):
91
97
 
92
98
  def set_status(self) -> None:
93
99
  """Set the status icon for the status item widget."""
94
- icon_name = IconsEnum[self.config.status].value
95
- icon = self.style().standardIcon(getattr(QStyle.StandardPixmap, icon_name))
100
+ icon_path = IconsEnum[self.config.status].value
101
+ icon = QIcon(icon_path)
96
102
  self._icon.setPixmap(icon.pixmap(*self.icon_size))
97
103
  self._icon.setAlignment(Qt.AlignmentFlag.AlignRight)
98
104
 
@@ -3,6 +3,7 @@ import os
3
3
  from qtpy.QtDesigner import QDesignerCustomWidgetInterface
4
4
  from qtpy.QtGui import QIcon
5
5
 
6
+ import bec_widgets
6
7
  from bec_widgets.widgets.color_button.color_button import ColorButton
7
8
 
8
9
  DOM_XML = """
@@ -11,6 +12,7 @@ DOM_XML = """
11
12
  </widget>
12
13
  </ui>
13
14
  """
15
+ MODULE_PATH = os.path.dirname(bec_widgets.__file__)
14
16
 
15
17
 
16
18
  class ColorButtonPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
@@ -29,8 +31,7 @@ class ColorButtonPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
29
31
  return "BEC Buttons"
30
32
 
31
33
  def icon(self):
32
- current_path = os.path.dirname(__file__)
33
- icon_path = os.path.join(current_path, "assets", "color_button.png")
34
+ icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "color_button.png")
34
35
  return QIcon(icon_path)
35
36
 
36
37
  def includeFile(self):
@@ -1,9 +1,11 @@
1
1
  # Copyright (C) 2022 The Qt Company Ltd.
2
2
  # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
+ import os
3
4
 
4
5
  from qtpy.QtDesigner import QDesignerCustomWidgetInterface
5
6
  from qtpy.QtGui import QIcon
6
7
 
8
+ import bec_widgets
7
9
  from bec_widgets.widgets.device_box.device_box import DeviceBox
8
10
 
9
11
  DOM_XML = """
@@ -13,6 +15,8 @@ DOM_XML = """
13
15
  </ui>
14
16
  """
15
17
 
18
+ MODULE_PATH = os.path.dirname(bec_widgets.__file__)
19
+
16
20
 
17
21
  class DeviceBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
18
22
  def __init__(self):
@@ -30,7 +34,8 @@ class DeviceBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
30
34
  return "Device Control"
31
35
 
32
36
  def icon(self):
33
- return QIcon()
37
+ icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "device_box.png")
38
+ return QIcon(icon_path)
34
39
 
35
40
  def includeFile(self):
36
41
  return "device_box"
@@ -5,6 +5,7 @@ import os
5
5
  from qtpy.QtDesigner import QDesignerCustomWidgetInterface
6
6
  from qtpy.QtGui import QIcon
7
7
 
8
+ import bec_widgets
8
9
  from bec_widgets.widgets.device_combobox.device_combobox import DeviceComboBox
9
10
 
10
11
  DOM_XML = """
@@ -14,6 +15,8 @@ DOM_XML = """
14
15
  </ui>
15
16
  """
16
17
 
18
+ MODULE_PATH = os.path.dirname(bec_widgets.__file__)
19
+
17
20
 
18
21
  class DeviceComboBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
19
22
  def __init__(self):
@@ -28,11 +31,10 @@ class DeviceComboBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
28
31
  return DOM_XML
29
32
 
30
33
  def group(self):
31
- return "BEC Device Inputs"
34
+ return "Device Control"
32
35
 
33
36
  def icon(self):
34
- current_path = os.path.dirname(__file__)
35
- icon_path = os.path.join(current_path, "assets", "device_combobox_icon.png")
37
+ icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "device_combo_box.png")
36
38
  return QIcon(icon_path)
37
39
 
38
40
  def includeFile(self):
@@ -2,7 +2,6 @@ from typing import TYPE_CHECKING
2
2
 
3
3
  from qtpy.QtWidgets import QComboBox
4
4
 
5
- from bec_widgets.utils.bec_widget import BECWidget
6
5
  from bec_widgets.widgets.base_classes.device_input_base import DeviceInputBase, DeviceInputConfig
7
6
 
8
7
  if TYPE_CHECKING:
@@ -6,7 +6,7 @@ def main(): # pragma: no cover
6
6
  return
7
7
  from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
8
8
 
9
- from bec_widgets.widgets.device_combobox.device_combobox_plugin import DeviceComboBoxPlugin
9
+ from bec_widgets.widgets.device_combobox.device_combo_box_plugin import DeviceComboBoxPlugin
10
10
 
11
11
  QPyDesignerCustomWidgetCollection.addCustomWidget(DeviceComboBoxPlugin())
12
12
 
@@ -5,6 +5,7 @@ import os
5
5
  from qtpy.QtDesigner import QDesignerCustomWidgetInterface
6
6
  from qtpy.QtGui import QIcon
7
7
 
8
+ import bec_widgets
8
9
  from bec_widgets.widgets.device_line_edit.device_line_edit import DeviceLineEdit
9
10
 
10
11
  DOM_XML = """
@@ -14,6 +15,8 @@ DOM_XML = """
14
15
  </ui>
15
16
  """
16
17
 
18
+ MODULE_PATH = os.path.dirname(bec_widgets.__file__)
19
+
17
20
 
18
21
  class DeviceLineEditPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
19
22
  def __init__(self):
@@ -28,11 +31,10 @@ class DeviceLineEditPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
28
31
  return DOM_XML
29
32
 
30
33
  def group(self):
31
- return "BEC Device Inputs"
34
+ return "Device Control"
32
35
 
33
36
  def icon(self):
34
- current_path = os.path.dirname(__file__)
35
- icon_path = os.path.join(current_path, "assets", "line_edit_icon.png")
37
+ icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "device_line_edit.png")
36
38
  return QIcon(icon_path)
37
39
 
38
40
  def includeFile(self):
@@ -46,7 +46,7 @@ class BECDock(BECWidget, Dock):
46
46
  def __init__(
47
47
  self,
48
48
  parent: QWidget | None = None,
49
- parent_dock_area: BECDockArea | None = None,
49
+ parent_dock_area: QWidget | None = None,
50
50
  config: DockConfig | None = None,
51
51
  name: str | None = None,
52
52
  client=None,
@@ -64,6 +64,8 @@ class BECDock(BECWidget, Dock):
64
64
  super().__init__(client=client, config=config, gui_id=gui_id)
65
65
  Dock.__init__(self, name=name, **kwargs)
66
66
 
67
+ self.parent_dock_area = parent_dock_area
68
+
67
69
  # Layout Manager
68
70
  self.layout_manager = GridLayoutManager(self.layout)
69
71
 
@@ -230,7 +232,7 @@ class BECDock(BECWidget, Dock):
230
232
  Remove the dock from the parent dock area.
231
233
  """
232
234
  # self.cleanup()
233
- self.orig_area.remove_dock(self.name())
235
+ self.parent_dock_area.remove_dock(self.name())
234
236
 
235
237
  def cleanup(self):
236
238
  """
@@ -249,3 +251,4 @@ class BECDock(BECWidget, Dock):
249
251
  """
250
252
  self.cleanup()
251
253
  super().close()
254
+ self.parent_dock_area.dock_area.docks.pop(self.name(), None)