bec-widgets 0.99.1__py3-none-any.whl → 0.99.9__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 (250) hide show
  1. .gitlab-ci.yml +0 -1
  2. CHANGELOG.md +76 -70
  3. PKG-INFO +2 -2
  4. bec_widgets/cli/client.py +3 -3
  5. bec_widgets/qt_utils/toolbar.py +11 -5
  6. bec_widgets/utils/bec_widget.py +11 -2
  7. bec_widgets/utils/colors.py +18 -2
  8. bec_widgets/utils/plugin_templates/plugin.template +2 -2
  9. bec_widgets/widgets/bec_queue/bec_queue.py +2 -0
  10. bec_widgets/widgets/bec_queue/bec_queue_plugin.py +1 -1
  11. bec_widgets/widgets/bec_status_box/bec_status_box.py +2 -0
  12. bec_widgets/widgets/bec_status_box/bec_status_box_plugin.py +1 -1
  13. bec_widgets/widgets/color_button/color_button.py +2 -0
  14. bec_widgets/widgets/color_button/color_button_plugin.py +1 -1
  15. bec_widgets/widgets/colormap_selector/colormap_selector.py +1 -0
  16. bec_widgets/widgets/colormap_selector/colormap_selector_plugin.py +1 -1
  17. bec_widgets/widgets/dark_mode_button/dark_mode_button.py +12 -3
  18. bec_widgets/widgets/dark_mode_button/dark_mode_button_plugin.py +1 -1
  19. bec_widgets/widgets/device_browser/device_browser.py +2 -0
  20. bec_widgets/widgets/device_browser/device_browser_plugin.py +1 -1
  21. bec_widgets/widgets/device_combobox/device_combo_box_plugin.py +1 -1
  22. bec_widgets/widgets/device_combobox/device_combobox.py +2 -0
  23. bec_widgets/widgets/device_line_edit/device_line_edit.py +2 -0
  24. bec_widgets/widgets/device_line_edit/device_line_edit_plugin.py +1 -1
  25. bec_widgets/widgets/dock/dock.py +1 -0
  26. bec_widgets/widgets/dock/dock_area.py +30 -10
  27. bec_widgets/widgets/dock/dock_area_plugin.py +1 -1
  28. bec_widgets/widgets/figure/figure.py +1 -1
  29. bec_widgets/widgets/figure/plots/waveform/waveform.py +12 -7
  30. bec_widgets/widgets/figure/plots/waveform/waveform_curve.py +3 -3
  31. bec_widgets/widgets/image/bec_image_widget_plugin.py +1 -1
  32. bec_widgets/widgets/image/image_widget.py +1 -0
  33. bec_widgets/widgets/motor_map/bec_motor_map_widget_plugin.py +1 -1
  34. bec_widgets/widgets/motor_map/motor_map_widget.py +1 -0
  35. bec_widgets/widgets/position_indicator/position_indicator.py +2 -0
  36. bec_widgets/widgets/position_indicator/position_indicator_plugin.py +1 -1
  37. bec_widgets/widgets/positioner_box/positioner_box.py +1 -0
  38. bec_widgets/widgets/positioner_box/positioner_box_plugin.py +1 -1
  39. bec_widgets/widgets/positioner_box/positioner_control_line.py +2 -0
  40. bec_widgets/widgets/positioner_box/positioner_control_line_plugin.py +1 -1
  41. bec_widgets/widgets/ring_progress_bar/ring_progress_bar.py +1 -0
  42. bec_widgets/widgets/ring_progress_bar/ring_progress_bar_plugin.py +1 -1
  43. bec_widgets/widgets/scan_control/scan_control.py +2 -0
  44. bec_widgets/widgets/scan_control/scan_control_plugin.py +1 -4
  45. bec_widgets/widgets/spinner/spinner.py +2 -0
  46. bec_widgets/widgets/spinner/spinner_widget_plugin.py +1 -1
  47. bec_widgets/widgets/stop_button/stop_button.py +2 -0
  48. bec_widgets/widgets/stop_button/stop_button_plugin.py +1 -1
  49. bec_widgets/widgets/text_box/text_box.py +1 -0
  50. bec_widgets/widgets/text_box/text_box_plugin.py +1 -1
  51. bec_widgets/widgets/toggle/toggle.py +1 -0
  52. bec_widgets/widgets/toggle/toggle_switch_plugin.py +1 -1
  53. bec_widgets/widgets/vscode/vs_code_editor_plugin.py +1 -1
  54. bec_widgets/widgets/vscode/vscode.py +1 -0
  55. bec_widgets/widgets/waveform/bec_waveform_widget_plugin.py +1 -1
  56. bec_widgets/widgets/waveform/waveform_popups/curve_dialog/curve_dialog.py +14 -13
  57. bec_widgets/widgets/waveform/waveform_widget.py +3 -2
  58. bec_widgets/widgets/website/website.py +42 -10
  59. bec_widgets/widgets/website/website_widget_plugin.py +1 -1
  60. {bec_widgets-0.99.1.dist-info → bec_widgets-0.99.9.dist-info}/METADATA +2 -2
  61. bec_widgets-0.99.9.dist-info/RECORD +231 -0
  62. pyproject.toml +7 -2
  63. bec_widgets/assets/toolbar_icons/add.svg +0 -3
  64. bec_widgets/assets/toolbar_icons/attach_all.svg +0 -3
  65. bec_widgets/assets/toolbar_icons/auto_range.svg +0 -3
  66. bec_widgets/assets/toolbar_icons/compare.svg +0 -3
  67. bec_widgets/assets/toolbar_icons/connection.svg +0 -4
  68. bec_widgets/assets/toolbar_icons/device_line_edit.svg +0 -3
  69. bec_widgets/assets/toolbar_icons/drag_pan_mode.svg +0 -3
  70. bec_widgets/assets/toolbar_icons/export.svg +0 -9
  71. bec_widgets/assets/toolbar_icons/fft.svg +0 -11
  72. bec_widgets/assets/toolbar_icons/fitting_parameters.svg +0 -3
  73. bec_widgets/assets/toolbar_icons/history.svg +0 -4
  74. bec_widgets/assets/toolbar_icons/image.svg +0 -3
  75. bec_widgets/assets/toolbar_icons/image_autorange.svg +0 -3
  76. bec_widgets/assets/toolbar_icons/import.svg +0 -9
  77. bec_widgets/assets/toolbar_icons/line_axis.svg +0 -3
  78. bec_widgets/assets/toolbar_icons/line_curve.svg +0 -3
  79. bec_widgets/assets/toolbar_icons/lock_aspect_ratio.svg +0 -3
  80. bec_widgets/assets/toolbar_icons/log_scale.png +0 -0
  81. bec_widgets/assets/toolbar_icons/motor_map.svg +0 -3
  82. bec_widgets/assets/toolbar_icons/photo_library.svg +0 -3
  83. bec_widgets/assets/toolbar_icons/positioner_box.svg +0 -3
  84. bec_widgets/assets/toolbar_icons/progress.svg +0 -3
  85. bec_widgets/assets/toolbar_icons/queue.svg +0 -3
  86. bec_widgets/assets/toolbar_icons/rectangle_mode.svg +0 -3
  87. bec_widgets/assets/toolbar_icons/remove.svg +0 -5
  88. bec_widgets/assets/toolbar_icons/reset_settings.svg +0 -3
  89. bec_widgets/assets/toolbar_icons/restore_state.svg +0 -3
  90. bec_widgets/assets/toolbar_icons/ring_progress.svg +0 -3
  91. bec_widgets/assets/toolbar_icons/rotate_left.svg +0 -3
  92. bec_widgets/assets/toolbar_icons/rotate_right.svg +0 -3
  93. bec_widgets/assets/toolbar_icons/save.svg +0 -3
  94. bec_widgets/assets/toolbar_icons/save_state.svg +0 -3
  95. bec_widgets/assets/toolbar_icons/scan_control.svg +0 -3
  96. bec_widgets/assets/toolbar_icons/settings.svg +0 -4
  97. bec_widgets/assets/toolbar_icons/status.svg +0 -3
  98. bec_widgets/assets/toolbar_icons/terminal.svg +0 -3
  99. bec_widgets/assets/toolbar_icons/transform.svg +0 -3
  100. bec_widgets/assets/toolbar_icons/waveform.svg +0 -3
  101. bec_widgets-0.99.1.dist-info/RECORD +0 -415
  102. docs/Makefile +0 -20
  103. docs/_static/custom.css +0 -170
  104. docs/_templates/custom-class-template.rst +0 -34
  105. docs/_templates/custom-module-template.rst +0 -66
  106. docs/api_reference/api_reference.md +0 -12
  107. docs/assets/apps_48dp.svg +0 -1
  108. docs/assets/display_settings_48dp.svg +0 -1
  109. docs/assets/index_api.svg +0 -97
  110. docs/assets/index_contribute.svg +0 -76
  111. docs/assets/index_getting_started.svg +0 -66
  112. docs/assets/index_user_guide.svg +0 -67
  113. docs/assets/rocket_launch_48dp.svg +0 -1
  114. docs/assets/widget_screenshots/buttons.png +0 -0
  115. docs/assets/widget_screenshots/device_box.png +0 -0
  116. docs/assets/widget_screenshots/device_browser.png +0 -0
  117. docs/assets/widget_screenshots/device_inputs.png +0 -0
  118. docs/assets/widget_screenshots/dock_area.png +0 -0
  119. docs/assets/widget_screenshots/figure.png +0 -0
  120. docs/assets/widget_screenshots/image_widget.png +0 -0
  121. docs/assets/widget_screenshots/motor_map_widget.png +0 -0
  122. docs/assets/widget_screenshots/position_indicator.png +0 -0
  123. docs/assets/widget_screenshots/queue.png +0 -0
  124. docs/assets/widget_screenshots/ring_progress_bar.png +0 -0
  125. docs/assets/widget_screenshots/scan_controller.png +0 -0
  126. docs/assets/widget_screenshots/spinner.gif +0 -0
  127. docs/assets/widget_screenshots/status_box.png +0 -0
  128. docs/assets/widget_screenshots/text_box.png +0 -0
  129. docs/assets/widget_screenshots/toggle.png +0 -0
  130. docs/assets/widget_screenshots/waveform_widget.png +0 -0
  131. docs/assets/widget_screenshots/website.png +0 -0
  132. docs/conf.py +0 -82
  133. docs/developer/developer.md +0 -52
  134. docs/developer/introduction/concepts.md +0 -14
  135. docs/developer/introduction/contributing.md +0 -28
  136. docs/developer/introduction/introduction.md +0 -16
  137. docs/developer/introduction/useful_links.md +0 -23
  138. docs/developer/widget_development/bec_dispatcher.md +0 -143
  139. docs/developer/widget_development/widget_development.md +0 -13
  140. docs/index.md +0 -74
  141. docs/introduction/introduction.md +0 -18
  142. docs/make.bat +0 -35
  143. docs/requirements.txt +0 -12
  144. docs/user/api_reference/api_reference.md +0 -11
  145. docs/user/applications/applications.md +0 -10
  146. docs/user/customisation.md +0 -123
  147. docs/user/getting_started/BECDockArea.png +0 -0
  148. docs/user/getting_started/auto_updates.md +0 -82
  149. docs/user/getting_started/getting_started.md +0 -15
  150. docs/user/getting_started/gui_complex_gui.gif +0 -0
  151. docs/user/getting_started/installation.md +0 -33
  152. docs/user/getting_started/quick_start.md +0 -110
  153. docs/user/getting_started/video_tutorials.md +0 -17
  154. docs/user/user.md +0 -71
  155. docs/user/widgets/bec_figure/BECFigure.png +0 -0
  156. docs/user/widgets/bec_figure/bec_figure.md +0 -105
  157. docs/user/widgets/bec_status_box/bec_status_box.gif +0 -0
  158. docs/user/widgets/bec_status_box/bec_status_box.md +0 -38
  159. docs/user/widgets/buttons/buttons.md +0 -63
  160. docs/user/widgets/buttons/dark_mode_disabled.png +0 -0
  161. docs/user/widgets/buttons/dark_mode_enabled.png +0 -0
  162. docs/user/widgets/device_browser/device_browser.md +0 -36
  163. docs/user/widgets/device_browser/device_browser.png +0 -0
  164. docs/user/widgets/device_input/device_input.md +0 -100
  165. docs/user/widgets/dock_area/BECDockArea.png +0 -0
  166. docs/user/widgets/dock_area/bec_dock_area.md +0 -107
  167. docs/user/widgets/image/image_plot.gif +0 -0
  168. docs/user/widgets/image/image_widget.md +0 -84
  169. docs/user/widgets/motor_map/motor.gif +0 -0
  170. docs/user/widgets/motor_map/motor_map.md +0 -80
  171. docs/user/widgets/position_indicator/position_indicator.md +0 -76
  172. docs/user/widgets/positioner_box/positioner_box.md +0 -63
  173. docs/user/widgets/progress_bar/progress_bar.gif +0 -0
  174. docs/user/widgets/progress_bar/ring_progress_bar.md +0 -103
  175. docs/user/widgets/queue/queue.md +0 -41
  176. docs/user/widgets/scan_control/hide_scan_control.png +0 -0
  177. docs/user/widgets/scan_control/scan_control.gif +0 -0
  178. docs/user/widgets/scan_control/scan_control.md +0 -54
  179. docs/user/widgets/spinner/spinner.md +0 -75
  180. docs/user/widgets/text_box/text_box.md +0 -74
  181. docs/user/widgets/toggle/toggle.md +0 -66
  182. docs/user/widgets/waveform/bec_figure_dap.gif +0 -0
  183. docs/user/widgets/waveform/scatter_2D.gif +0 -0
  184. docs/user/widgets/waveform/w1D.gif +0 -0
  185. docs/user/widgets/waveform/waveform_widget.md +0 -132
  186. docs/user/widgets/website/website.md +0 -69
  187. docs/user/widgets/widgets.md +0 -220
  188. tests/__init__.py +0 -0
  189. tests/end-2-end/__init__.py +0 -0
  190. tests/end-2-end/conftest.py +0 -53
  191. tests/end-2-end/test_bec_dock_rpc_e2e.py +0 -298
  192. tests/end-2-end/test_bec_figure_rpc_e2e.py +0 -212
  193. tests/end-2-end/test_rpc_register_e2e.py +0 -40
  194. tests/end-2-end/test_scan_control_e2e.py +0 -71
  195. tests/references/SpinnerWidget/SpinnerWidget_darwin.png +0 -0
  196. tests/references/SpinnerWidget/SpinnerWidget_linux.png +0 -0
  197. tests/references/SpinnerWidget/SpinnerWidget_started_darwin.png +0 -0
  198. tests/references/SpinnerWidget/SpinnerWidget_started_linux.png +0 -0
  199. tests/unit_tests/__init__.py +0 -0
  200. tests/unit_tests/client_mocks.py +0 -189
  201. tests/unit_tests/conftest.py +0 -64
  202. tests/unit_tests/test_bec_connector.py +0 -80
  203. tests/unit_tests/test_bec_dispatcher.py +0 -119
  204. tests/unit_tests/test_bec_dock.py +0 -155
  205. tests/unit_tests/test_bec_figure.py +0 -270
  206. tests/unit_tests/test_bec_image.py +0 -63
  207. tests/unit_tests/test_bec_image_widget.py +0 -217
  208. tests/unit_tests/test_bec_motor_map.py +0 -282
  209. tests/unit_tests/test_bec_queue.py +0 -111
  210. tests/unit_tests/test_bec_status_box.py +0 -123
  211. tests/unit_tests/test_client_utils.py +0 -76
  212. tests/unit_tests/test_color_map_selector.py +0 -42
  213. tests/unit_tests/test_color_validation.py +0 -75
  214. tests/unit_tests/test_configs/config_device.yaml +0 -33
  215. tests/unit_tests/test_configs/config_device_no_entry.yaml +0 -27
  216. tests/unit_tests/test_configs/config_scan.yaml +0 -82
  217. tests/unit_tests/test_crosshair.py +0 -143
  218. tests/unit_tests/test_dark_mode_button.py +0 -70
  219. tests/unit_tests/test_device_browser.py +0 -83
  220. tests/unit_tests/test_device_input_base.py +0 -76
  221. tests/unit_tests/test_device_input_widgets.py +0 -178
  222. tests/unit_tests/test_error_utils.py +0 -63
  223. tests/unit_tests/test_generate_cli_client.py +0 -123
  224. tests/unit_tests/test_generate_plugin.py +0 -155
  225. tests/unit_tests/test_motor_map_widget.py +0 -194
  226. tests/unit_tests/test_msgs/__init__.py +0 -0
  227. tests/unit_tests/test_msgs/available_scans_message.py +0 -989
  228. tests/unit_tests/test_plot_base.py +0 -95
  229. tests/unit_tests/test_plugin_utils.py +0 -13
  230. tests/unit_tests/test_positioner_box.py +0 -130
  231. tests/unit_tests/test_ring_progress_bar.py +0 -337
  232. tests/unit_tests/test_rpc_register.py +0 -52
  233. tests/unit_tests/test_rpc_server.py +0 -42
  234. tests/unit_tests/test_rpc_widget_handler.py +0 -7
  235. tests/unit_tests/test_scan_control.py +0 -324
  236. tests/unit_tests/test_scan_control_group_box.py +0 -160
  237. tests/unit_tests/test_setting_dialog.py +0 -96
  238. tests/unit_tests/test_spinner.py +0 -31
  239. tests/unit_tests/test_stop_button.py +0 -27
  240. tests/unit_tests/test_text_box_widget.py +0 -54
  241. tests/unit_tests/test_toggle.py +0 -38
  242. tests/unit_tests/test_vscode_widget.py +0 -75
  243. tests/unit_tests/test_waveform1d.py +0 -712
  244. tests/unit_tests/test_waveform_widget.py +0 -462
  245. tests/unit_tests/test_website_widget.py +0 -25
  246. tests/unit_tests/test_widget_io.py +0 -90
  247. tests/unit_tests/test_yaml_dialog.py +0 -163
  248. {bec_widgets-0.99.1.dist-info → bec_widgets-0.99.9.dist-info}/WHEEL +0 -0
  249. {bec_widgets-0.99.1.dist-info → bec_widgets-0.99.9.dist-info}/entry_points.txt +0 -0
  250. {bec_widgets-0.99.1.dist-info → bec_widgets-0.99.9.dist-info}/licenses/LICENSE +0 -0
