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
@@ -1,462 +0,0 @@
|
|
1
|
-
from unittest.mock import MagicMock, patch
|
2
|
-
|
3
|
-
import pyqtgraph as pg
|
4
|
-
import pytest
|
5
|
-
|
6
|
-
from bec_widgets.qt_utils.settings_dialog import SettingsDialog
|
7
|
-
from bec_widgets.widgets.figure.plots.axis_settings import AxisSettings
|
8
|
-
from bec_widgets.widgets.waveform.waveform_popups.curve_dialog.curve_dialog import CurveSettings
|
9
|
-
from bec_widgets.widgets.waveform.waveform_widget import BECWaveformWidget
|
10
|
-
|
11
|
-
from .client_mocks import mocked_client
|
12
|
-
|
13
|
-
|
14
|
-
@pytest.fixture
|
15
|
-
def waveform_widget(qtbot, mocked_client):
|
16
|
-
widget = BECWaveformWidget(client=mocked_client())
|
17
|
-
qtbot.addWidget(widget)
|
18
|
-
qtbot.waitExposed(widget)
|
19
|
-
yield widget
|
20
|
-
|
21
|
-
|
22
|
-
@pytest.fixture
|
23
|
-
def mock_waveform(waveform_widget):
|
24
|
-
waveform_mock = MagicMock()
|
25
|
-
waveform_widget.waveform = waveform_mock
|
26
|
-
return waveform_mock
|
27
|
-
|
28
|
-
|
29
|
-
def test_waveform_widget_init(waveform_widget):
|
30
|
-
assert waveform_widget is not None
|
31
|
-
assert waveform_widget.client is not None
|
32
|
-
assert isinstance(waveform_widget, BECWaveformWidget)
|
33
|
-
assert waveform_widget.config.widget_class == "BECWaveformWidget"
|
34
|
-
|
35
|
-
|
36
|
-
###################################
|
37
|
-
# Wrapper methods for Waveform
|
38
|
-
###################################
|
39
|
-
|
40
|
-
|
41
|
-
def test_waveform_widget_get_curve(waveform_widget, mock_waveform):
|
42
|
-
waveform_widget.get_curve("curve_id")
|
43
|
-
waveform_widget.waveform.get_curve.assert_called_once_with("curve_id")
|
44
|
-
|
45
|
-
|
46
|
-
def test_waveform_widget_set_colormap(waveform_widget, mock_waveform):
|
47
|
-
waveform_widget.set_colormap("colormap")
|
48
|
-
waveform_widget.waveform.set_colormap.assert_called_once_with("colormap")
|
49
|
-
|
50
|
-
|
51
|
-
def test_waveform_widget_set_x(waveform_widget, mock_waveform):
|
52
|
-
waveform_widget.set_x("samx", "samx")
|
53
|
-
waveform_widget.waveform.set_x.assert_called_once_with("samx", "samx")
|
54
|
-
|
55
|
-
|
56
|
-
def test_waveform_plot_data(waveform_widget, mock_waveform):
|
57
|
-
waveform_widget.plot(x=[1, 2, 3], y=[1, 2, 3])
|
58
|
-
waveform_widget.waveform.plot.assert_called_once_with(
|
59
|
-
arg1=None,
|
60
|
-
x=[1, 2, 3],
|
61
|
-
y=[1, 2, 3],
|
62
|
-
x_name=None,
|
63
|
-
y_name=None,
|
64
|
-
z_name=None,
|
65
|
-
x_entry=None,
|
66
|
-
y_entry=None,
|
67
|
-
z_entry=None,
|
68
|
-
color=None,
|
69
|
-
color_map_z="plasma",
|
70
|
-
label=None,
|
71
|
-
validate=True,
|
72
|
-
dap=None,
|
73
|
-
)
|
74
|
-
|
75
|
-
|
76
|
-
def test_waveform_plot_scan_curves(waveform_widget, mock_waveform):
|
77
|
-
waveform_widget.plot(x_name="samx", y_name="samy", dap="GaussianModel")
|
78
|
-
waveform_widget.waveform.plot.assert_called_once_with(
|
79
|
-
arg1=None,
|
80
|
-
x=None,
|
81
|
-
y=None,
|
82
|
-
x_name="samx",
|
83
|
-
y_name="samy",
|
84
|
-
z_name=None,
|
85
|
-
x_entry=None,
|
86
|
-
y_entry=None,
|
87
|
-
z_entry=None,
|
88
|
-
color=None,
|
89
|
-
color_map_z="plasma",
|
90
|
-
label=None,
|
91
|
-
validate=True,
|
92
|
-
dap="GaussianModel",
|
93
|
-
)
|
94
|
-
|
95
|
-
|
96
|
-
def test_waveform_widget_add_dap(waveform_widget, mock_waveform):
|
97
|
-
waveform_widget.add_dap(x_name="samx", y_name="bpm4i")
|
98
|
-
waveform_widget.waveform.add_dap.assert_called_once_with(
|
99
|
-
x_name="samx",
|
100
|
-
y_name="bpm4i",
|
101
|
-
x_entry=None,
|
102
|
-
y_entry=None,
|
103
|
-
color=None,
|
104
|
-
dap="GaussianModel",
|
105
|
-
validate_bec=True,
|
106
|
-
)
|
107
|
-
|
108
|
-
|
109
|
-
def test_waveform_widget_get_dap_params(waveform_widget, mock_waveform):
|
110
|
-
waveform_widget.get_dap_params()
|
111
|
-
waveform_widget.waveform.get_dap_params.assert_called_once()
|
112
|
-
|
113
|
-
|
114
|
-
def test_waveform_widget_get_dap_summary(waveform_widget, mock_waveform):
|
115
|
-
waveform_widget.get_dap_summary()
|
116
|
-
waveform_widget.waveform.get_dap_summary.assert_called_once()
|
117
|
-
|
118
|
-
|
119
|
-
def test_waveform_widget_remove_curve(waveform_widget, mock_waveform):
|
120
|
-
waveform_widget.remove_curve("curve_id")
|
121
|
-
waveform_widget.waveform.remove_curve.assert_called_once_with("curve_id")
|
122
|
-
|
123
|
-
|
124
|
-
def test_waveform_widget_scan_history(waveform_widget, mock_waveform):
|
125
|
-
waveform_widget.scan_history(0)
|
126
|
-
waveform_widget.waveform.scan_history.assert_called_once_with(0, None)
|
127
|
-
|
128
|
-
|
129
|
-
def test_waveform_widget_get_all_data(waveform_widget, mock_waveform):
|
130
|
-
waveform_widget.get_all_data()
|
131
|
-
waveform_widget.waveform.get_all_data.assert_called_once()
|
132
|
-
|
133
|
-
|
134
|
-
def test_waveform_widget_set_title(waveform_widget, mock_waveform):
|
135
|
-
waveform_widget.set_title("Title")
|
136
|
-
waveform_widget.waveform.set_title.assert_called_once_with("Title")
|
137
|
-
|
138
|
-
|
139
|
-
def test_waveform_widget_set_base(waveform_widget, mock_waveform):
|
140
|
-
waveform_widget.set(
|
141
|
-
title="Test Title",
|
142
|
-
x_label="X Label",
|
143
|
-
y_label="Y Label",
|
144
|
-
x_scale="linear",
|
145
|
-
y_scale="log",
|
146
|
-
x_lim=(0, 10),
|
147
|
-
y_lim=(0, 10),
|
148
|
-
legend_label_size=12,
|
149
|
-
)
|
150
|
-
waveform_widget.waveform.set.assert_called_once_with(
|
151
|
-
title="Test Title",
|
152
|
-
x_label="X Label",
|
153
|
-
y_label="Y Label",
|
154
|
-
x_scale="linear",
|
155
|
-
y_scale="log",
|
156
|
-
x_lim=(0, 10),
|
157
|
-
y_lim=(0, 10),
|
158
|
-
legend_label_size=12,
|
159
|
-
)
|
160
|
-
|
161
|
-
|
162
|
-
def test_waveform_widget_set_x_label(waveform_widget, mock_waveform):
|
163
|
-
waveform_widget.set_x_label("X Label")
|
164
|
-
waveform_widget.waveform.set_x_label.assert_called_once_with("X Label")
|
165
|
-
|
166
|
-
|
167
|
-
def test_waveform_widget_set_y_label(waveform_widget, mock_waveform):
|
168
|
-
waveform_widget.set_y_label("Y Label")
|
169
|
-
waveform_widget.waveform.set_y_label.assert_called_once_with("Y Label")
|
170
|
-
|
171
|
-
|
172
|
-
def test_waveform_widget_set_x_scale(waveform_widget, mock_waveform):
|
173
|
-
waveform_widget.set_x_scale("linear")
|
174
|
-
waveform_widget.waveform.set_x_scale.assert_called_once_with("linear")
|
175
|
-
|
176
|
-
|
177
|
-
def test_waveform_widget_set_y_scale(waveform_widget, mock_waveform):
|
178
|
-
waveform_widget.set_y_scale("log")
|
179
|
-
waveform_widget.waveform.set_y_scale.assert_called_once_with("log")
|
180
|
-
|
181
|
-
|
182
|
-
def test_waveform_widget_set_x_lim(waveform_widget, mock_waveform):
|
183
|
-
waveform_widget.set_x_lim((0, 10))
|
184
|
-
waveform_widget.waveform.set_x_lim.assert_called_once_with((0, 10))
|
185
|
-
|
186
|
-
|
187
|
-
def test_waveform_widget_set_y_lim(waveform_widget, mock_waveform):
|
188
|
-
waveform_widget.set_y_lim((0, 10))
|
189
|
-
waveform_widget.waveform.set_y_lim.assert_called_once_with((0, 10))
|
190
|
-
|
191
|
-
|
192
|
-
def test_waveform_widget_set_legend_label_size(waveform_widget, mock_waveform):
|
193
|
-
waveform_widget.set_legend_label_size(12)
|
194
|
-
waveform_widget.waveform.set_legend_label_size.assert_called_once_with(12)
|
195
|
-
|
196
|
-
|
197
|
-
def test_waveform_widget_set_auto_range(waveform_widget, mock_waveform):
|
198
|
-
waveform_widget.set_auto_range(True, "xy")
|
199
|
-
waveform_widget.waveform.set_auto_range.assert_called_once_with(True, "xy")
|
200
|
-
|
201
|
-
|
202
|
-
def test_waveform_widget_set_grid(waveform_widget, mock_waveform):
|
203
|
-
waveform_widget.set_grid(True, False)
|
204
|
-
waveform_widget.waveform.set_grid.assert_called_once_with(True, False)
|
205
|
-
|
206
|
-
|
207
|
-
def test_waveform_widget_lock_aspect_ratio(waveform_widget, mock_waveform):
|
208
|
-
waveform_widget.lock_aspect_ratio(True)
|
209
|
-
waveform_widget.waveform.lock_aspect_ratio.assert_called_once_with(True)
|
210
|
-
|
211
|
-
|
212
|
-
def test_waveform_widget_export(waveform_widget, mock_waveform):
|
213
|
-
waveform_widget.export()
|
214
|
-
waveform_widget.waveform.export.assert_called_once()
|
215
|
-
|
216
|
-
|
217
|
-
###################################
|
218
|
-
# ToolBar interactions
|
219
|
-
###################################
|
220
|
-
|
221
|
-
|
222
|
-
def test_toolbar_drag_mode_action_triggered(waveform_widget, qtbot):
|
223
|
-
action_drag = waveform_widget.toolbar.widgets["drag_mode"].action
|
224
|
-
action_rectangle = waveform_widget.toolbar.widgets["rectangle_mode"].action
|
225
|
-
action_drag.trigger()
|
226
|
-
assert action_drag.isChecked() == True
|
227
|
-
assert action_rectangle.isChecked() == False
|
228
|
-
|
229
|
-
|
230
|
-
def test_toolbar_rectangle_mode_action_triggered(waveform_widget, qtbot):
|
231
|
-
action_drag = waveform_widget.toolbar.widgets["drag_mode"].action
|
232
|
-
action_rectangle = waveform_widget.toolbar.widgets["rectangle_mode"].action
|
233
|
-
action_rectangle.trigger()
|
234
|
-
assert action_drag.isChecked() == False
|
235
|
-
assert action_rectangle.isChecked() == True
|
236
|
-
|
237
|
-
|
238
|
-
def test_toolbar_auto_range_action_triggered(waveform_widget, mock_waveform, qtbot):
|
239
|
-
action = waveform_widget.toolbar.widgets["auto_range"].action
|
240
|
-
action.trigger()
|
241
|
-
qtbot.wait(200)
|
242
|
-
waveform_widget.waveform.set_auto_range.assert_called_once_with(True, "xy")
|
243
|
-
|
244
|
-
|
245
|
-
def test_toolbar_fit_params_action_triggered(qtbot, waveform_widget):
|
246
|
-
action = waveform_widget.toolbar.widgets["fit_params"].action
|
247
|
-
with patch(
|
248
|
-
"bec_widgets.widgets.waveform.waveform_widget.FitSummaryWidget"
|
249
|
-
) as MockFitSummaryWidget:
|
250
|
-
mock_dialog_instance = MockFitSummaryWidget.return_value
|
251
|
-
action.trigger()
|
252
|
-
mock_dialog_instance.show.assert_called_once()
|
253
|
-
|
254
|
-
|
255
|
-
def test_enable_mouse_pan_mode(qtbot, waveform_widget):
|
256
|
-
action_drag = waveform_widget.toolbar.widgets["drag_mode"].action
|
257
|
-
action_rectangle = waveform_widget.toolbar.widgets["rectangle_mode"].action
|
258
|
-
|
259
|
-
mock_view_box = MagicMock()
|
260
|
-
waveform_widget.waveform.plot_item.getViewBox = MagicMock(return_value=mock_view_box)
|
261
|
-
|
262
|
-
waveform_widget.enable_mouse_pan_mode()
|
263
|
-
|
264
|
-
assert action_drag.isChecked() == True
|
265
|
-
assert action_rectangle.isChecked() == False
|
266
|
-
mock_view_box.setMouseMode.assert_called_once_with(pg.ViewBox.PanMode)
|
267
|
-
|
268
|
-
|
269
|
-
###################################
|
270
|
-
# Curve Dialog Tests
|
271
|
-
###################################
|
272
|
-
def show_curve_dialog(qtbot, waveform_widget):
|
273
|
-
curve_dialog = SettingsDialog(
|
274
|
-
waveform_widget,
|
275
|
-
settings_widget=CurveSettings(),
|
276
|
-
window_title="Curve Settings",
|
277
|
-
config=waveform_widget.waveform._curves_data,
|
278
|
-
)
|
279
|
-
qtbot.addWidget(curve_dialog)
|
280
|
-
qtbot.waitExposed(curve_dialog)
|
281
|
-
return curve_dialog
|
282
|
-
|
283
|
-
|
284
|
-
def test_curve_dialog_scan_curves_interactions(qtbot, waveform_widget):
|
285
|
-
waveform_widget.plot(y_name="bpm4i")
|
286
|
-
waveform_widget.plot(y_name="bpm3a")
|
287
|
-
|
288
|
-
curve_dialog = show_curve_dialog(qtbot, waveform_widget)
|
289
|
-
|
290
|
-
# Check default display of config from waveform widget
|
291
|
-
assert curve_dialog is not None
|
292
|
-
assert curve_dialog.widget.ui.scan_table.rowCount() == 2
|
293
|
-
assert curve_dialog.widget.ui.scan_table.cellWidget(0, 0).text() == "bpm4i"
|
294
|
-
assert curve_dialog.widget.ui.scan_table.cellWidget(0, 1).text() == "bpm4i"
|
295
|
-
assert curve_dialog.widget.ui.scan_table.cellWidget(1, 0).text() == "bpm3a"
|
296
|
-
assert curve_dialog.widget.ui.scan_table.cellWidget(1, 1).text() == "bpm3a"
|
297
|
-
assert curve_dialog.widget.ui.x_mode.currentText() == "best_effort"
|
298
|
-
assert curve_dialog.widget.ui.x_name.isEnabled() == False
|
299
|
-
assert curve_dialog.widget.ui.x_entry.isEnabled() == False
|
300
|
-
|
301
|
-
# Add a new curve
|
302
|
-
curve_dialog.widget.ui.add_curve.click()
|
303
|
-
qtbot.wait(200)
|
304
|
-
assert curve_dialog.widget.ui.scan_table.rowCount() == 3
|
305
|
-
|
306
|
-
# Set device to new curve
|
307
|
-
curve_dialog.widget.ui.scan_table.cellWidget(2, 0).setText("bpm3i")
|
308
|
-
|
309
|
-
# Change the x mode to device
|
310
|
-
curve_dialog.widget.ui.x_mode.setCurrentText("device")
|
311
|
-
qtbot.wait(200)
|
312
|
-
assert curve_dialog.widget.ui.x_name.isEnabled() == True
|
313
|
-
assert curve_dialog.widget.ui.x_entry.isEnabled() == True
|
314
|
-
|
315
|
-
# Set the x device
|
316
|
-
curve_dialog.widget.ui.x_name.setText("samx")
|
317
|
-
|
318
|
-
# Delete first curve ('bpm4i')
|
319
|
-
curve_dialog.widget.ui.scan_table.cellWidget(0, 6).click()
|
320
|
-
qtbot.wait(200)
|
321
|
-
assert curve_dialog.widget.ui.scan_table.rowCount() == 2
|
322
|
-
assert curve_dialog.widget.ui.scan_table.cellWidget(0, 0).text() == "bpm3a"
|
323
|
-
assert curve_dialog.widget.ui.scan_table.cellWidget(0, 1).text() == "bpm3a"
|
324
|
-
assert curve_dialog.widget.ui.scan_table.cellWidget(1, 0).text() == "bpm3i"
|
325
|
-
|
326
|
-
# Close the dialog
|
327
|
-
curve_dialog.accept()
|
328
|
-
qtbot.wait(200)
|
329
|
-
|
330
|
-
# Check the curve data in the target widget
|
331
|
-
assert list(waveform_widget.waveform._curves_data["scan_segment"].keys()) == [
|
332
|
-
"bpm3a-bpm3a",
|
333
|
-
"bpm3i-bpm3i",
|
334
|
-
]
|
335
|
-
assert len(waveform_widget.curves) == 2
|
336
|
-
|
337
|
-
|
338
|
-
def test_curve_dialog_async(qtbot, waveform_widget):
|
339
|
-
waveform_widget.plot(y_name="bpm4i")
|
340
|
-
waveform_widget.plot(y_name="async_device")
|
341
|
-
|
342
|
-
curve_dialog = show_curve_dialog(qtbot, waveform_widget)
|
343
|
-
|
344
|
-
assert curve_dialog is not None
|
345
|
-
assert curve_dialog.widget.ui.scan_table.rowCount() == 2
|
346
|
-
assert curve_dialog.widget.ui.scan_table.cellWidget(0, 0).text() == "bpm4i"
|
347
|
-
assert curve_dialog.widget.ui.scan_table.cellWidget(0, 1).text() == "bpm4i"
|
348
|
-
assert curve_dialog.widget.ui.scan_table.cellWidget(1, 0).text() == "async_device"
|
349
|
-
assert curve_dialog.widget.ui.scan_table.cellWidget(1, 1).text() == "async_device"
|
350
|
-
|
351
|
-
|
352
|
-
def test_curve_dialog_dap(qtbot, waveform_widget):
|
353
|
-
waveform_widget.plot(x_name="samx", y_name="bpm4i", dap="GaussianModel")
|
354
|
-
|
355
|
-
curve_dialog = show_curve_dialog(qtbot, waveform_widget)
|
356
|
-
|
357
|
-
assert curve_dialog is not None
|
358
|
-
assert curve_dialog.widget.ui.scan_table.rowCount() == 1
|
359
|
-
assert curve_dialog.widget.ui.scan_table.cellWidget(0, 0).text() == "bpm4i"
|
360
|
-
assert curve_dialog.widget.ui.scan_table.cellWidget(0, 1).text() == "bpm4i"
|
361
|
-
assert curve_dialog.widget.ui.dap_table.isEnabled() == True
|
362
|
-
assert curve_dialog.widget.ui.dap_table.rowCount() == 1
|
363
|
-
assert curve_dialog.widget.ui.dap_table.cellWidget(0, 0).text() == "bpm4i"
|
364
|
-
assert curve_dialog.widget.ui.dap_table.cellWidget(0, 1).text() == "bpm4i"
|
365
|
-
assert curve_dialog.widget.ui.x_mode.currentText() == "device"
|
366
|
-
assert curve_dialog.widget.ui.x_name.isEnabled() == True
|
367
|
-
assert curve_dialog.widget.ui.x_entry.isEnabled() == True
|
368
|
-
assert curve_dialog.widget.ui.x_name.text() == "samx"
|
369
|
-
assert curve_dialog.widget.ui.x_entry.text() == "samx"
|
370
|
-
|
371
|
-
curve_dialog.accept()
|
372
|
-
qtbot.wait(200)
|
373
|
-
|
374
|
-
assert list(waveform_widget.waveform._curves_data["scan_segment"].keys()) == ["bpm4i-bpm4i"]
|
375
|
-
assert len(waveform_widget.curves) == 2
|
376
|
-
|
377
|
-
|
378
|
-
###################################
|
379
|
-
# Axis Dialog Tests
|
380
|
-
###################################
|
381
|
-
|
382
|
-
|
383
|
-
def show_axis_dialog(qtbot, waveform_widget):
|
384
|
-
axis_dialog = SettingsDialog(
|
385
|
-
waveform_widget,
|
386
|
-
settings_widget=AxisSettings(),
|
387
|
-
window_title="Axis Settings",
|
388
|
-
config=waveform_widget._config_dict["axis"],
|
389
|
-
)
|
390
|
-
qtbot.addWidget(axis_dialog)
|
391
|
-
qtbot.waitExposed(axis_dialog)
|
392
|
-
return axis_dialog
|
393
|
-
|
394
|
-
|
395
|
-
def test_axis_dialog_with_axis_limits(qtbot, waveform_widget):
|
396
|
-
waveform_widget.set(
|
397
|
-
title="Test Title",
|
398
|
-
x_label="X Label",
|
399
|
-
y_label="Y Label",
|
400
|
-
x_scale="linear",
|
401
|
-
y_scale="log",
|
402
|
-
x_lim=(0, 10),
|
403
|
-
y_lim=(0, 10),
|
404
|
-
)
|
405
|
-
|
406
|
-
axis_dialog = show_axis_dialog(qtbot, waveform_widget)
|
407
|
-
|
408
|
-
assert axis_dialog is not None
|
409
|
-
assert axis_dialog.widget.ui.plot_title.text() == "Test Title"
|
410
|
-
assert axis_dialog.widget.ui.x_label.text() == "X Label"
|
411
|
-
assert axis_dialog.widget.ui.y_label.text() == "Y Label"
|
412
|
-
assert axis_dialog.widget.ui.x_scale.currentText() == "linear"
|
413
|
-
assert axis_dialog.widget.ui.y_scale.currentText() == "log"
|
414
|
-
assert axis_dialog.widget.ui.x_min.value() == 0
|
415
|
-
assert axis_dialog.widget.ui.x_max.value() == 10
|
416
|
-
assert axis_dialog.widget.ui.y_min.value() == 0
|
417
|
-
assert axis_dialog.widget.ui.y_max.value() == 10
|
418
|
-
|
419
|
-
|
420
|
-
def test_axis_dialog_without_axis_limits(qtbot, waveform_widget):
|
421
|
-
waveform_widget.set(
|
422
|
-
title="Test Title", x_label="X Label", y_label="Y Label", x_scale="linear", y_scale="log"
|
423
|
-
)
|
424
|
-
x_range = waveform_widget.fig.widget_list[0].plot_item.viewRange()[0]
|
425
|
-
y_range = waveform_widget.fig.widget_list[0].plot_item.viewRange()[1]
|
426
|
-
|
427
|
-
axis_dialog = show_axis_dialog(qtbot, waveform_widget)
|
428
|
-
|
429
|
-
assert axis_dialog is not None
|
430
|
-
assert axis_dialog.widget.ui.plot_title.text() == "Test Title"
|
431
|
-
assert axis_dialog.widget.ui.x_label.text() == "X Label"
|
432
|
-
assert axis_dialog.widget.ui.y_label.text() == "Y Label"
|
433
|
-
assert axis_dialog.widget.ui.x_scale.currentText() == "linear"
|
434
|
-
assert axis_dialog.widget.ui.y_scale.currentText() == "log"
|
435
|
-
assert axis_dialog.widget.ui.x_min.value() == x_range[0]
|
436
|
-
assert axis_dialog.widget.ui.x_max.value() == x_range[1]
|
437
|
-
assert axis_dialog.widget.ui.y_min.value() == y_range[0]
|
438
|
-
assert axis_dialog.widget.ui.y_max.value() == y_range[1]
|
439
|
-
|
440
|
-
|
441
|
-
def test_axis_dialog_set_properties(qtbot, waveform_widget):
|
442
|
-
axis_dialog = show_axis_dialog(qtbot, waveform_widget)
|
443
|
-
|
444
|
-
axis_dialog.widget.ui.plot_title.setText("New Title")
|
445
|
-
axis_dialog.widget.ui.x_label.setText("New X Label")
|
446
|
-
axis_dialog.widget.ui.y_label.setText("New Y Label")
|
447
|
-
axis_dialog.widget.ui.x_scale.setCurrentText("log")
|
448
|
-
axis_dialog.widget.ui.y_scale.setCurrentText("linear")
|
449
|
-
axis_dialog.widget.ui.x_min.setValue(5)
|
450
|
-
axis_dialog.widget.ui.x_max.setValue(15)
|
451
|
-
axis_dialog.widget.ui.y_min.setValue(5)
|
452
|
-
axis_dialog.widget.ui.y_max.setValue(15)
|
453
|
-
|
454
|
-
axis_dialog.accept()
|
455
|
-
|
456
|
-
assert waveform_widget._config_dict["axis"]["title"] == "New Title"
|
457
|
-
assert waveform_widget._config_dict["axis"]["x_label"] == "New X Label"
|
458
|
-
assert waveform_widget._config_dict["axis"]["y_label"] == "New Y Label"
|
459
|
-
assert waveform_widget._config_dict["axis"]["x_scale"] == "log"
|
460
|
-
assert waveform_widget._config_dict["axis"]["y_scale"] == "linear"
|
461
|
-
assert waveform_widget._config_dict["axis"]["x_lim"] == (5, 15)
|
462
|
-
assert waveform_widget._config_dict["axis"]["y_lim"] == (5, 15)
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import pytest
|
2
|
-
from qtpy.QtCore import QUrl
|
3
|
-
|
4
|
-
from bec_widgets.widgets.website.website import WebsiteWidget
|
5
|
-
|
6
|
-
from .client_mocks import mocked_client
|
7
|
-
|
8
|
-
|
9
|
-
@pytest.fixture
|
10
|
-
def website_widget(qtbot, mocked_client):
|
11
|
-
widget = WebsiteWidget(client=mocked_client)
|
12
|
-
qtbot.addWidget(widget)
|
13
|
-
qtbot.waitExposed(widget)
|
14
|
-
yield widget
|
15
|
-
|
16
|
-
|
17
|
-
def test_website_widget_set_url(website_widget):
|
18
|
-
website_widget.set_url("https://scilog.psi.ch")
|
19
|
-
assert website_widget.url() == QUrl("https://scilog.psi.ch")
|
20
|
-
|
21
|
-
website_widget.set_url(None)
|
22
|
-
assert website_widget.url() == QUrl("https://scilog.psi.ch")
|
23
|
-
|
24
|
-
website_widget.set_url("https://google.com")
|
25
|
-
assert website_widget.get_url() == "https://google.com"
|
@@ -1,90 +0,0 @@
|
|
1
|
-
# pylint: disable = no-name-in-module,missing-class-docstring, missing-module-docstring
|
2
|
-
import pytest
|
3
|
-
from qtpy.QtWidgets import QComboBox, QLineEdit, QSpinBox, QTableWidget, QVBoxLayout, QWidget
|
4
|
-
|
5
|
-
from bec_widgets.utils.widget_io import WidgetHierarchy
|
6
|
-
|
7
|
-
|
8
|
-
@pytest.fixture(scope="function")
|
9
|
-
def example_widget(qtbot):
|
10
|
-
# Create a widget with a few child widgets
|
11
|
-
main_widget = QWidget()
|
12
|
-
layout = QVBoxLayout(main_widget)
|
13
|
-
line_edit = QLineEdit(main_widget)
|
14
|
-
combo_box = QComboBox(main_widget)
|
15
|
-
table_widget = QTableWidget(2, 2, main_widget)
|
16
|
-
spin_box = QSpinBox(main_widget)
|
17
|
-
layout.addWidget(line_edit)
|
18
|
-
layout.addWidget(combo_box)
|
19
|
-
layout.addWidget(table_widget)
|
20
|
-
layout.addWidget(spin_box)
|
21
|
-
|
22
|
-
# Add text items to the combo box
|
23
|
-
combo_box.addItems(["Option 1", "Option 2", "Option 3"])
|
24
|
-
|
25
|
-
qtbot.addWidget(main_widget)
|
26
|
-
qtbot.waitExposed(main_widget)
|
27
|
-
yield main_widget
|
28
|
-
|
29
|
-
|
30
|
-
def test_export_import_config(example_widget):
|
31
|
-
initial_config = {
|
32
|
-
"QWidget ()": {
|
33
|
-
"QLineEdit ()": {"value": "New Text"},
|
34
|
-
"QComboBox ()": {"value": 1},
|
35
|
-
"QTableWidget ()": {"value": [["a", "b"], ["c", "d"]]},
|
36
|
-
"QSpinBox ()": {"value": 10},
|
37
|
-
}
|
38
|
-
}
|
39
|
-
WidgetHierarchy.import_config_from_dict(example_widget, initial_config, set_values=True)
|
40
|
-
|
41
|
-
exported_config_full = WidgetHierarchy.export_config_to_dict(example_widget, grab_values=True)
|
42
|
-
exported_config_reduced = WidgetHierarchy.export_config_to_dict(
|
43
|
-
example_widget, grab_values=True, save_all=False
|
44
|
-
)
|
45
|
-
|
46
|
-
expected_full = {
|
47
|
-
"QWidget ()": {
|
48
|
-
"QVBoxLayout ()": {},
|
49
|
-
"QLineEdit ()": {"value": "New Text", "QObject ()": {}},
|
50
|
-
"QComboBox ()": {"value": 1, "QStandardItemModel ()": {}},
|
51
|
-
"QTableWidget ()": {
|
52
|
-
"value": [["a", "b"], ["c", "d"]],
|
53
|
-
"QWidget (qt_scrollarea_viewport)": {},
|
54
|
-
"QStyledItemDelegate ()": {},
|
55
|
-
"QHeaderView ()": {
|
56
|
-
"QWidget (qt_scrollarea_viewport)": {},
|
57
|
-
"QWidget (qt_scrollarea_hcontainer)": {
|
58
|
-
"QScrollBar ()": {},
|
59
|
-
"QBoxLayout ()": {},
|
60
|
-
},
|
61
|
-
"QWidget (qt_scrollarea_vcontainer)": {
|
62
|
-
"QScrollBar ()": {},
|
63
|
-
"QBoxLayout ()": {},
|
64
|
-
},
|
65
|
-
"QItemSelectionModel ()": {},
|
66
|
-
},
|
67
|
-
"QAbstractButton ()": {},
|
68
|
-
"QAbstractTableModel ()": {},
|
69
|
-
"QItemSelectionModel ()": {},
|
70
|
-
"QWidget (qt_scrollarea_hcontainer)": {"QScrollBar ()": {}, "QBoxLayout ()": {}},
|
71
|
-
"QWidget (qt_scrollarea_vcontainer)": {"QScrollBar ()": {}, "QBoxLayout ()": {}},
|
72
|
-
},
|
73
|
-
"QSpinBox ()": {
|
74
|
-
"value": 10,
|
75
|
-
"QLineEdit (qt_spinbox_lineedit)": {"value": "10", "QObject ()": {}},
|
76
|
-
"QValidator (qt_spinboxvalidator)": {},
|
77
|
-
},
|
78
|
-
}
|
79
|
-
}
|
80
|
-
expected_reduced = {
|
81
|
-
"QWidget ()": {
|
82
|
-
"QLineEdit ()": {"value": "New Text"},
|
83
|
-
"QComboBox ()": {"value": 1},
|
84
|
-
"QTableWidget ()": {"value": [["a", "b"], ["c", "d"]]},
|
85
|
-
"QSpinBox ()": {"value": 10, "QLineEdit (qt_spinbox_lineedit)": {"value": "10"}},
|
86
|
-
}
|
87
|
-
}
|
88
|
-
|
89
|
-
assert exported_config_full == expected_full
|
90
|
-
assert exported_config_reduced == expected_reduced
|