bec-widgets 0.57.0__tar.gz → 0.57.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/CHANGELOG.md +13 -13
  2. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/PKG-INFO +1 -1
  3. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/cli/auto_updates.py +1 -1
  4. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/cli/client.py +4 -4
  5. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/examples/jupyter_console/jupyter_console_window.py +4 -4
  6. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/dock/dock.py +44 -35
  7. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/dock/dock_area.py +1 -3
  8. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/widgets/bec_figure.md +4 -4
  9. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/widgets/spiral_progress_bar.md +2 -2
  10. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/pyproject.toml +1 -1
  11. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/end-2-end/test_bec_dock_rpc_e2e.py +5 -5
  12. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_bec_dock.py +1 -1
  13. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/.git_hooks/pre-commit +0 -0
  14. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/.gitignore +0 -0
  15. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/.gitlab/issue_templates/bug_report_template.md +0 -0
  16. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/.gitlab/issue_templates/documentation_update_template.md +0 -0
  17. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/.gitlab/issue_templates/feature_request_template.md +0 -0
  18. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/.gitlab/merge_request_templates/default.md +0 -0
  19. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/.gitlab-ci.yml +0 -0
  20. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/.pylintrc +0 -0
  21. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/.readthedocs.yaml +0 -0
  22. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/LICENSE +0 -0
  23. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/README.md +0 -0
  24. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/__init__.py +0 -0
  25. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/assets/bec_widgets_icon.png +0 -0
  26. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/assets/terminal_icon.png +0 -0
  27. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/cli/__init__.py +0 -0
  28. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/cli/client_utils.py +0 -0
  29. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/cli/generate_cli.py +0 -0
  30. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/cli/rpc_register.py +0 -0
  31. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/cli/rpc_wigdet_handler.py +0 -0
  32. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/cli/server.py +0 -0
  33. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/examples/__init__.py +0 -0
  34. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/examples/jupyter_console/__init__.py +0 -0
  35. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/examples/jupyter_console/jupyter_console_window.ui +0 -0
  36. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/examples/motor_movement/__init__.py +0 -0
  37. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/examples/motor_movement/motor_control_compilations.py +0 -0
  38. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/examples/motor_movement/motor_controller.ui +0 -0
  39. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/__init__.py +0 -0
  40. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/bec_connector.py +0 -0
  41. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/bec_dispatcher.py +0 -0
  42. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/bec_table.py +0 -0
  43. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/colors.py +0 -0
  44. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/container_utils.py +0 -0
  45. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/crosshair.py +0 -0
  46. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/entry_validator.py +0 -0
  47. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/layout_manager.py +0 -0
  48. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/plugin_utils.py +0 -0
  49. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/rpc_decorator.py +0 -0
  50. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/thread_checker.py +0 -0
  51. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/ui_loader.py +0 -0
  52. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/validator_delegate.py +0 -0
  53. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/widget_io.py +0 -0
  54. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/utils/yaml_dialog.py +0 -0
  55. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/__init__.py +0 -0
  56. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/dock/__init__.py +0 -0
  57. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/figure/__init__.py +0 -0
  58. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/figure/figure.py +0 -0
  59. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/figure/plots/__init__.py +0 -0
  60. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/figure/plots/image/__init__.py +0 -0
  61. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/figure/plots/image/image.py +0 -0
  62. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/figure/plots/image/image_item.py +0 -0
  63. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/figure/plots/image/image_processor.py +0 -0
  64. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/figure/plots/motor_map/__init__.py +0 -0
  65. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/figure/plots/motor_map/motor_map.py +0 -0
  66. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/figure/plots/plot_base.py +0 -0
  67. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/figure/plots/waveform/__init__.py +0 -0
  68. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/figure/plots/waveform/waveform.py +0 -0
  69. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/figure/plots/waveform/waveform_curve.py +0 -0
  70. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/jupyter_console/__init__.py +0 -0
  71. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/jupyter_console/jupyter_console.py +0 -0
  72. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/__init__.py +0 -0
  73. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/motor_control.py +0 -0
  74. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/motor_table/__init__.py +0 -0
  75. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/motor_table/motor_table.py +0 -0
  76. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/motor_table/motor_table.ui +0 -0
  77. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/movement_absolute/__init__.py +0 -0
  78. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/movement_absolute/movement_absolute.py +0 -0
  79. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/movement_absolute/movement_absolute.ui +0 -0
  80. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/movement_relative/__init__.py +0 -0
  81. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/movement_relative/movement_relative.py +0 -0
  82. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/movement_relative/movement_relative.ui +0 -0
  83. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/selection/__init__.py +0 -0
  84. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/selection/selection.py +0 -0
  85. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/motor_control/selection/selection.ui +0 -0
  86. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/scan_control/__init__.py +0 -0
  87. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/scan_control/scan_control.py +0 -0
  88. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/spiral_progress_bar/__init__.py +0 -0
  89. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/spiral_progress_bar/ring.py +0 -0
  90. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/spiral_progress_bar/spiral_progress_bar.py +0 -0
  91. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/toolbar/__init__.py +0 -0
  92. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/bec_widgets/widgets/toolbar/toolbar.py +0 -0
  93. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/Makefile +0 -0
  94. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/_static/custom.css +0 -0
  95. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/_templates/custom-class-template.rst +0 -0
  96. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/_templates/custom-module-template.rst +0 -0
  97. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/api_reference/api_reference.md +0 -0
  98. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/assets/apps_48dp.svg +0 -0
  99. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/assets/display_settings_48dp.svg +0 -0
  100. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/assets/index_api.svg +0 -0
  101. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/assets/index_contribute.svg +0 -0
  102. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/assets/index_getting_started.svg +0 -0
  103. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/assets/index_user_guide.svg +0 -0
  104. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/assets/rocket_launch_48dp.svg +0 -0
  105. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/conf.py +0 -0
  106. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/developer/developer.md +0 -0
  107. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/index.md +0 -0
  108. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/introduction/introduction.md +0 -0
  109. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/make.bat +0 -0
  110. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/requirements.txt +0 -0
  111. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/api_reference/api_reference.md +0 -0
  112. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/applications/applications.md +0 -0
  113. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/customisation.md +0 -0
  114. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/getting_started/command_line_introduction.md +0 -0
  115. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/getting_started/getting_started.md +0 -0
  116. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/getting_started/gui_complex_gui.gif +0 -0
  117. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/getting_started/installation.md +0 -0
  118. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/user.md +0 -0
  119. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/widgets/image_plot.gif +0 -0
  120. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/widgets/motor.gif +0 -0
  121. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/widgets/progress_bar.gif +0 -0
  122. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/widgets/scatter_2D.gif +0 -0
  123. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/widgets/w1D.gif +0 -0
  124. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/docs/user/widgets/widgets.md +0 -0
  125. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/__init__.py +0 -0
  126. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/end-2-end/__init__.py +0 -0
  127. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/end-2-end/conftest.py +0 -0
  128. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/end-2-end/test_bec_figure_rpc_e2e.py +0 -0
  129. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/end-2-end/test_rpc_register_e2e.py +0 -0
  130. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/__init__.py +0 -0
  131. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/client_mocks.py +0 -0
  132. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/conftest.py +0 -0
  133. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_bec_connector.py +0 -0
  134. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_bec_dispatcher.py +0 -0
  135. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_bec_figure.py +0 -0
  136. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_bec_motor_map.py +0 -0
  137. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_client_utils.py +0 -0
  138. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_configs/config_device.yaml +0 -0
  139. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_configs/config_device_no_entry.yaml +0 -0
  140. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_configs/config_scan.yaml +0 -0
  141. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_crosshair.py +0 -0
  142. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_generate_cli_client.py +0 -0
  143. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_motor_control.py +0 -0
  144. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_msgs/__init__.py +0 -0
  145. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_msgs/available_scans_message.py +0 -0
  146. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_plot_base.py +0 -0
  147. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_rpc_register.py +0 -0
  148. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_scan_control.py +0 -0
  149. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_spiral_progress_bar.py +0 -0
  150. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_waveform1d.py +0 -0
  151. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_widget_io.py +0 -0
  152. {bec_widgets-0.57.0 → bec_widgets-0.57.1}/tests/unit_tests/test_yaml_dialog.py +0 -0