@@ -1,103 +0,0 @@
1
- (user.widgets.ring_progress_bar)=
2
-
3
- # Ring Progress Bar
4
-
5
- ````{tab} Overview
6
-
7
- The [`Ring Progress Bar`](/api_reference/_autosummary/bec_widgets.cli.client.RingProgressBar) widget is a circular progress bar designed to visualize the progress of tasks in a clear and intuitive manner. This widget is particularly useful in applications where task progress needs to be represented as a percentage. The `Ring Progress Bar` can be controlled directly via its API or can be hooked up to track the progress of a device readback or scan, providing real-time visual feedback.
8
-
9
- ## Key Features:
10
- - **Circular Progress Visualization**: Displays a circular progress bar to represent task completion.
11
- - **Device and Scan Integration**: Hooks into device readbacks or scans to automatically update the progress bar based on real-time data.
12
- - **Multiple Rings**: Supports multiple progress rings within the same widget to track different tasks in parallel.
13
- - **Customizable Visual Elements**: Allows customization of colors, line widths, and other visual elements for each progress ring.
14
-
15
- ![RingProgressBar](./progress_bar.gif)
16
-
17
- ````
18
-
19
- ````{tab} Example
20
-
21
- ## Example 1 - Adding Ring Progress Bar to BECDockArea
22
-
23
- In this example, we demonstrate how to add a `RingProgressBar` widget to a `BECDockArea` to visualize the progress of a task.
24
-
25
- ```python
26
- # Add a new dock with a RingProgressBar widget
27
- progress = gui.add_dock().add_widget("RingProgressBar")
28
-
29
- # Customize the size of the progress ring
30
- progress.set_line_widths(20)
31
- ```
32
-
33
- ## Example 2 - Adding Multiple Rings to Track Parallel Tasks
34
-
35
- By default, the `RingProgressBar` widget displays a single ring. You can add additional rings to track multiple tasks simultaneously.
36
-
37
- ```python
38
- # Add a second ring to the RingProgressBar
39
- progress.add_ring()
40
-
41
- # Customize the rings
42
- progress.rings[0].set_line_widths(20) # Set the width of the first ring
43
- progress.rings[1].set_line_widths(10) # Set the width of the second ring
44
- ```
45
-
46
- ## Example 3 - Integrating with Device Readback and Scans
47
-
48
- The `RingProgressBar` can automatically update based on the progress of scans or device readbacks. This example shows how to set up the progress rings to reflect these updates.
49
-
50
- ```python
51
- # Set the first ring to update based on scan progress
52
- progress.rings[0].set_update("scan")
53
-
54
- # Set the second ring to update based on a device readback (e.g., samx)
55
- progress.rings[1].set_update("device", "samx")
56
- ```
57
-
58
- ## Example 4 - Customizing Visual Elements of the Rings
59
-
60
- The `RingProgressBar` widget offers various customization options, such as changing colors, line widths, and the gap between rings.
61
-
62
- ```python
63
- # Set the color of the first ring to blue
64
- progress.rings[0].set_color("blue")
65
-
66
- # Set the background color of the second ring
67
- progress.rings[1].set_background("gray")
68
-
69
- # Adjust the gap between the rings
70
- progress.set_gap(5)
71
-
72
- # Set the diameter of the progress bar
73
- progress.set_diameter(150)
74
- ```
75
-
76
- ## Example 5 - Manual Updates and Precision Control
77
-
78
- While the `RingProgressBar` supports automatic updates, you can also manually control the progress and set the precision for each ring.
79
-
80
- ```python
81
- # Disable automatic updates and manually set the progress value
82
- progress.enable_auto_updates(False)
83
- progress.rings[0].set_value(75) # Set the first ring to 75%
84
-
85
- # Set precision for the progress display
86
- progress.set_precision(2) # Display progress with two decimal places
87
-
88
-
89
- # Setting multiple rigns with different values
90
- progress.set_number_of_bars(3)
91
-
92
- # Set the values of the rings to 50, 75, and 25 from outer to inner ring
93
- progress.set_value([50, 75, 25])
94
- ```
95
-
96
- ````
97
-
98
- ````{tab} API
99
- ```{eval-rst}
100
- .. include:: /api_reference/_autosummary/bec_widgets.cli.client.RingProgressBar.rst
101
- ```
102
- ````
103
-
@@ -1,41 +0,0 @@
1
- (user.widgets.bec_queue)=
2
-
3
- # BEC Queue Widget
4
-
5
- ````{tab} Overview
6
-
7
- The [`BEC Queue Widget`](/api_reference/_autosummary/bec_widgets.cli.client.BECQueue) provides a real-time display of the BEC scan queue, allowing users to monitor and track the status of ongoing and pending scans. The widget automatically updates to reflect the current state of the scan queue, displaying critical information such as scan numbers, types, and statuses. This widget is particularly useful for users who need to manage and oversee multiple scans in the BEC environment.
8
-
9
- ## Key Features:
10
- - **Real-Time Queue Monitoring**: Displays the current state of the BEC scan queue, with automatic updates as the queue changes.
11
- - **Detailed Scan Information**: Provides a clear view of scan numbers, types, and statuses, helping users track the progress and state of each scan.
12
- - **Interactive Table Layout**: The queue is presented in a table format, with customizable columns that stretch to fit the available space.
13
- - **Flexible Integration**: The widget can be integrated into both [`BECDockArea`](user.widgets.bec_dock_area) and used as an individual component in your application through `QtDesigner`.
14
-
15
- ````
16
-
17
- ````{tab} Examples
18
-
19
- The `BEC Queue Widget` can be embedded within a [`BECDockArea`](user.widgets.bec_dock_area) or used as an individual component in your application through `QtDesigner`. Below are examples demonstrating how to create and use the `BEC Queue Widget`.
20
-
21
- ## Example 1 - Adding BEC Queue Widget to BECDockArea
22
-
23
- In this example, we demonstrate how to add a `BECQueue` widget to a `BECDockArea`, allowing users to monitor the BEC scan queue directly from the GUI.
24
-
25
- ```python
26
- # Add a new dock with a BECQueue widget
27
- bec_queue = gui.add_dock().add_widget("BECQueue")
28
- ```
29
-
30
- ```{hint}
31
- The `BECQueue` widget automatically updates as the scan queue changes, providing real-time feedback on the status of each scan.
32
- Once the widget is added, it will automatically display the current scan queue
33
- ```
34
-
35
- ````
36
-
37
- ````{tab} API
38
- ```{eval-rst}
39
- .. include:: /api_reference/_autosummary/bec_widgets.cli.client.BECQueue.rst
40
- ```
41
- ````
@@ -1,54 +0,0 @@
1
- (user.widgets.scan_control)=
2
-
3
- # Scan Control Widget
4
-
5
- ````{tab} Overview
6
-
7
- The [`Scan Control`](/api_reference/_autosummary/bec_widgets.cli.client.ScanControl) widget provides a graphical user interface (GUI) to manage various scan operations in a BEC environment. It is designed to interact with the BEC server, enabling users to start and stop scans. The widget automatically creates the necessary input form based on the scan's signature and gui_config, making it highly adaptable to different scanning processes.
8
-
9
- ## Key Features:
10
- - **Automatic Interface Generation**: Automatically generates a control interface based on scan signatures and `gui_config`.
11
- - **Dynamic Argument Bundling**: Supports the dynamic addition and removal of argument bundles such as positioners controls.
12
- - **Visual Parameter Grouping**: Provides a visual representation of scan parameters, grouped by their functionality.
13
- - **Integrated Scan Controls**: Includes start abd stop controls for managing scan execution.
14
-
15
- ```{note}
16
- By default, this widget supports scans that are derived from the following base classes and have a defined `gui_config`:
17
- - [ScanBase](https://beamline-experiment-control.readthedocs.io/en/latest/api_reference/_autosummary/bec_server.scan_server.scans.ScanBase.html)
18
- - [SyncFlyScanBase](https://beamline-experiment-control.readthedocs.io/en/latest/api_reference/_autosummary/bec_server.scan_server.scans.SyncFlyScanBase.html)
19
- - [AsyncFlyScanBase](https://beamline-experiment-control.readthedocs.io/en/latest/api_reference/_autosummary/bec_server.scan_server.scans.AsyncFlyScanBase.html)
20
- ```
21
-
22
- ```{hint}
23
- The full procedure how to design `gui_config` for your custom scan class is described in the [Scan GUI Configuration](https://bec.readthedocs.io/en/latest/developer/scans/scan_gui_config.html) tutorial.
24
- ```
25
-
26
- ## BECDesigner Customization
27
- Within the BECDesigner's [property editor](https://doc.qt.io/qt-6/designer-widget-mode.html#the-property-editor/), the `ScanControl` widget can be customized to suit your application's requirements. The widget provides the following customization options:
28
- - **Hide Scan Control**: Allows you to hide the scan control buttons from the widget interface. This is useful when you want to place the control buttons in a different location.
29
- - **Hide Scan Selection**: Allows you to hide the scan selection combobox from the widget interface. This is useful when you want to restrict the user to a specific scan type or implement a custom scan selection mechanism.
30
-
31
- ```{figure} ./hide_scan_control.png
32
- ```
33
-
34
- ````
35
-
36
- ````{tab} Examples
37
-
38
- The `ScanControl` widget can be integrated within a [`BECDockArea`](user.widgets.bec_dock_area) or used as an individual component in your application through `BECDesigner`. Below are examples demonstrating how to create and use the `ScanControl` widget.
39
-
40
- ## Example 1 - Adding Scan Control Widget to BECDockArea
41
-
42
- In this example, we demonstrate how to add a `ScanControl` widget to a `BECDockArea`, enabling the user to control scan operations directly from the GUI.
43
-
44
- ```python
45
- # Add a new dock with a ScanControl widget
46
- scan_control = gui.add_dock().add_widget("ScanControl")
47
- ```
48
- ````
49
-
50
- ````{tab} API
51
- ```{eval-rst}
52
- .. include:: /api_reference/_autosummary/bec_widgets.cli.client.ScanControl.rst
53
- ```
54
- ````
@@ -1,75 +0,0 @@
1
- (user.widgets.spinner)=
2
-
3
- # Spinner Widget
4
-
5
- ````{tab} Overview
6
-
7
- The [`SpinnerWidget`](/api_reference/_autosummary/bec_widgets.cli.client.SpinnerWidget) is a simple and versatile widget designed to indicate loading or movement within an application. It is commonly used to show that a device is in motion or that an operation is ongoing. The `SpinnerWidget` can be easily integrated into your GUI application either through direct code instantiation or by using `QtDesigner`.
8
-
9
- ## Key Features:
10
- - **Loading Indicator**: Provides a visual indication of ongoing operations or device movement.
11
- - **Smooth Animation**: Features a smooth, continuous spinning animation to catch the user's attention.
12
- - **Easy Integration**: Can be added directly in code or through `QtDesigner`, making it adaptable to various use cases.
13
- - **Customizable Appearance**: Automatically adapts to the application's theme, ensuring visual consistency.
14
-
15
- ````
16
-
17
- ````{tab} Examples
18
-
19
- The `SpinnerWidget` can be embedded within a GUI application through direct code instantiation or by using `QtDesigner`. Below are examples demonstrating how to create and use the `SpinnerWidget`.
20
-
21
- ## Example 1 - Creating a Spinner Widget in Code
22
-
23
- In this example, we demonstrate how to create a `SpinnerWidget` in code and start the spinner to indicate an ongoing operation.
24
-
25
- ```python
26
- from qtpy.QtWidgets import QApplication, QMainWindow
27
- from bec_widgets.widgets.spinner_widget import SpinnerWidget
28
-
29
- app = QApplication([])
30
-
31
- # Create a main window
32
- window = QMainWindow()
33
-
34
- # Create a SpinnerWidget instance
35
- spinner = SpinnerWidget()
36
-
37
- # Start the spinner
38
- spinner.start()
39
-
40
- # Set the spinner as the central widget
41
- window.setCentralWidget(spinner)
42
- window.show()
43
-
44
- app.exec_()
45
- ```
46
-
47
- ## Example 2 - Stopping the Spinner
48
-
49
- You can stop the spinner to indicate that an operation has completed.
50
-
51
- ```python
52
- # Stop the spinner
53
- spinner.stop()
54
- ```
55
-
56
- ## Example 3 - Integrating the Spinner Widget in QtDesigner
57
-
58
- The `SpinnerWidget` can be added to your GUI layout using `QtDesigner`. Once added, you can control the spinner using the `start` and `stop` methods, similar to the code examples above.
59
-
60
- ```python
61
- # Example: Start the spinner in a QtDesigner-based application
62
- self.spinner_widget.start()
63
-
64
- # Example: Stop the spinner in a QtDesigner-based application
65
- self.spinner_widget.stop()
66
- ```
67
-
68
- ````
69
-
70
- ````{tab} API
71
-
72
- ```{eval-rst}
73
- .. include:: /api_reference/_autosummary/bec_widgets.widgets.spinner.spinner.SpinnerWidget.rst
74
- ```
75
- ````
@@ -1,74 +0,0 @@
1
- (user.widgets.text_box)=
2
-
3
- # Text Box Widget
4
-
5
- ````{tab} Overview
6
-
7
- The [`Text Box Widget`](/api_reference/_autosummary/bec_widgets.cli.client.TextBox) is a versatile widget that allows users to display text within the BEC GUI. It supports both plain text and HTML, making it useful for displaying simple messages or more complex formatted content. This widget is particularly suited for integrating textual content directly into the user interface, whether as a standalone message box or as part of a larger application interface.
8
-
9
- ## Key Features:
10
- - **Text Display**: Display either plain text or HTML content, with automatic detection of the format.
11
- - **Customizable Appearance**: Set the background and font colors to match the design of your application.
12
- - **Font Size Adjustment**: Customize the font size of the displayed text for better readability.
13
-
14
- ````
15
-
16
- ````{tab} Examples - CLI
17
-
18
- The `TextBox` widget can be integrated within a [`BECDockArea`](user.widgets.bec_dock_area) or used as an individual component in your application through `QtDesigner`. The following examples demonstrate how to create and customize the `TextBox` widget in various scenarios.
19
-
20
- ## Example 1 - Adding Text Box Widget to BECDockArea
21
-
22
- In this example, we demonstrate how to add a `TextBox` widget to a `BECDockArea` and set the text to be displayed.
23
-
24
- ```python
25
- # Add a new dock with a TextBox widget
26
- text_box = gui.add_dock().add_widget("TextBox")
27
-
28
- # Set the text to display
29
- text_box.set_text("Hello, World!")
30
- ```
31
-
32
- ## Example 2 - Displaying HTML Content
33
-
34
- The `TextBox` widget can automatically detect and render HTML content. This example shows how to display formatted HTML text.
35
-
36
- ```python
37
- # Set the text to display as HTML
38
- text_box.set_text("<h1>Welcome to BEC Widgets</h1><p>This is an example of displaying <strong>HTML</strong> text.</p>")
39
- ```
40
-
41
- ## Example 3 - Customizing Appearance
42
-
43
- The `TextBox` widget allows you to customize the background and font colors to fit your application's design. Below is an example of how to set these properties.
44
-
45
- ```python
46
- # Set the background color to white and the font color to black
47
- text_box.set_color(background_color="#FFF", font_color="#000")
48
- ```
49
-
50
- ## Example 4 - Adjusting Font Size
51
-
52
- To improve readability or fit more text within the widget, you can adjust the font size.
53
-
54
- ```python
55
- # Set the font size to 14 pixels
56
- text_box.set_font_size(14)
57
- ```
58
-
59
- ````
60
-
61
- ````{tab} API
62
- ```{eval-rst}
63
- .. include:: /api_reference/_autosummary/bec_widgets.cli.client.TextBox.rst
64
- ```
65
- ````
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
@@ -1,66 +0,0 @@
1
- (user.widgets.toggle)=
2
-
3
- # Toggle Switch Widget
4
-
5
- ````{tab} Overview
6
-
7
- The [`Toggle Switch`](/api_reference/_autosummary/bec_widgets.cli.client.ToggleSwitch) widget provides a simple, customizable toggle switch that can be used to represent binary states (e.g., on/off, true/false) within a GUI. This widget is designed to be used directly in code or added through `QtDesigner`, making it versatile for various applications where a user-friendly switch is needed.
8
-
9
- ## Key Features:
10
- - **Binary State Representation**: Represents a simple on/off state with a smooth toggle animation.
11
- - **Customizable Appearance**: Allows customization of track and thumb colors for both active and inactive states.
12
- - **Smooth Animation**: Includes a smooth animation when toggling between states, enhancing user interaction.
13
- - **QtDesigner Integration**: Can be added directly through `QtDesigner` or instantiated in code.
14
-
15
- ````
16
-
17
- ````{tab} Examples
18
-
19
- The `Toggle Switch` widget can be integrated within a GUI application either through direct code instantiation or by using `QtDesigner`. Below are examples demonstrating how to create and customize the `Toggle Switch` widget.
20
-
21
- ## Example 1 - Creating a Toggle Switch in Code
22
-
23
- In this example, we demonstrate how to create a `ToggleSwitch` widget in code and customize its appearance.
24
-
25
- ```python
26
- from qtpy.QtWidgets import QApplication, QVBoxLayout, QWidget
27
- from bec_widgets.widgets.toggle_switch import ToggleSwitch
28
-
29
- class MyGui(QWidget):
30
- def __init__(self):
31
- super().__init__()
32
- self.setLayout(QVBoxLayout(self)) # Initialize the layout for the widget
33
-
34
- # Create and add the ToggleSwitch to the layout
35
- self.toggle_switch = ToggleSwitch()
36
- self.layout().addWidget(self.toggle_switch)
37
-
38
- # Example of how this custom GUI might be used:
39
- app = QApplication([])
40
- my_gui = MyGui()
41
- my_gui.show()
42
- app.exec_()
43
- ```
44
-
45
- ## Example 2 - Customizing the Toggle Switch Appearance
46
-
47
- The `ToggleSwitch` widget allows you to customize its appearance by changing the track and thumb colors for both active and inactive states. Below is an example of how to set these properties.
48
-
49
- ```python
50
- # Set the active and inactive track and thumb colors
51
- self.toggle_switch.active_track_color = QColor(0, 122, 204) # Active state track color (blue)
52
- self.toggle_switch.inactive_track_color = QColor(200, 200, 200) # Inactive state track color (grey)
53
- self.toggle_switch.active_thumb_color = QColor(255, 255, 255) # Active state thumb color (white)
54
- self.toggle_switch.inactive_thumb_color = QColor(255, 255, 255) # Inactive state thumb color (white)
55
- ```
56
-
57
- ## Example 3 - Integrating the Toggle Switch in QtDesigner
58
-
59
- The `ToggleSwitch` can be added as a custom widget in `QtDesigner`. Once integrated, you can configure its properties through the designer's property editor. After adding the widget to a form in QtDesigner, you can manipulate it in your PyQt/PySide application:
60
-
61
- ```python
62
- # For instance:
63
- self.toggle_switch.setChecked(True)
64
- ```
65
-
66
- ````
Binary file
Binary file
@@ -1,132 +0,0 @@
1
- (user.widgets.waveform_widget)=
2
-
3
- # Waveform Widget
4
-
5
- ````{tab} Overview
6
-
7
- The Waveform Widget is used to display 1D detector signals. The widget is directly integrated with the `BEC` framework and can display real-time data from detectors loaded in the current `BEC` session as well as custom data from users.
8
-
9
- ## Key Features:
10
- - **Flexible Integration**: The widget can be integrated into both [`BECFigure`](user.widgets.bec_figure) and [`BECDockArea`](user.widgets.bec_dock_area), or used as an individual component in your application through `BECDesigner`.
11
- - **Data Visualization**: Real-time plotting of positioner versus detector values from the BEC session, as well as static plotting of custom data.
12
- - **Real-time Data Processing**: Add real-time Data Processing Pipeline (DAP) to the real-time acquisition.
13
- - **Data Export**: Export data to CSV, H5, and other formats.
14
- - **Customizable Visual Elements**: Customize visual elements such as line color and style.
15
- - **Interactive Controls**: Interactive controls for zooming and panning through the data.
16
-
17
- ![Waveform 1D](./w1D.gif)
18
- ````
19
-
20
- ````{tab} Examples - CLI
21
-
22
- `WaveformWidget` can be embedded in both `BECFigure` and `BECDockArea`, or used as an individual component in your application through `BECDesigner`. However, the command-line API is the same for all cases.
23
-
24
- ## Example 1 - Adding Waveform Widget to BECFigure
25
-
26
- In this example, we will demonstrate how to add two different `WaveformWidgets` into a single `BECFigure` widget.
27
-
28
- ```python
29
- # Add new dock with BECFigure widget
30
- fig = gui.add_dock().add_widget('BECFigure')
31
-
32
- # Add two WaveformWidgets to the BECFigure
33
- plt1 = fig.plot(x_name='samx', y_name='bpm4i')
34
- plt2 = fig.plot(x_name='samx', y_name='bpm3i')
35
- ```
36
-
37
- ## Example 2 - Adding Waveform Widget as a dock with BECDockArea
38
-
39
- Adding `WaveformWidget` into a `BECDockArea` is similar to adding any other widget. The widget has the same API as the one in BECFigure; however, as an independent widget outside BECFigure, it has its own toolbar, allowing users to configure the widget without needing CLI commands.
40
-
41
- ```python
42
- # Add new WaveformWidgets to the BECDockArea
43
- plt1 = gui.add_dock().add_widget('BECWaveformWidget')
44
- plt2 = gui.add_dock().add_widget('BECWaveformWidget')
45
-
46
- # Add signals to the WaveformWidget
47
- plt1.plot(x_name='samx', y_name='bpm4i')
48
- plt2.plot(x_name='samx', y_name='bpm3i')
49
- ```
50
-
51
- ## Example 3 - Adding Waveform Widget with curves
52
- ```python
53
- # adds a new dock, a new BECFigure and a BECWaveForm to the dock
54
- plt = gui.add_dock().add_widget('BECFigure').plot(x_name='samx', y_name='bpm4i')
55
-
56
- # add a second curve to the same plot
57
- plt.plot(x_name='samx', y_name='bpm3i')
58
-
59
- # set axis labels
60
- plt.set_title("Gauss plots vs. samx")
61
- plt.set_x_label("Motor X")
62
- plt.set_y_label("Gauss Signal (A.U.")
63
- ```
64
-
65
- ```{note}
66
- The return value of the simulated devices *bpm4i* and *bpm3i* may not be Gaussian signals, but they can be easily configured with the code snippet below. For more details, please check the documentation for the [simulation](https://bec.readthedocs.io/en/latest/developer/devices/bec_sim.html).
67
- ```
68
-
69
- ```python
70
- # bpm4i uses GaussianModel and samx as a reference; default settings
71
- dev.bpm4i.sim.select_sim_model("GaussianModel")
72
-
73
- # bpm3i uses StepModel and samx as a reference; default settings
74
- dev.bpm3i.sim.select_sim_model("StepModel")
75
- ```
76
- ## Example 4 - Adding Data Processing Pipeline Curve with LMFit Models
77
-
78
- In addition to the scan curve, you can also add a second curve that fits the signal using a specified model from [LMFit](https://lmfit.github.io/lmfit-py/builtin_models.html). The following code snippet demonstrates how to create a 1D waveform curve with an attached DAP process, or how to add a DAP process to an existing curve using the BEC CLI. Please note that for this example, both devices were set as Gaussian signals.
79
-
80
- ```python
81
- # Add a new dock, a new BECFigure, and a BECWaveForm to the dock with a GaussianModel DAP
82
- plt = gui.add_dock().add_widget('BECFigure').plot(x_name='samx', y_name='bpm4i', dap="GaussianModel")
83
-
84
- # Add a second curve to the same plot without DAP
85
- plt.plot(x_name='samx', y_name='bpm3a')
86
-
87
- # Add DAP to the second curve
88
- plt.add_dap(x_name='samx', y_name='bpm3a', dap="GaussianModel")
89
-
90
- ```
91
-
92
- To get the parameters of the fit, you need to retrieve the curve objects and call the `dap_params` property.
93
-
94
- ```python
95
- # Get the curve object by name from the legend
96
- dap_bpm4i = plt.get_curve("bpm4i-bpm4i-GaussianModel")
97
- dap_bpm3a = plt.get_curve("bpm3a-bpm3a-GaussianModel")
98
-
99
- # Get the parameters of the fit
100
- print(dap_bpm4i.dap_params)
101
- # Output
102
- {'amplitude': 197.399639720862,
103
- 'center': 5.013486095404885,
104
- 'sigma': 0.9820868875739888}
105
-
106
- print(dap_bpm3a.dap_params)
107
- # Output
108
- {'amplitude': 698.3072786185278,
109
- 'center': 0.9702840866173836,
110
- 'sigma': 1.97139754785518}
111
- ```
112
-
113
- ![Waveform 1D_DAP](./bec_figure_dap.gif)
114
-
115
- ## Example 5 - 2D Waveform Scatter Plot
116
-
117
- The 2D scatter plot widget is designed for more complex data visualization. It employs a false color map to represent a third dimension (z-axis), making it an ideal tool for visualizing multidimensional data sets.
118
-
119
- ```python
120
- # adds a new dock, a new BECFigure and a BECWaveForm to the dock
121
- plt = gui.add_dock().add_widget('BECFigure').add_plot(x_name='samx', y_name='samy', z_name='bpm4i')
122
- ```
123
-
124
- ![Scatter 2D](./scatter_2D.gif)
125
-
126
- ````
127
-
128
- ````{tab} API
129
- ```{eval-rst}
130
- .. include:: /api_reference/_autosummary/bec_widgets.cli.client.BECWaveform.rst
131
- ```
132
- ````
@@ -1,69 +0,0 @@
1
- (user.widgets.website)=
2
-
3
- # Website Widget
4
-
5
- ````{tab} Overview
6
-
7
- The [`Website Widget`](/api_reference/_autosummary/bec_widgets.cli.client.WebsiteWidget) is a versatile tool that allows users to display websites directly within the BEC GUI. This widget is useful for embedding documentation, dashboards, or any web-based tools within the application interface. It is designed to be integrated within a [`BECDockArea`](user.widgets.bec_dock_area) or used as an individual component in your application through `QtDesigner`.
8
-
9
- ## Key Features:
10
- - **URL Display**: Set and display any website URL within the widget.
11
- - **Navigation Controls**: Navigate through the website’s history with back and forward controls.
12
- - **Reload Functionality**: Reload the currently displayed website to ensure up-to-date content.
13
-
14
- ````
15
-
16
- ````{tab} Examples - CLI
17
-
18
- The `WebsiteWidget` can be embedded within a [`BECDockArea`](user.widgets.bec_dock_area) or used as an individual component in your application through `QtDesigner`. The following examples demonstrate how to create and use the `WebsiteWidget` in different scenarios.
19
-
20
- ## Example 1 - Adding Website Widget to BECDockArea
21
-
22
- In this example, we demonstrate how to add a `WebsiteWidget` to a `BECDockArea` and set the URL of the website to be displayed.
23
-
24
- ```python
25
- # Add a new dock with a WebsiteWidget
26
- web = gui.add_dock().add_widget("WebsiteWidget")
27
-
28
- # Set the URL of the website to display
29
- web.set_url("https://bec.readthedocs.io/en/latest/")
30
- ```
31
-
32
- ## Example 2 - Navigating within the Website Widget
33
-
34
- The `WebsiteWidget` allows users to navigate back and forward through the website’s history. This example shows how to implement these navigation controls.
35
-
36
- ```python
37
- # Go back in the website history
38
- web.back()
39
-
40
- # Go forward in the website history
41
- web.forward()
42
- ```
43
-
44
- ## Example 3 - Reloading the Website
45
-
46
- To ensure that the displayed website content is up-to-date, you can use the reload functionality.
47
-
48
- ```python
49
- # Reload the current website
50
- web.reload()
51
- ```
52
-
53
- ## Example 4 - Retrieving the Current URL
54
-
55
- You may want to retrieve the current URL being displayed in the `WebsiteWidget`. The following example demonstrates how to access the current URL.
56
-
57
- ```python
58
- # Get the current URL of the WebsiteWidget
59
- current_url = web.get_url()
60
- print(f"The current URL is: {current_url}")
61
- ```
62
-
63
- ````
64
-
65
- ````{tab} API
66
- ```{eval-rst}
67
- .. include:: /api_reference/_autosummary/bec_widgets.cli.client.WebsiteWidget.rst
68
- ```
69
- ````