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,234 +0,0 @@
|
|
1
|
-
from __future__ import annotations
|
2
|
-
|
3
|
-
import sys
|
4
|
-
|
5
|
-
from qtpy.QtWidgets import QVBoxLayout, QWidget
|
6
|
-
|
7
|
-
from bec_widgets.qt_utils.settings_dialog import SettingsDialog
|
8
|
-
from bec_widgets.qt_utils.toolbar import DeviceSelectionAction, MaterialIconAction, ModularToolBar
|
9
|
-
from bec_widgets.utils.bec_widget import BECWidget
|
10
|
-
from bec_widgets.widgets.containers.figure import BECFigure
|
11
|
-
from bec_widgets.widgets.containers.figure.plots.motor_map.motor_map import MotorMapConfig
|
12
|
-
from bec_widgets.widgets.control.device_input.base_classes.device_input_base import BECDeviceFilter
|
13
|
-
from bec_widgets.widgets.control.device_input.device_combobox.device_combobox import DeviceComboBox
|
14
|
-
from bec_widgets.widgets.plots.motor_map.motor_map_dialog.motor_map_settings import MotorMapSettings
|
15
|
-
|
16
|
-
|
17
|
-
class BECMotorMapWidget(BECWidget, QWidget):
|
18
|
-
PLUGIN = True
|
19
|
-
ICON_NAME = "my_location"
|
20
|
-
USER_ACCESS = [
|
21
|
-
"change_motors",
|
22
|
-
"set_max_points",
|
23
|
-
"set_precision",
|
24
|
-
"set_num_dim_points",
|
25
|
-
"set_background_value",
|
26
|
-
"set_scatter_size",
|
27
|
-
"get_data",
|
28
|
-
"reset_history",
|
29
|
-
"export",
|
30
|
-
]
|
31
|
-
|
32
|
-
def __init__(
|
33
|
-
self,
|
34
|
-
parent: QWidget | None = None,
|
35
|
-
config: MotorMapConfig | None = None,
|
36
|
-
client=None,
|
37
|
-
gui_id: str | None = None,
|
38
|
-
**kwargs,
|
39
|
-
) -> None:
|
40
|
-
if config is None:
|
41
|
-
config = MotorMapConfig(widget_class=self.__class__.__name__)
|
42
|
-
else:
|
43
|
-
if isinstance(config, dict):
|
44
|
-
config = MotorMapConfig(**config)
|
45
|
-
super().__init__(client=client, gui_id=gui_id, **kwargs)
|
46
|
-
QWidget.__init__(self, parent)
|
47
|
-
|
48
|
-
self.layout = QVBoxLayout(self)
|
49
|
-
self.layout.setSpacing(0)
|
50
|
-
self.layout.setContentsMargins(0, 0, 0, 0)
|
51
|
-
|
52
|
-
self.fig = BECFigure()
|
53
|
-
self.toolbar = ModularToolBar(
|
54
|
-
actions={
|
55
|
-
"motor_x": DeviceSelectionAction(
|
56
|
-
"Motor X:", DeviceComboBox(device_filter=[BECDeviceFilter.POSITIONER])
|
57
|
-
),
|
58
|
-
"motor_y": DeviceSelectionAction(
|
59
|
-
"Motor Y:", DeviceComboBox(device_filter=[BECDeviceFilter.POSITIONER])
|
60
|
-
),
|
61
|
-
"connect": MaterialIconAction(icon_name="link", tooltip="Connect Motors"),
|
62
|
-
"history": MaterialIconAction(icon_name="history", tooltip="Reset Trace History"),
|
63
|
-
"config": MaterialIconAction(
|
64
|
-
icon_name="settings", tooltip="Open Configuration Dialog"
|
65
|
-
),
|
66
|
-
},
|
67
|
-
target_widget=self,
|
68
|
-
)
|
69
|
-
|
70
|
-
self.layout.addWidget(self.toolbar)
|
71
|
-
self.layout.addWidget(self.fig)
|
72
|
-
|
73
|
-
self.map = self.fig.motor_map()
|
74
|
-
self.map.apply_config(config)
|
75
|
-
|
76
|
-
self._hook_actions()
|
77
|
-
|
78
|
-
self.config = config
|
79
|
-
|
80
|
-
def _hook_actions(self):
|
81
|
-
self.toolbar.widgets["connect"].action.triggered.connect(self._action_motors)
|
82
|
-
self.toolbar.widgets["config"].action.triggered.connect(self.show_settings)
|
83
|
-
self.toolbar.widgets["history"].action.triggered.connect(self.reset_history)
|
84
|
-
|
85
|
-
if self.map.motor_x is None and self.map.motor_y is None:
|
86
|
-
self._enable_actions(False)
|
87
|
-
|
88
|
-
def _enable_actions(self, enable: bool):
|
89
|
-
self.toolbar.widgets["config"].action.setEnabled(enable)
|
90
|
-
self.toolbar.widgets["history"].action.setEnabled(enable)
|
91
|
-
|
92
|
-
def _action_motors(self):
|
93
|
-
toolbar_x = self.toolbar.widgets["motor_x"].device_combobox
|
94
|
-
toolbar_y = self.toolbar.widgets["motor_y"].device_combobox
|
95
|
-
motor_x = toolbar_x.currentText()
|
96
|
-
motor_y = toolbar_y.currentText()
|
97
|
-
self.change_motors(motor_x, motor_y, None, None, True)
|
98
|
-
toolbar_x.setStyleSheet("QComboBox {{ background-color: " "; }}")
|
99
|
-
toolbar_y.setStyleSheet("QComboBox {{ background-color: " "; }}")
|
100
|
-
|
101
|
-
def show_settings(self) -> None:
|
102
|
-
dialog = SettingsDialog(
|
103
|
-
self, settings_widget=MotorMapSettings(), window_title="Motor Map Settings"
|
104
|
-
)
|
105
|
-
dialog.exec()
|
106
|
-
|
107
|
-
###################################
|
108
|
-
# User Access Methods from MotorMap
|
109
|
-
###################################
|
110
|
-
|
111
|
-
def change_motors(
|
112
|
-
self,
|
113
|
-
motor_x: str,
|
114
|
-
motor_y: str,
|
115
|
-
motor_x_entry: str = None,
|
116
|
-
motor_y_entry: str = None,
|
117
|
-
validate_bec: bool = True,
|
118
|
-
) -> None:
|
119
|
-
"""
|
120
|
-
Change the active motors for the plot.
|
121
|
-
|
122
|
-
Args:
|
123
|
-
motor_x(str): Motor name for the X axis.
|
124
|
-
motor_y(str): Motor name for the Y axis.
|
125
|
-
motor_x_entry(str): Motor entry for the X axis.
|
126
|
-
motor_y_entry(str): Motor entry for the Y axis.
|
127
|
-
validate_bec(bool, optional): If True, validate the signal with BEC. Defaults to True.
|
128
|
-
"""
|
129
|
-
self.map.change_motors(motor_x, motor_y, motor_x_entry, motor_y_entry, validate_bec)
|
130
|
-
if self.map.motor_x is not None and self.map.motor_y is not None:
|
131
|
-
self._enable_actions(True)
|
132
|
-
toolbar_x = self.toolbar.widgets["motor_x"].device_combobox
|
133
|
-
toolbar_y = self.toolbar.widgets["motor_y"].device_combobox
|
134
|
-
|
135
|
-
if toolbar_x.currentText() != motor_x:
|
136
|
-
toolbar_x.setCurrentText(motor_x)
|
137
|
-
toolbar_x.setStyleSheet("QComboBox {{ background-color: " "; }}")
|
138
|
-
if toolbar_y.currentText() != motor_y:
|
139
|
-
toolbar_y.setCurrentText(motor_y)
|
140
|
-
toolbar_y.setStyleSheet("QComboBox {{ background-color: " "; }}")
|
141
|
-
|
142
|
-
def get_data(self) -> dict:
|
143
|
-
"""
|
144
|
-
Get the data of the motor map.
|
145
|
-
|
146
|
-
Returns:
|
147
|
-
dict: Data of the motor map.
|
148
|
-
"""
|
149
|
-
return self.map.get_data()
|
150
|
-
|
151
|
-
def reset_history(self) -> None:
|
152
|
-
"""
|
153
|
-
Reset the history of the motor map.
|
154
|
-
"""
|
155
|
-
self.map.reset_history()
|
156
|
-
|
157
|
-
def set_color(self, color: str | tuple):
|
158
|
-
"""
|
159
|
-
Set the color of the motor map.
|
160
|
-
|
161
|
-
Args:
|
162
|
-
color(str, tuple): Color to set.
|
163
|
-
"""
|
164
|
-
self.map.set_color(color)
|
165
|
-
|
166
|
-
def set_max_points(self, max_points: int) -> None:
|
167
|
-
"""
|
168
|
-
Set the maximum number of points to display on the motor map.
|
169
|
-
|
170
|
-
Args:
|
171
|
-
max_points(int): Maximum number of points to display.
|
172
|
-
"""
|
173
|
-
self.map.set_max_points(max_points)
|
174
|
-
|
175
|
-
def set_precision(self, precision: int) -> None:
|
176
|
-
"""
|
177
|
-
Set the precision of the motor map.
|
178
|
-
|
179
|
-
Args:
|
180
|
-
precision(int): Precision to set.
|
181
|
-
"""
|
182
|
-
self.map.set_precision(precision)
|
183
|
-
|
184
|
-
def set_num_dim_points(self, num_dim_points: int) -> None:
|
185
|
-
"""
|
186
|
-
Set the number of points to display on the motor map.
|
187
|
-
|
188
|
-
Args:
|
189
|
-
num_dim_points(int): Number of points to display.
|
190
|
-
"""
|
191
|
-
self.map.set_num_dim_points(num_dim_points)
|
192
|
-
|
193
|
-
def set_background_value(self, background_value: int) -> None:
|
194
|
-
"""
|
195
|
-
Set the background value of the motor map.
|
196
|
-
|
197
|
-
Args:
|
198
|
-
background_value(int): Background value of the motor map.
|
199
|
-
"""
|
200
|
-
self.map.set_background_value(background_value)
|
201
|
-
|
202
|
-
def set_scatter_size(self, scatter_size: int) -> None:
|
203
|
-
"""
|
204
|
-
Set the scatter size of the motor map.
|
205
|
-
|
206
|
-
Args:
|
207
|
-
scatter_size(int): Scatter size of the motor map.
|
208
|
-
"""
|
209
|
-
self.map.set_scatter_size(scatter_size)
|
210
|
-
|
211
|
-
def export(self):
|
212
|
-
"""
|
213
|
-
Show the export dialog for the motor map.
|
214
|
-
"""
|
215
|
-
self.map.export()
|
216
|
-
|
217
|
-
def cleanup(self):
|
218
|
-
self.fig.cleanup()
|
219
|
-
self.toolbar.widgets["motor_x"].device_combobox.cleanup()
|
220
|
-
self.toolbar.widgets["motor_y"].device_combobox.cleanup()
|
221
|
-
return super().cleanup()
|
222
|
-
|
223
|
-
|
224
|
-
def main(): # pragma: no cover
|
225
|
-
from qtpy.QtWidgets import QApplication
|
226
|
-
|
227
|
-
app = QApplication(sys.argv)
|
228
|
-
widget = BECMotorMapWidget()
|
229
|
-
widget.show()
|
230
|
-
sys.exit(app.exec_())
|
231
|
-
|
232
|
-
|
233
|
-
if __name__ == "__main__": # pragma: no cover
|
234
|
-
main()
|
@@ -1 +0,0 @@
|
|
1
|
-
{'files': ['multi_waveform_widget.py','multi-waveform_controls.ui']}
|
@@ -1,99 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<ui version="4.0">
|
3
|
-
<class>Form</class>
|
4
|
-
<widget class="QWidget" name="Form">
|
5
|
-
<property name="geometry">
|
6
|
-
<rect>
|
7
|
-
<x>0</x>
|
8
|
-
<y>0</y>
|
9
|
-
<width>561</width>
|
10
|
-
<height>86</height>
|
11
|
-
</rect>
|
12
|
-
</property>
|
13
|
-
<property name="windowTitle">
|
14
|
-
<string>Form</string>
|
15
|
-
</property>
|
16
|
-
<layout class="QGridLayout" name="gridLayout">
|
17
|
-
<item row="0" column="0">
|
18
|
-
<widget class="QLabel" name="label_curve_index">
|
19
|
-
<property name="text">
|
20
|
-
<string>Curve Index</string>
|
21
|
-
</property>
|
22
|
-
</widget>
|
23
|
-
</item>
|
24
|
-
<item row="0" column="1">
|
25
|
-
<widget class="QSlider" name="slider_index">
|
26
|
-
<property name="orientation">
|
27
|
-
<enum>Qt::Orientation::Horizontal</enum>
|
28
|
-
</property>
|
29
|
-
</widget>
|
30
|
-
</item>
|
31
|
-
<item row="0" column="2">
|
32
|
-
<widget class="QSpinBox" name="spinbox_index"/>
|
33
|
-
</item>
|
34
|
-
<item row="0" column="3" colspan="3">
|
35
|
-
<widget class="QCheckBox" name="checkbox_highlight">
|
36
|
-
<property name="text">
|
37
|
-
<string>Highlight always last curve</string>
|
38
|
-
</property>
|
39
|
-
</widget>
|
40
|
-
</item>
|
41
|
-
<item row="1" column="0">
|
42
|
-
<widget class="QLabel" name="label_opacity">
|
43
|
-
<property name="text">
|
44
|
-
<string>Opacity</string>
|
45
|
-
</property>
|
46
|
-
</widget>
|
47
|
-
</item>
|
48
|
-
<item row="1" column="1">
|
49
|
-
<widget class="QSlider" name="slider_opacity">
|
50
|
-
<property name="maximum">
|
51
|
-
<number>100</number>
|
52
|
-
</property>
|
53
|
-
<property name="orientation">
|
54
|
-
<enum>Qt::Orientation::Horizontal</enum>
|
55
|
-
</property>
|
56
|
-
</widget>
|
57
|
-
</item>
|
58
|
-
<item row="1" column="3">
|
59
|
-
<widget class="QLabel" name="label_max_trace">
|
60
|
-
<property name="text">
|
61
|
-
<string>Max Trace</string>
|
62
|
-
</property>
|
63
|
-
</widget>
|
64
|
-
</item>
|
65
|
-
<item row="1" column="4">
|
66
|
-
<widget class="QSpinBox" name="spinbox_max_trace">
|
67
|
-
<property name="toolTip">
|
68
|
-
<string>How many curves should be displayed</string>
|
69
|
-
</property>
|
70
|
-
<property name="maximum">
|
71
|
-
<number>500</number>
|
72
|
-
</property>
|
73
|
-
<property name="value">
|
74
|
-
<number>200</number>
|
75
|
-
</property>
|
76
|
-
</widget>
|
77
|
-
</item>
|
78
|
-
<item row="1" column="5">
|
79
|
-
<widget class="QCheckBox" name="checkbox_flush_buffer">
|
80
|
-
<property name="toolTip">
|
81
|
-
<string>If hiddne curves should be deleted.</string>
|
82
|
-
</property>
|
83
|
-
<property name="text">
|
84
|
-
<string>Flush Buffer</string>
|
85
|
-
</property>
|
86
|
-
</widget>
|
87
|
-
</item>
|
88
|
-
<item row="1" column="2">
|
89
|
-
<widget class="QSpinBox" name="spinbox_opacity">
|
90
|
-
<property name="maximum">
|
91
|
-
<number>100</number>
|
92
|
-
</property>
|
93
|
-
</widget>
|
94
|
-
</item>
|
95
|
-
</layout>
|
96
|
-
</widget>
|
97
|
-
<resources/>
|
98
|
-
<connections/>
|
99
|
-
</ui>
|