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
bec_widgets/widgets/dock/dock.py
CHANGED
@@ -7,7 +7,7 @@ from pydantic import Field
|
|
7
7
|
from pyqtgraph.dockarea.DockArea import DockArea
|
8
8
|
from qtpy.QtCore import Qt
|
9
9
|
from qtpy.QtGui import QPainter, QPaintEvent
|
10
|
-
from qtpy.QtWidgets import QVBoxLayout, QWidget
|
10
|
+
from qtpy.QtWidgets import QSizePolicy, QVBoxLayout, QWidget
|
11
11
|
|
12
12
|
from bec_widgets.qt_utils.error_popups import SafeSlot
|
13
13
|
from bec_widgets.qt_utils.toolbar import (
|
@@ -18,7 +18,17 @@ from bec_widgets.qt_utils.toolbar import (
|
|
18
18
|
)
|
19
19
|
from bec_widgets.utils import ConnectionConfig, WidgetContainerUtils
|
20
20
|
from bec_widgets.utils.bec_widget import BECWidget
|
21
|
+
from bec_widgets.widgets.bec_queue.bec_queue import BECQueue
|
22
|
+
from bec_widgets.widgets.bec_status_box.bec_status_box import BECStatusBox
|
23
|
+
from bec_widgets.widgets.dark_mode_button.dark_mode_button import DarkModeButton
|
21
24
|
from bec_widgets.widgets.dock.dock import BECDock, DockConfig
|
25
|
+
from bec_widgets.widgets.image.image_widget import BECImageWidget
|
26
|
+
from bec_widgets.widgets.motor_map.motor_map_widget import BECMotorMapWidget
|
27
|
+
from bec_widgets.widgets.positioner_box.positioner_box import PositionerBox
|
28
|
+
from bec_widgets.widgets.ring_progress_bar.ring_progress_bar import RingProgressBar
|
29
|
+
from bec_widgets.widgets.scan_control.scan_control import ScanControl
|
30
|
+
from bec_widgets.widgets.vscode.vscode import VSCodeEditor
|
31
|
+
from bec_widgets.widgets.waveform.waveform_widget import BECWaveformWidget
|
22
32
|
|
23
33
|
|
24
34
|
class DockAreaConfig(ConnectionConfig):
|
@@ -71,13 +81,17 @@ class BECDockArea(BECWidget, QWidget):
|
|
71
81
|
label="Add Plot ",
|
72
82
|
actions={
|
73
83
|
"waveform": MaterialIconAction(
|
74
|
-
icon_name=
|
84
|
+
icon_name=BECWaveformWidget.ICON_NAME,
|
85
|
+
tooltip="Add Waveform",
|
86
|
+
filled=True,
|
75
87
|
),
|
76
88
|
"image": MaterialIconAction(
|
77
|
-
icon_name=
|
89
|
+
icon_name=BECImageWidget.ICON_NAME, tooltip="Add Image", filled=True
|
78
90
|
),
|
79
91
|
"motor_map": MaterialIconAction(
|
80
|
-
icon_name=
|
92
|
+
icon_name=BECMotorMapWidget.ICON_NAME,
|
93
|
+
tooltip="Add Motor Map",
|
94
|
+
filled=True,
|
81
95
|
),
|
82
96
|
},
|
83
97
|
),
|
@@ -86,10 +100,10 @@ class BECDockArea(BECWidget, QWidget):
|
|
86
100
|
label="Add Device Control ",
|
87
101
|
actions={
|
88
102
|
"scan_control": MaterialIconAction(
|
89
|
-
icon_name=
|
103
|
+
icon_name=ScanControl.ICON_NAME, tooltip="Add Scan Control", filled=True
|
90
104
|
),
|
91
105
|
"positioner_box": MaterialIconAction(
|
92
|
-
icon_name=
|
106
|
+
icon_name=PositionerBox.ICON_NAME, tooltip="Add Device Box", filled=True
|
93
107
|
),
|
94
108
|
},
|
95
109
|
),
|
@@ -98,16 +112,18 @@ class BECDockArea(BECWidget, QWidget):
|
|
98
112
|
label="Add Utils ",
|
99
113
|
actions={
|
100
114
|
"queue": MaterialIconAction(
|
101
|
-
icon_name=
|
115
|
+
icon_name=BECQueue.ICON_NAME, tooltip="Add Scan Queue", filled=True
|
102
116
|
),
|
103
117
|
"vs_code": MaterialIconAction(
|
104
|
-
icon_name=
|
118
|
+
icon_name=VSCodeEditor.ICON_NAME, tooltip="Add VS Code", filled=True
|
105
119
|
),
|
106
120
|
"status": MaterialIconAction(
|
107
|
-
icon_name=
|
121
|
+
icon_name=BECStatusBox.ICON_NAME,
|
122
|
+
tooltip="Add BEC Status Box",
|
123
|
+
filled=True,
|
108
124
|
),
|
109
125
|
"progress_bar": MaterialIconAction(
|
110
|
-
icon_name=
|
126
|
+
icon_name=RingProgressBar.ICON_NAME,
|
111
127
|
tooltip="Add Circular ProgressBar",
|
112
128
|
filled=True,
|
113
129
|
),
|
@@ -127,6 +143,10 @@ class BECDockArea(BECWidget, QWidget):
|
|
127
143
|
|
128
144
|
self.layout.addWidget(self.toolbar)
|
129
145
|
self.layout.addWidget(self.dock_area)
|
146
|
+
self.spacer = QWidget()
|
147
|
+
self.spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
|
148
|
+
self.toolbar.addWidget(self.spacer)
|
149
|
+
self.toolbar.addWidget(DarkModeButton(toolbar=True))
|
130
150
|
self._hook_toolbar()
|
131
151
|
|
132
152
|
def _hook_toolbar(self):
|
@@ -34,7 +34,7 @@ class BECDockAreaPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
34
34
|
return "BEC Plots"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
return designer_material_icon(
|
37
|
+
return designer_material_icon(BECDockArea.ICON_NAME)
|
38
38
|
|
39
39
|
def includeFile(self):
|
40
40
|
return "dock_area"
|
@@ -252,7 +252,7 @@ class BECFigure(BECWidget, pg.GraphicsLayoutWidget):
|
|
252
252
|
y_entry: str | None = None,
|
253
253
|
z_entry: str | None = None,
|
254
254
|
color: str | None = None,
|
255
|
-
color_map_z: str | None = "
|
255
|
+
color_map_z: str | None = "magma",
|
256
256
|
label: str | None = None,
|
257
257
|
validate: bool = True,
|
258
258
|
new: bool = False,
|
@@ -26,7 +26,7 @@ from bec_widgets.widgets.figure.plots.waveform.waveform_curve import (
|
|
26
26
|
|
27
27
|
class Waveform1DConfig(SubplotConfig):
|
28
28
|
color_palette: Optional[str] = Field(
|
29
|
-
"
|
29
|
+
"magma", description="The color palette of the figure widget.", validate_default=True
|
30
30
|
)
|
31
31
|
curves: dict[str, CurveConfig] = Field(
|
32
32
|
{}, description="The list of curves to be added to the 1D waveform widget."
|
@@ -269,7 +269,7 @@ class BECWaveform(BECPlotBase):
|
|
269
269
|
y_entry: str | None = None,
|
270
270
|
z_entry: str | None = None,
|
271
271
|
color: str | None = None,
|
272
|
-
color_map_z: str | None = "
|
272
|
+
color_map_z: str | None = "magma",
|
273
273
|
label: str | None = None,
|
274
274
|
validate: bool = True,
|
275
275
|
dap: str | None = None, # TODO add dap custom curve wrapper
|
@@ -451,8 +451,10 @@ class BECWaveform(BECPlotBase):
|
|
451
451
|
color = (
|
452
452
|
color
|
453
453
|
or Colors.golden_angle_color(
|
454
|
-
colormap=self.config.color_palette,
|
455
|
-
|
454
|
+
colormap=self.config.color_palette,
|
455
|
+
num=max(10, len(self.plot_item.curves) + 1),
|
456
|
+
format="HEX",
|
457
|
+
)[len(self.plot_item.curves)]
|
456
458
|
)
|
457
459
|
|
458
460
|
# Create curve by config
|
@@ -479,7 +481,7 @@ class BECWaveform(BECPlotBase):
|
|
479
481
|
y_entry: str | None = None,
|
480
482
|
z_entry: str | None = None,
|
481
483
|
color: str | None = None,
|
482
|
-
color_map_z: str | None = "
|
484
|
+
color_map_z: str | None = "magma",
|
483
485
|
label: str | None = None,
|
484
486
|
validate_bec: bool = True,
|
485
487
|
dap: str | None = None,
|
@@ -546,9 +548,12 @@ class BECWaveform(BECPlotBase):
|
|
546
548
|
color = (
|
547
549
|
color
|
548
550
|
or Colors.golden_angle_color(
|
549
|
-
colormap=self.config.color_palette,
|
550
|
-
|
551
|
+
colormap=self.config.color_palette,
|
552
|
+
num=max(10, len(self.plot_item.curves) + 1),
|
553
|
+
format="HEX",
|
554
|
+
)[len(self.plot_item.curves)]
|
551
555
|
)
|
556
|
+
print(f"Color: {color}")
|
552
557
|
|
553
558
|
# Create curve by config
|
554
559
|
curve_config = CurveConfig(
|
@@ -44,15 +44,15 @@ class CurveConfig(ConnectionConfig):
|
|
44
44
|
symbol_color: Optional[str | tuple] = Field(
|
45
45
|
None, description="The color of the symbol of the curve."
|
46
46
|
)
|
47
|
-
symbol_size: Optional[int] = Field(
|
48
|
-
pen_width: Optional[int] = Field(
|
47
|
+
symbol_size: Optional[int] = Field(7, description="The size of the symbol of the curve.")
|
48
|
+
pen_width: Optional[int] = Field(4, description="The width of the pen of the curve.")
|
49
49
|
pen_style: Optional[Literal["solid", "dash", "dot", "dashdot"]] = Field(
|
50
50
|
"solid", description="The style of the pen of the curve."
|
51
51
|
)
|
52
52
|
source: Optional[str] = Field(None, description="The source of the curve.")
|
53
53
|
signals: Optional[Signal] = Field(None, description="The signal of the curve.")
|
54
54
|
color_map_z: Optional[str] = Field(
|
55
|
-
"
|
55
|
+
"magma", description="The colormap of the curves z gradient.", validate_default=True
|
56
56
|
)
|
57
57
|
|
58
58
|
model_config: dict = {"validate_assignment": True}
|
@@ -34,7 +34,7 @@ class BECImageWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
34
34
|
return "BEC Plots"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
return designer_material_icon(
|
37
|
+
return designer_material_icon(BECImageWidget.ICON_NAME)
|
38
38
|
|
39
39
|
def includeFile(self):
|
40
40
|
return "bec_image_widget"
|
@@ -32,7 +32,7 @@ class BECMotorMapWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cov
|
|
32
32
|
return "BEC Plots"
|
33
33
|
|
34
34
|
def icon(self):
|
35
|
-
return designer_material_icon(
|
35
|
+
return designer_material_icon(BECMotorMapWidget.ICON_NAME)
|
36
36
|
|
37
37
|
def includeFile(self):
|
38
38
|
return "bec_motor_map_widget"
|
@@ -34,7 +34,7 @@ class PositionIndicatorPlugin(QDesignerCustomWidgetInterface): # pragma: no cov
|
|
34
34
|
return "BEC Utils"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
return designer_material_icon(
|
37
|
+
return designer_material_icon(PositionIndicator.ICON_NAME)
|
38
38
|
|
39
39
|
def includeFile(self):
|
40
40
|
return "position_indicator"
|
@@ -33,7 +33,7 @@ class PositionerBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
33
33
|
return "Device Control"
|
34
34
|
|
35
35
|
def icon(self):
|
36
|
-
return designer_material_icon(
|
36
|
+
return designer_material_icon(PositionerBox.ICON_NAME)
|
37
37
|
|
38
38
|
def includeFile(self):
|
39
39
|
return "positioner_box"
|
@@ -9,6 +9,8 @@ class PositionerControlLine(PositionerBox):
|
|
9
9
|
ui_file = "positioner_control_line.ui"
|
10
10
|
dimensions = (60, 600) # height, width
|
11
11
|
|
12
|
+
ICON_NAME = "switch_left"
|
13
|
+
|
12
14
|
def __init__(self, parent=None, device: Positioner = None, *args, **kwargs):
|
13
15
|
"""Initialize the DeviceControlLine.
|
14
16
|
|
@@ -33,7 +33,7 @@ class PositionerControlLinePlugin(QDesignerCustomWidgetInterface): # pragma: no
|
|
33
33
|
return "Device Control"
|
34
34
|
|
35
35
|
def icon(self):
|
36
|
-
return designer_material_icon(
|
36
|
+
return designer_material_icon(PositionerControlLine.ICON_NAME)
|
37
37
|
|
38
38
|
def includeFile(self):
|
39
39
|
return "positioner_control_line"
|
@@ -33,7 +33,7 @@ class RingProgressBarPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
33
33
|
return "BEC Utils"
|
34
34
|
|
35
35
|
def icon(self):
|
36
|
-
return designer_material_icon(
|
36
|
+
return designer_material_icon(RingProgressBar.ICON_NAME)
|
37
37
|
|
38
38
|
def includeFile(self):
|
39
39
|
return "ring_progress_bar"
|
@@ -1,10 +1,8 @@
|
|
1
1
|
# Copyright (C) 2022 The Qt Company Ltd.
|
2
2
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
|
-
import os
|
4
3
|
|
5
4
|
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
6
5
|
|
7
|
-
import bec_widgets
|
8
6
|
from bec_widgets.utils.bec_designer import designer_material_icon
|
9
7
|
from bec_widgets.widgets.scan_control.scan_control import ScanControl
|
10
8
|
|
@@ -14,7 +12,6 @@ DOM_XML = """
|
|
14
12
|
</widget>
|
15
13
|
</ui>
|
16
14
|
"""
|
17
|
-
MODULE_PATH = os.path.dirname(bec_widgets.__file__)
|
18
15
|
|
19
16
|
|
20
17
|
class ScanControlPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
@@ -33,7 +30,7 @@ class ScanControlPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
33
30
|
return "Device Control"
|
34
31
|
|
35
32
|
def icon(self):
|
36
|
-
return designer_material_icon(
|
33
|
+
return designer_material_icon(ScanControl.ICON_NAME)
|
37
34
|
|
38
35
|
def includeFile(self):
|
39
36
|
return "scan_control"
|
@@ -34,7 +34,7 @@ class SpinnerWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
34
34
|
return "BEC Utils"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
return designer_material_icon(
|
37
|
+
return designer_material_icon(SpinnerWidget.ICON_NAME)
|
38
38
|
|
39
39
|
def includeFile(self):
|
40
40
|
return "spinner_widget"
|
@@ -7,6 +7,8 @@ from bec_widgets.utils.bec_widget import BECWidget
|
|
7
7
|
class StopButton(BECWidget, QPushButton):
|
8
8
|
"""A button that stops the current scan."""
|
9
9
|
|
10
|
+
ICON_NAME = "dangerous"
|
11
|
+
|
10
12
|
def __init__(self, parent=None, client=None, config=None, gui_id=None):
|
11
13
|
super().__init__(client=client, config=config, gui_id=gui_id)
|
12
14
|
QPushButton.__init__(self, parent=parent)
|
@@ -34,7 +34,7 @@ class StopButtonPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
34
34
|
return "BEC Utils"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
return designer_material_icon(
|
37
|
+
return designer_material_icon(StopButton.ICON_NAME)
|
38
38
|
|
39
39
|
def includeFile(self):
|
40
40
|
return "stop_button"
|
@@ -31,6 +31,7 @@ class TextBoxConfig(ConnectionConfig):
|
|
31
31
|
class TextBox(BECWidget, QTextEdit):
|
32
32
|
|
33
33
|
USER_ACCESS = ["set_color", "set_text", "set_font_size"]
|
34
|
+
ICON_NAME = "chat"
|
34
35
|
|
35
36
|
def __init__(self, parent=None, text: str = "", client=None, config=None, gui_id=None):
|
36
37
|
if config is None:
|
@@ -34,7 +34,7 @@ class ToggleSwitchPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
34
34
|
return "BEC Utils"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
return designer_material_icon(
|
37
|
+
return designer_material_icon(ToggleSwitch.ICON_NAME)
|
38
38
|
|
39
39
|
def includeFile(self):
|
40
40
|
return "toggle_switch"
|
@@ -34,7 +34,7 @@ class VSCodeEditorPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
34
34
|
return "BEC Developer"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
return designer_material_icon(
|
37
|
+
return designer_material_icon(VSCodeEditor.ICON_NAME)
|
38
38
|
|
39
39
|
def includeFile(self):
|
40
40
|
return "vs_code_editor"
|
@@ -34,7 +34,7 @@ class BECWaveformWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cov
|
|
34
34
|
return "BEC Plots"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
return designer_material_icon(
|
37
|
+
return designer_material_icon(BECWaveformWidget.ICON_NAME)
|
38
38
|
|
39
39
|
def includeFile(self):
|
40
40
|
return "bec_waveform_widget"
|
@@ -5,8 +5,7 @@ from typing import Literal
|
|
5
5
|
|
6
6
|
from bec_qthemes import material_icon
|
7
7
|
from pydantic import BaseModel
|
8
|
-
from qtpy.QtCore import QObject,
|
9
|
-
from qtpy.QtGui import QIcon
|
8
|
+
from qtpy.QtCore import QObject, Slot
|
10
9
|
from qtpy.QtWidgets import QComboBox, QLineEdit, QPushButton, QSpinBox, QTableWidget, QVBoxLayout
|
11
10
|
|
12
11
|
import bec_widgets
|
@@ -121,10 +120,10 @@ class CurveSettings(SettingWidget):
|
|
121
120
|
cm = self.ui.color_map_selector_dap.combo.currentText()
|
122
121
|
table = self.ui.dap_table
|
123
122
|
rows = table.rowCount()
|
124
|
-
colors = Colors.golden_angle_color(colormap=cm, num=rows + 1, format="HEX")
|
123
|
+
colors = Colors.golden_angle_color(colormap=cm, num=max(10, rows + 1), format="HEX")
|
125
124
|
color_button_col = 2 if target == "scan" else 3
|
126
|
-
for row
|
127
|
-
table.cellWidget(row, color_button_col).setColor(
|
125
|
+
for row in range(rows):
|
126
|
+
table.cellWidget(row, color_button_col).setColor(colors[row])
|
128
127
|
|
129
128
|
@Slot()
|
130
129
|
def accept_changes(self):
|
@@ -251,12 +250,12 @@ class DialogRow(QObject):
|
|
251
250
|
self.width = QSpinBox()
|
252
251
|
self.width.setMinimum(1)
|
253
252
|
self.width.setMaximum(20)
|
254
|
-
self.width.setValue(
|
253
|
+
self.width.setValue(4)
|
255
254
|
|
256
255
|
self.symbol_size = QSpinBox()
|
257
256
|
self.symbol_size.setMinimum(1)
|
258
257
|
self.symbol_size.setMaximum(20)
|
259
|
-
self.symbol_size.setValue(
|
258
|
+
self.symbol_size.setValue(7)
|
260
259
|
|
261
260
|
self.remove_button.clicked.connect(
|
262
261
|
lambda: self.remove_row()
|
@@ -281,9 +280,10 @@ class DialogRow(QObject):
|
|
281
280
|
self.width.setValue(self.config.pen_width)
|
282
281
|
self.symbol_size.setValue(self.config.symbol_size)
|
283
282
|
else:
|
284
|
-
|
285
|
-
colormap="magma", num=self.row + 1, format="HEX"
|
286
|
-
)
|
283
|
+
default_colors = Colors.golden_angle_color(
|
284
|
+
colormap="magma", num=max(10, self.row + 1), format="HEX"
|
285
|
+
)
|
286
|
+
default_color = default_colors[self.row]
|
287
287
|
self.color_button.setColor(default_color)
|
288
288
|
|
289
289
|
self.table_widget.setCellWidget(self.row, 0, self.device_line_edit)
|
@@ -304,9 +304,10 @@ class DialogRow(QObject):
|
|
304
304
|
self.width.setValue(self.config.pen_width)
|
305
305
|
self.symbol_size.setValue(self.config.symbol_size)
|
306
306
|
else:
|
307
|
-
|
308
|
-
colormap="magma", num=self.row + 1, format="HEX"
|
309
|
-
)
|
307
|
+
default_colors = Colors.golden_angle_color(
|
308
|
+
colormap="magma", num=max(10, self.row + 1), format="HEX"
|
309
|
+
)
|
310
|
+
default_color = default_colors[self.row]
|
310
311
|
self.color_button.setColor(default_color)
|
311
312
|
|
312
313
|
self.table_widget.setCellWidget(self.row, 0, self.device_line_edit)
|
@@ -28,6 +28,7 @@ except ImportError:
|
|
28
28
|
|
29
29
|
|
30
30
|
class BECWaveformWidget(BECWidget, QWidget):
|
31
|
+
ICON_NAME = "show_chart"
|
31
32
|
USER_ACCESS = [
|
32
33
|
"curves",
|
33
34
|
"plot",
|
@@ -105,7 +106,7 @@ class BECWaveformWidget(BECWidget, QWidget):
|
|
105
106
|
),
|
106
107
|
"separator_2": SeparatorAction(),
|
107
108
|
"curves": MaterialIconAction(
|
108
|
-
icon_name="
|
109
|
+
icon_name="timeline", tooltip="Open Curves Configuration"
|
109
110
|
),
|
110
111
|
"fit_params": MaterialIconAction(
|
111
112
|
icon_name="monitoring", tooltip="Open Fitting Parameters"
|
@@ -284,7 +285,7 @@ class BECWaveformWidget(BECWidget, QWidget):
|
|
284
285
|
y_entry: str | None = None,
|
285
286
|
z_entry: str | None = None,
|
286
287
|
color: str | None = None,
|
287
|
-
color_map_z: str | None = "
|
288
|
+
color_map_z: str | None = "magma",
|
288
289
|
label: str | None = None,
|
289
290
|
validate: bool = True,
|
290
291
|
dap: str | None = None, # TODO add dap custom curve wrapper
|