bec-widgets 0.87.1__py3-none-any.whl → 0.88.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 (59) hide show
  1. CHANGELOG.md +58 -62
  2. PKG-INFO +1 -1
  3. bec_widgets/assets/designer_icons/BECWaveformWidget.png +0 -0
  4. bec_widgets/assets/designer_icons/colormap_selector.png +0 -0
  5. bec_widgets/assets/toolbar_icons/add.svg +3 -0
  6. bec_widgets/assets/toolbar_icons/auto_range.svg +3 -0
  7. bec_widgets/assets/toolbar_icons/drag_pan_mode.svg +3 -0
  8. bec_widgets/assets/toolbar_icons/export.svg +9 -0
  9. bec_widgets/assets/toolbar_icons/fitting_parameters.svg +3 -0
  10. bec_widgets/assets/toolbar_icons/import.svg +9 -0
  11. bec_widgets/assets/toolbar_icons/line_axis.svg +3 -0
  12. bec_widgets/assets/toolbar_icons/photo_library.svg +3 -0
  13. bec_widgets/assets/toolbar_icons/rectangle_mode.svg +3 -0
  14. bec_widgets/assets/toolbar_icons/remove.svg +5 -0
  15. bec_widgets/assets/toolbar_icons/save.svg +3 -0
  16. bec_widgets/assets/toolbar_icons/settings.svg +4 -0
  17. bec_widgets/cli/client.py +307 -5
  18. bec_widgets/cli/server.py +2 -1
  19. bec_widgets/examples/jupyter_console/jupyter_console_window.py +12 -5
  20. bec_widgets/examples/plugin_example_pyside/tictactoe.py +1 -0
  21. bec_widgets/widgets/{color_map_selector/color_map_selector.py → colormap_selector/colormap_selector.py} +3 -1
  22. bec_widgets/widgets/colormap_selector/colormap_selector.pyproject +1 -0
  23. bec_widgets/widgets/{color_map_selector/color_map_selector_plugin.py → colormap_selector/colormap_selector_plugin.py} +8 -6
  24. bec_widgets/widgets/{color_map_selector/register_color_map_selector.py → colormap_selector/register_colormap_selector.py} +1 -1
  25. bec_widgets/widgets/figure/figure.py +12 -0
  26. bec_widgets/widgets/figure/plots/axis_settings.py +38 -11
  27. bec_widgets/widgets/figure/plots/image/image.py +1 -0
  28. bec_widgets/widgets/figure/plots/motor_map/motor_map.py +1 -0
  29. bec_widgets/widgets/figure/plots/plot_base.py +7 -3
  30. bec_widgets/widgets/figure/plots/waveform/waveform.py +48 -50
  31. bec_widgets/widgets/figure/plots/waveform/waveform_curve.py +9 -0
  32. bec_widgets/widgets/motor_map/bec_motor_map_widget_plugin.py +1 -1
  33. bec_widgets/widgets/motor_map/motor_map_widget.py +7 -0
  34. bec_widgets/widgets/waveform/__init__.py +0 -0
  35. bec_widgets/widgets/waveform/bec_waveform_widget.pyproject +1 -0
  36. bec_widgets/widgets/waveform/bec_waveform_widget_plugin.py +59 -0
  37. bec_widgets/widgets/waveform/register_bec_waveform_widget.py +15 -0
  38. bec_widgets/widgets/waveform/waveform_toolbar/__init__.py +0 -0
  39. bec_widgets/widgets/waveform/waveform_toolbar/curve_dialog/__init__.py +0 -0
  40. bec_widgets/widgets/waveform/waveform_toolbar/curve_dialog/curve_dialog.py +341 -0
  41. bec_widgets/widgets/waveform/waveform_toolbar/curve_dialog/curve_dialog.ui +358 -0
  42. bec_widgets/widgets/waveform/waveform_toolbar/dap_summary_dialog/__init__.py +0 -0
  43. bec_widgets/widgets/waveform/waveform_toolbar/dap_summary_dialog/dap_summary.ui +127 -0
  44. bec_widgets/widgets/waveform/waveform_toolbar/dap_summary_dialog/dap_summary_dialog.py +69 -0
  45. bec_widgets/widgets/waveform/waveform_toolbar/waveform_toolbar.py +117 -0
  46. bec_widgets/widgets/waveform/waveform_widget.py +571 -0
  47. {bec_widgets-0.87.1.dist-info → bec_widgets-0.88.0.dist-info}/METADATA +1 -1
  48. {bec_widgets-0.87.1.dist-info → bec_widgets-0.88.0.dist-info}/RECORD +57 -30
  49. pyproject.toml +1 -1
  50. tests/unit_tests/test_color_map_selector.py +1 -1
  51. tests/unit_tests/test_waveform_widget.py +264 -0
  52. bec_widgets/widgets/color_map_selector/assets/color_map_selector_icon.png +0 -0
  53. bec_widgets/widgets/color_map_selector/color_map_selector.pyproject +0 -1
  54. /bec_widgets/assets/{bec_widgets_icon.png → app_icons/bec_widgets_icon.png} +0 -0
  55. /bec_widgets/assets/{terminal_icon.png → app_icons/terminal_icon.png} +0 -0
  56. /bec_widgets/widgets/{color_map_selector → colormap_selector}/__init__.py +0 -0
  57. {bec_widgets-0.87.1.dist-info → bec_widgets-0.88.0.dist-info}/WHEEL +0 -0
  58. {bec_widgets-0.87.1.dist-info → bec_widgets-0.88.0.dist-info}/entry_points.txt +0 -0
  59. {bec_widgets-0.87.1.dist-info → bec_widgets-0.88.0.dist-info}/licenses/LICENSE +0 -0
