bec-widgets 1.25.0__py3-none-any.whl → 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- .gitlab-ci.yml +11 -6
- CHANGELOG.md +650 -0
- PKG-INFO +3 -3
- bec_widgets/__init__.py +4 -0
- bec_widgets/applications/bw_launch.py +23 -0
- bec_widgets/applications/launch_window.py +430 -0
- bec_widgets/assets/app_icons/auto_update.png +0 -0
- bec_widgets/assets/app_icons/ui_loader_tile.png +0 -0
- bec_widgets/cli/__init__.py +0 -1
- bec_widgets/cli/client.py +1779 -2064
- bec_widgets/cli/client_utils.py +346 -174
- bec_widgets/cli/generate_cli.py +143 -37
- bec_widgets/cli/rpc/rpc_base.py +152 -21
- bec_widgets/cli/rpc/rpc_register.py +113 -6
- bec_widgets/cli/rpc/rpc_widget_handler.py +13 -11
- bec_widgets/cli/server.py +125 -239
- bec_widgets/examples/jupyter_console/jupyter_console_window.py +97 -145
- bec_widgets/examples/plugin_example_pyside/tictactoetaskmenu.py +1 -1
- bec_widgets/utils/bec_connector.py +190 -21
- bec_widgets/utils/bec_designer.py +7 -0
- bec_widgets/utils/bec_dispatcher.py +71 -4
- bec_widgets/utils/bec_plugin_helper.py +89 -0
- bec_widgets/utils/bec_signal_proxy.py +1 -1
- bec_widgets/utils/bec_widget.py +26 -10
- bec_widgets/utils/colors.py +1 -1
- bec_widgets/{qt_utils → utils}/compact_popup.py +2 -0
- bec_widgets/utils/container_utils.py +37 -12
- bec_widgets/utils/crosshair.py +25 -8
- bec_widgets/utils/entry_validator.py +3 -1
- bec_widgets/{qt_utils → utils}/error_popups.py +18 -0
- bec_widgets/{qt_utils → utils}/expandable_frame.py +2 -2
- bec_widgets/utils/forms_from_types/forms.py +182 -0
- bec_widgets/{widgets/editors/scan_metadata/_metadata_widgets.py → utils/forms_from_types/items.py} +41 -30
- bec_widgets/utils/generate_designer_plugin.py +40 -36
- bec_widgets/utils/linear_region_selector.py +2 -0
- bec_widgets/utils/name_utils.py +16 -0
- bec_widgets/{qt_utils → utils}/palette_viewer.py +2 -2
- bec_widgets/utils/plot_indicator_items.py +2 -5
- bec_widgets/utils/plugin_utils.py +47 -1
- bec_widgets/{qt_utils → utils}/round_frame.py +14 -14
- bec_widgets/utils/rpc_server.py +277 -0
- bec_widgets/utils/serialization.py +44 -0
- bec_widgets/{qt_utils → utils}/settings_dialog.py +26 -1
- bec_widgets/{qt_utils → utils}/side_panel.py +17 -10
- bec_widgets/{qt_utils → utils}/toolbar.py +69 -25
- bec_widgets/utils/ui_loader.py +8 -8
- bec_widgets/utils/widget_io.py +166 -25
- bec_widgets/widgets/containers/auto_update/auto_updates.py +364 -0
- bec_widgets/widgets/containers/dock/dock.py +157 -49
- bec_widgets/widgets/containers/dock/dock_area.py +186 -138
- bec_widgets/widgets/containers/layout_manager/layout_manager.py +2 -1
- bec_widgets/widgets/containers/main_window/addons/web_links.py +15 -0
- bec_widgets/widgets/containers/main_window/main_window.py +189 -41
- bec_widgets/widgets/control/buttons/button_abort/button_abort.py +3 -4
- bec_widgets/widgets/control/buttons/button_reset/button_reset.py +3 -4
- bec_widgets/widgets/control/buttons/button_resume/button_resume.py +3 -3
- bec_widgets/widgets/control/buttons/stop_button/stop_button.py +18 -7
- bec_widgets/widgets/control/device_control/position_indicator/position_indicator.py +22 -3
- bec_widgets/widgets/control/device_control/positioner_box/_base/positioner_box_base.py +37 -18
- bec_widgets/widgets/control/device_control/positioner_box/positioner_box/positioner_box.py +28 -4
- bec_widgets/widgets/control/device_control/positioner_box/positioner_box/positioner_box.ui +27 -4
- bec_widgets/widgets/control/device_control/positioner_box/positioner_box_2d/positioner_box_2d.py +5 -2
- bec_widgets/widgets/control/device_control/positioner_box/positioner_box_2d/positioner_box_2d.ui +97 -31
- bec_widgets/widgets/control/device_control/positioner_box/positioner_control_line/positioner_control_line.ui +11 -4
- bec_widgets/widgets/control/device_control/positioner_group/positioner_group.py +2 -3
- bec_widgets/widgets/control/device_input/base_classes/device_input_base.py +29 -4
- bec_widgets/widgets/control/device_input/base_classes/device_signal_input_base.py +1 -0
- bec_widgets/widgets/control/device_input/device_combobox/device_combobox.py +2 -2
- bec_widgets/widgets/control/device_input/device_line_edit/device_line_edit.py +2 -2
- bec_widgets/widgets/control/device_input/signal_combobox/signal_combobox.py +1 -2
- bec_widgets/widgets/control/device_input/signal_line_edit/signal_line_edit.py +1 -2
- bec_widgets/widgets/control/scan_control/scan_control.py +7 -5
- bec_widgets/widgets/control/scan_control/scan_group_box.py +28 -5
- bec_widgets/widgets/dap/dap_combo_box/dap_combo_box.py +1 -2
- bec_widgets/widgets/dap/lmfit_dialog/lmfit_dialog.py +3 -4
- bec_widgets/widgets/dap/lmfit_dialog/lmfit_dialog_vertical.ui +14 -8
- bec_widgets/widgets/editors/console/console.py +1 -1
- bec_widgets/widgets/editors/{scan_metadata/additional_metadata_table.py → dict_backed_table.py} +29 -6
- bec_widgets/widgets/editors/scan_metadata/__init__.py +0 -7
- bec_widgets/widgets/editors/scan_metadata/_util.py +1 -1
- bec_widgets/widgets/{plots/motor_map/register_bec_motor_map_widget.py → editors/scan_metadata/register_scan_metadata.py} +2 -4
- bec_widgets/widgets/editors/scan_metadata/scan_metadata.py +42 -136
- bec_widgets/widgets/editors/scan_metadata/scan_metadata.pyproject +1 -0
- bec_widgets/widgets/{plots/multi_waveform/bec_multi_waveform_widget_plugin.py → editors/scan_metadata/scan_metadata_plugin.py} +9 -9
- bec_widgets/widgets/editors/text_box/text_box.py +2 -3
- bec_widgets/widgets/editors/website/website.py +2 -2
- bec_widgets/widgets/games/minesweeper.py +3 -2
- bec_widgets/widgets/plots/image/image.py +960 -0
- bec_widgets/widgets/plots/image/image.pyproject +1 -0
- bec_widgets/widgets/plots/image/image_item.py +279 -0
- bec_widgets/widgets/plots/{motor_map/bec_motor_map_widget_plugin.py → image/image_plugin.py} +11 -13
- bec_widgets/widgets/{containers/figure/plots → plots}/image/image_processor.py +31 -64
- bec_widgets/widgets/plots/image/{register_bec_image_widget.py → register_image.py} +2 -2
- bec_widgets/widgets/plots/image/toolbar_bundles/image_selection.py +59 -0
- bec_widgets/widgets/plots/image/toolbar_bundles/processing.py +79 -0
- bec_widgets/widgets/plots/motor_map/motor_map.py +832 -0
- bec_widgets/widgets/plots/motor_map/motor_map.pyproject +1 -0
- bec_widgets/widgets/plots/motor_map/motor_map_plugin.py +54 -0
- bec_widgets/widgets/plots/{multi_waveform/register_bec_multi_waveform_widget.py → motor_map/register_motor_map.py} +2 -4
- bec_widgets/widgets/plots/motor_map/settings/motor_map_settings.py +129 -0
- bec_widgets/widgets/plots/motor_map/settings/motor_map_settings.ui +120 -0
- bec_widgets/widgets/plots/motor_map/toolbar_bundles/motor_selection.py +70 -0
- bec_widgets/widgets/plots/multi_waveform/multi_waveform.py +508 -0
- bec_widgets/widgets/plots/multi_waveform/multi_waveform.pyproject +1 -0
- bec_widgets/widgets/plots/multi_waveform/multi_waveform_plugin.py +54 -0
- bec_widgets/widgets/plots/multi_waveform/register_multi_waveform.py +15 -0
- bec_widgets/widgets/plots/multi_waveform/settings/control_panel.py +144 -0
- bec_widgets/widgets/plots/multi_waveform/settings/multi_waveform_controls.ui +164 -0
- bec_widgets/widgets/plots/multi_waveform/toolbar_bundles/monitor_selection.py +65 -0
- bec_widgets/widgets/{plots_next_gen → plots}/plot_base.py +321 -40
- bec_widgets/widgets/plots/{waveform/register_bec_waveform_widget.py → scatter_waveform/register_scatter_waveform.py} +3 -3
- bec_widgets/widgets/plots/scatter_waveform/scatter_curve.py +197 -0
- bec_widgets/widgets/plots/scatter_waveform/scatter_waveform.py +553 -0
- bec_widgets/widgets/plots/scatter_waveform/scatter_waveform.pyproject +1 -0
- bec_widgets/widgets/plots/{image/bec_image_widget_plugin.py → scatter_waveform/scatter_waveform_plugin.py} +9 -13
- bec_widgets/widgets/plots/scatter_waveform/settings/scatter_curve_setting.py +138 -0
- bec_widgets/widgets/plots/scatter_waveform/settings/scatter_curve_settings_horizontal.ui +195 -0
- bec_widgets/widgets/plots/scatter_waveform/settings/scatter_curve_settings_vertical.ui +204 -0
- bec_widgets/widgets/{plots_next_gen → plots}/setting_menus/axis_settings.py +8 -8
- bec_widgets/widgets/{plots_next_gen → plots}/toolbar_bundles/mouse_interactions.py +4 -18
- bec_widgets/widgets/{plots_next_gen → plots}/toolbar_bundles/plot_export.py +14 -3
- bec_widgets/widgets/{plots_next_gen → plots}/toolbar_bundles/roi_bundle.py +6 -1
- bec_widgets/widgets/{plots_next_gen → plots}/toolbar_bundles/save_state.py +2 -2
- bec_widgets/widgets/{containers/figure/plots/waveform/waveform_curve.py → plots/waveform/curve.py} +119 -49
- bec_widgets/widgets/plots/waveform/register_waveform.py +15 -0
- bec_widgets/widgets/plots/waveform/settings/curve_settings/curve_setting.py +125 -0
- bec_widgets/widgets/plots/waveform/settings/curve_settings/curve_tree.py +576 -0
- bec_widgets/widgets/plots/waveform/utils/__init__.py +0 -0
- bec_widgets/widgets/plots/waveform/utils/roi_manager.py +84 -0
- bec_widgets/widgets/plots/waveform/waveform.py +1794 -0
- bec_widgets/widgets/plots/waveform/waveform.pyproject +1 -0
- bec_widgets/widgets/plots/waveform/{bec_waveform_widget_plugin.py → waveform_plugin.py} +9 -13
- bec_widgets/widgets/progress/bec_progressbar/bec_progressbar.py +1 -2
- bec_widgets/widgets/progress/ring_progress_bar/ring.py +11 -10
- bec_widgets/widgets/progress/ring_progress_bar/ring_progress_bar.py +24 -14
- bec_widgets/widgets/services/bec_queue/bec_queue.py +13 -11
- bec_widgets/widgets/services/bec_status_box/bec_status_box.py +3 -4
- bec_widgets/widgets/services/device_browser/device_browser.py +5 -2
- bec_widgets/widgets/services/device_browser/device_item/device_item.py +1 -1
- bec_widgets/widgets/utility/logpanel/logpanel.py +36 -17
- bec_widgets/widgets/utility/spinbox/decimal_spinbox.py +3 -3
- bec_widgets/widgets/utility/spinner/spinner.py +2 -2
- bec_widgets/widgets/utility/visual/color_button/color_button.py +1 -1
- bec_widgets/widgets/utility/visual/colormap_widget/colormap_widget.py +4 -6
- bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.py +4 -8
- {bec_widgets-1.25.0.dist-info → bec_widgets-2.0.0.dist-info}/METADATA +3 -3
- {bec_widgets-1.25.0.dist-info → bec_widgets-2.0.0.dist-info}/RECORD +169 -154
- pyproject.toml +3 -3
- bec_widgets/applications/alignment/alignment_1d/alignment_1d.py +0 -198
- bec_widgets/applications/alignment/alignment_1d/alignment_1d.ui +0 -615
- bec_widgets/applications/bec_app.py +0 -84
- bec_widgets/cli/auto_updates.py +0 -168
- bec_widgets/widgets/containers/figure/__init__.py +0 -1
- bec_widgets/widgets/containers/figure/figure.py +0 -796
- bec_widgets/widgets/containers/figure/plots/axis_settings.py +0 -91
- bec_widgets/widgets/containers/figure/plots/axis_settings.ui +0 -256
- bec_widgets/widgets/containers/figure/plots/image/image.py +0 -772
- bec_widgets/widgets/containers/figure/plots/image/image_item.py +0 -337
- bec_widgets/widgets/containers/figure/plots/motor_map/motor_map.py +0 -525
- bec_widgets/widgets/containers/figure/plots/multi_waveform/multi_waveform.py +0 -340
- bec_widgets/widgets/containers/figure/plots/plot_base.py +0 -505
- bec_widgets/widgets/containers/figure/plots/waveform/waveform.py +0 -1563
- bec_widgets/widgets/plots/image/bec_image_widget.pyproject +0 -1
- bec_widgets/widgets/plots/image/image_widget.py +0 -515
- bec_widgets/widgets/plots/motor_map/bec_motor_map_widget.pyproject +0 -1
- bec_widgets/widgets/plots/motor_map/motor_map_dialog/motor_map_settings.py +0 -56
- bec_widgets/widgets/plots/motor_map/motor_map_dialog/motor_map_settings.ui +0 -108
- bec_widgets/widgets/plots/motor_map/motor_map_widget.py +0 -234
- bec_widgets/widgets/plots/multi_waveform/bec_multi_waveform_widget.pyproject +0 -1
- bec_widgets/widgets/plots/multi_waveform/multi_waveform_controls.ui +0 -99
- bec_widgets/widgets/plots/multi_waveform/multi_waveform_widget.py +0 -536
- bec_widgets/widgets/plots/waveform/bec_waveform_widget.pyproject +0 -1
- bec_widgets/widgets/plots/waveform/waveform_popups/curve_dialog/curve_dialog.py +0 -336
- bec_widgets/widgets/plots/waveform/waveform_popups/curve_dialog/curve_dialog.ui +0 -372
- bec_widgets/widgets/plots/waveform/waveform_popups/dap_summary_dialog/dap_summary_dialog.py +0 -25
- bec_widgets/widgets/plots/waveform/waveform_widget.py +0 -751
- /bec_widgets/{qt_utils → utils}/collapsible_panel_manager.py +0 -0
- /bec_widgets/{applications/alignment → utils/forms_from_types}/__init__.py +0 -0
- /bec_widgets/{qt_utils → utils}/redis_message_waiter.py +0 -0
- /bec_widgets/{applications/alignment/alignment_1d → widgets/containers/auto_update}/__init__.py +0 -0
- /bec_widgets/{qt_utils → widgets/containers/main_window/addons}/__init__.py +0 -0
- /bec_widgets/widgets/{containers/figure/plots → plots/image/toolbar_bundles}/__init__.py +0 -0
- /bec_widgets/widgets/{containers/figure/plots/image → plots/motor_map/settings}/__init__.py +0 -0
- /bec_widgets/widgets/{containers/figure/plots/motor_map → plots/motor_map/toolbar_bundles}/__init__.py +0 -0
- /bec_widgets/widgets/{containers/figure/plots/multi_waveform → plots/multi_waveform/settings}/__init__.py +0 -0
- /bec_widgets/widgets/{containers/figure/plots/waveform → plots/multi_waveform/toolbar_bundles}/__init__.py +0 -0
- /bec_widgets/widgets/plots/{motor_map/motor_map_dialog → scatter_waveform}/__init__.py +0 -0
- /bec_widgets/widgets/plots/{waveform/waveform_popups → scatter_waveform/settings}/__init__.py +0 -0
- /bec_widgets/widgets/plots/{waveform/waveform_popups/curve_dialog → setting_menus}/__init__.py +0 -0
- /bec_widgets/widgets/{plots_next_gen → plots}/setting_menus/axis_settings_horizontal.ui +0 -0
- /bec_widgets/widgets/{plots_next_gen → plots}/setting_menus/axis_settings_vertical.ui +0 -0
- /bec_widgets/widgets/plots/{waveform/waveform_popups/dap_summary_dialog → toolbar_bundles}/__init__.py +0 -0
- /bec_widgets/widgets/{plots_next_gen/setting_menus → plots/waveform/settings}/__init__.py +0 -0
- /bec_widgets/widgets/{plots_next_gen/toolbar_bundles → plots/waveform/settings/curve_settings}/__init__.py +0 -0
- {bec_widgets-1.25.0.dist-info → bec_widgets-2.0.0.dist-info}/WHEEL +0 -0
- {bec_widgets-1.25.0.dist-info → bec_widgets-2.0.0.dist-info}/entry_points.txt +0 -0
- {bec_widgets-1.25.0.dist-info → bec_widgets-2.0.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,615 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<ui version="4.0">
|
3
|
-
<class>mainWindow</class>
|
4
|
-
<widget class="QMainWindow" name="mainWindow">
|
5
|
-
<property name="geometry">
|
6
|
-
<rect>
|
7
|
-
<x>0</x>
|
8
|
-
<y>0</y>
|
9
|
-
<width>1611</width>
|
10
|
-
<height>1019</height>
|
11
|
-
</rect>
|
12
|
-
</property>
|
13
|
-
<property name="windowTitle">
|
14
|
-
<string>Alignment tool</string>
|
15
|
-
</property>
|
16
|
-
<widget class="QWidget" name="widget">
|
17
|
-
<layout class="QVBoxLayout" name="verticalLayout_2">
|
18
|
-
<item>
|
19
|
-
<widget class="QWidget" name="widget" native="true">
|
20
|
-
<property name="sizePolicy">
|
21
|
-
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
22
|
-
<horstretch>0</horstretch>
|
23
|
-
<verstretch>0</verstretch>
|
24
|
-
</sizepolicy>
|
25
|
-
</property>
|
26
|
-
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
27
|
-
<item>
|
28
|
-
<widget class="DarkModeButton" name="dark_mode_button"/>
|
29
|
-
</item>
|
30
|
-
<item>
|
31
|
-
<spacer name="horizontalSpacer_6">
|
32
|
-
<property name="orientation">
|
33
|
-
<enum>Qt::Orientation::Horizontal</enum>
|
34
|
-
</property>
|
35
|
-
<property name="sizeHint" stdset="0">
|
36
|
-
<size>
|
37
|
-
<width>40</width>
|
38
|
-
<height>20</height>
|
39
|
-
</size>
|
40
|
-
</property>
|
41
|
-
</spacer>
|
42
|
-
</item>
|
43
|
-
<item>
|
44
|
-
<widget class="BECStatusBox" name="bec_status_box">
|
45
|
-
<property name="compact_view" stdset="0">
|
46
|
-
<bool>true</bool>
|
47
|
-
</property>
|
48
|
-
<property name="label" stdset="0">
|
49
|
-
<string>BEC Servers</string>
|
50
|
-
</property>
|
51
|
-
</widget>
|
52
|
-
</item>
|
53
|
-
<item>
|
54
|
-
<spacer name="horizontalSpacer_3">
|
55
|
-
<property name="orientation">
|
56
|
-
<enum>Qt::Orientation::Horizontal</enum>
|
57
|
-
</property>
|
58
|
-
<property name="sizeHint" stdset="0">
|
59
|
-
<size>
|
60
|
-
<width>40</width>
|
61
|
-
<height>20</height>
|
62
|
-
</size>
|
63
|
-
</property>
|
64
|
-
</spacer>
|
65
|
-
</item>
|
66
|
-
<item>
|
67
|
-
<widget class="BECQueue" name="bec_queue">
|
68
|
-
<property name="compact_view" stdset="0">
|
69
|
-
<bool>true</bool>
|
70
|
-
</property>
|
71
|
-
</widget>
|
72
|
-
</item>
|
73
|
-
<item>
|
74
|
-
<spacer name="horizontalSpacer_5">
|
75
|
-
<property name="orientation">
|
76
|
-
<enum>Qt::Orientation::Horizontal</enum>
|
77
|
-
</property>
|
78
|
-
<property name="sizeHint" stdset="0">
|
79
|
-
<size>
|
80
|
-
<width>40</width>
|
81
|
-
<height>20</height>
|
82
|
-
</size>
|
83
|
-
</property>
|
84
|
-
</spacer>
|
85
|
-
</item>
|
86
|
-
<item>
|
87
|
-
<widget class="QRadioButton" name="radioButton">
|
88
|
-
<property name="enabled">
|
89
|
-
<bool>false</bool>
|
90
|
-
</property>
|
91
|
-
<property name="text">
|
92
|
-
<string>SLS Light On</string>
|
93
|
-
</property>
|
94
|
-
<property name="checkable">
|
95
|
-
<bool>true</bool>
|
96
|
-
</property>
|
97
|
-
<property name="checked">
|
98
|
-
<bool>true</bool>
|
99
|
-
</property>
|
100
|
-
<property name="autoExclusive">
|
101
|
-
<bool>false</bool>
|
102
|
-
</property>
|
103
|
-
</widget>
|
104
|
-
</item>
|
105
|
-
<item>
|
106
|
-
<spacer name="horizontalSpacer_7">
|
107
|
-
<property name="orientation">
|
108
|
-
<enum>Qt::Orientation::Horizontal</enum>
|
109
|
-
</property>
|
110
|
-
<property name="sizeHint" stdset="0">
|
111
|
-
<size>
|
112
|
-
<width>40</width>
|
113
|
-
<height>20</height>
|
114
|
-
</size>
|
115
|
-
</property>
|
116
|
-
</spacer>
|
117
|
-
</item>
|
118
|
-
<item>
|
119
|
-
<widget class="QRadioButton" name="radioButton_3">
|
120
|
-
<property name="enabled">
|
121
|
-
<bool>false</bool>
|
122
|
-
</property>
|
123
|
-
<property name="text">
|
124
|
-
<string>BEAMLINE Checks</string>
|
125
|
-
</property>
|
126
|
-
<property name="checkable">
|
127
|
-
<bool>true</bool>
|
128
|
-
</property>
|
129
|
-
<property name="checked">
|
130
|
-
<bool>true</bool>
|
131
|
-
</property>
|
132
|
-
<property name="autoExclusive">
|
133
|
-
<bool>false</bool>
|
134
|
-
</property>
|
135
|
-
</widget>
|
136
|
-
</item>
|
137
|
-
<item>
|
138
|
-
<spacer name="horizontalSpacer_4">
|
139
|
-
<property name="orientation">
|
140
|
-
<enum>Qt::Orientation::Horizontal</enum>
|
141
|
-
</property>
|
142
|
-
<property name="sizeHint" stdset="0">
|
143
|
-
<size>
|
144
|
-
<width>40</width>
|
145
|
-
<height>20</height>
|
146
|
-
</size>
|
147
|
-
</property>
|
148
|
-
</spacer>
|
149
|
-
</item>
|
150
|
-
<item>
|
151
|
-
<widget class="StopButton" name="stop_button">
|
152
|
-
<property name="sizePolicy">
|
153
|
-
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
154
|
-
<horstretch>0</horstretch>
|
155
|
-
<verstretch>0</verstretch>
|
156
|
-
</sizepolicy>
|
157
|
-
</property>
|
158
|
-
<property name="minimumSize">
|
159
|
-
<size>
|
160
|
-
<width>200</width>
|
161
|
-
<height>40</height>
|
162
|
-
</size>
|
163
|
-
</property>
|
164
|
-
<property name="maximumSize">
|
165
|
-
<size>
|
166
|
-
<width>200</width>
|
167
|
-
<height>40</height>
|
168
|
-
</size>
|
169
|
-
</property>
|
170
|
-
</widget>
|
171
|
-
</item>
|
172
|
-
</layout>
|
173
|
-
</widget>
|
174
|
-
</item>
|
175
|
-
<item>
|
176
|
-
<widget class="BECProgressBar" name="bec_progress_bar">
|
177
|
-
<property name="minimumSize">
|
178
|
-
<size>
|
179
|
-
<width>0</width>
|
180
|
-
<height>25</height>
|
181
|
-
</size>
|
182
|
-
</property>
|
183
|
-
<property name="maximumSize">
|
184
|
-
<size>
|
185
|
-
<width>16777215</width>
|
186
|
-
<height>25</height>
|
187
|
-
</size>
|
188
|
-
</property>
|
189
|
-
</widget>
|
190
|
-
</item>
|
191
|
-
<item>
|
192
|
-
<widget class="QTabWidget" name="tabWidget">
|
193
|
-
<property name="sizePolicy">
|
194
|
-
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
195
|
-
<horstretch>0</horstretch>
|
196
|
-
<verstretch>0</verstretch>
|
197
|
-
</sizepolicy>
|
198
|
-
</property>
|
199
|
-
<property name="currentIndex">
|
200
|
-
<number>0</number>
|
201
|
-
</property>
|
202
|
-
<widget class="QWidget" name="ControlTab">
|
203
|
-
<attribute name="title">
|
204
|
-
<string>Alignment Control</string>
|
205
|
-
</attribute>
|
206
|
-
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
207
|
-
<item>
|
208
|
-
<widget class="QWidget" name="widget_4" native="true">
|
209
|
-
<property name="sizePolicy">
|
210
|
-
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
211
|
-
<horstretch>1</horstretch>
|
212
|
-
<verstretch>0</verstretch>
|
213
|
-
</sizepolicy>
|
214
|
-
</property>
|
215
|
-
<layout class="QVBoxLayout" name="verticalLayout_3">
|
216
|
-
<item>
|
217
|
-
<widget class="ScanControl" name="scan_control">
|
218
|
-
<property name="current_scan" stdset="0">
|
219
|
-
<string>line_scan</string>
|
220
|
-
</property>
|
221
|
-
<property name="hide_arg_box" stdset="0">
|
222
|
-
<bool>false</bool>
|
223
|
-
</property>
|
224
|
-
<property name="hide_scan_selection_combobox" stdset="0">
|
225
|
-
<bool>true</bool>
|
226
|
-
</property>
|
227
|
-
<property name="hide_add_remove_buttons" stdset="0">
|
228
|
-
<bool>true</bool>
|
229
|
-
</property>
|
230
|
-
</widget>
|
231
|
-
</item>
|
232
|
-
<item>
|
233
|
-
<widget class="PositionerGroup" name="positioner_group"/>
|
234
|
-
</item>
|
235
|
-
<item>
|
236
|
-
<spacer name="verticalSpacer">
|
237
|
-
<property name="orientation">
|
238
|
-
<enum>Qt::Orientation::Vertical</enum>
|
239
|
-
</property>
|
240
|
-
<property name="sizeHint" stdset="0">
|
241
|
-
<size>
|
242
|
-
<width>20</width>
|
243
|
-
<height>40</height>
|
244
|
-
</size>
|
245
|
-
</property>
|
246
|
-
</spacer>
|
247
|
-
</item>
|
248
|
-
</layout>
|
249
|
-
</widget>
|
250
|
-
</item>
|
251
|
-
<item>
|
252
|
-
<widget class="QWidget" name="widget_3" native="true">
|
253
|
-
<property name="sizePolicy">
|
254
|
-
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
255
|
-
<horstretch>4</horstretch>
|
256
|
-
<verstretch>0</verstretch>
|
257
|
-
</sizepolicy>
|
258
|
-
</property>
|
259
|
-
<layout class="QVBoxLayout" name="verticalLayout">
|
260
|
-
<item>
|
261
|
-
<widget class="QWidget" name="widget_2" native="true">
|
262
|
-
<property name="sizePolicy">
|
263
|
-
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
264
|
-
<horstretch>0</horstretch>
|
265
|
-
<verstretch>0</verstretch>
|
266
|
-
</sizepolicy>
|
267
|
-
</property>
|
268
|
-
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
269
|
-
<item>
|
270
|
-
<widget class="QLabel" name="label_2">
|
271
|
-
<property name="font">
|
272
|
-
<font/>
|
273
|
-
</property>
|
274
|
-
<property name="text">
|
275
|
-
<string>Monitor</string>
|
276
|
-
</property>
|
277
|
-
</widget>
|
278
|
-
</item>
|
279
|
-
<item>
|
280
|
-
<widget class="DeviceComboBox" name="device_combobox_2"/>
|
281
|
-
</item>
|
282
|
-
<item>
|
283
|
-
<widget class="QLabel" name="label_3">
|
284
|
-
<property name="font">
|
285
|
-
<font/>
|
286
|
-
</property>
|
287
|
-
<property name="text">
|
288
|
-
<string>LMFit Model</string>
|
289
|
-
</property>
|
290
|
-
</widget>
|
291
|
-
</item>
|
292
|
-
<item>
|
293
|
-
<widget class="DapComboBox" name="dap_combo_box"/>
|
294
|
-
</item>
|
295
|
-
<item>
|
296
|
-
<widget class="QLabel" name="label">
|
297
|
-
<property name="text">
|
298
|
-
<string>Enable ROI</string>
|
299
|
-
</property>
|
300
|
-
</widget>
|
301
|
-
</item>
|
302
|
-
<item>
|
303
|
-
<widget class="ToggleSwitch" name="toggle_switch">
|
304
|
-
<property name="sizePolicy">
|
305
|
-
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
306
|
-
<horstretch>3</horstretch>
|
307
|
-
<verstretch>0</verstretch>
|
308
|
-
</sizepolicy>
|
309
|
-
</property>
|
310
|
-
<property name="toolTip">
|
311
|
-
<string>Activate linear region select for LMFit</string>
|
312
|
-
</property>
|
313
|
-
<property name="layoutDirection">
|
314
|
-
<enum>Qt::LayoutDirection::LeftToRight</enum>
|
315
|
-
</property>
|
316
|
-
<property name="checked" stdset="0">
|
317
|
-
<bool>false</bool>
|
318
|
-
</property>
|
319
|
-
</widget>
|
320
|
-
</item>
|
321
|
-
<item>
|
322
|
-
<spacer name="horizontalSpacer_8">
|
323
|
-
<property name="orientation">
|
324
|
-
<enum>Qt::Orientation::Horizontal</enum>
|
325
|
-
</property>
|
326
|
-
<property name="sizeHint" stdset="0">
|
327
|
-
<size>
|
328
|
-
<width>40</width>
|
329
|
-
<height>20</height>
|
330
|
-
</size>
|
331
|
-
</property>
|
332
|
-
</spacer>
|
333
|
-
</item>
|
334
|
-
</layout>
|
335
|
-
</widget>
|
336
|
-
</item>
|
337
|
-
<item>
|
338
|
-
<widget class="BECWaveformWidget" name="bec_waveform_widget">
|
339
|
-
<property name="sizePolicy">
|
340
|
-
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
341
|
-
<horstretch>0</horstretch>
|
342
|
-
<verstretch>1</verstretch>
|
343
|
-
</sizepolicy>
|
344
|
-
</property>
|
345
|
-
<property name="minimumSize">
|
346
|
-
<size>
|
347
|
-
<width>600</width>
|
348
|
-
<height>450</height>
|
349
|
-
</size>
|
350
|
-
</property>
|
351
|
-
<property name="clear_curves_on_plot_update" stdset="0">
|
352
|
-
<bool>true</bool>
|
353
|
-
</property>
|
354
|
-
</widget>
|
355
|
-
</item>
|
356
|
-
<item>
|
357
|
-
<widget class="LMFitDialog" name="lm_fit_dialog">
|
358
|
-
<property name="sizePolicy">
|
359
|
-
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
360
|
-
<horstretch>0</horstretch>
|
361
|
-
<verstretch>0</verstretch>
|
362
|
-
</sizepolicy>
|
363
|
-
</property>
|
364
|
-
<property name="minimumSize">
|
365
|
-
<size>
|
366
|
-
<width>0</width>
|
367
|
-
<height>190</height>
|
368
|
-
</size>
|
369
|
-
</property>
|
370
|
-
<property name="always_show_latest" stdset="0">
|
371
|
-
<bool>true</bool>
|
372
|
-
</property>
|
373
|
-
<property name="hide_curve_selection" stdset="0">
|
374
|
-
<bool>true</bool>
|
375
|
-
</property>
|
376
|
-
<property name="hide_summary" stdset="0">
|
377
|
-
<bool>true</bool>
|
378
|
-
</property>
|
379
|
-
</widget>
|
380
|
-
</item>
|
381
|
-
</layout>
|
382
|
-
</widget>
|
383
|
-
</item>
|
384
|
-
</layout>
|
385
|
-
</widget>
|
386
|
-
<widget class="QWidget" name="tab_2">
|
387
|
-
<attribute name="title">
|
388
|
-
<string>Logbook</string>
|
389
|
-
</attribute>
|
390
|
-
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
391
|
-
<property name="leftMargin">
|
392
|
-
<number>2</number>
|
393
|
-
</property>
|
394
|
-
<property name="topMargin">
|
395
|
-
<number>2</number>
|
396
|
-
</property>
|
397
|
-
<property name="rightMargin">
|
398
|
-
<number>2</number>
|
399
|
-
</property>
|
400
|
-
<property name="bottomMargin">
|
401
|
-
<number>2</number>
|
402
|
-
</property>
|
403
|
-
<item>
|
404
|
-
<widget class="WebsiteWidget" name="website_widget">
|
405
|
-
<property name="url" stdset="0">
|
406
|
-
<string>https://scilog.psi.ch/login</string>
|
407
|
-
</property>
|
408
|
-
</widget>
|
409
|
-
</item>
|
410
|
-
</layout>
|
411
|
-
</widget>
|
412
|
-
</widget>
|
413
|
-
</item>
|
414
|
-
</layout>
|
415
|
-
</widget>
|
416
|
-
</widget>
|
417
|
-
<customwidgets>
|
418
|
-
<customwidget>
|
419
|
-
<class>DapComboBox</class>
|
420
|
-
<extends>QWidget</extends>
|
421
|
-
<header>dap_combo_box</header>
|
422
|
-
</customwidget>
|
423
|
-
<customwidget>
|
424
|
-
<class>StopButton</class>
|
425
|
-
<extends>QWidget</extends>
|
426
|
-
<header>stop_button</header>
|
427
|
-
</customwidget>
|
428
|
-
<customwidget>
|
429
|
-
<class>WebsiteWidget</class>
|
430
|
-
<extends>QWidget</extends>
|
431
|
-
<header>website_widget</header>
|
432
|
-
</customwidget>
|
433
|
-
<customwidget>
|
434
|
-
<class>BECQueue</class>
|
435
|
-
<extends>QWidget</extends>
|
436
|
-
<header>bec_queue</header>
|
437
|
-
</customwidget>
|
438
|
-
<customwidget>
|
439
|
-
<class>ScanControl</class>
|
440
|
-
<extends>QWidget</extends>
|
441
|
-
<header>scan_control</header>
|
442
|
-
</customwidget>
|
443
|
-
<customwidget>
|
444
|
-
<class>ToggleSwitch</class>
|
445
|
-
<extends>QWidget</extends>
|
446
|
-
<header>toggle_switch</header>
|
447
|
-
</customwidget>
|
448
|
-
<customwidget>
|
449
|
-
<class>BECProgressBar</class>
|
450
|
-
<extends>QWidget</extends>
|
451
|
-
<header>bec_progress_bar</header>
|
452
|
-
</customwidget>
|
453
|
-
<customwidget>
|
454
|
-
<class>DarkModeButton</class>
|
455
|
-
<extends>QWidget</extends>
|
456
|
-
<header>dark_mode_button</header>
|
457
|
-
</customwidget>
|
458
|
-
<customwidget>
|
459
|
-
<class>PositionerGroup</class>
|
460
|
-
<extends>QWidget</extends>
|
461
|
-
<header>positioner_group</header>
|
462
|
-
</customwidget>
|
463
|
-
<customwidget>
|
464
|
-
<class>BECWaveformWidget</class>
|
465
|
-
<extends>QWidget</extends>
|
466
|
-
<header>bec_waveform_widget</header>
|
467
|
-
</customwidget>
|
468
|
-
<customwidget>
|
469
|
-
<class>DeviceComboBox</class>
|
470
|
-
<extends>QComboBox</extends>
|
471
|
-
<header>device_combobox</header>
|
472
|
-
</customwidget>
|
473
|
-
<customwidget>
|
474
|
-
<class>LMFitDialog</class>
|
475
|
-
<extends>QWidget</extends>
|
476
|
-
<header>lm_fit_dialog</header>
|
477
|
-
</customwidget>
|
478
|
-
<customwidget>
|
479
|
-
<class>BECStatusBox</class>
|
480
|
-
<extends>QWidget</extends>
|
481
|
-
<header>bec_status_box</header>
|
482
|
-
</customwidget>
|
483
|
-
</customwidgets>
|
484
|
-
<resources/>
|
485
|
-
<connections>
|
486
|
-
<connection>
|
487
|
-
<sender>toggle_switch</sender>
|
488
|
-
<signal>enabled(bool)</signal>
|
489
|
-
<receiver>bec_waveform_widget</receiver>
|
490
|
-
<slot>toogle_roi_select(bool)</slot>
|
491
|
-
<hints>
|
492
|
-
<hint type="sourcelabel">
|
493
|
-
<x>1042</x>
|
494
|
-
<y>212</y>
|
495
|
-
</hint>
|
496
|
-
<hint type="destinationlabel">
|
497
|
-
<x>1416</x>
|
498
|
-
<y>322</y>
|
499
|
-
</hint>
|
500
|
-
</hints>
|
501
|
-
</connection>
|
502
|
-
<connection>
|
503
|
-
<sender>bec_waveform_widget</sender>
|
504
|
-
<signal>dap_summary_update(QVariantMap,QVariantMap)</signal>
|
505
|
-
<receiver>lm_fit_dialog</receiver>
|
506
|
-
<slot>update_summary_tree(QVariantMap,QVariantMap)</slot>
|
507
|
-
<hints>
|
508
|
-
<hint type="sourcelabel">
|
509
|
-
<x>1099</x>
|
510
|
-
<y>258</y>
|
511
|
-
</hint>
|
512
|
-
<hint type="destinationlabel">
|
513
|
-
<x>1157</x>
|
514
|
-
<y>929</y>
|
515
|
-
</hint>
|
516
|
-
</hints>
|
517
|
-
</connection>
|
518
|
-
<connection>
|
519
|
-
<sender>device_combobox_2</sender>
|
520
|
-
<signal>currentTextChanged(QString)</signal>
|
521
|
-
<receiver>bec_waveform_widget</receiver>
|
522
|
-
<slot>plot(QString)</slot>
|
523
|
-
<hints>
|
524
|
-
<hint type="sourcelabel">
|
525
|
-
<x>577</x>
|
526
|
-
<y>215</y>
|
527
|
-
</hint>
|
528
|
-
<hint type="destinationlabel">
|
529
|
-
<x>1416</x>
|
530
|
-
<y>427</y>
|
531
|
-
</hint>
|
532
|
-
</hints>
|
533
|
-
</connection>
|
534
|
-
<connection>
|
535
|
-
<sender>device_combobox_2</sender>
|
536
|
-
<signal>currentTextChanged(QString)</signal>
|
537
|
-
<receiver>dap_combo_box</receiver>
|
538
|
-
<slot>select_y_axis(QString)</slot>
|
539
|
-
<hints>
|
540
|
-
<hint type="sourcelabel">
|
541
|
-
<x>577</x>
|
542
|
-
<y>215</y>
|
543
|
-
</hint>
|
544
|
-
<hint type="destinationlabel">
|
545
|
-
<x>909</x>
|
546
|
-
<y>215</y>
|
547
|
-
</hint>
|
548
|
-
</hints>
|
549
|
-
</connection>
|
550
|
-
<connection>
|
551
|
-
<sender>dap_combo_box</sender>
|
552
|
-
<signal>new_dap_config(QString,QString,QString)</signal>
|
553
|
-
<receiver>bec_waveform_widget</receiver>
|
554
|
-
<slot>add_dap(QString,QString,QString)</slot>
|
555
|
-
<hints>
|
556
|
-
<hint type="sourcelabel">
|
557
|
-
<x>909</x>
|
558
|
-
<y>215</y>
|
559
|
-
</hint>
|
560
|
-
<hint type="destinationlabel">
|
561
|
-
<x>1416</x>
|
562
|
-
<y>447</y>
|
563
|
-
</hint>
|
564
|
-
</hints>
|
565
|
-
</connection>
|
566
|
-
<connection>
|
567
|
-
<sender>scan_control</sender>
|
568
|
-
<signal>device_selected(QString)</signal>
|
569
|
-
<receiver>positioner_group</receiver>
|
570
|
-
<slot>set_positioners(QString)</slot>
|
571
|
-
<hints>
|
572
|
-
<hint type="sourcelabel">
|
573
|
-
<x>230</x>
|
574
|
-
<y>306</y>
|
575
|
-
</hint>
|
576
|
-
<hint type="destinationlabel">
|
577
|
-
<x>187</x>
|
578
|
-
<y>926</y>
|
579
|
-
</hint>
|
580
|
-
</hints>
|
581
|
-
</connection>
|
582
|
-
<connection>
|
583
|
-
<sender>scan_control</sender>
|
584
|
-
<signal>device_selected(QString)</signal>
|
585
|
-
<receiver>bec_waveform_widget</receiver>
|
586
|
-
<slot>set_x(QString)</slot>
|
587
|
-
<hints>
|
588
|
-
<hint type="sourcelabel">
|
589
|
-
<x>187</x>
|
590
|
-
<y>356</y>
|
591
|
-
</hint>
|
592
|
-
<hint type="destinationlabel">
|
593
|
-
<x>972</x>
|
594
|
-
<y>509</y>
|
595
|
-
</hint>
|
596
|
-
</hints>
|
597
|
-
</connection>
|
598
|
-
<connection>
|
599
|
-
<sender>scan_control</sender>
|
600
|
-
<signal>device_selected(QString)</signal>
|
601
|
-
<receiver>dap_combo_box</receiver>
|
602
|
-
<slot>select_x_axis(QString)</slot>
|
603
|
-
<hints>
|
604
|
-
<hint type="sourcelabel">
|
605
|
-
<x>187</x>
|
606
|
-
<y>356</y>
|
607
|
-
</hint>
|
608
|
-
<hint type="destinationlabel">
|
609
|
-
<x>794</x>
|
610
|
-
<y>202</y>
|
611
|
-
</hint>
|
612
|
-
</hints>
|
613
|
-
</connection>
|
614
|
-
</connections>
|
615
|
-
</ui>
|
@@ -1,84 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Launcher for BEC GUI Applications
|
3
|
-
|
4
|
-
Application must be located in bec_widgets/applications ;
|
5
|
-
in order for the launcher to find the application, it has to be put in
|
6
|
-
a subdirectory with the same name as the main Python module:
|
7
|
-
|
8
|
-
/bec_widgets/applications
|
9
|
-
├── alignment
|
10
|
-
│ └── alignment_1d
|
11
|
-
│ └── alignment_1d.py
|
12
|
-
├── other_app
|
13
|
-
└── other_app.py
|
14
|
-
|
15
|
-
The tree above would contain 2 applications, alignment_1d and other_app.
|
16
|
-
|
17
|
-
The Python module for the application must have `if __name__ == "__main__":`
|
18
|
-
in order for the launcher to execute it (it is run with `python -m`).
|
19
|
-
"""
|
20
|
-
|
21
|
-
import argparse
|
22
|
-
import os
|
23
|
-
import sys
|
24
|
-
|
25
|
-
MODULE_PATH = os.path.dirname(__file__)
|
26
|
-
|
27
|
-
|
28
|
-
def find_apps(base_dir: str) -> list[str]:
|
29
|
-
matching_modules = []
|
30
|
-
|
31
|
-
for root, dirs, files in os.walk(base_dir):
|
32
|
-
parent_dir = os.path.basename(root)
|
33
|
-
|
34
|
-
for file in files:
|
35
|
-
if file.endswith(".py") and file != "__init__.py":
|
36
|
-
file_name_without_ext = os.path.splitext(file)[0]
|
37
|
-
|
38
|
-
if file_name_without_ext == parent_dir:
|
39
|
-
rel_path = os.path.relpath(root, base_dir)
|
40
|
-
module_path = rel_path.replace(os.sep, ".")
|
41
|
-
|
42
|
-
module_name = f"{module_path}.{file_name_without_ext}"
|
43
|
-
matching_modules.append((file_name_without_ext, module_name))
|
44
|
-
|
45
|
-
return matching_modules
|
46
|
-
|
47
|
-
|
48
|
-
def main():
|
49
|
-
parser = argparse.ArgumentParser(description="BEC application launcher")
|
50
|
-
|
51
|
-
parser.add_argument("-m", "--module", type=str, help="The module to run (string argument).")
|
52
|
-
|
53
|
-
# Add a positional argument for the module, which acts as a fallback if -m is not provided
|
54
|
-
parser.add_argument(
|
55
|
-
"positional_module",
|
56
|
-
nargs="?", # This makes the positional argument optional
|
57
|
-
help="Positional argument that is treated as module if -m is not specified.",
|
58
|
-
)
|
59
|
-
|
60
|
-
args = parser.parse_args()
|
61
|
-
# If the -m/--module is not provided, fallback to the positional argument
|
62
|
-
module = args.module if args.module else args.positional_module
|
63
|
-
|
64
|
-
if module:
|
65
|
-
for app_name, app_module in find_apps(MODULE_PATH):
|
66
|
-
if module in (app_name, app_module):
|
67
|
-
print("Starting:", app_name)
|
68
|
-
python_executable = sys.executable
|
69
|
-
|
70
|
-
# Replace the current process with the new Python module
|
71
|
-
os.execvp(
|
72
|
-
python_executable,
|
73
|
-
[python_executable, "-m", f"bec_widgets.applications.{app_module}"],
|
74
|
-
)
|
75
|
-
print(f"Error: cannot find application {module}")
|
76
|
-
|
77
|
-
# display list of apps
|
78
|
-
print("Available applications:")
|
79
|
-
for app, _ in find_apps(MODULE_PATH):
|
80
|
-
print(f" - {app}")
|
81
|
-
|
82
|
-
|
83
|
-
if __name__ == "__main__": # pragma: no cover
|
84
|
-
main()
|