@@ -2,6 +2,19 @@
2
2
 
3
3
 
4
4
 
5
+ ## v0.57.1 (2024-06-06)
6
+
7
+ ### Documentation
8
+
9
+ * docs: docs refactored from add_widget_bec to add_widget ([`c3f4845`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c3f4845b4f95005ff737fed5542600b0b9a9cc2b))
10
+
11
+ ### Fix
12
+
13
+ * fix: tests references to add_widget_bec refactored ([`f51b25f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/f51b25f0af4ab8b0a75ee48a40bfbb079c16e9d1))
14
+
15
+ * fix(dock): add_widget and add_widget_bec consolidated ([`8ae323f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8ae323f5c3c0d9d0f202d31d5e8374a272a26be2))
16
+
17
+
5
18
  ## v0.57.0 (2024-06-05)
6
19
 
7
20
  ### Documentation
@@ -160,16 +173,3 @@
160
173
  ### Fix
161
174
 
162
175
  * fix(docstrings): docstrings formating fixed for sphinx to properly format readdocs ([`7f2f7cd`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/7f2f7cd07a14876617cd83cedde8c281fdc52c3a))
163
-
164
-
165
- ## v0.52.0 (2024-05-07)
166
-
167
- ### Feature
168
-
169
- * feat(utils/layout_manager): added GridLayoutManager to extend functionalities of native QGridLayout ([`fcd6ef0`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/fcd6ef0975dc872f69c9d6fb2b8a1ad04a423aae))
170
-
171
- * feat(widget/dock): BECDock and BECDock area for dockable windows ([`d8ff8af`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/d8ff8afcd474660a6069bbdab05f10a65f221727))
172
-
173
- ### Fix
174
-
175
- * fix(widgets/dock): BECDockArea close overwrites the default pyqtgraph Container close + minor improvements ([`ceae979`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/ceae979f375ecc33c5c97148f197655c1ca57b6c))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.57.0
3
+ Version: 0.57.1
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
@@ -30,7 +30,7 @@ class AutoUpdates:
30
30
  Create a default dock for the auto updates.
