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.
- .gitlab-ci.yml +0 -1
- CHANGELOG.md +76 -70
- PKG-INFO +2 -2
- bec_widgets/cli/client.py +3 -3
- bec_widgets/qt_utils/toolbar.py +11 -5
- bec_widgets/utils/bec_widget.py +11 -2
- bec_widgets/utils/colors.py +18 -2
- bec_widgets/utils/plugin_templates/plugin.template +2 -2
- bec_widgets/widgets/bec_queue/bec_queue.py +2 -0
- bec_widgets/widgets/bec_queue/bec_queue_plugin.py +1 -1
- bec_widgets/widgets/bec_status_box/bec_status_box.py +2 -0
- bec_widgets/widgets/bec_status_box/bec_status_box_plugin.py +1 -1
- bec_widgets/widgets/color_button/color_button.py +2 -0
- bec_widgets/widgets/color_button/color_button_plugin.py +1 -1
- bec_widgets/widgets/colormap_selector/colormap_selector.py +1 -0
- bec_widgets/widgets/colormap_selector/colormap_selector_plugin.py +1 -1
- bec_widgets/widgets/dark_mode_button/dark_mode_button.py +12 -3
- bec_widgets/widgets/dark_mode_button/dark_mode_button_plugin.py +1 -1
- bec_widgets/widgets/device_browser/device_browser.py +2 -0
- bec_widgets/widgets/device_browser/device_browser_plugin.py +1 -1
- bec_widgets/widgets/device_combobox/device_combo_box_plugin.py +1 -1
- bec_widgets/widgets/device_combobox/device_combobox.py +2 -0
- bec_widgets/widgets/device_line_edit/device_line_edit.py +2 -0
- bec_widgets/widgets/device_line_edit/device_line_edit_plugin.py +1 -1
- bec_widgets/widgets/dock/dock.py +1 -0
- bec_widgets/widgets/dock/dock_area.py +30 -10
- bec_widgets/widgets/dock/dock_area_plugin.py +1 -1
- bec_widgets/widgets/figure/figure.py +1 -1
- bec_widgets/widgets/figure/plots/waveform/waveform.py +12 -7
- bec_widgets/widgets/figure/plots/waveform/waveform_curve.py +3 -3
- bec_widgets/widgets/image/bec_image_widget_plugin.py +1 -1
- bec_widgets/widgets/image/image_widget.py +1 -0
- bec_widgets/widgets/motor_map/bec_motor_map_widget_plugin.py +1 -1
- bec_widgets/widgets/motor_map/motor_map_widget.py +1 -0
- bec_widgets/widgets/position_indicator/position_indicator.py +2 -0
- bec_widgets/widgets/position_indicator/position_indicator_plugin.py +1 -1
- bec_widgets/widgets/positioner_box/positioner_box.py +1 -0
- bec_widgets/widgets/positioner_box/positioner_box_plugin.py +1 -1
- bec_widgets/widgets/positioner_box/positioner_control_line.py +2 -0
- bec_widgets/widgets/positioner_box/positioner_control_line_plugin.py +1 -1
- bec_widgets/widgets/ring_progress_bar/ring_progress_bar.py +1 -0
- bec_widgets/widgets/ring_progress_bar/ring_progress_bar_plugin.py +1 -1
- bec_widgets/widgets/scan_control/scan_control.py +2 -0
- bec_widgets/widgets/scan_control/scan_control_plugin.py +1 -4
- bec_widgets/widgets/spinner/spinner.py +2 -0
- bec_widgets/widgets/spinner/spinner_widget_plugin.py +1 -1
- bec_widgets/widgets/stop_button/stop_button.py +2 -0
- bec_widgets/widgets/stop_button/stop_button_plugin.py +1 -1
- bec_widgets/widgets/text_box/text_box.py +1 -0
- bec_widgets/widgets/text_box/text_box_plugin.py +1 -1
- bec_widgets/widgets/toggle/toggle.py +1 -0
- bec_widgets/widgets/toggle/toggle_switch_plugin.py +1 -1
- bec_widgets/widgets/vscode/vs_code_editor_plugin.py +1 -1
- bec_widgets/widgets/vscode/vscode.py +1 -0
- bec_widgets/widgets/waveform/bec_waveform_widget_plugin.py +1 -1
- bec_widgets/widgets/waveform/waveform_popups/curve_dialog/curve_dialog.py +14 -13
- bec_widgets/widgets/waveform/waveform_widget.py +3 -2
- bec_widgets/widgets/website/website.py +42 -10
- bec_widgets/widgets/website/website_widget_plugin.py +1 -1
- {bec_widgets-0.99.1.dist-info → bec_widgets-0.99.9.dist-info}/METADATA +2 -2
- bec_widgets-0.99.9.dist-info/RECORD +231 -0
- pyproject.toml +7 -2
- bec_widgets/assets/toolbar_icons/add.svg +0 -3
- bec_widgets/assets/toolbar_icons/attach_all.svg +0 -3
- bec_widgets/assets/toolbar_icons/auto_range.svg +0 -3
- bec_widgets/assets/toolbar_icons/compare.svg +0 -3
- bec_widgets/assets/toolbar_icons/connection.svg +0 -4
- bec_widgets/assets/toolbar_icons/device_line_edit.svg +0 -3
- bec_widgets/assets/toolbar_icons/drag_pan_mode.svg +0 -3
- bec_widgets/assets/toolbar_icons/export.svg +0 -9
- bec_widgets/assets/toolbar_icons/fft.svg +0 -11
- bec_widgets/assets/toolbar_icons/fitting_parameters.svg +0 -3
- bec_widgets/assets/toolbar_icons/history.svg +0 -4
- bec_widgets/assets/toolbar_icons/image.svg +0 -3
- bec_widgets/assets/toolbar_icons/image_autorange.svg +0 -3
- bec_widgets/assets/toolbar_icons/import.svg +0 -9
- bec_widgets/assets/toolbar_icons/line_axis.svg +0 -3
- bec_widgets/assets/toolbar_icons/line_curve.svg +0 -3
- bec_widgets/assets/toolbar_icons/lock_aspect_ratio.svg +0 -3
- bec_widgets/assets/toolbar_icons/log_scale.png +0 -0
- bec_widgets/assets/toolbar_icons/motor_map.svg +0 -3
- bec_widgets/assets/toolbar_icons/photo_library.svg +0 -3
- bec_widgets/assets/toolbar_icons/positioner_box.svg +0 -3
- bec_widgets/assets/toolbar_icons/progress.svg +0 -3
- bec_widgets/assets/toolbar_icons/queue.svg +0 -3
- bec_widgets/assets/toolbar_icons/rectangle_mode.svg +0 -3
- bec_widgets/assets/toolbar_icons/remove.svg +0 -5
- bec_widgets/assets/toolbar_icons/reset_settings.svg +0 -3
- bec_widgets/assets/toolbar_icons/restore_state.svg +0 -3
- bec_widgets/assets/toolbar_icons/ring_progress.svg +0 -3
- bec_widgets/assets/toolbar_icons/rotate_left.svg +0 -3
- bec_widgets/assets/toolbar_icons/rotate_right.svg +0 -3
- bec_widgets/assets/toolbar_icons/save.svg +0 -3
- bec_widgets/assets/toolbar_icons/save_state.svg +0 -3
- bec_widgets/assets/toolbar_icons/scan_control.svg +0 -3
- bec_widgets/assets/toolbar_icons/settings.svg +0 -4
- bec_widgets/assets/toolbar_icons/status.svg +0 -3
- bec_widgets/assets/toolbar_icons/terminal.svg +0 -3
- bec_widgets/assets/toolbar_icons/transform.svg +0 -3
- bec_widgets/assets/toolbar_icons/waveform.svg +0 -3
- bec_widgets-0.99.1.dist-info/RECORD +0 -415
- docs/Makefile +0 -20
- docs/_static/custom.css +0 -170
- docs/_templates/custom-class-template.rst +0 -34
- docs/_templates/custom-module-template.rst +0 -66
- docs/api_reference/api_reference.md +0 -12
- docs/assets/apps_48dp.svg +0 -1
- docs/assets/display_settings_48dp.svg +0 -1
- docs/assets/index_api.svg +0 -97
- docs/assets/index_contribute.svg +0 -76
- docs/assets/index_getting_started.svg +0 -66
- docs/assets/index_user_guide.svg +0 -67
- docs/assets/rocket_launch_48dp.svg +0 -1
- docs/assets/widget_screenshots/buttons.png +0 -0
- docs/assets/widget_screenshots/device_box.png +0 -0
- docs/assets/widget_screenshots/device_browser.png +0 -0
- docs/assets/widget_screenshots/device_inputs.png +0 -0
- docs/assets/widget_screenshots/dock_area.png +0 -0
- docs/assets/widget_screenshots/figure.png +0 -0
- docs/assets/widget_screenshots/image_widget.png +0 -0
- docs/assets/widget_screenshots/motor_map_widget.png +0 -0
- docs/assets/widget_screenshots/position_indicator.png +0 -0
- docs/assets/widget_screenshots/queue.png +0 -0
- docs/assets/widget_screenshots/ring_progress_bar.png +0 -0
- docs/assets/widget_screenshots/scan_controller.png +0 -0
- docs/assets/widget_screenshots/spinner.gif +0 -0
- docs/assets/widget_screenshots/status_box.png +0 -0
- docs/assets/widget_screenshots/text_box.png +0 -0
- docs/assets/widget_screenshots/toggle.png +0 -0
- docs/assets/widget_screenshots/waveform_widget.png +0 -0
- docs/assets/widget_screenshots/website.png +0 -0
- docs/conf.py +0 -82
- docs/developer/developer.md +0 -52
- docs/developer/introduction/concepts.md +0 -14
- docs/developer/introduction/contributing.md +0 -28
- docs/developer/introduction/introduction.md +0 -16
- docs/developer/introduction/useful_links.md +0 -23
- docs/developer/widget_development/bec_dispatcher.md +0 -143
- docs/developer/widget_development/widget_development.md +0 -13
- docs/index.md +0 -74
- docs/introduction/introduction.md +0 -18
- docs/make.bat +0 -35
- docs/requirements.txt +0 -12
- docs/user/api_reference/api_reference.md +0 -11
- docs/user/applications/applications.md +0 -10
- docs/user/customisation.md +0 -123
- docs/user/getting_started/BECDockArea.png +0 -0
- docs/user/getting_started/auto_updates.md +0 -82
- docs/user/getting_started/getting_started.md +0 -15
- docs/user/getting_started/gui_complex_gui.gif +0 -0
- docs/user/getting_started/installation.md +0 -33
- docs/user/getting_started/quick_start.md +0 -110
- docs/user/getting_started/video_tutorials.md +0 -17
- docs/user/user.md +0 -71
- docs/user/widgets/bec_figure/BECFigure.png +0 -0
- docs/user/widgets/bec_figure/bec_figure.md +0 -105
- docs/user/widgets/bec_status_box/bec_status_box.gif +0 -0
- docs/user/widgets/bec_status_box/bec_status_box.md +0 -38
- docs/user/widgets/buttons/buttons.md +0 -63
- docs/user/widgets/buttons/dark_mode_disabled.png +0 -0
- docs/user/widgets/buttons/dark_mode_enabled.png +0 -0
- docs/user/widgets/device_browser/device_browser.md +0 -36
- docs/user/widgets/device_browser/device_browser.png +0 -0
- docs/user/widgets/device_input/device_input.md +0 -100
- docs/user/widgets/dock_area/BECDockArea.png +0 -0
- docs/user/widgets/dock_area/bec_dock_area.md +0 -107
- docs/user/widgets/image/image_plot.gif +0 -0
- docs/user/widgets/image/image_widget.md +0 -84
- docs/user/widgets/motor_map/motor.gif +0 -0
- docs/user/widgets/motor_map/motor_map.md +0 -80
- docs/user/widgets/position_indicator/position_indicator.md +0 -76
- docs/user/widgets/positioner_box/positioner_box.md +0 -63
- docs/user/widgets/progress_bar/progress_bar.gif +0 -0
- docs/user/widgets/progress_bar/ring_progress_bar.md +0 -103
- docs/user/widgets/queue/queue.md +0 -41
- docs/user/widgets/scan_control/hide_scan_control.png +0 -0
- docs/user/widgets/scan_control/scan_control.gif +0 -0
- docs/user/widgets/scan_control/scan_control.md +0 -54
- docs/user/widgets/spinner/spinner.md +0 -75
- docs/user/widgets/text_box/text_box.md +0 -74
- docs/user/widgets/toggle/toggle.md +0 -66
- docs/user/widgets/waveform/bec_figure_dap.gif +0 -0
- docs/user/widgets/waveform/scatter_2D.gif +0 -0
- docs/user/widgets/waveform/w1D.gif +0 -0
- docs/user/widgets/waveform/waveform_widget.md +0 -132
- docs/user/widgets/website/website.md +0 -69
- docs/user/widgets/widgets.md +0 -220
- tests/__init__.py +0 -0
- tests/end-2-end/__init__.py +0 -0
- tests/end-2-end/conftest.py +0 -53
- tests/end-2-end/test_bec_dock_rpc_e2e.py +0 -298
- tests/end-2-end/test_bec_figure_rpc_e2e.py +0 -212
- tests/end-2-end/test_rpc_register_e2e.py +0 -40
- tests/end-2-end/test_scan_control_e2e.py +0 -71
- tests/references/SpinnerWidget/SpinnerWidget_darwin.png +0 -0
- tests/references/SpinnerWidget/SpinnerWidget_linux.png +0 -0
- tests/references/SpinnerWidget/SpinnerWidget_started_darwin.png +0 -0
- tests/references/SpinnerWidget/SpinnerWidget_started_linux.png +0 -0
- tests/unit_tests/__init__.py +0 -0
- tests/unit_tests/client_mocks.py +0 -189
- tests/unit_tests/conftest.py +0 -64
- tests/unit_tests/test_bec_connector.py +0 -80
- tests/unit_tests/test_bec_dispatcher.py +0 -119
- tests/unit_tests/test_bec_dock.py +0 -155
- tests/unit_tests/test_bec_figure.py +0 -270
- tests/unit_tests/test_bec_image.py +0 -63
- tests/unit_tests/test_bec_image_widget.py +0 -217
- tests/unit_tests/test_bec_motor_map.py +0 -282
- tests/unit_tests/test_bec_queue.py +0 -111
- tests/unit_tests/test_bec_status_box.py +0 -123
- tests/unit_tests/test_client_utils.py +0 -76
- tests/unit_tests/test_color_map_selector.py +0 -42
- tests/unit_tests/test_color_validation.py +0 -75
- tests/unit_tests/test_configs/config_device.yaml +0 -33
- tests/unit_tests/test_configs/config_device_no_entry.yaml +0 -27
- tests/unit_tests/test_configs/config_scan.yaml +0 -82
- tests/unit_tests/test_crosshair.py +0 -143
- tests/unit_tests/test_dark_mode_button.py +0 -70
- tests/unit_tests/test_device_browser.py +0 -83
- tests/unit_tests/test_device_input_base.py +0 -76
- tests/unit_tests/test_device_input_widgets.py +0 -178
- tests/unit_tests/test_error_utils.py +0 -63
- tests/unit_tests/test_generate_cli_client.py +0 -123
- tests/unit_tests/test_generate_plugin.py +0 -155
- tests/unit_tests/test_motor_map_widget.py +0 -194
- tests/unit_tests/test_msgs/__init__.py +0 -0
- tests/unit_tests/test_msgs/available_scans_message.py +0 -989
- tests/unit_tests/test_plot_base.py +0 -95
- tests/unit_tests/test_plugin_utils.py +0 -13
- tests/unit_tests/test_positioner_box.py +0 -130
- tests/unit_tests/test_ring_progress_bar.py +0 -337
- tests/unit_tests/test_rpc_register.py +0 -52
- tests/unit_tests/test_rpc_server.py +0 -42
- tests/unit_tests/test_rpc_widget_handler.py +0 -7
- tests/unit_tests/test_scan_control.py +0 -324
- tests/unit_tests/test_scan_control_group_box.py +0 -160
- tests/unit_tests/test_setting_dialog.py +0 -96
- tests/unit_tests/test_spinner.py +0 -31
- tests/unit_tests/test_stop_button.py +0 -27
- tests/unit_tests/test_text_box_widget.py +0 -54
- tests/unit_tests/test_toggle.py +0 -38
- tests/unit_tests/test_vscode_widget.py +0 -75
- tests/unit_tests/test_waveform1d.py +0 -712
- tests/unit_tests/test_waveform_widget.py +0 -462
- tests/unit_tests/test_website_widget.py +0 -25
- tests/unit_tests/test_widget_io.py +0 -90
- tests/unit_tests/test_yaml_dialog.py +0 -163
- {bec_widgets-0.99.1.dist-info → bec_widgets-0.99.9.dist-info}/WHEEL +0 -0
- {bec_widgets-0.99.1.dist-info → bec_widgets-0.99.9.dist-info}/entry_points.txt +0 -0
- {bec_widgets-0.99.1.dist-info → bec_widgets-0.99.9.dist-info}/licenses/LICENSE +0 -0
.gitlab-ci.yml
CHANGED
CHANGELOG.md
CHANGED
@@ -1,155 +1,161 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
## v0.99.
|
3
|
+
## v0.99.9 (2024-08-28)
|
4
4
|
|
5
5
|
### Fix
|
6
6
|
|
7
|
-
* fix
|
7
|
+
* fix: fixed build process and excluded docs and tests from tarballs and wheels ([`719254c`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/719254cf0a48e1fc4bd541edba239570778bcfea))
|
8
8
|
|
9
|
-
## v0.99.
|
9
|
+
## v0.99.8 (2024-08-28)
|
10
10
|
|
11
|
-
###
|
11
|
+
### Fix
|
12
12
|
|
13
|
-
*
|
13
|
+
* fix(website): fixed designer integration for website widget ([`5f37e86`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/5f37e862c95ac7173b6918ad39bcaef938dad698))
|
14
14
|
|
15
|
-
###
|
15
|
+
### Refactor
|
16
16
|
|
17
|
-
*
|
17
|
+
* refactor(website): changed inheritance of website widget to simple qwidget; closes #325 ([`9925bbd`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/9925bbdb48b55eacbbce9fd6a1555a21b84221f9))
|
18
|
+
|
19
|
+
## v0.99.7 (2024-08-28)
|
18
20
|
|
19
21
|
### Fix
|
20
22
|
|
21
|
-
* fix(
|
23
|
+
* fix(toolbar): material icons can accept color as kwarg ([`ffc871e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/ffc871ebbd3b68abc3e151bb8f5849e6c50e775e))
|
22
24
|
|
23
|
-
|
25
|
+
## v0.99.6 (2024-08-28)
|
24
26
|
|
25
|
-
|
27
|
+
### Documentation
|
26
28
|
|
27
|
-
|
29
|
+
* docs: various bugs fixed ([`c31e9a3`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c31e9a3aff3ee8e984674dee0965ee7f1b6e2b8f))
|
28
30
|
|
29
|
-
|
31
|
+
### Fix
|
30
32
|
|
31
|
-
|
33
|
+
* fix(toolbar): use of native qt separators ([`09c6c93`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/09c6c93c397ce4a21c293f6c79106c74b2db65ca))
|
32
34
|
|
33
|
-
|
35
|
+
## v0.99.5 (2024-08-28)
|
34
36
|
|
35
|
-
|
37
|
+
### Documentation
|
38
|
+
|
39
|
+
* docs(index): index page is centered ([`02239de`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/02239de0a36fcd6cbf97990b0dec1ddf7ecf6ba6))
|
36
40
|
|
37
41
|
### Fix
|
38
42
|
|
39
|
-
* fix(
|
43
|
+
* fix(dock_area): dark button added ([`e6f204b`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e6f204b6aa295747a68769f43af2e549149b401a))
|
40
44
|
|
41
|
-
|
45
|
+
## v0.99.4 (2024-08-28)
|
42
46
|
|
43
|
-
|
47
|
+
### Documentation
|
44
48
|
|
45
|
-
*
|
49
|
+
* docs(buttons): added missing buttons docs ([`4e5520a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/4e5520aee2115d2fc0cebb3865433478a5ec8253))
|
46
50
|
|
47
|
-
*
|
51
|
+
* docs(developer): tutorial for BECWidget base class ([`ac2cb51`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/ac2cb5197deef4d51e26ee5beb070eba3ffc210d))
|
48
52
|
|
49
|
-
|
53
|
+
### Fix
|
50
54
|
|
51
|
-
* fix(
|
55
|
+
* fix(theme): apply theme to all pyqtgraph widgets on manual updates ([`c550186`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c5501860e8e07a53f4bce144d44ed39eda6290ef))
|
52
56
|
|
53
57
|
### Refactor
|
54
58
|
|
55
|
-
* refactor(
|
59
|
+
* refactor(buttons): changed grid and thumbnail fig in gallery ([`4591ba8`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/4591ba8f73e22aba7258cad93c073f1387cb74a0))
|
56
60
|
|
57
|
-
|
61
|
+
* refactor(icons): removed toolbar icons from assets ([`f335763`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/f335763280adb1d83ba31f073ce206e4cb5d15ef))
|
58
62
|
|
59
|
-
|
63
|
+
* refactor(icons): moved widget icons to class attribute ICON_NAME ([`e890091`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e890091d862e42317c7a54fc414ba37c85f268b0))
|
60
64
|
|
61
|
-
|
65
|
+
## v0.99.3 (2024-08-27)
|
62
66
|
|
63
|
-
###
|
67
|
+
### Build
|
64
68
|
|
65
|
-
*
|
69
|
+
* build: updated min version of bec qthemes ([`d482434`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/d48243483ef8228cc5eb85e40a6b8f5da3b45520))
|
66
70
|
|
67
|
-
|
71
|
+
### Fix
|
68
72
|
|
69
|
-
|
73
|
+
* fix(cmaps): unified all defaults to magma cmap ([`1ca9499`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/1ca9499edd334c19fe1e7aac71d3940a80a1ec95))
|
70
74
|
|
71
|
-
*
|
75
|
+
* fix(color maps): color maps should take the background color into account; fixed min colors to 10 ([`060935f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/060935ffc5472a958c337bf60834c5291f104ece))
|
72
76
|
|
73
|
-
|
77
|
+
## v0.99.2 (2024-08-27)
|
74
78
|
|
75
|
-
|
79
|
+
### Ci
|
76
80
|
|
77
|
-
|
81
|
+
* ci: additional tests are not allowed to fail ([`bb385f0`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/bb385f07ca18904461a541b5cadde05398c84438))
|
78
82
|
|
79
83
|
### Fix
|
80
84
|
|
81
|
-
* fix(
|
85
|
+
* fix(widgets): fixed default theme for widgets
|
86
|
+
|
87
|
+
If not theme is set, the init of the BECWidget base class sets the default theme to "dark" ([`cf28730`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/cf28730515e3c2d5914e0205768734c578711e5c))
|
82
88
|
|
83
|
-
|
89
|
+
## v0.99.1 (2024-08-27)
|
84
90
|
|
85
|
-
|
91
|
+
### Fix
|
86
92
|
|
87
|
-
|
93
|
+
* fix(crosshair): emit all crosshair events, not just line coordinates ([`2265458`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2265458dcc57970db18c62619f5877d542d72e81))
|
88
94
|
|
89
|
-
|
95
|
+
## v0.99.0 (2024-08-25)
|
90
96
|
|
91
|
-
###
|
97
|
+
### Documentation
|
92
98
|
|
93
|
-
*
|
99
|
+
* docs(darkmodebutton): added dark mode button docs ([`406c263`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/406c263746f0e809c1a4d98356c48f40428c23d7))
|
94
100
|
|
95
|
-
|
101
|
+
### Feature
|
96
102
|
|
97
|
-
*
|
103
|
+
* feat(darkmodebutton): added button to toggle between dark and light mode ([`cc8c166`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/cc8c166b5c1d37e0f64c83801b2347a54a6550b6))
|
98
104
|
|
99
|
-
|
105
|
+
### Fix
|
100
106
|
|
101
|
-
|
107
|
+
* fix(toggle): emit state change ([`c4f3308`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c4f3308dc0c3e4b2064760ccd7372d71b3e49f96))
|
102
108
|
|
103
|
-
###
|
109
|
+
### Refactor
|
104
110
|
|
105
|
-
*
|
111
|
+
* refactor(darkmodebutton): renamed set_dark_mode_enabled to toggle_dark_mode ([`c70724a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c70724a456900bcb06b040407a2c5d497e49ce77))
|
106
112
|
|
107
|
-
###
|
113
|
+
### Test
|
108
114
|
|
109
|
-
*
|
115
|
+
* test(dark_mode_button): added tests for dark mode button ([`df35aab`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/df35aabff30c5d00b1c441132bd370446653741e))
|
110
116
|
|
111
|
-
## v0.
|
117
|
+
## v0.98.0 (2024-08-25)
|
112
118
|
|
113
|
-
###
|
119
|
+
### Feature
|
114
120
|
|
115
|
-
*
|
121
|
+
* feat(themes): added set_theme method ([`2b4449a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2b4449afebdda0a97f95712a1353cf40ec55c283))
|
116
122
|
|
117
123
|
### Fix
|
118
124
|
|
119
|
-
* fix(
|
125
|
+
* fix(toolbar): removed hardcoded color values ([`afdf4e8`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/afdf4e8782a22566932180224fa1c924d24c810f))
|
120
126
|
|
121
|
-
|
127
|
+
* fix: transitioning to material icons ([`2a82032`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2a82032644a84e38df04e2035a6aa63f4a046360))
|
122
128
|
|
123
|
-
*
|
129
|
+
* fix(dock_area): transitioned to MaterialIconAction ([`88a2f66`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/88a2f667588e9aeb34ae556fa327898824052bc3))
|
124
130
|
|
125
|
-
*
|
131
|
+
* fix: fix color palette if qtheme was not called ([`3f3b207`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/3f3b207295ebd406ebaeecee465c774965161b8b))
|
126
132
|
|
127
|
-
|
133
|
+
* fix(figure): removed theme from figure init ([`e42b84c`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e42b84c63650297d67feffccc02a2c2ba111ca79))
|
128
134
|
|
129
|
-
|
135
|
+
* fix: use globally set theme instead of the internal bec widgets theme ([`77c5aa7`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/77c5aa741cf1f5b969a42aa878aa2965176dbf41))
|
130
136
|
|
131
|
-
*
|
137
|
+
* fix(waveform): fixed icon appearance ([`36ad464`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/36ad4641594b67c9b789515c28f7db78a12757ee))
|
132
138
|
|
133
|
-
|
139
|
+
### Refactor
|
134
140
|
|
135
|
-
*
|
141
|
+
* refactor(waveform): use set theme for demo ([`44cfda1`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/44cfda1c07306669c9a4e09706d95e6b91dee370))
|
136
142
|
|
137
|
-
|
143
|
+
## v0.97.0 (2024-08-23)
|
138
144
|
|
139
145
|
### Feature
|
140
146
|
|
141
|
-
* feat(
|
142
|
-
|
143
|
-
* feat(widgets): added device_browser widget ([`73f5a2f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/73f5a2f085b289ac18fa8a918b6ad7cfed595fb4))
|
147
|
+
* feat(designer): added designer icon factory ([`82a55dd`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/82a55ddf3eafb589cb63408db1c0e7e5c9d629da))
|
144
148
|
|
145
149
|
### Fix
|
146
150
|
|
147
|
-
* fix(
|
151
|
+
* fix(toolbar icon): fixed material icon toolbar for theme changes ([`3ecbd60`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/3ecbd60627994417c9175364e5909710dbcdceb2))
|
148
152
|
|
149
|
-
|
153
|
+
## v0.96.3 (2024-08-23)
|
150
154
|
|
151
|
-
|
155
|
+
### Documentation
|
152
156
|
|
153
|
-
|
157
|
+
* docs(dispatcher): docs added ([`dd7c71b`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/dd7c71bb1e0b7ef5398b1e1a05fc1147c772420a))
|
154
158
|
|
155
|
-
|
159
|
+
### Fix
|
160
|
+
|
161
|
+
* fix: minor fixes for type annotations ([`8c2e7c8`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8c2e7c82592ace50e4e1f47e392a0ddc988f57ae))
|
PKG-INFO
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: bec_widgets
|
3
|
-
Version: 0.99.
|
3
|
+
Version: 0.99.9
|
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
|
@@ -11,7 +11,7 @@ Classifier: Topic :: Scientific/Engineering
|
|
11
11
|
Requires-Python: >=3.10
|
12
12
|
Requires-Dist: bec-ipython-client>=2.21.4,~=2.21
|
13
13
|
Requires-Dist: bec-lib>=2.21.4,~=2.21
|
14
|
-
Requires-Dist: bec-qthemes
|
14
|
+
Requires-Dist: bec-qthemes>=0.4.2,~=0.4
|
15
15
|
Requires-Dist: black~=24.0
|
16
16
|
Requires-Dist: isort>=5.13.2,~=5.13
|
17
17
|
Requires-Dist: pydantic~=2.0
|
bec_widgets/cli/client.py
CHANGED
@@ -483,7 +483,7 @@ class BECFigure(RPCBase):
|
|
483
483
|
y_entry: "str | None" = None,
|
484
484
|
z_entry: "str | None" = None,
|
485
485
|
color: "str | None" = None,
|
486
|
-
color_map_z: "str | None" = "
|
486
|
+
color_map_z: "str | None" = "magma",
|
487
487
|
label: "str | None" = None,
|
488
488
|
validate: "bool" = True,
|
489
489
|
new: "bool" = False,
|
@@ -1728,7 +1728,7 @@ class BECWaveform(RPCBase):
|
|
1728
1728
|
y_entry: "str | None" = None,
|
1729
1729
|
z_entry: "str | None" = None,
|
1730
1730
|
color: "str | None" = None,
|
1731
|
-
color_map_z: "str | None" = "
|
1731
|
+
color_map_z: "str | None" = "magma",
|
1732
1732
|
label: "str | None" = None,
|
1733
1733
|
validate: "bool" = True,
|
1734
1734
|
dap: "str | None" = None,
|
@@ -2042,7 +2042,7 @@ class BECWaveformWidget(RPCBase):
|
|
2042
2042
|
y_entry: "str | None" = None,
|
2043
2043
|
z_entry: "str | None" = None,
|
2044
2044
|
color: "str | None" = None,
|
2045
|
-
color_map_z: "str | None" = "
|
2045
|
+
color_map_z: "str | None" = "magma",
|
2046
2046
|
label: "str | None" = None,
|
2047
2047
|
validate: "bool" = True,
|
2048
2048
|
dap: "str | None" = None,
|
bec_widgets/qt_utils/toolbar.py
CHANGED
@@ -2,10 +2,11 @@
|
|
2
2
|
import os
|
3
3
|
from abc import ABC, abstractmethod
|
4
4
|
from collections import defaultdict
|
5
|
+
from typing import Literal
|
5
6
|
|
6
7
|
from bec_qthemes._icon.material_icons import material_icon
|
7
8
|
from qtpy.QtCore import QSize
|
8
|
-
from qtpy.QtGui import QAction, QIcon
|
9
|
+
from qtpy.QtGui import QAction, QColor, QIcon
|
9
10
|
from qtpy.QtWidgets import QHBoxLayout, QLabel, QMenu, QToolBar, QToolButton, QWidget
|
10
11
|
|
11
12
|
import bec_widgets
|
@@ -45,9 +46,7 @@ class SeparatorAction(ToolBarAction):
|
|
45
46
|
"""Separator action for the toolbar."""
|
46
47
|
|
47
48
|
def add_to_toolbar(self, toolbar: QToolBar, target: QWidget):
|
48
|
-
|
49
|
-
self.separator.setFixedSize(2, 22)
|
50
|
-
toolbar.addWidget(self.separator)
|
49
|
+
toolbar.addSeparator()
|
51
50
|
|
52
51
|
|
53
52
|
class IconAction(ToolBarAction):
|
@@ -88,12 +87,14 @@ class MaterialIconAction:
|
|
88
87
|
tooltip: str = None,
|
89
88
|
checkable: bool = False,
|
90
89
|
filled: bool = False,
|
90
|
+
color: str | tuple | QColor | dict[Literal["dark", "light"], str] | None = None,
|
91
91
|
):
|
92
92
|
self.icon_name = icon_name
|
93
93
|
self.tooltip = tooltip
|
94
94
|
self.checkable = checkable
|
95
95
|
self.action = None
|
96
96
|
self.filled = filled
|
97
|
+
self.color = color
|
97
98
|
|
98
99
|
def add_to_toolbar(self, toolbar: QToolBar, target: QWidget):
|
99
100
|
icon = self.get_icon()
|
@@ -104,7 +105,11 @@ class MaterialIconAction:
|
|
104
105
|
def get_icon(self):
|
105
106
|
|
106
107
|
icon = material_icon(
|
107
|
-
self.icon_name,
|
108
|
+
self.icon_name,
|
109
|
+
size=(20, 20),
|
110
|
+
convert_to_pixmap=False,
|
111
|
+
filled=self.filled,
|
112
|
+
color=self.color,
|
108
113
|
)
|
109
114
|
return icon
|
110
115
|
|
@@ -219,3 +224,4 @@ class ModularToolBar(QToolBar):
|
|
219
224
|
self.setMovable(False)
|
220
225
|
self.setFloatable(False)
|
221
226
|
self.setContentsMargins(0, 0, 0, 0)
|
227
|
+
self.setStyleSheet("QToolBar { background-color: rgba(0, 0, 0, 0); border: none; }")
|
bec_widgets/utils/bec_widget.py
CHANGED
@@ -1,19 +1,28 @@
|
|
1
|
-
from qtpy.QtWidgets import QWidget
|
1
|
+
from qtpy.QtWidgets import QApplication, QWidget
|
2
2
|
|
3
3
|
from bec_widgets.utils.bec_connector import BECConnector, ConnectionConfig
|
4
|
+
from bec_widgets.utils.colors import set_theme
|
4
5
|
|
5
6
|
|
6
7
|
class BECWidget(BECConnector):
|
7
8
|
"""Mixin class for all BEC widgets, to handle cleanup"""
|
8
9
|
|
10
|
+
# The icon name is the name of the icon in the icon theme, typically a name taken
|
11
|
+
# from fonts.google.com/icons. Override this in subclasses to set the icon name.
|
12
|
+
ICON_NAME = "widgets"
|
13
|
+
|
9
14
|
def __init__(self, client=None, config: ConnectionConfig = None, gui_id: str = None):
|
10
15
|
if not isinstance(self, QWidget):
|
11
16
|
raise RuntimeError(f"{repr(self)} is not a subclass of QWidget")
|
12
17
|
super().__init__(client, config, gui_id)
|
13
18
|
|
19
|
+
# Set the theme to auto if it is not set yet
|
20
|
+
app = QApplication.instance()
|
21
|
+
if not hasattr(app, "theme"):
|
22
|
+
set_theme("dark")
|
23
|
+
|
14
24
|
def cleanup(self):
|
15
25
|
"""Cleanup the widget."""
|
16
|
-
pass
|
17
26
|
|
18
27
|
def closeEvent(self, event):
|
19
28
|
self.rpc_register.remove_rpc(self)
|
bec_widgets/utils/colors.py
CHANGED
@@ -29,6 +29,7 @@ def set_theme(theme: Literal["dark", "light", "auto"]):
|
|
29
29
|
app = QApplication.instance()
|
30
30
|
bec_qthemes.setup_theme(theme)
|
31
31
|
pg.setConfigOption("background", "w" if app.theme["theme"] == "light" else "k")
|
32
|
+
apply_theme(theme)
|
32
33
|
|
33
34
|
# pylint: disable=protected-access
|
34
35
|
if theme != "auto":
|
@@ -44,6 +45,9 @@ def set_theme(theme: Literal["dark", "light", "auto"]):
|
|
44
45
|
|
45
46
|
|
46
47
|
def apply_theme(theme: Literal["dark", "light"]):
|
48
|
+
"""
|
49
|
+
Apply the theme to all pyqtgraph widgets. Do not use this function directly. Use set_theme instead.
|
50
|
+
"""
|
47
51
|
app = QApplication.instance()
|
48
52
|
# go through all pyqtgraph widgets and set background
|
49
53
|
children = itertools.chain.from_iterable(
|
@@ -105,8 +109,19 @@ class Colors:
|
|
105
109
|
angles = Colors.golden_ratio(len(cmap_colors))
|
106
110
|
color_selection = np.round(np.interp(angles, (-np.pi, np.pi), (0, len(cmap_colors))))
|
107
111
|
colors = []
|
108
|
-
|
109
|
-
|
112
|
+
ii = 0
|
113
|
+
while len(colors) < num:
|
114
|
+
color_index = int(color_selection[ii])
|
115
|
+
color = cmap_colors[color_index]
|
116
|
+
app = QApplication.instance()
|
117
|
+
if hasattr(app, "theme") and app.theme["theme"] == "light":
|
118
|
+
background = 255
|
119
|
+
else:
|
120
|
+
background = 0
|
121
|
+
if np.abs(np.mean(color[:3] * 255) - background) < 50:
|
122
|
+
ii += 1
|
123
|
+
continue
|
124
|
+
|
110
125
|
if format.upper() == "HEX":
|
111
126
|
colors.append(QColor.fromRgbF(*color).name())
|
112
127
|
elif format.upper() == "RGB":
|
@@ -115,6 +130,7 @@ class Colors:
|
|
115
130
|
colors.append(QColor.fromRgbF(*color))
|
116
131
|
else:
|
117
132
|
raise ValueError("Unsupported format. Please choose 'RGB', 'HEX', or 'QColor'.")
|
133
|
+
ii += 1
|
118
134
|
return colors
|
119
135
|
|
120
136
|
@staticmethod
|
@@ -2,8 +2,8 @@
|
|
2
2
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
3
|
|
4
4
|
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
5
|
-
from qtpy.QtGui import QIcon
|
6
5
|
|
6
|
+
from bec_widgets.utils.bec_designer import designer_material_icon
|
7
7
|
{widget_import}
|
8
8
|
|
9
9
|
DOM_XML = """
|
@@ -30,7 +30,7 @@ class {plugin_name_pascal}Plugin(QDesignerCustomWidgetInterface): # pragma: no
|
|
30
30
|
return ""
|
31
31
|
|
32
32
|
def icon(self):
|
33
|
-
return
|
33
|
+
return designer_material_icon({plugin_name_pascal}.ICON_NAME)
|
34
34
|
|
35
35
|
def includeFile(self):
|
36
36
|
return "{plugin_name_snake}"
|
@@ -34,7 +34,7 @@ class BECQueuePlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
34
34
|
return "BEC Services"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
return designer_material_icon(
|
37
|
+
return designer_material_icon(BECQueue.ICON_NAME)
|
38
38
|
|
39
39
|
def includeFile(self):
|
40
40
|
return "bec_queue"
|
@@ -34,7 +34,7 @@ class BECStatusBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
34
34
|
return "BEC Services"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
return designer_material_icon(
|
37
|
+
return designer_material_icon(BECStatusBox.ICON_NAME)
|
38
38
|
|
39
39
|
def includeFile(self):
|
40
40
|
return "bec_status_box"
|
@@ -31,7 +31,7 @@ class ColorButtonPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
31
31
|
return "BEC Buttons"
|
32
32
|
|
33
33
|
def icon(self):
|
34
|
-
return designer_material_icon(
|
34
|
+
return designer_material_icon(ColorButton.ICON_NAME)
|
35
35
|
|
36
36
|
def includeFile(self):
|
37
37
|
return "color_button"
|
@@ -34,7 +34,7 @@ class ColormapSelectorPlugin(QDesignerCustomWidgetInterface): # pragma: no cove
|
|
34
34
|
return "BEC Buttons"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
return designer_material_icon(
|
37
|
+
return designer_material_icon(ColormapSelector.ICON_NAME)
|
38
38
|
|
39
39
|
def includeFile(self):
|
40
40
|
return "colormap_selector"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from bec_qthemes import material_icon
|
2
2
|
from qtpy.QtCore import Property, Qt, Slot
|
3
|
-
from qtpy.QtWidgets import QHBoxLayout, QPushButton, QWidget
|
3
|
+
from qtpy.QtWidgets import QHBoxLayout, QPushButton, QToolButton, QWidget
|
4
4
|
|
5
5
|
from bec_widgets.utils.bec_widget import BECWidget
|
6
6
|
from bec_widgets.utils.colors import set_theme
|
@@ -9,8 +9,14 @@ from bec_widgets.utils.colors import set_theme
|
|
9
9
|
class DarkModeButton(BECWidget, QWidget):
|
10
10
|
USER_ACCESS = ["toggle_dark_mode"]
|
11
11
|
|
12
|
+
ICON_NAME = "dark_mode"
|
13
|
+
|
12
14
|
def __init__(
|
13
|
-
self,
|
15
|
+
self,
|
16
|
+
parent: QWidget | None = None,
|
17
|
+
client=None,
|
18
|
+
gui_id: str | None = None,
|
19
|
+
toolbar: bool = False,
|
14
20
|
) -> None:
|
15
21
|
super().__init__(client=client, gui_id=gui_id)
|
16
22
|
QWidget.__init__(self, parent)
|
@@ -22,7 +28,10 @@ class DarkModeButton(BECWidget, QWidget):
|
|
22
28
|
self.layout.setAlignment(Qt.AlignmentFlag.AlignVCenter)
|
23
29
|
|
24
30
|
icon = material_icon("dark_mode", size=(20, 20), convert_to_pixmap=False)
|
25
|
-
|
31
|
+
if toolbar:
|
32
|
+
self.mode_button = QToolButton(icon=icon)
|
33
|
+
else:
|
34
|
+
self.mode_button = QPushButton(icon=icon)
|
26
35
|
self.update_mode_button()
|
27
36
|
self.mode_button.clicked.connect(self.toggle_dark_mode)
|
28
37
|
self.layout.addWidget(self.mode_button)
|
@@ -30,7 +30,7 @@ class DarkModeButtonPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
30
30
|
return "BEC Buttons"
|
31
31
|
|
32
32
|
def icon(self):
|
33
|
-
return designer_material_icon(
|
33
|
+
return designer_material_icon(DarkModeButton.ICON_NAME)
|
34
34
|
|
35
35
|
def includeFile(self):
|
36
36
|
return "dark_mode_button"
|
@@ -30,7 +30,7 @@ class DeviceBrowserPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
30
30
|
return "BEC Services"
|
31
31
|
|
32
32
|
def icon(self):
|
33
|
-
return designer_material_icon(
|
33
|
+
return designer_material_icon(DeviceBrowser.ICON_NAME)
|
34
34
|
|
35
35
|
def includeFile(self):
|
36
36
|
return "device_browser"
|
@@ -34,7 +34,7 @@ class DeviceComboBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
34
34
|
return "Device Control"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
return designer_material_icon(
|
37
|
+
return designer_material_icon(DeviceComboBox.ICON_NAME)
|
38
38
|
|
39
39
|
def includeFile(self):
|
40
40
|
return "device_combobox"
|
@@ -22,6 +22,8 @@ class DeviceComboBox(DeviceInputBase, QComboBox):
|
|
22
22
|
arg_name: Argument name, can be used for the other widgets which has to call some other function in bec using correct argument names.
|
23
23
|
"""
|
24
24
|
|
25
|
+
ICON_NAME = "list_alt"
|
26
|
+
|
25
27
|
def __init__(
|
26
28
|
self,
|
27
29
|
parent=None,
|
@@ -24,6 +24,8 @@ class DeviceLineEdit(DeviceInputBase, QLineEdit):
|
|
24
24
|
arg_name: Argument name, can be used for the other widgets which has to call some other function in bec using correct argument names.
|
25
25
|
"""
|
26
26
|
|
27
|
+
ICON_NAME = "edit_note"
|
28
|
+
|
27
29
|
def __init__(
|
28
30
|
self,
|
29
31
|
parent=None,
|
@@ -34,7 +34,7 @@ class DeviceLineEditPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
34
34
|
return "Device Control"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
return designer_material_icon(
|
37
|
+
return designer_material_icon(DeviceLineEdit.ICON_NAME)
|
38
38
|
|
39
39
|
def includeFile(self):
|
40
40
|
return "device_line_edit"
|