CHANGELOG.md CHANGED
@@ -1,5 +1,63 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.88.0 (2024-07-19)
4
+
5
+ ### Feature
6
+
7
+ * feat(waveform_widget): designer plugin added ([`1f8ef52`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/1f8ef52b606283038052640849094f515a463403))
8
+
9
+ * feat(waveform_widget): switch between drag and rectangle mode ([`2be009c`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2be009c6477ba26c5cfb4d827534c5d5eb428999))
10
+
11
+ * feat(waveform_widget): autorange button ([`8df6b00`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8df6b003e5c6a942fa2e875d9790e492c087bf26))
12
+
13
+ * feat(waveform_widget): dap parameter window ([`1e551d6`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/1e551d6e9696f79ea2e0a179d13a4fc6c2a128b2))
14
+
15
+ * feat(waveform): export to matplotlib window of current scene ([`8d93405`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8d9340539967b06b1e15f21a2106a39d5c740f31))
16
+
17
+ * feat(figure): export dialog can be launched from CLI and from toolbar ([`6ff6111`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6ff611109153b9412dce37c527b19e839d99bba7))
18
+
19
+ * feat(waveform_widget): added error handle utility ([`a8ff1d4`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/a8ff1d4cd09cae5eaeb4bd0ea90fdd102e32f3a3))
20
+
21
+ * feat(curve_dialog): add DAP functionality ([`e830565`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e8305652fde384da037242cf8f7e3606f22bcfb6))
22
+
23
+ * feat(curve_dialog): curves can be added ([`c926a75`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c926a75a7927d672c044ea8f68771209ae5accc6))
24
+
25
+ * feat(waveform_widget): BECWaveformWidget toolbar added import/export config ([`fa9b171`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/fa9b17191ddbb4043a658dae9aa0801e1dc22b84))
26
+
27
+ * feat(waveform_widget): BECWaveformWidget added with toolbar ([`755b394`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/755b394c1c4d7c443c442d89c630d08ce5415554))
28
+
29
+ ### Fix
30
+
31
+ * fix(waveform_widget): plot API unified with BECFigure ([`2c8764a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2c8764a27de89b39b717032b58465e120ec57fbc))
32
+
33
+ * fix(colormap_selector): compatibility for PyQt6 when using designer fixed ([`50135b5`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/50135b5fe90a88618291e9357f180cb19251dace))
34
+
35
+ * fix(waveform_widget): adapted for BECWidget base class ([`6eb313f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6eb313fa76e559d62ecd8fa8849142b83817e47c))
36
+
37
+ * fix(waveform_widget): temporary disabled save/load config ([`7089cf3`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/7089cf356a43d805241d5621952e544d690e65e0))
38
+
39
+ * fix(waveform_widget): use @SafeSlot decorator for automatic error message ([`8e588d7`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8e588d79c86e950f6915e89c08fa9415c4bd8033))
40
+
41
+ * fix(waveform): colormaps of curves can be changed and normalised
42
+
43
+ feat(waveform): colormap can be changed from curve dialog
44
+
45
+ fix(curve_dialog): default dialog parameters fixed
46
+
47
+ curve Dialog colormap WIP ([`33495cf`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/33495cfe03b363f18db61d8af2983f49027b7a43))
48
+
49
+ * fix(waveform_widget): adapted for changes from improved scan logic from waveform widget ([`8ac35d7`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8ac35d7280b1ff007c10612228d163cc0c5d1a99))
50
+
51
+ ### Refactor
52
+
53
+ * refactor(icons): icons moved to the assets directory ([`a8b6ef2`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/a8b6ef20cccae87515b10f054d0ed5b10e152769))
54
+
55
+ * refactor(waveform_widget): removed PYSIDE6 check ([`47fcb9e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/47fcb9ebfe35ae600cced95a1edc68f6f6e37a04))
56
+
57
+ ### Test
58
+
59
+ * test(waveform_widget): test added ([`8d764e2`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8d764e2d46a1e017dadc3c4630648c1ca708afc2))
60
+
3
61
  ## v0.87.1 (2024-07-18)
4
62
 
5
63
  ### Fix
@@ -81,65 +139,3 @@ Handles closeEvent() and RPC registering/unregistering ([`c7feb69`](https://gitl
81
139
  ### Test
82
140
 
83
141
  * test(waveform): tests extended ([`006992e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/006992e43cc56d56261bc4fd3e9cae9abcab2153))