31
31
  """
32
32
  dock = self.gui.add_dock("default_figure")
33
- dock.add_widget_bec("BECFigure")
33
+ dock.add_widget("BECFigure")
34
34
  self.dock_name = "default_figure"
35
35
 
36
36
  @staticmethod
@@ -1468,20 +1468,20 @@ class BECDock(RPCBase):
1468
1468
  """
1469
1469
 
1470
1470
  @rpc_call
1471
- def add_widget_bec(
1471
+ def add_widget(
1472
1472
  self,
1473
- widget_type: "str",
1473
+ widget: "BECConnector | str",
1474
1474
  row=None,
1475
1475
  col=0,
1476
1476
  rowspan=1,
1477
1477
  colspan=1,
1478
1478
  shift: "Literal['down', 'up', 'left', 'right']" = "down",
1479
- ):
1479
+ ) -> "BECConnector":
1480
1480
  """
1481
1481
  Add a widget to the dock.
1482
1482
 
1483
1483
  Args:
1484
- widget_type(str): The widget to add. Only BEC RPC widgets from RPCWidgetHandler are allowed.
1484
+ widget(QWidget): The widget to add.
1485
1485
  row(int): The row to add the widget to. If None, the widget will be added to the next available row.
1486
1486
  col(int): The column to add the widget to.
1487
1487
  rowspan(int): The number of rows the widget should span.
@@ -104,19 +104,19 @@ class JupyterConsoleWindow(QWidget): # pragma: no cover:
104
104
  def _init_dock(self):
105
105
 
106
106
  self.d0 = self.dock.add_dock(name="dock_0")
107
- self.fig0 = self.d0.add_widget_bec("BECFigure")
107
+ self.fig0 = self.d0.add_widget("BECFigure")
108
108
  self.fig0.image("eiger", vrange=(0, 100))
109
109
 
110
110
  self.d1 = self.dock.add_dock(name="dock_1", position="right")
111
- self.fig1 = self.d1.add_widget_bec("BECFigure")
111
+ self.fig1 = self.d1.add_widget("BECFigure")
112
112
  self.fig1.plot(x_name="samx", y_name="bpm4i")
113
113
  self.fig1.plot(x_name="samx", y_name="bpm3a")
114
114
 
115
115
  self.d2 = self.dock.add_dock(name="dock_2", position="bottom")
116
- self.fig2 = self.d2.add_widget_bec("BECFigure", row=0, col=0)
116
+ self.fig2 = self.d2.add_widget("BECFigure", row=0, col=0)
117
117
  self.fig2.motor_map(x_name="samx", y_name="samy")
118
118
  self.fig2.plot(x_name="samx", y_name="bpm4i")
119
- self.bar = self.d2.add_widget_bec("SpiralProgressBar", row=0, col=1)
119
+ self.bar = self.d2.add_widget("SpiralProgressBar", row=0, col=1)
120
120
  self.bar.set_diameter(200)
121
121
 
122
122
  self.dock.save_state()
@@ -33,7 +33,7 @@ class BECDock(BECConnector, Dock):
33
33
  "hide_title_bar",
34
34
  "get_widgets_positions",
35
35
  "set_title",
36
- "add_widget_bec",
36
+ "add_widget",
37
37
  "list_eligible_widgets",
38
38
  "move_widget",
39
39
  "remove_widget",
@@ -152,47 +152,47 @@ class BECDock(BECConnector, Dock):
152
152
  """
