bec-widgets 0.89.0__py3-none-any.whl → 0.91.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.
- CHANGELOG.md +50 -52
- PKG-INFO +1 -1
- bec_widgets/assets/designer_icons/code.png +0 -0
- bec_widgets/assets/designer_icons/color_button.png +0 -0
- bec_widgets/assets/designer_icons/device_box.png +0 -0
- bec_widgets/assets/designer_icons/device_combo_box.png +0 -0
- bec_widgets/assets/designer_icons/device_line_edit.png +0 -0
- bec_widgets/assets/designer_icons/dock_area.png +0 -0
- bec_widgets/assets/designer_icons/games.png +0 -0
- bec_widgets/assets/designer_icons/image.png +0 -0
- bec_widgets/assets/designer_icons/position_indicator.png +0 -0
- bec_widgets/assets/designer_icons/queue.png +0 -0
- bec_widgets/assets/designer_icons/ring_progress.png +0 -0
- bec_widgets/assets/designer_icons/scan_control.png +0 -0
- bec_widgets/assets/designer_icons/spinner.png +0 -0
- bec_widgets/assets/designer_icons/status.png +0 -0
- bec_widgets/assets/designer_icons/stop.png +0 -0
- bec_widgets/assets/designer_icons/text.png +0 -0
- bec_widgets/assets/designer_icons/toggle.png +0 -0
- bec_widgets/assets/designer_icons/web.png +0 -0
- bec_widgets/assets/status_icons/error.svg +3 -0
- bec_widgets/assets/status_icons/not_connected.svg +3 -0
- bec_widgets/assets/status_icons/refresh.svg +3 -0
- bec_widgets/assets/status_icons/running.svg +3 -0
- bec_widgets/assets/status_icons/warning.svg +3 -0
- bec_widgets/assets/toolbar_icons/attach_all.svg +3 -0
- bec_widgets/assets/toolbar_icons/auto_range.svg +1 -1
- bec_widgets/assets/toolbar_icons/compare.svg +3 -0
- bec_widgets/assets/toolbar_icons/device_box.svg +3 -0
- bec_widgets/assets/toolbar_icons/fft.svg +11 -0
- bec_widgets/assets/toolbar_icons/image.svg +3 -0
- bec_widgets/assets/toolbar_icons/image_autorange.svg +3 -0
- bec_widgets/assets/toolbar_icons/line_curve.svg +3 -0
- bec_widgets/assets/toolbar_icons/lock_aspect_ratio.svg +3 -0
- bec_widgets/assets/toolbar_icons/log_scale.png +0 -0
- bec_widgets/assets/toolbar_icons/motor_map.svg +3 -0
- bec_widgets/assets/toolbar_icons/progress.svg +3 -0
- bec_widgets/assets/toolbar_icons/queue.svg +3 -0
- bec_widgets/assets/toolbar_icons/reset_settings.svg +3 -0
- bec_widgets/assets/toolbar_icons/restore_state.svg +3 -0
- bec_widgets/assets/toolbar_icons/ring_progress.svg +3 -0
- bec_widgets/assets/toolbar_icons/rotate_left.svg +3 -0
- bec_widgets/assets/toolbar_icons/rotate_right.svg +3 -0
- bec_widgets/assets/toolbar_icons/save_state.svg +3 -0
- bec_widgets/assets/toolbar_icons/scan_control.svg +3 -0
- bec_widgets/assets/toolbar_icons/status.svg +3 -0
- bec_widgets/assets/toolbar_icons/terminal.svg +3 -0
- bec_widgets/assets/toolbar_icons/transform.svg +3 -0
- bec_widgets/assets/toolbar_icons/waveform.svg +3 -0
- bec_widgets/cli/client.py +188 -3
- bec_widgets/examples/jupyter_console/jupyter_console_window.py +18 -19
- bec_widgets/examples/plugin_example_pyside/tictactoeplugin.py +8 -2
- bec_widgets/qt_utils/toolbar.py +52 -2
- bec_widgets/utils/generate_designer_plugin.py +1 -1
- bec_widgets/widgets/bec_queue/bec_queue_plugin.py +7 -2
- bec_widgets/widgets/bec_status_box/bec_status_box_plugin.py +7 -2
- bec_widgets/widgets/bec_status_box/status_item.py +14 -8
- bec_widgets/widgets/color_button/color_button_plugin.py +3 -2
- bec_widgets/widgets/device_box/device_box_plugin.py +6 -1
- bec_widgets/widgets/device_combobox/{device_combobox_plugin.py → device_combo_box_plugin.py} +5 -3
- bec_widgets/widgets/device_combobox/device_combobox.py +0 -1
- bec_widgets/widgets/device_combobox/{register_device_combobox.py → register_device_combo_box.py} +1 -1
- bec_widgets/widgets/device_line_edit/device_line_edit_plugin.py +5 -3
- bec_widgets/widgets/dock/dock.py +5 -2
- bec_widgets/widgets/dock/dock_area.py +139 -29
- bec_widgets/widgets/dock/dock_area.pyproject +1 -0
- bec_widgets/widgets/dock/dock_area_plugin.py +59 -0
- bec_widgets/widgets/dock/register_dock_area.py +15 -0
- bec_widgets/widgets/figure/figure.py +1 -3
- bec_widgets/widgets/figure/plots/axis_settings.ui +86 -100
- bec_widgets/widgets/figure/plots/image/image.py +85 -3
- bec_widgets/widgets/figure/plots/image/image_item.py +14 -0
- bec_widgets/widgets/image/__init__.py +0 -0
- bec_widgets/widgets/image/bec_image_widget.pyproject +1 -0
- bec_widgets/widgets/image/bec_image_widget_plugin.py +59 -0
- bec_widgets/widgets/image/image_widget.py +475 -0
- bec_widgets/widgets/image/register_bec_image_widget.py +15 -0
- bec_widgets/widgets/position_indicator/__init__.py +0 -0
- bec_widgets/widgets/position_indicator/position_indicator_plugin.py +7 -2
- bec_widgets/widgets/ring_progress_bar/register_ring_progress_bar.py +15 -0
- bec_widgets/widgets/ring_progress_bar/ring_progress_bar.pyproject +1 -0
- bec_widgets/widgets/ring_progress_bar/ring_progress_bar_plugin.py +58 -0
- bec_widgets/widgets/scan_control/register_scan_control.py +15 -0
- bec_widgets/widgets/scan_control/scan_control.pyproject +1 -0
- bec_widgets/widgets/scan_control/scan_control_plugin.py +58 -0
- bec_widgets/widgets/spinner/spinner_widget_plugin.py +7 -2
- bec_widgets/widgets/stop_button/stop_button_plugin.py +5 -3
- bec_widgets/widgets/text_box/register_text_box.py +15 -0
- bec_widgets/widgets/text_box/text_box.pyproject +1 -0
- bec_widgets/widgets/text_box/text_box_plugin.py +58 -0
- bec_widgets/widgets/toggle/toggle_switch_plugin.py +7 -2
- bec_widgets/widgets/vscode/register_vs_code_editor.py +15 -0
- bec_widgets/widgets/vscode/vs_code_editor.pyproject +1 -0
- bec_widgets/widgets/vscode/vs_code_editor_plugin.py +59 -0
- bec_widgets/widgets/waveform/bec_waveform_widget_plugin.py +1 -1
- bec_widgets/widgets/website/register_website_widget.py +15 -0
- bec_widgets/widgets/website/website_widget.pyproject +1 -0
- bec_widgets/widgets/website/website_widget_plugin.py +58 -0
- {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/METADATA +1 -1
- {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/RECORD +112 -45
- pyproject.toml +1 -1
- tests/unit_tests/client_mocks.py +9 -1
- tests/unit_tests/test_bec_dock.py +70 -30
- tests/unit_tests/test_bec_image_widget.py +218 -0
- tests/unit_tests/test_device_input_base.py +1 -1
- tests/unit_tests/test_device_input_widgets.py +2 -0
- tests/unit_tests/test_waveform_widget.py +1 -1
- bec_widgets/widgets/color_button/assets/color_button.png +0 -0
- bec_widgets/widgets/device_combobox/assets/device_combobox_icon.png +0 -0
- bec_widgets/widgets/device_line_edit/assets/line_edit_icon.png +0 -0
- bec_widgets/widgets/stop_button/assets/stop.png +0 -0
- /bec_widgets/assets/designer_icons/{BECWaveformWidget.png → waveform.png} +0 -0
- /bec_widgets/widgets/device_combobox/{device_combobox.pyproject → device_combo_box.pyproject} +0 -0
- {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/WHEEL +0 -0
- {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/entry_points.txt +0 -0
- {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,9 +1,11 @@
|
|
1
1
|
# Copyright (C) 2022 The Qt Company Ltd.
|
2
2
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
|
+
import os
|
3
4
|
|
4
5
|
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
5
6
|
from qtpy.QtGui import QIcon
|
6
7
|
|
8
|
+
import bec_widgets
|
7
9
|
from bec_widgets.widgets.spinner.spinner import SpinnerWidget
|
8
10
|
|
9
11
|
DOM_XML = """
|
@@ -13,6 +15,8 @@ DOM_XML = """
|
|
13
15
|
</ui>
|
14
16
|
"""
|
15
17
|
|
18
|
+
MODULE_PATH = os.path.dirname(bec_widgets.__file__)
|
19
|
+
|
16
20
|
|
17
21
|
class SpinnerWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
18
22
|
def __init__(self):
|
@@ -27,10 +31,11 @@ class SpinnerWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
27
31
|
return DOM_XML
|
28
32
|
|
29
33
|
def group(self):
|
30
|
-
return ""
|
34
|
+
return "BEC Utils"
|
31
35
|
|
32
36
|
def icon(self):
|
33
|
-
|
37
|
+
icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "spinner.png")
|
38
|
+
return QIcon(icon_path)
|
34
39
|
|
35
40
|
def includeFile(self):
|
36
41
|
return "spinner_widget"
|
@@ -5,6 +5,7 @@ import os
|
|
5
5
|
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
6
6
|
from qtpy.QtGui import QIcon
|
7
7
|
|
8
|
+
import bec_widgets
|
8
9
|
from bec_widgets.widgets.stop_button.stop_button import StopButton
|
9
10
|
|
10
11
|
DOM_XML = """
|
@@ -14,6 +15,8 @@ DOM_XML = """
|
|
14
15
|
</ui>
|
15
16
|
"""
|
16
17
|
|
18
|
+
MODULE_PATH = os.path.dirname(bec_widgets.__file__)
|
19
|
+
|
17
20
|
|
18
21
|
class StopButtonPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
19
22
|
def __init__(self):
|
@@ -28,11 +31,10 @@ class StopButtonPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
28
31
|
return DOM_XML
|
29
32
|
|
30
33
|
def group(self):
|
31
|
-
return "BEC
|
34
|
+
return "BEC Utils"
|
32
35
|
|
33
36
|
def icon(self):
|
34
|
-
|
35
|
-
icon_path = os.path.join(current_path, "assets", "stop.png")
|
37
|
+
icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "stop.png")
|
36
38
|
return QIcon(icon_path)
|
37
39
|
|
38
40
|
def includeFile(self):
|
@@ -0,0 +1,15 @@
|
|
1
|
+
def main(): # pragma: no cover
|
2
|
+
from qtpy import PYSIDE6
|
3
|
+
|
4
|
+
if not PYSIDE6:
|
5
|
+
print("PYSIDE6 is not available in the environment. Cannot patch designer.")
|
6
|
+
return
|
7
|
+
from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
|
8
|
+
|
9
|
+
from bec_widgets.widgets.text_box.text_box_plugin import TextBoxPlugin
|
10
|
+
|
11
|
+
QPyDesignerCustomWidgetCollection.addCustomWidget(TextBoxPlugin())
|
12
|
+
|
13
|
+
|
14
|
+
if __name__ == "__main__": # pragma: no cover
|
15
|
+
main()
|
@@ -0,0 +1 @@
|
|
1
|
+
{'files': ['text_box.py']}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Copyright (C) 2022 The Qt Company Ltd.
|
2
|
+
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
|
+
import os
|
4
|
+
|
5
|
+
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
6
|
+
from qtpy.QtGui import QIcon
|
7
|
+
|
8
|
+
import bec_widgets
|
9
|
+
from bec_widgets.widgets.text_box.text_box import TextBox
|
10
|
+
|
11
|
+
DOM_XML = """
|
12
|
+
<ui language='c++'>
|
13
|
+
<widget class='TextBox' name='text_box'>
|
14
|
+
</widget>
|
15
|
+
</ui>
|
16
|
+
"""
|
17
|
+
MODULE_PATH = os.path.dirname(bec_widgets.__file__)
|
18
|
+
|
19
|
+
|
20
|
+
class TextBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
21
|
+
def __init__(self):
|
22
|
+
super().__init__()
|
23
|
+
self._form_editor = None
|
24
|
+
|
25
|
+
def createWidget(self, parent):
|
26
|
+
t = TextBox(parent)
|
27
|
+
return t
|
28
|
+
|
29
|
+
def domXml(self):
|
30
|
+
return DOM_XML
|
31
|
+
|
32
|
+
def group(self):
|
33
|
+
return "BEC Utils"
|
34
|
+
|
35
|
+
def icon(self):
|
36
|
+
icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "text.png")
|
37
|
+
return QIcon(icon_path)
|
38
|
+
|
39
|
+
def includeFile(self):
|
40
|
+
return "text_box"
|
41
|
+
|
42
|
+
def initialize(self, form_editor):
|
43
|
+
self._form_editor = form_editor
|
44
|
+
|
45
|
+
def isContainer(self):
|
46
|
+
return False
|
47
|
+
|
48
|
+
def isInitialized(self):
|
49
|
+
return self._form_editor is not None
|
50
|
+
|
51
|
+
def name(self):
|
52
|
+
return "TextBox"
|
53
|
+
|
54
|
+
def toolTip(self):
|
55
|
+
return "TextBox"
|
56
|
+
|
57
|
+
def whatsThis(self):
|
58
|
+
return self.toolTip()
|
@@ -1,9 +1,11 @@
|
|
1
1
|
# Copyright (C) 2022 The Qt Company Ltd.
|
2
2
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
|
+
import os
|
3
4
|
|
4
5
|
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
5
6
|
from qtpy.QtGui import QIcon
|
6
7
|
|
8
|
+
import bec_widgets
|
7
9
|
from bec_widgets.widgets.toggle.toggle import ToggleSwitch
|
8
10
|
|
9
11
|
DOM_XML = """
|
@@ -13,6 +15,8 @@ DOM_XML = """
|
|
13
15
|
</ui>
|
14
16
|
"""
|
15
17
|
|
18
|
+
MODULE_PATH = os.path.dirname(bec_widgets.__file__)
|
19
|
+
|
16
20
|
|
17
21
|
class ToggleSwitchPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
18
22
|
def __init__(self):
|
@@ -27,10 +31,11 @@ class ToggleSwitchPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
|
27
31
|
return DOM_XML
|
28
32
|
|
29
33
|
def group(self):
|
30
|
-
return ""
|
34
|
+
return "BEC Utils"
|
31
35
|
|
32
36
|
def icon(self):
|
33
|
-
|
37
|
+
icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "toggle.png")
|
38
|
+
return QIcon(icon_path)
|
34
39
|
|
35
40
|
def includeFile(self):
|
36
41
|
return "toggle_switch"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
def main(): # pragma: no cover
|
2
|
+
from qtpy import PYSIDE6
|
3
|
+
|
4
|
+
if not PYSIDE6:
|
5
|
+
print("PYSIDE6 is not available in the environment. Cannot patch designer.")
|
6
|
+
return
|
7
|
+
from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
|
8
|
+
|
9
|
+
from bec_widgets.widgets.vscode.vs_code_editor_plugin import VSCodeEditorPlugin
|
10
|
+
|
11
|
+
QPyDesignerCustomWidgetCollection.addCustomWidget(VSCodeEditorPlugin())
|
12
|
+
|
13
|
+
|
14
|
+
if __name__ == "__main__": # pragma: no cover
|
15
|
+
main()
|
@@ -0,0 +1 @@
|
|
1
|
+
{'files': ['vscode.py']}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Copyright (C) 2022 The Qt Company Ltd.
|
2
|
+
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
|
+
import os
|
4
|
+
|
5
|
+
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
6
|
+
from qtpy.QtGui import QIcon
|
7
|
+
|
8
|
+
import bec_widgets
|
9
|
+
from bec_widgets.widgets.vscode.vscode import VSCodeEditor
|
10
|
+
|
11
|
+
DOM_XML = """
|
12
|
+
<ui language='c++'>
|
13
|
+
<widget class='VSCodeEditor' name='vs_code_editor'>
|
14
|
+
</widget>
|
15
|
+
</ui>
|
16
|
+
"""
|
17
|
+
|
18
|
+
MODULE_PATH = os.path.dirname(bec_widgets.__file__)
|
19
|
+
|
20
|
+
|
21
|
+
class VSCodeEditorPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
22
|
+
def __init__(self):
|
23
|
+
super().__init__()
|
24
|
+
self._form_editor = None
|
25
|
+
|
26
|
+
def createWidget(self, parent):
|
27
|
+
t = VSCodeEditor(parent)
|
28
|
+
return t
|
29
|
+
|
30
|
+
def domXml(self):
|
31
|
+
return DOM_XML
|
32
|
+
|
33
|
+
def group(self):
|
34
|
+
return "BEC Developer"
|
35
|
+
|
36
|
+
def icon(self):
|
37
|
+
icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "code.png")
|
38
|
+
return QIcon(icon_path)
|
39
|
+
|
40
|
+
def includeFile(self):
|
41
|
+
return "vs_code_editor"
|
42
|
+
|
43
|
+
def initialize(self, form_editor):
|
44
|
+
self._form_editor = form_editor
|
45
|
+
|
46
|
+
def isContainer(self):
|
47
|
+
return False
|
48
|
+
|
49
|
+
def isInitialized(self):
|
50
|
+
return self._form_editor is not None
|
51
|
+
|
52
|
+
def name(self):
|
53
|
+
return "VSCodeEditor"
|
54
|
+
|
55
|
+
def toolTip(self):
|
56
|
+
return ""
|
57
|
+
|
58
|
+
def whatsThis(self):
|
59
|
+
return self.toolTip()
|
@@ -34,7 +34,7 @@ class BECWaveformWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cov
|
|
34
34
|
return "BEC Plots"
|
35
35
|
|
36
36
|
def icon(self):
|
37
|
-
icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "
|
37
|
+
icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "waveform.png")
|
38
38
|
return QIcon(icon_path)
|
39
39
|
|
40
40
|
def includeFile(self):
|
@@ -0,0 +1,15 @@
|
|
1
|
+
def main(): # pragma: no cover
|
2
|
+
from qtpy import PYSIDE6
|
3
|
+
|
4
|
+
if not PYSIDE6:
|
5
|
+
print("PYSIDE6 is not available in the environment. Cannot patch designer.")
|
6
|
+
return
|
7
|
+
from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
|
8
|
+
|
9
|
+
from bec_widgets.widgets.website.website_widget_plugin import WebsiteWidgetPlugin
|
10
|
+
|
11
|
+
QPyDesignerCustomWidgetCollection.addCustomWidget(WebsiteWidgetPlugin())
|
12
|
+
|
13
|
+
|
14
|
+
if __name__ == "__main__": # pragma: no cover
|
15
|
+
main()
|
@@ -0,0 +1 @@
|
|
1
|
+
{'files': ['website.py']}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Copyright (C) 2022 The Qt Company Ltd.
|
2
|
+
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
|
+
import os
|
4
|
+
|
5
|
+
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
6
|
+
from qtpy.QtGui import QIcon
|
7
|
+
|
8
|
+
import bec_widgets
|
9
|
+
from bec_widgets.widgets.website.website import WebsiteWidget
|
10
|
+
|
11
|
+
DOM_XML = """
|
12
|
+
<ui language='c++'>
|
13
|
+
<widget class='WebsiteWidget' name='website_widget'>
|
14
|
+
</widget>
|
15
|
+
</ui>
|
16
|
+
"""
|
17
|
+
MODULE_PATH = os.path.dirname(bec_widgets.__file__)
|
18
|
+
|
19
|
+
|
20
|
+
class WebsiteWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
21
|
+
def __init__(self):
|
22
|
+
super().__init__()
|
23
|
+
self._form_editor = None
|
24
|
+
|
25
|
+
def createWidget(self, parent):
|
26
|
+
t = WebsiteWidget(parent)
|
27
|
+
return t
|
28
|
+
|
29
|
+
def domXml(self):
|
30
|
+
return DOM_XML
|
31
|
+
|
32
|
+
def group(self):
|
33
|
+
return "BEC Utils"
|
34
|
+
|
35
|
+
def icon(self):
|
36
|
+
icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "web.png")
|
37
|
+
return QIcon(icon_path)
|
38
|
+
|
39
|
+
def includeFile(self):
|
40
|
+
return "website_widget"
|
41
|
+
|
42
|
+
def initialize(self, form_editor):
|
43
|
+
self._form_editor = form_editor
|
44
|
+
|
45
|
+
def isContainer(self):
|
46
|
+
return False
|
47
|
+
|
48
|
+
def isInitialized(self):
|
49
|
+
return self._form_editor is not None
|
50
|
+
|
51
|
+
def name(self):
|
52
|
+
return "WebsiteWidget"
|
53
|
+
|
54
|
+
def toolTip(self):
|
55
|
+
return ""
|
56
|
+
|
57
|
+
def whatsThis(self):
|
58
|
+
return self.toolTip()
|