bec-widgets 1.4.1__py3-none-any.whl → 1.5.1__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. CHANGELOG.md +32 -25
  2. PKG-INFO +1 -1
  3. bec_widgets/applications/alignment/alignment_1d/alignment_1d.py +7 -20
  4. bec_widgets/cli/client.py +430 -32
  5. bec_widgets/cli/generate_cli.py +2 -2
  6. bec_widgets/cli/rpc_register.py +2 -0
  7. bec_widgets/cli/rpc_wigdet_handler.py +5 -3
  8. bec_widgets/cli/server.py +2 -3
  9. bec_widgets/examples/jupyter_console/jupyter_console_window.py +10 -8
  10. bec_widgets/qt_utils/palette_viewer.py +1 -1
  11. bec_widgets/utils/crosshair.py +88 -35
  12. bec_widgets/utils/generate_designer_plugin.py +1 -1
  13. bec_widgets/utils/plugin_utils.py +14 -5
  14. bec_widgets/utils/ui_loader.py +2 -2
  15. bec_widgets/widgets/{dock → containers/dock}/dock_area.py +21 -11
  16. bec_widgets/widgets/{dock → containers/dock}/dock_area_plugin.py +1 -1
  17. bec_widgets/widgets/{dock → containers/dock}/register_dock_area.py +1 -1
  18. bec_widgets/widgets/{figure → containers/figure}/figure.py +41 -7
  19. bec_widgets/widgets/{figure → containers/figure}/plots/image/image.py +7 -4
  20. bec_widgets/widgets/{figure → containers/figure}/plots/image/image_item.py +5 -2
  21. bec_widgets/widgets/{figure → containers/figure}/plots/motor_map/motor_map.py +2 -2
  22. bec_widgets/widgets/containers/figure/plots/multi_waveform/multi_waveform.py +353 -0
  23. bec_widgets/widgets/{figure → containers/figure}/plots/waveform/waveform.py +2 -2
  24. bec_widgets/widgets/{figure → containers/figure}/plots/waveform/waveform_curve.py +2 -2
  25. bec_widgets/widgets/{button_abort → control/buttons/button_abort}/abort_button_plugin.py +1 -1
  26. bec_widgets/widgets/{button_abort → control/buttons/button_abort}/button_abort.py +1 -0
  27. bec_widgets/widgets/{button_abort → control/buttons/button_abort}/register_abort_button.py +3 -1
  28. bec_widgets/widgets/{button_reset → control/buttons/button_reset}/button_reset.py +1 -0
  29. bec_widgets/widgets/{button_reset → control/buttons/button_reset}/register_reset_button.py +3 -1
  30. bec_widgets/widgets/{button_reset → control/buttons/button_reset}/reset_button_plugin.py +1 -1
  31. bec_widgets/widgets/{button_resume → control/buttons/button_resume}/button_resume.py +1 -0
  32. bec_widgets/widgets/{button_resume → control/buttons/button_resume}/register_resume_button.py +3 -1
  33. bec_widgets/widgets/{button_resume → control/buttons/button_resume}/resume_button_plugin.py +1 -1
  34. bec_widgets/widgets/{stop_button → control/buttons/stop_button}/register_stop_button.py +1 -1
  35. bec_widgets/widgets/{stop_button → control/buttons/stop_button}/stop_button.py +1 -0
  36. bec_widgets/widgets/{stop_button → control/buttons/stop_button}/stop_button_plugin.py +1 -1
  37. bec_widgets/widgets/{position_indicator → control/device_control/position_indicator}/position_indicator.py +1 -1
  38. bec_widgets/widgets/{position_indicator → control/device_control/position_indicator}/position_indicator_plugin.py +3 -1
  39. bec_widgets/widgets/{position_indicator → control/device_control/position_indicator}/register_position_indicator.py +1 -1
  40. bec_widgets/widgets/{positioner_box → control/device_control/positioner_box}/positioner_box.py +6 -3
  41. bec_widgets/widgets/{positioner_box → control/device_control/positioner_box}/positioner_box_plugin.py +1 -1
  42. bec_widgets/widgets/{positioner_box → control/device_control/positioner_box}/positioner_control_line.py +2 -1
  43. bec_widgets/widgets/{positioner_box → control/device_control/positioner_box}/positioner_control_line_plugin.py +3 -1
  44. bec_widgets/widgets/{positioner_box → control/device_control/positioner_box}/register_positioner_box.py +3 -1
  45. bec_widgets/widgets/{positioner_box → control/device_control/positioner_box}/register_positioner_control_line.py +1 -1
  46. bec_widgets/widgets/{positioner_group → control/device_control/positioner_group}/positioner_group.py +3 -3
  47. bec_widgets/widgets/{positioner_group → control/device_control/positioner_group}/positioner_group_plugin.py +3 -1
  48. bec_widgets/widgets/{positioner_group → control/device_control/positioner_group}/register_positioner_group.py +3 -1
  49. bec_widgets/widgets/{device_combobox → control/device_input/device_combobox}/device_combo_box_plugin.py +1 -1
  50. bec_widgets/widgets/{device_combobox → control/device_input/device_combobox}/device_combobox.py +2 -1
  51. bec_widgets/widgets/{device_combobox → control/device_input/device_combobox}/register_device_combo_box.py +3 -1
  52. bec_widgets/widgets/{device_line_edit → control/device_input/device_line_edit}/device_line_edit.py +5 -2
  53. bec_widgets/widgets/{device_line_edit → control/device_input/device_line_edit}/device_line_edit_plugin.py +3 -1
  54. bec_widgets/widgets/{device_line_edit → control/device_input/device_line_edit}/register_device_line_edit.py +3 -1
  55. bec_widgets/widgets/{signal_combobox → control/device_input/signal_combobox}/register_signal_combobox.py +3 -1
  56. bec_widgets/widgets/{signal_combobox → control/device_input/signal_combobox}/signal_combobox.py +4 -1
  57. bec_widgets/widgets/{signal_combobox → control/device_input/signal_combobox}/signal_combobox_plugin.py +1 -1
  58. bec_widgets/widgets/{signal_line_edit → control/device_input/signal_line_edit}/register_signal_line_edit.py +3 -1
  59. bec_widgets/widgets/{signal_line_edit → control/device_input/signal_line_edit}/signal_line_edit.py +4 -1
  60. bec_widgets/widgets/{signal_line_edit → control/device_input/signal_line_edit}/signal_line_edit_plugin.py +3 -1
  61. bec_widgets/widgets/{scan_control → control/scan_control}/register_scan_control.py +1 -1
  62. bec_widgets/widgets/{scan_control → control/scan_control}/scan_control.py +5 -4
  63. bec_widgets/widgets/{scan_control → control/scan_control}/scan_control_plugin.py +1 -1
  64. bec_widgets/widgets/{scan_control → control/scan_control}/scan_group_box.py +4 -2
  65. bec_widgets/widgets/{dap_combo_box → dap/dap_combo_box}/dap_combo_box.py +1 -1
  66. bec_widgets/widgets/{dap_combo_box → dap/dap_combo_box}/dap_combo_box_plugin.py +1 -1
  67. bec_widgets/widgets/{dap_combo_box → dap/dap_combo_box}/register_dap_combo_box.py +1 -1
  68. bec_widgets/widgets/{lmfit_dialog → dap/lmfit_dialog}/lm_fit_dialog_plugin.py +1 -1
  69. bec_widgets/widgets/{lmfit_dialog → dap/lmfit_dialog}/lmfit_dialog.py +1 -0
  70. bec_widgets/widgets/{lmfit_dialog → dap/lmfit_dialog}/register_lm_fit_dialog.py +1 -1
  71. bec_widgets/widgets/{console → editors/console}/console.py +1 -0
  72. bec_widgets/widgets/{console → editors/console}/console_plugin.py +1 -1
  73. bec_widgets/widgets/{console → editors/console}/register_console.py +1 -1
  74. bec_widgets/widgets/{text_box → editors/text_box}/register_text_box.py +1 -1
  75. bec_widgets/widgets/{text_box → editors/text_box}/text_box.py +1 -0
  76. bec_widgets/widgets/{text_box → editors/text_box}/text_box_plugin.py +1 -1
  77. bec_widgets/widgets/{vscode → editors/vscode}/register_vs_code_editor.py +1 -1
  78. bec_widgets/widgets/{vscode → editors/vscode}/vs_code_editor_plugin.py +1 -1
  79. bec_widgets/widgets/{vscode → editors/vscode}/vscode.py +2 -2
  80. bec_widgets/widgets/{website → editors/website}/register_website_widget.py +1 -1
  81. bec_widgets/widgets/{website → editors/website}/website.py +1 -0
  82. bec_widgets/widgets/{website → editors/website}/website_widget_plugin.py +1 -1
  83. bec_widgets/widgets/{image → plots/image}/bec_image_widget_plugin.py +1 -1
  84. bec_widgets/widgets/{image → plots/image}/image_widget.py +7 -6
  85. bec_widgets/widgets/{image → plots/image}/register_bec_image_widget.py +1 -1
  86. bec_widgets/widgets/{motor_map → plots/motor_map}/bec_motor_map_widget_plugin.py +1 -1
  87. bec_widgets/widgets/{motor_map → plots/motor_map}/motor_map_widget.py +6 -6
  88. bec_widgets/widgets/{motor_map → plots/motor_map}/register_bec_motor_map_widget.py +3 -1
  89. bec_widgets/widgets/plots/multi_waveform/bec_multi_waveform_widget.pyproject +1 -0
  90. bec_widgets/widgets/plots/multi_waveform/bec_multi_waveform_widget_plugin.py +54 -0
  91. bec_widgets/widgets/plots/multi_waveform/multi_waveform_controls.ui +99 -0
  92. bec_widgets/widgets/plots/multi_waveform/multi_waveform_widget.py +535 -0
  93. bec_widgets/widgets/plots/multi_waveform/register_bec_multi_waveform_widget.py +17 -0
  94. bec_widgets/widgets/{waveform → plots/waveform}/bec_waveform_widget_plugin.py +1 -1
  95. bec_widgets/widgets/{waveform → plots/waveform}/register_bec_waveform_widget.py +3 -1
  96. bec_widgets/widgets/{waveform → plots/waveform}/waveform_popups/curve_dialog/curve_dialog.py +5 -3
  97. bec_widgets/widgets/plots/waveform/waveform_popups/dap_summary_dialog/__init__.py +0 -0
  98. bec_widgets/widgets/{waveform → plots/waveform}/waveform_popups/dap_summary_dialog/dap_summary_dialog.py +2 -6
  99. bec_widgets/widgets/{waveform → plots/waveform}/waveform_widget.py +9 -6
  100. bec_widgets/widgets/progress/__init__.py +0 -0
  101. bec_widgets/widgets/progress/bec_progressbar/__init__.py +0 -0
  102. bec_widgets/widgets/{bec_progressbar → progress/bec_progressbar}/bec_progress_bar_plugin.py +1 -1
  103. bec_widgets/widgets/{bec_progressbar → progress/bec_progressbar}/bec_progressbar.py +1 -0
  104. bec_widgets/widgets/{bec_progressbar → progress/bec_progressbar}/register_bec_progress_bar.py +3 -1
  105. bec_widgets/widgets/{ring_progress_bar → progress/ring_progress_bar}/register_ring_progress_bar.py +3 -1
  106. bec_widgets/widgets/{ring_progress_bar → progress/ring_progress_bar}/ring_progress_bar.py +2 -1
  107. bec_widgets/widgets/{ring_progress_bar → progress/ring_progress_bar}/ring_progress_bar_plugin.py +1 -1
  108. bec_widgets/widgets/services/__init__.py +0 -0
  109. bec_widgets/widgets/services/bec_queue/__init__.py +0 -0
  110. bec_widgets/widgets/{bec_queue → services/bec_queue}/bec_queue.py +5 -4
  111. bec_widgets/widgets/{bec_queue → services/bec_queue}/bec_queue_plugin.py +1 -1
  112. bec_widgets/widgets/{bec_queue → services/bec_queue}/register_bec_queue.py +1 -1
  113. bec_widgets/widgets/services/bec_status_box/__init__.py +0 -0
  114. bec_widgets/widgets/{bec_status_box → services/bec_status_box}/bec_status_box.py +3 -3
  115. bec_widgets/widgets/{bec_status_box → services/bec_status_box}/bec_status_box_plugin.py +1 -1
  116. bec_widgets/widgets/{bec_status_box → services/bec_status_box}/register_bec_status_box.py +1 -1
  117. bec_widgets/widgets/services/device_browser/__init__.py +0 -0
  118. bec_widgets/widgets/{device_browser → services/device_browser}/device_browser.py +3 -3
  119. bec_widgets/widgets/{device_browser → services/device_browser}/device_browser_plugin.py +1 -1
  120. bec_widgets/widgets/{device_browser → services/device_browser}/register_device_browser.py +3 -1
  121. bec_widgets/widgets/utility/__init__.py +0 -0
  122. bec_widgets/widgets/utility/spinner/__init__.py +0 -0
  123. bec_widgets/widgets/{spinner → utility/spinner}/register_spinner_widget.py +1 -1
  124. bec_widgets/widgets/{spinner → utility/spinner}/spinner.py +1 -0
  125. bec_widgets/widgets/{spinner → utility/spinner}/spinner_widget_plugin.py +1 -1
  126. bec_widgets/widgets/utility/toggle/__init__.py +0 -0
  127. bec_widgets/widgets/{toggle → utility/toggle}/register_toggle_switch.py +1 -1
  128. bec_widgets/widgets/{toggle → utility/toggle}/toggle.py +1 -0
  129. bec_widgets/widgets/{toggle → utility/toggle}/toggle_switch_plugin.py +1 -1
  130. bec_widgets/widgets/utility/visual/__init__.py +0 -0
  131. bec_widgets/widgets/utility/visual/color_button/__init__.py +0 -0
  132. bec_widgets/widgets/{color_button → utility/visual/color_button}/color_button.py +1 -0
  133. bec_widgets/widgets/{color_button → utility/visual/color_button}/color_button_plugin.py +1 -1
  134. bec_widgets/widgets/{color_button → utility/visual/color_button}/register_color_button.py +3 -1
  135. bec_widgets/widgets/utility/visual/colormap_selector/__init__.py +0 -0
  136. bec_widgets/widgets/{colormap_selector → utility/visual/colormap_selector}/colormap_selector.py +1 -0
  137. bec_widgets/widgets/{colormap_selector → utility/visual/colormap_selector}/colormap_selector_plugin.py +1 -1
  138. bec_widgets/widgets/{colormap_selector → utility/visual/colormap_selector}/register_colormap_selector.py +1 -1
  139. bec_widgets/widgets/utility/visual/colormap_widget/__init__.py +0 -0
  140. bec_widgets/widgets/{colormap_widget → utility/visual/colormap_widget}/bec_color_map_widget_plugin.py +1 -1
  141. bec_widgets/widgets/{colormap_widget → utility/visual/colormap_widget}/colormap_widget.py +1 -0
  142. bec_widgets/widgets/{colormap_widget → utility/visual/colormap_widget}/register_bec_color_map_widget.py +1 -1
  143. bec_widgets/widgets/utility/visual/dark_mode_button/__init__.py +0 -0
  144. bec_widgets/widgets/{dark_mode_button → utility/visual/dark_mode_button}/dark_mode_button.py +1 -0
  145. bec_widgets/widgets/{dark_mode_button → utility/visual/dark_mode_button}/dark_mode_button_plugin.py +1 -1
  146. bec_widgets/widgets/{dark_mode_button → utility/visual/dark_mode_button}/register_dark_mode_button.py +3 -1
  147. {bec_widgets-1.4.1.dist-info → bec_widgets-1.5.1.dist-info}/METADATA +1 -1
  148. bec_widgets-1.5.1.dist-info/RECORD +318 -0
  149. {bec_widgets-1.4.1.dist-info → bec_widgets-1.5.1.dist-info}/WHEEL +1 -1
  150. pyproject.toml +1 -1
  151. bec_widgets-1.4.1.dist-info/RECORD +0 -297
  152. /bec_widgets/widgets/{base_classes → containers}/__init__.py +0 -0
  153. /bec_widgets/widgets/{dock → containers/dock}/__init__.py +0 -0
  154. /bec_widgets/widgets/{dock → containers/dock}/dock.py +0 -0
  155. /bec_widgets/widgets/{dock → containers/dock}/dock_area.pyproject +0 -0
  156. /bec_widgets/widgets/{figure → containers/figure}/__init__.py +0 -0
  157. /bec_widgets/widgets/{bec_progressbar → containers/figure/plots}/__init__.py +0 -0
  158. /bec_widgets/widgets/{figure → containers/figure}/plots/axis_settings.py +0 -0
  159. /bec_widgets/widgets/{figure → containers/figure}/plots/axis_settings.ui +0 -0
  160. /bec_widgets/widgets/{bec_queue → containers/figure/plots/image}/__init__.py +0 -0
  161. /bec_widgets/widgets/{figure → containers/figure}/plots/image/image_processor.py +0 -0
  162. /bec_widgets/widgets/{bec_status_box → containers/figure/plots/motor_map}/__init__.py +0 -0
  163. /bec_widgets/widgets/{button_abort → containers/figure/plots/multi_waveform}/__init__.py +0 -0
  164. /bec_widgets/widgets/{figure → containers/figure}/plots/plot_base.py +0 -0
  165. /bec_widgets/widgets/{button_reset → containers/figure/plots/waveform}/__init__.py +0 -0
  166. /bec_widgets/widgets/{button_resume → control}/__init__.py +0 -0
  167. /bec_widgets/widgets/{color_button → control/buttons}/__init__.py +0 -0
  168. /bec_widgets/widgets/{colormap_selector → control/buttons/button_abort}/__init__.py +0 -0
  169. /bec_widgets/widgets/{button_abort → control/buttons/button_abort}/abort_button.pyproject +0 -0
  170. /bec_widgets/widgets/{colormap_widget → control/buttons/button_reset}/__init__.py +0 -0
  171. /bec_widgets/widgets/{button_reset → control/buttons/button_reset}/reset_button.pyproject +0 -0
  172. /bec_widgets/widgets/{dap_combo_box → control/buttons/button_resume}/__init__.py +0 -0
  173. /bec_widgets/widgets/{button_resume → control/buttons/button_resume}/resume_button.pyproject +0 -0
  174. /bec_widgets/widgets/{dark_mode_button → control/buttons/stop_button}/__init__.py +0 -0
  175. /bec_widgets/widgets/{stop_button → control/buttons/stop_button}/stop_button.pyproject +0 -0
  176. /bec_widgets/widgets/{device_browser → control/device_control}/__init__.py +0 -0
  177. /bec_widgets/widgets/{device_combobox → control/device_control/position_indicator}/__init__.py +0 -0
  178. /bec_widgets/widgets/{position_indicator → control/device_control/position_indicator}/position_indicator.pyproject +0 -0
  179. /bec_widgets/widgets/{device_line_edit → control/device_control/positioner_box}/__init__.py +0 -0
  180. /bec_widgets/widgets/{positioner_box → control/device_control/positioner_box}/positioner_box.pyproject +0 -0
  181. /bec_widgets/widgets/{positioner_box → control/device_control/positioner_box}/positioner_box.ui +0 -0
  182. /bec_widgets/widgets/{positioner_box → control/device_control/positioner_box}/positioner_control_line.pyproject +0 -0
  183. /bec_widgets/widgets/{positioner_box → control/device_control/positioner_box}/positioner_control_line.ui +0 -0
  184. /bec_widgets/widgets/{figure/plots → control/device_control/positioner_group}/__init__.py +0 -0
  185. /bec_widgets/widgets/{positioner_group → control/device_control/positioner_group}/positioner_group.pyproject +0 -0
  186. /bec_widgets/widgets/{figure/plots/image → control/device_input}/__init__.py +0 -0
  187. /bec_widgets/widgets/{figure/plots/motor_map → control/device_input/base_classes}/__init__.py +0 -0
  188. /bec_widgets/widgets/{base_classes → control/device_input/base_classes}/device_input_base.py +0 -0
  189. /bec_widgets/widgets/{base_classes → control/device_input/base_classes}/device_signal_input_base.py +0 -0
  190. /bec_widgets/widgets/{figure/plots/waveform → control/device_input/device_combobox}/__init__.py +0 -0
  191. /bec_widgets/widgets/{device_combobox → control/device_input/device_combobox}/device_combo_box.pyproject +0 -0
  192. /bec_widgets/widgets/{image → control/device_input/device_line_edit}/__init__.py +0 -0
  193. /bec_widgets/widgets/{device_line_edit → control/device_input/device_line_edit}/device_line_edit.pyproject +0 -0
  194. /bec_widgets/widgets/{jupyter_console → control/device_input/signal_combobox}/__init__.py +0 -0
  195. /bec_widgets/widgets/{signal_combobox → control/device_input/signal_combobox}/signal_combobox.pyproject +0 -0
  196. /bec_widgets/widgets/{lmfit_dialog → control/device_input/signal_line_edit}/__init__.py +0 -0
  197. /bec_widgets/widgets/{signal_line_edit → control/device_input/signal_line_edit}/signal_line_edit.pyproject +0 -0
  198. /bec_widgets/widgets/{scan_control → control/scan_control}/__init__.py +0 -0
  199. /bec_widgets/widgets/{scan_control → control/scan_control}/scan_control.pyproject +0 -0
  200. /bec_widgets/widgets/{motor_map → dap}/__init__.py +0 -0
  201. /bec_widgets/widgets/{motor_map/motor_map_dialog → dap/dap_combo_box}/__init__.py +0 -0
  202. /bec_widgets/widgets/{dap_combo_box → dap/dap_combo_box}/dap_combo_box.pyproject +0 -0
  203. /bec_widgets/widgets/{position_indicator → dap/lmfit_dialog}/__init__.py +0 -0
  204. /bec_widgets/widgets/{lmfit_dialog → dap/lmfit_dialog}/lm_fit_dialog.pyproject +0 -0
  205. /bec_widgets/widgets/{lmfit_dialog → dap/lmfit_dialog}/lmfit_dialog_compact.ui +0 -0
  206. /bec_widgets/widgets/{lmfit_dialog → dap/lmfit_dialog}/lmfit_dialog_vertical.ui +0 -0
  207. /bec_widgets/widgets/{positioner_box → editors}/__init__.py +0 -0
  208. /bec_widgets/widgets/{positioner_group → editors/console}/__init__.py +0 -0
  209. /bec_widgets/widgets/{console → editors/console}/console.pyproject +0 -0
  210. /bec_widgets/widgets/{signal_combobox → editors/jupyter_console}/__init__.py +0 -0
  211. /bec_widgets/widgets/{jupyter_console → editors/jupyter_console}/jupyter_console.py +0 -0
  212. /bec_widgets/widgets/{signal_line_edit → editors/text_box}/__init__.py +0 -0
  213. /bec_widgets/widgets/{text_box → editors/text_box}/text_box.pyproject +0 -0
  214. /bec_widgets/widgets/{spinner → editors/vscode}/__init__.py +0 -0
  215. /bec_widgets/widgets/{vscode → editors/vscode}/vs_code_editor.pyproject +0 -0
  216. /bec_widgets/widgets/{stop_button → editors/website}/__init__.py +0 -0
  217. /bec_widgets/widgets/{website → editors/website}/website_widget.pyproject +0 -0
  218. /bec_widgets/widgets/{text_box → plots}/__init__.py +0 -0
  219. /bec_widgets/widgets/{toggle → plots/image}/__init__.py +0 -0
  220. /bec_widgets/widgets/{image → plots/image}/bec_image_widget.pyproject +0 -0
  221. /bec_widgets/widgets/{vscode → plots/motor_map}/__init__.py +0 -0
  222. /bec_widgets/widgets/{motor_map → plots/motor_map}/bec_motor_map_widget.pyproject +0 -0
  223. /bec_widgets/widgets/{waveform → plots/motor_map/motor_map_dialog}/__init__.py +0 -0
  224. /bec_widgets/widgets/{motor_map → plots/motor_map}/motor_map_dialog/motor_map_settings.py +0 -0
  225. /bec_widgets/widgets/{motor_map → plots/motor_map}/motor_map_dialog/motor_map_settings.ui +0 -0
  226. /bec_widgets/widgets/{waveform/waveform_popups → plots/multi_waveform}/__init__.py +0 -0
  227. /bec_widgets/widgets/{waveform/waveform_popups/curve_dialog → plots/waveform}/__init__.py +0 -0
  228. /bec_widgets/widgets/{waveform → plots/waveform}/bec_waveform_widget.pyproject +0 -0
  229. /bec_widgets/widgets/{waveform/waveform_popups/dap_summary_dialog → plots/waveform/waveform_popups}/__init__.py +0 -0
  230. /bec_widgets/widgets/{website → plots/waveform/waveform_popups/curve_dialog}/__init__.py +0 -0
  231. /bec_widgets/widgets/{waveform → plots/waveform}/waveform_popups/curve_dialog/curve_dialog.ui +0 -0
  232. /bec_widgets/widgets/{bec_progressbar → progress/bec_progressbar}/bec_progress_bar.pyproject +0 -0
  233. /bec_widgets/widgets/{ring_progress_bar → progress/ring_progress_bar}/__init__.py +0 -0
  234. /bec_widgets/widgets/{ring_progress_bar → progress/ring_progress_bar}/ring.py +0 -0
  235. /bec_widgets/widgets/{ring_progress_bar → progress/ring_progress_bar}/ring_progress_bar.pyproject +0 -0
  236. /bec_widgets/widgets/{bec_queue → services/bec_queue}/bec_queue.pyproject +0 -0
  237. /bec_widgets/widgets/{bec_status_box → services/bec_status_box}/bec_status_box.pyproject +0 -0
  238. /bec_widgets/widgets/{bec_status_box → services/bec_status_box}/status_item.py +0 -0
  239. /bec_widgets/widgets/{device_browser → services/device_browser}/device_browser.pyproject +0 -0
  240. /bec_widgets/widgets/{device_browser → services/device_browser}/device_browser.ui +0 -0
  241. /bec_widgets/widgets/{device_browser → services/device_browser}/device_item/__init__.py +0 -0
  242. /bec_widgets/widgets/{device_browser → services/device_browser}/device_item/device_item.py +0 -0
  243. /bec_widgets/widgets/{spinner → utility/spinner}/spinner_widget.pyproject +0 -0
  244. /bec_widgets/widgets/{toggle → utility/toggle}/toggle_switch.pyproject +0 -0
  245. /bec_widgets/widgets/{color_button → utility/visual/color_button}/color_button.pyproject +0 -0
  246. /bec_widgets/widgets/{colormap_selector → utility/visual/colormap_selector}/colormap_selector.pyproject +0 -0
  247. /bec_widgets/widgets/{colormap_widget → utility/visual/colormap_widget}/bec_color_map_widget.pyproject +0 -0
  248. /bec_widgets/widgets/{dark_mode_button → utility/visual/dark_mode_button}/dark_mode_button.pyproject +0 -0
  249. {bec_widgets-1.4.1.dist-info → bec_widgets-1.5.1.dist-info}/entry_points.txt +0 -0
  250. {bec_widgets-1.4.1.dist-info → bec_widgets-1.5.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,99 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>Form</class>
4
+ <widget class="QWidget" name="Form">
5
+ <property name="geometry">
6
+ <rect>
7
+ <x>0</x>
8
+ <y>0</y>
9
+ <width>561</width>
10
+ <height>86</height>
11
+ </rect>
12
+ </property>
13
+ <property name="windowTitle">
14
+ <string>Form</string>
15
+ </property>
16
+ <layout class="QGridLayout" name="gridLayout">
17
+ <item row="0" column="0">
18
+ <widget class="QLabel" name="label_curve_index">
19
+ <property name="text">
20
+ <string>Curve Index</string>
21
+ </property>
22
+ </widget>
23
+ </item>
24
+ <item row="0" column="1">
25
+ <widget class="QSlider" name="slider_index">
26
+ <property name="orientation">
27
+ <enum>Qt::Orientation::Horizontal</enum>
28
+ </property>
29
+ </widget>
30
+ </item>
31
+ <item row="0" column="2">
32
+ <widget class="QSpinBox" name="spinbox_index"/>
33
+ </item>
34
+ <item row="0" column="3" colspan="3">
35
+ <widget class="QCheckBox" name="checkbox_highlight">
36
+ <property name="text">
37
+ <string>Highlight always last curve</string>
38
+ </property>
39
+ </widget>
40
+ </item>
41
+ <item row="1" column="0">
42
+ <widget class="QLabel" name="label_opacity">
43
+ <property name="text">
44
+ <string>Opacity</string>
45
+ </property>
46
+ </widget>
47
+ </item>
48
+ <item row="1" column="1">
49
+ <widget class="QSlider" name="slider_opacity">
50
+ <property name="maximum">
51
+ <number>100</number>
52
+ </property>
53
+ <property name="orientation">
54
+ <enum>Qt::Orientation::Horizontal</enum>
55
+ </property>
56
+ </widget>
57
+ </item>
58
+ <item row="1" column="3">
59
+ <widget class="QLabel" name="label_max_trace">
60
+ <property name="text">
61
+ <string>Max Trace</string>
62
+ </property>
63
+ </widget>
64
+ </item>
65
+ <item row="1" column="4">
66
+ <widget class="QSpinBox" name="spinbox_max_trace">
67
+ <property name="toolTip">
68
+ <string>How many curves should be displayed</string>
69
+ </property>
70
+ <property name="maximum">
71
+ <number>500</number>
72
+ </property>
73
+ <property name="value">
74
+ <number>200</number>
75
+ </property>
76
+ </widget>
77
+ </item>
78
+ <item row="1" column="5">
79
+ <widget class="QCheckBox" name="checkbox_flush_buffer">
80
+ <property name="toolTip">
81
+ <string>If hiddne curves should be deleted.</string>
82
+ </property>
83
+ <property name="text">
84
+ <string>Flush Buffer</string>
85
+ </property>
86
+ </widget>
87
+ </item>
88
+ <item row="1" column="2">
89
+ <widget class="QSpinBox" name="spinbox_opacity">
90
+ <property name="maximum">
91
+ <number>100</number>
92
+ </property>
93
+ </widget>
94
+ </item>
95
+ </layout>
96
+ </widget>
97
+ <resources/>
98
+ <connections/>
99
+ </ui>
@@ -0,0 +1,535 @@
1
+ import os
2
+ from typing import Literal
3
+
4
+ import pyqtgraph as pg
5
+ from bec_lib.device import ReadoutPriority
6
+ from bec_lib.logger import bec_logger
7
+ from qtpy.QtCore import Slot
8
+ from qtpy.QtWidgets import QVBoxLayout, QWidget
9
+
10
+ from bec_widgets.qt_utils.error_popups import SafeSlot
11
+ from bec_widgets.qt_utils.settings_dialog import SettingsDialog
12
+ from bec_widgets.qt_utils.toolbar import (
13
+ DeviceSelectionAction,
14
+ MaterialIconAction,
15
+ ModularToolBar,
16
+ SeparatorAction,
17
+ WidgetAction,
18
+ )
19
+ from bec_widgets.utils import UILoader
20
+ from bec_widgets.utils.bec_widget import BECWidget
21
+ from bec_widgets.widgets.containers.figure import BECFigure
22
+ from bec_widgets.widgets.containers.figure.plots.axis_settings import AxisSettings
23
+ from bec_widgets.widgets.containers.figure.plots.multi_waveform.multi_waveform import (
24
+ BECMultiWaveformConfig,
25
+ )
26
+ from bec_widgets.widgets.control.device_input.base_classes.device_input_base import BECDeviceFilter
27
+ from bec_widgets.widgets.control.device_input.device_combobox.device_combobox import DeviceComboBox
28
+ from bec_widgets.widgets.utility.visual.colormap_widget.colormap_widget import BECColorMapWidget
29
+
30
+ logger = bec_logger.logger
31
+
32
+
33
+ class BECMultiWaveformWidget(BECWidget, QWidget):
34
+ PLUGIN = True
35
+ ICON_NAME = "ssid_chart"
36
+ USER_ACCESS = [
37
+ "curves",
38
+ "set_monitor",
39
+ "set_curve_highlight",
40
+ "set_opacity",
41
+ "set_curve_limit",
42
+ "set_buffer_flush",
43
+ "set_highlight_last_curve",
44
+ "set_colormap",
45
+ "set",
46
+ "set_title",
47
+ "set_x_label",
48
+ "set_y_label",
49
+ "set_x_scale",
50
+ "set_y_scale",
51
+ "set_x_lim",
52
+ "set_y_lim",
53
+ "set_grid",
54
+ "set_colormap",
55
+ "enable_fps_monitor",
56
+ "lock_aspect_ratio",
57
+ "export",
58
+ ]
59
+
60
+ def __init__(
61
+ self,
62
+ parent: QWidget | None = None,
63
+ config: BECMultiWaveformConfig | dict = None,
64
+ client=None,
65
+ gui_id: str | None = None,
66
+ ) -> None:
67
+ if config is None:
68
+ config = BECMultiWaveformConfig(widget_class=self.__class__.__name__)
69
+ else:
70
+ if isinstance(config, dict):
71
+ config = BECMultiWaveformConfig(**config)
72
+ super().__init__(client=client, gui_id=gui_id)
73
+ QWidget.__init__(self, parent)
74
+
75
+ self.layout = QVBoxLayout(self)
76
+ self.layout.setSpacing(0)
77
+ self.layout.setContentsMargins(0, 0, 0, 0)
78
+
79
+ self.fig = BECFigure()
80
+ self.colormap_button = BECColorMapWidget(cmap="magma")
81
+ self.toolbar = ModularToolBar(
82
+ actions={
83
+ "monitor": DeviceSelectionAction(
84
+ "",
85
+ DeviceComboBox(
86
+ device_filter=BECDeviceFilter.DEVICE,
87
+ readout_priority_filter=ReadoutPriority.ASYNC,
88
+ ),
89
+ ),
90
+ "connect": MaterialIconAction(icon_name="link", tooltip="Connect Device"),
91
+ "separator_0": SeparatorAction(),
92
+ "colormap": WidgetAction(widget=self.colormap_button),
93
+ "separator_1": SeparatorAction(),
94
+ "save": MaterialIconAction(icon_name="save", tooltip="Open Export Dialog"),
95
+ "matplotlib": MaterialIconAction(
96
+ icon_name="photo_library", tooltip="Open Matplotlib Plot"
97
+ ),
98
+ "separator_2": SeparatorAction(),
99
+ "drag_mode": MaterialIconAction(
100
+ icon_name="drag_pan", tooltip="Drag Mouse Mode", checkable=True
101
+ ),
102
+ "rectangle_mode": MaterialIconAction(
103
+ icon_name="frame_inspect", tooltip="Rectangle Zoom Mode", checkable=True
104
+ ),
105
+ "auto_range": MaterialIconAction(
106
+ icon_name="open_in_full", tooltip="Autorange Plot"
107
+ ),
108
+ "crosshair": MaterialIconAction(
109
+ icon_name="point_scan", tooltip="Show Crosshair", checkable=True
110
+ ),
111
+ "separator_3": SeparatorAction(),
112
+ "fps_monitor": MaterialIconAction(
113
+ icon_name="speed", tooltip="Show FPS Monitor", checkable=True
114
+ ),
115
+ "axis_settings": MaterialIconAction(
116
+ icon_name="settings", tooltip="Open Configuration Dialog"
117
+ ),
118
+ },
119
+ target_widget=self,
120
+ )
121
+
122
+ self.layout.addWidget(self.toolbar)
123
+ self.layout.addWidget(self.fig)
124
+
125
+ self.waveform = self.fig.multi_waveform() # FIXME config should be injected here
126
+ self.config = config
127
+
128
+ self.create_multi_waveform_controls()
129
+
130
+ self._hook_actions()
131
+ self.waveform.monitor_signal_updated.connect(self.update_controls_limits)
132
+
133
+ def create_multi_waveform_controls(self):
134
+ """
135
+ Create the controls for the multi waveform widget.
136
+ """
137
+ current_path = os.path.dirname(__file__)
138
+ self.controls = UILoader(self).loader(
139
+ os.path.join(current_path, "multi_waveform_controls.ui")
140
+ )
141
+ self.layout.addWidget(self.controls)
142
+
143
+ # Hook default controls properties
144
+ self.controls.checkbox_highlight.setChecked(self.config.highlight_last_curve)
145
+ self.controls.spinbox_opacity.setValue(self.config.opacity)
146
+ self.controls.slider_opacity.setValue(self.config.opacity)
147
+ self.controls.spinbox_max_trace.setValue(self.config.curve_limit)
148
+ self.controls.checkbox_flush_buffer.setChecked(self.config.flush_buffer)
149
+
150
+ # Connect signals
151
+ self.controls.spinbox_max_trace.valueChanged.connect(self.set_curve_limit)
152
+ self.controls.checkbox_flush_buffer.toggled.connect(self.set_buffer_flush)
153
+ self.controls.slider_opacity.valueChanged.connect(self.controls.spinbox_opacity.setValue)
154
+ self.controls.spinbox_opacity.valueChanged.connect(self.controls.slider_opacity.setValue)
155
+ self.controls.slider_opacity.valueChanged.connect(self.set_opacity)
156
+ self.controls.spinbox_opacity.valueChanged.connect(self.set_opacity)
157
+ self.controls.slider_index.valueChanged.connect(self.controls.spinbox_index.setValue)
158
+ self.controls.spinbox_index.valueChanged.connect(self.controls.slider_index.setValue)
159
+ self.controls.slider_index.valueChanged.connect(self.set_curve_highlight)
160
+ self.controls.spinbox_index.valueChanged.connect(self.set_curve_highlight)
161
+ self.controls.checkbox_highlight.toggled.connect(self.set_highlight_last_curve)
162
+
163
+ # Trigger first round of settings
164
+ self.set_curve_limit(self.config.curve_limit)
165
+ self.set_opacity(self.config.opacity)
166
+ self.set_highlight_last_curve(self.config.highlight_last_curve)
167
+
168
+ @Slot()
169
+ def update_controls_limits(self):
170
+ """
171
+ Update the limits of the controls.
172
+ """
173
+ num_curves = len(self.waveform.curves)
174
+ if num_curves == 0:
175
+ num_curves = 1 # Avoid setting max to 0
176
+ current_index = num_curves - 1
177
+ self.controls.slider_index.setMinimum(0)
178
+ self.controls.slider_index.setMaximum(self.waveform.number_of_visible_curves - 1)
179
+ self.controls.spinbox_index.setMaximum(self.waveform.number_of_visible_curves - 1)
180
+ if self.controls.checkbox_highlight.isChecked():
181
+ self.controls.slider_index.setValue(current_index)
182
+ self.controls.spinbox_index.setValue(current_index)
183
+
184
+ def _hook_actions(self):
185
+ self.toolbar.widgets["connect"].action.triggered.connect(self._connect_action)
186
+ # Separator 0
187
+ self.toolbar.widgets["save"].action.triggered.connect(self.export)
188
+ self.toolbar.widgets["matplotlib"].action.triggered.connect(self.export_to_matplotlib)
189
+ self.toolbar.widgets["colormap"].widget.colormap_changed_signal.connect(self.set_colormap)
190
+ # Separator 1
191
+ self.toolbar.widgets["drag_mode"].action.triggered.connect(self.enable_mouse_pan_mode)
192
+ self.toolbar.widgets["rectangle_mode"].action.triggered.connect(
193
+ self.enable_mouse_rectangle_mode
194
+ )
195
+ self.toolbar.widgets["auto_range"].action.triggered.connect(self._auto_range_from_toolbar)
196
+ self.toolbar.widgets["crosshair"].action.triggered.connect(self.waveform.toggle_crosshair)
197
+ # Separator 2
198
+ self.toolbar.widgets["fps_monitor"].action.triggered.connect(self.enable_fps_monitor)
199
+ self.toolbar.widgets["axis_settings"].action.triggered.connect(self.show_axis_settings)
200
+
201
+ ###################################
202
+ # Dialog Windows
203
+ ###################################
204
+ @SafeSlot(popup_error=True)
205
+ def _connect_action(self):
206
+ monitor_combo = self.toolbar.widgets["monitor"].device_combobox
207
+ monitor_name = monitor_combo.currentText()
208
+ self.set_monitor(monitor=monitor_name)
209
+ monitor_combo.setStyleSheet("QComboBox { background-color: " "; }")
210
+
211
+ def show_axis_settings(self):
212
+ dialog = SettingsDialog(
213
+ self,
214
+ settings_widget=AxisSettings(),
215
+ window_title="Axis Settings",
216
+ config=self.waveform._config_dict["axis"],
217
+ )
218
+ dialog.exec()
219
+
220
+ ########################################
221
+ # User Access Methods from MultiWaveform
222
+ ########################################
223
+ @property
224
+ def curves(self) -> list[pg.PlotDataItem]:
225
+ """
226
+ Get the curves of the plot widget as a list
227
+ Returns:
228
+ list: List of curves.
229
+ """
230
+ return list(self.waveform.curves)
231
+
232
+ @curves.setter
233
+ def curves(self, value: list[pg.PlotDataItem]):
234
+ self.waveform.curves = value
235
+
236
+ @SafeSlot(popup_error=True)
237
+ def set_monitor(self, monitor: str) -> None:
238
+ """
239
+ Set the monitor of the plot widget.
240
+
241
+ Args:
242
+ monitor(str): The monitor to set.
243
+ """
244
+ self.waveform.set_monitor(monitor)
245
+ if self.toolbar.widgets["monitor"].device_combobox.currentText() != monitor:
246
+ self.toolbar.widgets["monitor"].device_combobox.setCurrentText(monitor)
247
+ self.toolbar.widgets["monitor"].device_combobox.setStyleSheet(
248
+ "QComboBox { background-color: " "; }"
249
+ )
250
+
251
+ @SafeSlot(int)
252
+ def set_curve_highlight(self, index: int) -> None:
253
+ """
254
+ Set the curve highlight of the plot widget by index
255
+
256
+ Args:
257
+ index(int): The index of the curve to highlight.
258
+ """
259
+ if self.controls.checkbox_highlight.isChecked():
260
+ # If always highlighting the last curve, set index to -1
261
+ self.waveform.set_curve_highlight(-1)
262
+ else:
263
+ self.waveform.set_curve_highlight(index)
264
+
265
+ @SafeSlot(int)
266
+ def set_opacity(self, opacity: int) -> None:
267
+ """
268
+ Set the opacity of the plot widget.
269
+
270
+ Args:
271
+ opacity(int): The opacity to set.
272
+ """
273
+ self.waveform.set_opacity(opacity)
274
+
275
+ @SafeSlot(int)
276
+ def set_curve_limit(self, curve_limit: int) -> None:
277
+ """
278
+ Set the maximum number of traces to display on the plot widget.
279
+
280
+ Args:
281
+ curve_limit(int): The maximum number of traces to display.
282
+ """
283
+ flush_buffer = self.controls.checkbox_flush_buffer.isChecked()
284
+ self.waveform.set_curve_limit(curve_limit, flush_buffer)
285
+ self.update_controls_limits()
286
+
287
+ @SafeSlot(bool)
288
+ def set_buffer_flush(self, flush_buffer: bool) -> None:
289
+ """
290
+ Set the buffer flush property of the plot widget.
291
+
292
+ Args:
293
+ flush_buffer(bool): True to flush the buffer, False to not flush the buffer.
294
+ """
295
+ curve_limit = self.controls.spinbox_max_trace.value()
296
+ self.waveform.set_curve_limit(curve_limit, flush_buffer)
297
+ self.update_controls_limits()
298
+
299
+ @SafeSlot(bool)
300
+ def set_highlight_last_curve(self, enable: bool) -> None:
301
+ """
302
+ Enable or disable highlighting of the last curve.
303
+
304
+ Args:
305
+ enable(bool): True to enable highlighting of the last curve, False to disable.
306
+ """
307
+ self.waveform.config.highlight_last_curve = enable
308
+ if enable:
309
+ self.controls.slider_index.setEnabled(False)
310
+ self.controls.spinbox_index.setEnabled(False)
311
+ self.controls.checkbox_highlight.setChecked(True)
312
+ self.waveform.set_curve_highlight(-1)
313
+ else:
314
+ self.controls.slider_index.setEnabled(True)
315
+ self.controls.spinbox_index.setEnabled(True)
316
+ self.controls.checkbox_highlight.setChecked(False)
317
+ index = self.controls.spinbox_index.value()
318
+ self.waveform.set_curve_highlight(index)
319
+
320
+ @SafeSlot()
321
+ def set_colormap(self, colormap: str) -> None:
322
+ """
323
+ Set the colormap of the plot widget.
324
+
325
+ Args:
326
+ colormap(str): The colormap to set.
327
+ """
328
+ self.waveform.set_colormap(colormap)
329
+
330
+ ###################################
331
+ # User Access Methods from PlotBase
332
+ ###################################
333
+ def set(self, **kwargs):
334
+ """
335
+ Set the properties of the plot widget.
336
+
337
+ Args:
338
+ **kwargs: Keyword arguments for the properties to be set.
339
+
340
+ Possible properties:
341
+ - title: str
342
+ - x_label: str
343
+ - y_label: str
344
+ - x_scale: Literal["linear", "log"]
345
+ - y_scale: Literal["linear", "log"]
346
+ - x_lim: tuple
347
+ - y_lim: tuple
348
+ - legend_label_size: int
349
+ """
350
+ self.waveform.set(**kwargs)
351
+
352
+ def set_title(self, title: str):
353
+ """
354
+ Set the title of the plot widget.
355
+
356
+ Args:
357
+ title(str): The title to set.
358
+ """
359
+ self.waveform.set_title(title)
360
+
361
+ def set_x_label(self, x_label: str):
362
+ """
363
+ Set the x-axis label of the plot widget.
364
+
365
+ Args:
366
+ x_label(str): The x-axis label to set.
367
+ """
368
+ self.waveform.set_x_label(x_label)
369
+
370
+ def set_y_label(self, y_label: str):
371
+ """
372
+ Set the y-axis label of the plot widget.
373
+
374
+ Args:
375
+ y_label(str): The y-axis label to set.
376
+ """
377
+ self.waveform.set_y_label(y_label)
378
+
379
+ def set_x_scale(self, x_scale: Literal["linear", "log"]):
380
+ """
381
+ Set the x-axis scale of the plot widget.
382
+
383
+ Args:
384
+ x_scale(str): The x-axis scale to set.
385
+ """
386
+ self.waveform.set_x_scale(x_scale)
387
+
388
+ def set_y_scale(self, y_scale: Literal["linear", "log"]):
389
+ """
390
+ Set the y-axis scale of the plot widget.
391
+
392
+ Args:
393
+ y_scale(str): The y-axis scale to set.
394
+ """
395
+ self.waveform.set_y_scale(y_scale)
396
+
397
+ def set_x_lim(self, x_lim: tuple):
398
+ """
399
+ Set x-axis limits of the plot widget.
400
+
401
+ Args:
402
+ x_lim(tuple): The x-axis limits to set.
403
+ """
404
+ self.waveform.set_x_lim(x_lim)
405
+
406
+ def set_y_lim(self, y_lim: tuple):
407
+ """
408
+ Set y-axis limits of the plot widget.
409
+
410
+ Args:
411
+ y_lim(tuple): The y-axis limits to set.
412
+ """
413
+ self.waveform.set_y_lim(y_lim)
414
+
415
+ def set_legend_label_size(self, legend_label_size: int):
416
+ """
417
+ Set the legend label size of the plot widget.
418
+
419
+ Args:
420
+ legend_label_size(int): The legend label size to set.
421
+ """
422
+ self.waveform.set_legend_label_size(legend_label_size)
423
+
424
+ def set_auto_range(self, enabled: bool, axis: str = "xy"):
425
+ """
426
+ Set the auto range of the plot widget.
427
+
428
+ Args:
429
+ enabled(bool): True to enable auto range, False to disable.
430
+ axis(str): The axis to set the auto range for. Default is "xy".
431
+ """
432
+ self.waveform.set_auto_range(enabled, axis)
433
+
434
+ def enable_fps_monitor(self, enabled: bool):
435
+ """
436
+ Enable or disable the FPS monitor
437
+
438
+ Args:
439
+ enabled(bool): True to enable the FPS monitor, False to disable.
440
+ """
441
+ self.waveform.enable_fps_monitor(enabled)
442
+ if self.toolbar.widgets["fps_monitor"].action.isChecked() != enabled:
443
+ self.toolbar.widgets["fps_monitor"].action.setChecked(enabled)
444
+
445
+ @SafeSlot()
446
+ def _auto_range_from_toolbar(self):
447
+ """
448
+ Set the auto range of the plot widget from the toolbar.
449
+ """
450
+ self.waveform.set_auto_range(True, "xy")
451
+
452
+ def set_grid(self, x_grid: bool, y_grid: bool):
453
+ """
454
+ Set the grid of the plot widget.
455
+
456
+ Args:
457
+ x_grid(bool): True to enable the x-grid, False to disable.
458
+ y_grid(bool): True to enable the y-grid, False to disable.
459
+ """
460
+ self.waveform.set_grid(x_grid, y_grid)
461
+
462
+ def set_outer_axes(self, show: bool):
463
+ """
464
+ Set the outer axes of the plot widget.
465
+
466
+ Args:
467
+ show(bool): True to show the outer axes, False to hide.
468
+ """
469
+ self.waveform.set_outer_axes(show)
470
+
471
+ def lock_aspect_ratio(self, lock: bool):
472
+ """
473
+ Lock the aspect ratio of the plot widget.
474
+
475
+ Args:
476
+ lock(bool): True to lock the aspect ratio, False to unlock.
477
+ """
478
+ self.waveform.lock_aspect_ratio(lock)
479
+
480
+ @SafeSlot()
481
+ def enable_mouse_rectangle_mode(self):
482
+ """
483
+ Enable the mouse rectangle mode of the plot widget.
484
+ """
485
+ self.toolbar.widgets["rectangle_mode"].action.setChecked(True)
486
+ self.toolbar.widgets["drag_mode"].action.setChecked(False)
487
+ self.waveform.plot_item.getViewBox().setMouseMode(pg.ViewBox.RectMode)
488
+
489
+ @SafeSlot()
490
+ def enable_mouse_pan_mode(self):
491
+ """
492
+ Enable the mouse pan mode of the plot widget.
493
+ """
494
+ self.toolbar.widgets["drag_mode"].action.setChecked(True)
495
+ self.toolbar.widgets["rectangle_mode"].action.setChecked(False)
496
+ self.waveform.plot_item.getViewBox().setMouseMode(pg.ViewBox.PanMode)
497
+
498
+ def export(self):
499
+ """
500
+ Export the plot widget.
501
+ """
502
+ self.waveform.export()
503
+
504
+ def export_to_matplotlib(self):
505
+ """
506
+ Export the plot widget to matplotlib.
507
+ """
508
+ try:
509
+ import matplotlib as mpl
510
+ except ImportError:
511
+ self.warning_util.show_warning(
512
+ title="Matplotlib not installed",
513
+ message="Matplotlib is required for this feature.",
514
+ detailed_text="Please install matplotlib in your Python environment by using 'pip install matplotlib'.",
515
+ )
516
+ return
517
+ self.waveform.export_to_matplotlib()
518
+
519
+ #######################################
520
+ # User Access Methods from BECConnector
521
+ ######################################
522
+ def cleanup(self):
523
+ self.fig.cleanup()
524
+ return super().cleanup()
525
+
526
+
527
+ if __name__ == "__main__": # pragma: no cover
528
+ import sys
529
+
530
+ from qtpy.QtWidgets import QApplication
531
+
532
+ app = QApplication(sys.argv)
533
+ widget = BECMultiWaveformWidget()
534
+ widget.show()
535
+ sys.exit(app.exec())
@@ -0,0 +1,17 @@
1
+ def main(): # pragma: no cover
2
+ from qtpy import PYSIDE6
3
+
4
+ if not PYSIDE6:
5
+ print("PYSIDE6 is not available in the environment. Cannot patch designer.")
6
+ return
7
+ from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
8
+
9
+ from bec_widgets.widgets.plots.multi_waveform.bec_multi_waveform_widget_plugin import (
10
+ BECMultiWaveformWidgetPlugin,
11
+ )
12
+
13
+ QPyDesignerCustomWidgetCollection.addCustomWidget(BECMultiWaveformWidgetPlugin())
14
+
15
+
16
+ if __name__ == "__main__": # pragma: no cover
17
+ main()
@@ -6,7 +6,7 @@ from qtpy.QtDesigner import QDesignerCustomWidgetInterface
6
6
 
7
7
  import bec_widgets
8
8
  from bec_widgets.utils.bec_designer import designer_material_icon
9
- from bec_widgets.widgets.waveform.waveform_widget import BECWaveformWidget
9
+ from bec_widgets.widgets.plots.waveform.waveform_widget import BECWaveformWidget
10
10
 
11
11
  DOM_XML = """
12
12
  <ui language='c++'>
@@ -6,7 +6,9 @@ def main(): # pragma: no cover
6
6
  return
7
7
  from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
8
8
 
9
- from bec_widgets.widgets.waveform.bec_waveform_widget_plugin import BECWaveformWidgetPlugin
9
+ from bec_widgets.widgets.plots.waveform.bec_waveform_widget_plugin import (
10
+ BECWaveformWidgetPlugin,
11
+ )
10
12
 
11
13
  QPyDesignerCustomWidgetCollection.addCustomWidget(BECWaveformWidgetPlugin())
12
14
 
@@ -12,9 +12,11 @@ import bec_widgets
12
12
  from bec_widgets.qt_utils.error_popups import WarningPopupUtility
13
13
  from bec_widgets.qt_utils.settings_dialog import SettingWidget
14
14
  from bec_widgets.utils import Colors, UILoader
15
- from bec_widgets.widgets.color_button.color_button import ColorButton
16
- from bec_widgets.widgets.dap_combo_box.dap_combo_box import DapComboBox
17
- from bec_widgets.widgets.device_line_edit.device_line_edit import DeviceLineEdit
15
+ from bec_widgets.widgets.control.device_input.device_line_edit.device_line_edit import (
16
+ DeviceLineEdit,
17
+ )
18
+ from bec_widgets.widgets.dap.dap_combo_box.dap_combo_box import DapComboBox
19
+ from bec_widgets.widgets.utility.visual.color_button.color_button import ColorButton
18
20
 
19
21
  MODULE_PATH = os.path.dirname(bec_widgets.__file__)
20
22