153
153
  return list(RPCWidgetHandler.widget_classes.keys())
154
154
 
155
- def add_widget_bec(
156
- self,
157
- widget_type: str,
158
- row=None,
159
- col=0,
160
- rowspan=1,
161
- colspan=1,
162
- shift: Literal["down", "up", "left", "right"] = "down",
163
- ):
164
- """
165
- Add a widget to the dock.
166
-
167
- Args:
168
- widget_type(str): The widget to add. Only BEC RPC widgets from RPCWidgetHandler are allowed.
169
- row(int): The row to add the widget to. If None, the widget will be added to the next available row.
170
- col(int): The column to add the widget to.
171
- rowspan(int): The number of rows the widget should span.
172
- colspan(int): The number of columns the widget should span.
173
- shift(Literal["down", "up", "left", "right"]): The direction to shift the widgets if the position is occupied.
174
- """
175
- if row is None:
176
- row = self.layout.rowCount()
177
-
178
- if self.layout_manager.is_position_occupied(row, col):
179
- self.layout_manager.shift_widgets(shift, start_row=row)
180
-
181
- widget = RPCWidgetHandler.create_widget(widget_type)
182
- self.addWidget(widget, row=row, col=col, rowspan=rowspan, colspan=colspan)
183
- self.config.widgets[widget.gui_id] = widget.config
184
-
185
- return widget
155
+ # def add_widget_bec(
156
+ # self,
157
+ # widget_type: str,
158
+ # row=None,
159
+ # col=0,
160
+ # rowspan=1,
161
+ # colspan=1,
162
+ # shift: Literal["down", "up", "left", "right"] = "down",
163
+ # ):
164
+ # """
165
+ # Add a widget to the dock.
166
+ #
167
+ # Args:
168
+ # widget_type(str): The widget to add. Only BEC RPC widgets from RPCWidgetHandler are allowed.
169
+ # row(int): The row to add the widget to. If None, the widget will be added to the next available row.
170
+ # col(int): The column to add the widget to.
171
+ # rowspan(int): The number of rows the widget should span.
172
+ # colspan(int): The number of columns the widget should span.
173
+ # shift(Literal["down", "up", "left", "right"]): The direction to shift the widgets if the position is occupied.
174
+ # """
175
+ # if row is None:
176
+ # row = self.layout.rowCount()
177
+ #
178
+ # if self.layout_manager.is_position_occupied(row, col):
179
+ # self.layout_manager.shift_widgets(shift, start_row=row)
180
+ #
181
+ # widget = RPCWidgetHandler.create_widget(widget_type)
182
+ # self.addWidget(widget, row=row, col=col, rowspan=rowspan, colspan=colspan)
183
+ # self.config.widgets[widget.gui_id] = widget.config
184
+ #
185
+ # return widget
186
186
 