84
-
85
- ## v0.83.1 (2024-07-14)
86
-
87
- ### Fix
88
-
89
- * fix(toolbar): default transparent background ([`eab7883`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/eab78839792f175b7ac127ca603385c6baa5ff15))
90
-
91
- * fix: use apply_theme ([`2d4249e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2d4249e73a792fed1c2c7ab79bb8aec38c57466c))
92
-
93
- * fix: spinner: update reference image for widget test, use apply_theme ([`63db135`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/63db1352ee883d35670b3a692dbe51d6d01872ae))
94
-
95
- * fix: replace pyqtdarktheme by qdarkstyle, add 'apply_theme' function (in utils/colors.py) ([`8308115`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8308115f3646245d825fc47ab57297d3460bbcf5))
96
-
97
- ### Test
98
-
99
- * test(toolbar): added reference pngs for spinner for Darwin ([`11a7204`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/11a7204c98e0bf211a8721d296b45d24a3102b97))
100
-
101
- ## v0.83.0 (2024-07-08)
102
-
103
- ### Feature
104
-
105
- * feat: added reference utils to compare renderings of widgets ([`2988fd3`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2988fd387e6b8076fffec1d57e3ccab89ddb2aeb))
106
-
107
- * feat(widgets): added device box with spinner ([`1b017ed`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/1b017edfad8e78fa079210486123976695b8915c))
108
-
109
- * feat(designer): added option to skip the widget validation for DesignerPluginGenerator ([`41bcb80`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/41bcb801674ab6c4d6069bba34ffee09c9e665db))
110
-
111
- ### Fix
112
-
113
- * fix(terminal): added default args to avoid designer crashes on startup ([`360d171`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/360d17135573e44b80ab517756da3c0b31daab0f))
114
-
115
- * fix(widget): fixed widget cleanup routine ([`2b29e34`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2b29e34b52d056349647bb2fcf649b749a60d292))
116
-
117
- * fix(bec_widget): added cleanup method to bec widget base class ([`fd8766e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/fd8766ed87770661da6591aeb4df5abdaf38afc7))
118
-
119
- * fix(website): fixed dummy input ([`903ce7d`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/903ce7d46b5d37d40486d0fda92d3694d3faca62))
120
-
121
- ### Test
122
-
123
- * test(vscode): fixed vscode tests for new cleanup routine ([`eb26e2a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/eb26e2a11b229a52efe2e6d4fb28d760d3740136))
124
-
125
- * test(vscode): improved vscode test ([`5de8804`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/5de8804da1e41eafad2472344904b3324438c13b))
126
-
127
- ## v0.82.2 (2024-07-08)
128
-
129
- ### Fix
130
-
131
- * fix(rpc_server): pass cli config to server ([`90178e2`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/90178e2f61fa9dac7d82c0d0db40a9767bb133e6))
132
-
133
- ## v0.82.1 (2024-07-07)
134
-
135
- ### Fix
136
-
137
- * fix(motor_map): bug where motors without limits were selected ([`c78cd89`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c78cd898f203f950d7cb589eb5609feaa88062cf))
138
-
139
- ### Test
140
-
141
- * test(setting_dialog): tests added ([`74a249b`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/74a249bd065d01006cb532bfff2a9bfedb34b592))
142
-
143
- ### Unknown
144
-
145
- * tests(motor_map_widget): tests added ([`734f4c7`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/734f4c77507a1edafd477d81b5f7401d8e759be2))
PKG-INFO CHANGED
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.87.1
3
+ Version: 0.88.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="#FFFFFF">
2
+ <path d="M440.39-440.39H185.87v-79.22h254.52V-774.7h79.22v255.09H774.7v79.22H519.61v254.52h-79.22v-254.52Z"/>
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="M571.91-279.09h191v-194h-60v134h-131v60ZM198.09-486.91h60v-134h131v-60h-191v194Zm-53 341.04q-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-509.82H145.09v509.82Zm0 0v-509.82 509.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="M480-54 303.43-230.56 361-288.13l79.39 78.83v-231.09H209.3L283.13-366l-57.57 57.57L54-480l172.56-172.57L284.13-595l-74.83 75.39h231.09v-231.65L366-676.87l-57.57-57.57L480-906l171.57 171.56L594-676.87l-74.39-74.39v231.65h231.65L676.87-594l57.57-57.57L906-480 734.44-308.43 676.87-366l74.39-74.39H519.61v231.09L599-288.13l57.57 57.57L480-54Z"/>
3
+ </svg>
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="48px" viewBox="0 0 24 24" width="48px"
2
+ fill="#FFFFFF">
3
+ <g>
4
+ <rect fill="none" height="24" width="24"/>
5
+ </g>
6
+ <g>
7
+ <path d="M18,15v3H6v-3H4v3c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2v-3H18z M7,9l1.41,1.41L11,7.83V16h2V7.83l2.59,2.58L17,9l-5-5L7,9z"/>
8
+ </g>
9
+ </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="m78.89-112.59 263.02-367.17h202l303.5-354.22v721.39H78.89Zm62.24-262.74-54.7-39.78 166.59-233.02h201L640.46-864.8l51.45 44.26-205.82 240.78H287.33l-146.2 204.43Zm70.54 194.37h567.37v-468.78L574.98-411.63H376.22L211.67-180.96Zm567.37 0Z"/>
3
+ </svg>
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="48px" viewBox="0 0 24 24" width="48px"
2
+ fill="#FFFFFF">
3
+ <g>
4
+ <rect fill="none" height="24" width="24"/>
5
+ </g>
6
+ <g>
7
+ <path d="M18,15v3H6v-3H4v3c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2v-3H18z M17,11l-1.41-1.41L13,12.17V4h-2v8.17L8.41,9.59L7,11l5,5 L17,11z"/>
8
+ </g>
9
+ </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="M110.39-110.39v-89.57l77.52-77.52v167.09h-77.52Zm165.57 0v-250.13l77.52-77.52v327.65h-77.52Zm165.56 0v-327.65l77.52 77.95v249.7h-77.52Zm165.57 0v-250.83l77.52-76.96v327.79h-77.52Zm165.56 0v-411.83l76.96-76.96v488.79h-76.96ZM110.39-335.65v-112.7L400-735.96l160 160 289.61-290.61v112.14L560-463.26l-160-160-289.61 287.61Z"/>
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="M354.61-386.61h391l-127-171-103 135-68-87-93 123ZM274.7-195.48q-32.51 0-55.87-23.35-23.35-23.36-23.35-55.87v-549.82q0-32.74 23.35-56.26 23.36-23.53 55.87-23.53h549.82q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26v549.82q0 32.51-23.53 55.87-23.52 23.35-56.26 23.35H274.7Zm0-79.22h549.82v-549.82H274.7v549.82ZM135.48-55.69q-32.74 0-56.26-23.53-23.53-23.52-23.53-56.26v-629.04h79.79v629.04h629.04v79.79H135.48ZM274.7-824.52v549.82-549.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="M444.19-421.3q39.72 0 67.4-27.78 27.67-27.78 27.67-66.91 0-39.14-27.71-66.57Q483.83-610 444.4-610q-39.44 0-66.92 27.28Q350-555.44 350-516.3q0 39.13 27.36 67.06 27.35 27.94 66.83 27.94ZM634.52-274 532.78-375.74q-22.56 12.31-44.41 19.02-21.84 6.72-43.28 6.72-69.57 0-117.7-48.62-48.13-48.62-48.13-117.88 0-67.98 48.29-116.39t117.08-48.41q68.79 0 117.08 48.41Q610-584.48 610-515.75q0 21.72-6.93 44.13-6.94 22.4-20.37 44.97l102.73 102.74L634.52-274ZM185.09-105.87q-32.51 0-55.87-23.35-23.35-23.36-23.35-55.87V-352h79.22v166.91H352v79.22H185.09Zm422.91 0v-79.22h166.91V-352h79.79v166.91q0 32.51-23.53 55.87-23.52 23.35-56.26 23.35H608ZM105.87-608v-166.91q0-32.74 23.35-56.26 23.36-23.53 55.87-23.53H352v79.79H185.09V-608h-79.22Zm669.04 0v-166.91H608v-79.79h166.91q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26V-608h-79.79Z"/>
3
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="48px" viewBox="0 0 24 24" width="48px"
2
+ fill="#8B1A10">
3
+ <rect fill="none" height="24" width="24"/>
4
+ <path d="M19,19H5V5h14V19z M3,3v18h18V3H3z M17,15.59L15.59,17L12,13.41L8.41,17L7,15.59L10.59,12L7,8.41L8.41,7L12,10.59L15.59,7 L17,8.41L13.41,12L17,15.59z"/>
5
+ </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-689.22v504.13q0 32.51-23.53 55.87-23.52 23.35-56.26 23.35H185.09q-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.53h504.13L854.7-689.22Zm-79.79 35.48L653.74-774.91H185.09v589.82h589.82v-468.65ZM479.76-250.09q43.24 0 73.74-30.26 30.5-30.27 30.5-73.5 0-43.24-30.26-73.74-30.27-30.5-73.5-30.5-43.24 0-73.74 30.27-30.5 30.26-30.5 73.5 0 43.23 30.26 73.73 30.27 30.5 73.5 30.5ZM238.09-578.91h358v-143h-358v143Zm-53-74.83v468.65-589.82 121.17Z"/>
3
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 0 24 24" width="48px" fill="#FFFFFF">
2
+ <path d="M0 0h24v24H0V0z" fill="none"/>
3
+ <path d="M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/>
4
+ </svg>
bec_widgets/cli/client.py CHANGED
@@ -19,6 +19,7 @@ class Widgets(str, enum.Enum):
19
19
  BECMotorMapWidget = "BECMotorMapWidget"
20
20
  BECQueue = "BECQueue"
21
21
  BECStatusBox = "BECStatusBox"
22
+ BECWaveformWidget = "BECWaveformWidget"
22
23
  DeviceBox = "DeviceBox"
23
24
  DeviceComboBox = "DeviceComboBox"
24
25
  DeviceLineEdit = "DeviceLineEdit"
@@ -184,7 +185,7 @@ class BECDock(RPCBase):
184
185
 
185
186
  @property
186
187
  @rpc_call
187
- def widget_list(self) -> "list[BECConnector]":
188
+ def widget_list(self) -> "list[BECWidget]":
188
189
  """
189
190
  Get the widgets in the dock.
190
191
 
@@ -225,13 +226,13 @@ class BECDock(RPCBase):
225
226
  @rpc_call
226
227
  def add_widget(
227
228
  self,
228
- widget: "BECConnector | str",
229
+ widget: "BECWidget | str",
229
230
  row=None,
230
231
  col=0,
231
232
  rowspan=1,
232
233
  colspan=1,
233
234
  shift: "Literal['down', 'up', 'left', 'right']" = "down",
234
- ) -> "BECConnector":
235
+ ) -> "BECWidget":
235
236
  """
236
237
  Add a widget to the dock.
237
238
 
@@ -614,6 +615,12 @@ class BECFigure(RPCBase):
614
615
  theme(Literal["dark","light"]): The theme to set for the figure widget.
615
616
  """
616
617
 
618
+ @rpc_call
619
+ def export(self):
620
+ """
621
+ Export the plot widget.
622
+ """
623
+
617
624
  @rpc_call
618
625
  def clear_all(self):
619
626
  """
@@ -1096,6 +1103,12 @@ class BECImageShow(RPCBase):
1096
1103
  lock(bool): True to lock, False to unlock.
1097
1104
  """
1098
1105
 
1106
+ @rpc_call
1107
+ def export(self):
1108
+ """
1109
+ Show the Export Dialog of the plot widget.
1110
+ """
1111
+
1099
1112
  @rpc_call
1100
1113
  def remove(self):
1101
1114
  """
@@ -1204,6 +1217,12 @@ class BECMotorMap(RPCBase):
1204
1217
  dict: Data of the motor map.
1205
1218
  """
1206
1219
 
1220
+ @rpc_call
1221
+ def export(self):
1222
+ """
1223
+ Show the Export Dialog of the plot widget.
1224
+ """
1225
+
1207
1226
  @rpc_call
1208
1227
  def remove(self):
1209
1228
  """
@@ -1298,6 +1317,12 @@ class BECMotorMapWidget(RPCBase):
1298
1317
  Reset the history of the motor map.
1299
1318
  """
1300
1319
 
1320
+ @rpc_call
1321
+ def export(self):
1322
+ """
1323
+ Show the export dialog for the motor map.
1324
+ """
1325
+
1301
1326
 
1302
1327
  class BECPlotBase(RPCBase):
1303
1328
  @property
@@ -1426,6 +1451,12 @@ class BECPlotBase(RPCBase):
1426
1451
  lock(bool): True to lock, False to unlock.
1427
1452
  """
1428
1453
 
1454
+ @rpc_call
1455
+ def export(self):
1456
+ """
1457
+ Show the Export Dialog of the plot widget.
1458
+ """
1459
+
1429
1460
  @rpc_call
1430
1461
  def remove(self):
1431
1462
  """
@@ -1563,8 +1594,6 @@ class BECWaveform(RPCBase):
1563
1594
  y_name(str): Name of the y signal.
1564
1595
  y_entry(str): Entry of the y signal.
1565
1596
  color(str, optional): Color of the curve. Defaults to None.
1566
- color_map_z(str): The color map to use for the z-axis.
1567
- label(str, optional): Label of the curve. Defaults to None.
1568
1597
  dap(str): The dap model to use for the curve.
1569
1598
  validate_bec(bool, optional): If True, validate the signal with BEC. Defaults to True.
1570
1599
  **kwargs: Additional keyword arguments for the curve configuration.
@@ -1756,6 +1785,15 @@ class BECWaveform(RPCBase):
1756
1785
  y(bool): Show grid on the y-axis.
1757
1786
  """
1758
1787
 
1788
+ @rpc_call
1789
+ def set_colormap(self, colormap: "str | None" = None):
1790
+ """
1791
+ Set the colormap of the plot widget.
1792
+
1793
+ Args:
1794
+ colormap(str, optional): Scale the colors of curves to colormap. If None, use the default color palette.
1795
+ """
1796
+
1759
1797
  @rpc_call
1760
1798
  def lock_aspect_ratio(self, lock):
1761
1799
  """
@@ -1765,6 +1803,12 @@ class BECWaveform(RPCBase):
1765
1803
  lock(bool): True to lock, False to unlock.
1766
1804
  """
1767
1805
 
1806
+ @rpc_call
1807
+ def export(self):
1808
+ """
1809
+ Show the Export Dialog of the plot widget.
1810
+ """
1811
+
1768
1812
  @rpc_call
1769
1813
  def remove(self):
1770
1814
  """
@@ -1787,6 +1831,264 @@ class BECWaveform(RPCBase):
1787
1831
  """
1788
1832
 
1789
1833
 
1834
+ class BECWaveformWidget(RPCBase):
1835
+ @property
1836
+ @rpc_call
1837
+ def curves(self) -> "list[BECCurve]":
1838
+ """
1839
+ Get the curves of the plot widget as a list
1840
+ Returns:
1841
+ list: List of curves.
1842
+ """
1843
+
1844
+ @rpc_call
1845
+ def plot(
1846
+ self,
1847
+ arg1: "list | np.ndarray | str | None" = None,
1848
+ x: "list | np.ndarray | None" = None,
1849
+ y: "list | np.ndarray | None" = None,
1850
+ x_name: "str | None" = None,
1851
+ y_name: "str | None" = None,
1852
+ z_name: "str | None" = None,
1853
+ x_entry: "str | None" = None,
1854
+ y_entry: "str | None" = None,
1855
+ z_entry: "str | None" = None,
1856
+ color: "str | None" = None,
1857
+ color_map_z: "str | None" = "plasma",
1858
+ label: "str | None" = None,
1859
+ validate: "bool" = True,
1860
+ dap: "str | None" = None,
1861
+ **kwargs,
1862
+ ) -> "BECCurve":
1863
+ """
1864
+ Plot a curve to the plot widget.
1865
+ Args:
1866
+ arg1(list | np.ndarray | str | None): First argument which can be x data(list | np.ndarray), y data(list | np.ndarray), or y_name(str).
1867
+ x(list | np.ndarray): Custom x data to plot.
1868
+ y(list | np.ndarray): Custom y data to plot.
1869
+ x_name(str): The name of the device for the x-axis.
1870
+ y_name(str): The name of the device for the y-axis.
1871
+ z_name(str): The name of the device for the z-axis.
1872
+ x_entry(str): The name of the entry for the x-axis.
1873
+ y_entry(str): The name of the entry for the y-axis.
1874
+ z_entry(str): The name of the entry for the z-axis.
1875
+ color(str): The color of the curve.
1876
+ color_map_z(str): The color map to use for the z-axis.
1877
+ label(str): The label of the curve.
1878
+ validate(bool): If True, validate the device names and entries.
1879
+ dap(str): The dap model to use for the curve. If not specified, none will be added.
1880
+
1881
+ Returns:
1882
+ BECCurve: The curve object.
1883
+ """
1884
+
1885
+ @rpc_call
1886
+ def add_dap(
1887
+ self,
1888
+ x_name: "str",
1889
+ y_name: "str",
1890
+ x_entry: "str | None" = None,
1891
+ y_entry: "str | None" = None,
1892
+ color: "str | None" = None,
1893
+ dap: "str" = "GaussianModel",
1894
+ validate_bec: "bool" = True,
1895
+ **kwargs,
1896
+ ) -> "BECCurve":
1897
+ """
1898
+ Add LMFIT dap model curve to the plot widget.
1899
+
1900
+ Args:
1901
+ x_name(str): Name of the x signal.
1902
+ x_entry(str): Entry of the x signal.
1903
+ y_name(str): Name of the y signal.
1904
+ y_entry(str): Entry of the y signal.
1905
+ color(str, optional): Color of the curve. Defaults to None.
1906
+ dap(str): The dap model to use for the curve.
1907
+ validate_bec(bool, optional): If True, validate the signal with BEC. Defaults to True.
1908
+ **kwargs: Additional keyword arguments for the curve configuration.
1909
+
1910
+ Returns:
1911
+ BECCurve: The curve object.
1912
+ """
1913
+
1914
+ @rpc_call
1915
+ def get_dap_params(self) -> "dict":
1916
+ """
1917
+ Get the DAP parameters of all DAP curves.
1918
+
1919
+ Returns:
1920
+ dict: DAP parameters of all DAP curves.
1921
+ """
1922
+
1923
+ @rpc_call
1924
+ def remove_curve(self, *identifiers):
1925
+ """
1926
+ Remove a curve from the plot widget.
1927
+
1928
+ Args:
1929
+ *identifiers: Identifier of the curve to be removed. Can be either an integer (index) or a string (curve_id).
1930
+ """
1931
+
1932
+ @rpc_call
1933
+ def scan_history(self, scan_index: "int" = None, scan_id: "str" = None):
1934
+ """
1935
+ Update the scan curves with the data from the scan storage.
1936
+ Provide only one of scan_id or scan_index.
1937
+
1938
+ Args:
1939
+ scan_id(str, optional): ScanID of the scan to be updated. Defaults to None.
1940
+ scan_index(int, optional): Index of the scan to be updated. Defaults to None.
1941
+ """
1942
+
1943
+ @rpc_call
1944
+ def get_all_data(self, output: "Literal['dict', 'pandas']" = "dict") -> "dict | pd.DataFrame":
1945
+ """
1946
+ Extract all curve data into a dictionary or a pandas DataFrame.
1947
+
1948
+ Args:
1949
+ output (Literal["dict", "pandas"]): Format of the output data.
1950
+
1951
+ Returns:
1952
+ dict | pd.DataFrame: Data of all curves in the specified format.
1953
+ """
1954
+
1955
+ @rpc_call
1956
+ def set(self, **kwargs):
1957
+ """
1958
+ Set the properties of the plot widget.
1959
+
1960
+ Args:
1961
+ **kwargs: Keyword arguments for the properties to be set.
1962
+
1963
+ Possible properties:
1964
+ - title: str
1965
+ - x_label: str
1966
+ - y_label: str
1967
+ - x_scale: Literal["linear", "log"]
1968
+ - y_scale: Literal["linear", "log"]
1969
+ - x_lim: tuple
1970
+ - y_lim: tuple
1971
+ - legend_label_size: int
1972
+ """
1973
+
1974
+ @rpc_call
1975
+ def set_x(self, x_name: "str", x_entry: "str | None" = None):
1976
+ """
1977
+ Change the x axis of the plot widget.
1978
+
1979
+ Args:
1980
+ x_name(str): Name of the x signal.
1981
+ - "best_effort": Use the best effort signal.
1982
+ - "timestamp": Use the timestamp signal.
1983
+ - "index": Use the index signal.
1984
+ - Custom signal name of device from BEC.
1985
+ x_entry(str): Entry of the x signal.
1986
+ """
1987
+
1988
+ @rpc_call
1989
+ def set_title(self, title: "str"):
1990
+ """
1991
+ Set the title of the plot widget.
1992
+
1993
+ Args:
1994
+ title(str): Title of the plot.
1995
+ """
1996
+
1997
+ @rpc_call
1998
+ def set_x_label(self, x_label: "str"):
1999
+ """
2000
+ Set the x-axis label of the plot widget.
2001
+
2002
+ Args:
2003
+ x_label(str): Label of the x-axis.
2004
+ """
2005
+
2006
+ @rpc_call
2007
+ def set_y_label(self, y_label: "str"):
2008
+ """
2009
+ Set the y-axis label of the plot widget.
2010
+
2011
+ Args:
2012
+ y_label(str): Label of the y-axis.
2013
+ """
2014
+
2015
+ @rpc_call
2016
+ def set_x_scale(self, x_scale: "Literal['linear', 'log']"):
2017
+ """
2018
+ Set the scale of the x-axis of the plot widget.
2019
+
2020
+ Args:
2021
+ x_scale(Literal["linear", "log"]): Scale of the x-axis.
2022
+ """
2023
+
2024
+ @rpc_call
2025
+ def set_y_scale(self, y_scale: "Literal['linear', 'log']"):
2026
+ """
2027
+ Set the scale of the y-axis of the plot widget.
2028
+
2029
+ Args:
2030
+ y_scale(Literal["linear", "log"]): Scale of the y-axis.
2031
+ """
2032
+
2033
+ @rpc_call
2034
+ def set_x_lim(self, x_lim: "tuple"):
2035
+ """
2036
+ Set the limits of the x-axis of the plot widget.
2037
+
2038
+ Args:
2039
+ x_lim(tuple): Limits of the x-axis.
2040
+ """
2041
+
2042
+ @rpc_call
2043
+ def set_y_lim(self, y_lim: "tuple"):
2044
+ """
2045
+ Set the limits of the y-axis of the plot widget.
2046
+
2047
+ Args:
2048
+ y_lim(tuple): Limits of the y-axis.
2049
+ """
2050
+
2051
+ @rpc_call
2052
+ def set_legend_label_size(self, legend_label_size: "int"):
2053
+ """
2054
+ Set the size of the legend labels of the plot widget.
2055
+
2056
+ Args:
2057
+ legend_label_size(int): Size of the legend labels.
2058
+ """
2059
+
2060
+ @rpc_call
2061
+ def set_grid(self, x_grid: "bool", y_grid: "bool"):
2062
+ """
2063
+ Set the grid visibility of the plot widget.
2064
+
2065
+ Args:
2066
+ x_grid(bool): Visibility of the x-axis grid.
2067
+ y_grid(bool): Visibility of the y-axis grid.
2068
+ """
2069
+
2070
+ @rpc_call
2071
+ def lock_aspect_ratio(self, lock: "bool"):
2072
+ """
2073
+ Lock the aspect ratio of the plot widget.
2074
+
2075
+ Args:
2076
+ lock(bool): Lock the aspect ratio.
2077
+ """
2078
+
2079
+ @rpc_call
2080
+ def export(self):
2081
+ """
2082
+ Show the export dialog for the plot widget.
2083
+ """
2084
+
2085
+ @rpc_call
2086
+ def export_to_matplotlib(self):
2087
+ """
2088
+ Export the plot widget to Matplotlib.
2089
+ """
2090
+
2091
+
1790
2092
  class DeviceBox(RPCBase):
1791
2093
  @property
1792
2094
  @rpc_call
bec_widgets/cli/server.py CHANGED
@@ -202,7 +202,8 @@ def main():
202
202
  module_path = os.path.dirname(bec_widgets.__file__)
203
203
  icon = QIcon()
204
204
  icon.addFile(
205
- os.path.join(module_path, "assets", "bec_widgets_icon.png"), size=QSize(48, 48)
205
+ os.path.join(module_path, "assets", "app_icons", "bec_widgets_icon.png"),
206
+ size=QSize(48, 48),
206
207
  )
207
208
  app.setWindowIcon(icon)
208
209