187
187
  def add_widget(
188
188
  self,
189
- widget: QWidget,
189
+ widget: BECConnector | str,
190
190
  row=None,
191
191
  col=0,
192
192
  rowspan=1,
193
193
  colspan=1,
194
194
  shift: Literal["down", "up", "left", "right"] = "down",
195
- ):
195
+ ) -> BECConnector:
196
196
  """
197
197
  Add a widget to the dock.
198
198
 
@@ -210,8 +210,17 @@ class BECDock(BECConnector, Dock):
210
210
  if self.layout_manager.is_position_occupied(row, col):
211
211
  self.layout_manager.shift_widgets(shift, start_row=row)
212
212
 
213
+ if isinstance(widget, str):
214
+ widget = RPCWidgetHandler.create_widget(widget)
215
+ else:
216
+ widget = widget
217
+
213
218
  self.addWidget(widget, row=row, col=col, rowspan=rowspan, colspan=colspan)
214
- self.config.widgets[widget.gui_id] = widget.config
219
+
220
+ if hasattr(widget, "config"):
221
+ self.config.widgets[widget.gui_id] = widget.config
222
+
223
+ return widget
215
224
 
216
225
  def move_widget(self, widget: QWidget, new_row: int, new_col: int):
217
226
  """
@@ -171,9 +171,7 @@ class BECDockArea(BECConnector, DockArea):
171
171
  dock.show_title_bar()
172
172
 
173
173
  if widget is not None and isinstance(widget, str):
174
- dock.add_widget_bec(
175
- widget_type=widget, row=row, col=col, rowspan=rowspan, colspan=colspan
176
- )
174
+ dock.add_widget(widget=widget, row=row, col=col, rowspan=rowspan, colspan=colspan)
177
175
  elif widget is not None and isinstance(widget, QWidget):
178
176
  dock.addWidget(widget, row=row, col=col, rowspan=rowspan, colspan=colspan)
179
177
  if self._instructions_visible:
@@ -20,7 +20,7 @@ In the following, we describe 4 different type of widgets thaat are available in
20
20
  The following code snipped demonstrates how to create a 1D waveform plot using BEC Widgets within BEC. More details about BEC Widgets in BEC can be found in the getting started section within the [introduction to the command line.](user.command_line_introduction)
21
21
  ```python
22
22
  # adds a new dock, a new BECFigure and a BECWaveForm to the dock
23
- plt = gui.add_dock().add_widget_bec('BECFigure').plot('samx', 'bpm4i')
23
+ plt = gui.add_dock().add_widget('BECFigure').plot('samx', 'bpm4i')
24
24
  # add a second curve to the same plot
25
25
  plt.add_curve_scan('samx', 'bpm3i')
26
26
  plt.set_title("Gauss plots vs. samx")
@@ -53,7 +53,7 @@ dev.bpm3i.sim.select_sim_model("StepModel")
53
53
  The following code snipped demonstrates how to create a 2D scatter plot using BEC Widgets within BEC.
54
54
  ```python
55
55
  # adds a new dock, a new BECFigure and a BECWaveForm to the dock
56
- plt = gui.add_dock().add_widget_bec('BECFigure').add_plot('samx', 'samy', 'bpm4i')
56
+ plt = gui.add_dock().add_widget('BECFigure').add_plot('samx', 'samy', 'bpm4i')
57
57
  ```
58
58
 
59
59
  (user.widgets.motor_map)=
@@ -72,7 +72,7 @@ plt = gui.add_dock().add_widget_bec('BECFigure').add_plot('samx', 'samy', 'bpm4i
72
72
  The following code snipped demonstrates how to create a motor map using BEC Widgets within BEC.
73
73
  ```python
74
74
  # add a motor map to the gui
75
- mot_map = gui.add_dock().add_widget_bec('BECFigure').motor_map('samx', 'samy')
75
+ mot_map = gui.add_dock().add_widget('BECFigure').motor_map('samx', 'samy')
76
76
  # change the number of points displayed
77
77
  ```
78
78
 
@@ -91,7 +91,7 @@ mot_map = gui.add_dock().add_widget_bec('BECFigure').motor_map('samx', 'samy')
91
91
  The following code snipped demonstrates how to create a motor map using BEC Widgets within BEC.
92
92
  ```python
93
93
  # add a camera view for the eiger camera to the gui
94
- cam_widget = gui.add_dock().add_widget_bec('BECFigure').image('eiger')
94
+ cam_widget = gui.add_dock().add_widget('BECFigure').image('eiger')
95
95
  # set the title of the camera view
96
96
  cam_widget.set_title("Camera Image Eiger")
97
97
  # change the color map range, e.g. from 0 to 100, per default it is autoscaling
@@ -15,7 +15,7 @@
15
15
  The following code snipped demonstrates how to create a 2D scatter plot using BEC Widgets within BEC.
16
16
  ```python
17
17
  # adds a new dock with a spiral progress bar
18
- progress = gui.add_dock().add_widget_bec("SpiralProgressBar")
18
+ progress = gui.add_dock().add_widget("SpiralProgressBar")
19
19
  # customize the size of the ring
20
- progress.set_line_widfth(20)
20
+ progress.set_line_width(20)
21
21
  ```
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "bec_widgets"
7
- version = "0.57.0"
7
+ version = "0.57.1"
8
8
  description = "BEC Widgets"
9
9
  requires-python = ">=3.10"
10
10
  classifiers = [
@@ -38,9 +38,9 @@ def test_rpc_add_dock_with_figure_e2e(rpc_server_dock, qtbot):
38
38
  assert len(dock_server.docks) == 3
39
39
 
40
40
  # Add 3 figures with some widgets
41
- fig0 = d0.add_widget_bec("BECFigure")
42
- fig1 = d1.add_widget_bec("BECFigure")
43
- fig2 = d2.add_widget_bec("BECFigure")
41
+ fig0 = d0.add_widget("BECFigure")
42
+ fig1 = d1.add_widget("BECFigure")
43
+ fig2 = d2.add_widget("BECFigure")
44
44
 
45
45
  assert len(dock_server.docks) == 3
46
46
  assert len(dock_server.docks["dock_0"].widgets) == 1
@@ -166,7 +166,7 @@ def test_spiral_bar(rpc_server_dock):
166
166
 
167
167
  d0 = dock.add_dock(name="dock_0")
168
168
 
169
- bar = d0.add_widget_bec("SpiralProgressBar")
169
+ bar = d0.add_widget("SpiralProgressBar")
170
170
  assert bar.__class__.__name__ == "SpiralProgressBar"
171
171
 
172
172
  bar.set_number_of_bars(5)
@@ -188,7 +188,7 @@ def test_spiral_bar_scan_update(rpc_server_dock, qtbot):
188
188
 
189
189
  d0 = dock.add_dock("dock_0")
190
190
 
191
- d0.add_widget_bec("SpiralProgressBar")
191
+ d0.add_widget("SpiralProgressBar")
192
192
 
193
193
  client = rpc_server_dock.client
194
194
  dev = client.device_manager.devices
@@ -58,7 +58,7 @@ def test_bec_dock_area_add_remove_dock(bec_dock_area, qtbot):
58
58
 
59
59
  def test_add_remove_bec_figure_to_dock(bec_dock_area):
60
60
  d0 = bec_dock_area.add_dock()
61
- fig = d0.add_widget_bec("BECFigure")
61
+ fig = d0.add_widget("BECFigure")
62
62
  plt = fig.plot(x_name="samx", y_name="bpm4i")
63
63
  im = fig.image("eiger")
64
64
  mm = fig.motor_map("samx", "samy")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes