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.
Files changed (116) hide show
  1. CHANGELOG.md +50 -52
  2. PKG-INFO +1 -1
  3. bec_widgets/assets/designer_icons/code.png +0 -0
  4. bec_widgets/assets/designer_icons/color_button.png +0 -0
  5. bec_widgets/assets/designer_icons/device_box.png +0 -0
  6. bec_widgets/assets/designer_icons/device_combo_box.png +0 -0
  7. bec_widgets/assets/designer_icons/device_line_edit.png +0 -0
  8. bec_widgets/assets/designer_icons/dock_area.png +0 -0
  9. bec_widgets/assets/designer_icons/games.png +0 -0
  10. bec_widgets/assets/designer_icons/image.png +0 -0
  11. bec_widgets/assets/designer_icons/position_indicator.png +0 -0
  12. bec_widgets/assets/designer_icons/queue.png +0 -0
  13. bec_widgets/assets/designer_icons/ring_progress.png +0 -0
  14. bec_widgets/assets/designer_icons/scan_control.png +0 -0
  15. bec_widgets/assets/designer_icons/spinner.png +0 -0
  16. bec_widgets/assets/designer_icons/status.png +0 -0
  17. bec_widgets/assets/designer_icons/stop.png +0 -0
  18. bec_widgets/assets/designer_icons/text.png +0 -0
  19. bec_widgets/assets/designer_icons/toggle.png +0 -0
  20. bec_widgets/assets/designer_icons/web.png +0 -0
  21. bec_widgets/assets/status_icons/error.svg +3 -0
  22. bec_widgets/assets/status_icons/not_connected.svg +3 -0
  23. bec_widgets/assets/status_icons/refresh.svg +3 -0
  24. bec_widgets/assets/status_icons/running.svg +3 -0
  25. bec_widgets/assets/status_icons/warning.svg +3 -0
  26. bec_widgets/assets/toolbar_icons/attach_all.svg +3 -0
  27. bec_widgets/assets/toolbar_icons/auto_range.svg +1 -1
  28. bec_widgets/assets/toolbar_icons/compare.svg +3 -0
  29. bec_widgets/assets/toolbar_icons/device_box.svg +3 -0
  30. bec_widgets/assets/toolbar_icons/fft.svg +11 -0
  31. bec_widgets/assets/toolbar_icons/image.svg +3 -0
  32. bec_widgets/assets/toolbar_icons/image_autorange.svg +3 -0
  33. bec_widgets/assets/toolbar_icons/line_curve.svg +3 -0
  34. bec_widgets/assets/toolbar_icons/lock_aspect_ratio.svg +3 -0
  35. bec_widgets/assets/toolbar_icons/log_scale.png +0 -0
  36. bec_widgets/assets/toolbar_icons/motor_map.svg +3 -0
  37. bec_widgets/assets/toolbar_icons/progress.svg +3 -0
  38. bec_widgets/assets/toolbar_icons/queue.svg +3 -0
  39. bec_widgets/assets/toolbar_icons/reset_settings.svg +3 -0
  40. bec_widgets/assets/toolbar_icons/restore_state.svg +3 -0
  41. bec_widgets/assets/toolbar_icons/ring_progress.svg +3 -0
  42. bec_widgets/assets/toolbar_icons/rotate_left.svg +3 -0
  43. bec_widgets/assets/toolbar_icons/rotate_right.svg +3 -0
  44. bec_widgets/assets/toolbar_icons/save_state.svg +3 -0
  45. bec_widgets/assets/toolbar_icons/scan_control.svg +3 -0
  46. bec_widgets/assets/toolbar_icons/status.svg +3 -0
  47. bec_widgets/assets/toolbar_icons/terminal.svg +3 -0
  48. bec_widgets/assets/toolbar_icons/transform.svg +3 -0
  49. bec_widgets/assets/toolbar_icons/waveform.svg +3 -0
  50. bec_widgets/cli/client.py +188 -3
  51. bec_widgets/examples/jupyter_console/jupyter_console_window.py +18 -19
  52. bec_widgets/examples/plugin_example_pyside/tictactoeplugin.py +8 -2
  53. bec_widgets/qt_utils/toolbar.py +52 -2
  54. bec_widgets/utils/generate_designer_plugin.py +1 -1
  55. bec_widgets/widgets/bec_queue/bec_queue_plugin.py +7 -2
  56. bec_widgets/widgets/bec_status_box/bec_status_box_plugin.py +7 -2
  57. bec_widgets/widgets/bec_status_box/status_item.py +14 -8
  58. bec_widgets/widgets/color_button/color_button_plugin.py +3 -2
  59. bec_widgets/widgets/device_box/device_box_plugin.py +6 -1
  60. bec_widgets/widgets/device_combobox/{device_combobox_plugin.py → device_combo_box_plugin.py} +5 -3
  61. bec_widgets/widgets/device_combobox/device_combobox.py +0 -1
  62. bec_widgets/widgets/device_combobox/{register_device_combobox.py → register_device_combo_box.py} +1 -1
  63. bec_widgets/widgets/device_line_edit/device_line_edit_plugin.py +5 -3
  64. bec_widgets/widgets/dock/dock.py +5 -2
  65. bec_widgets/widgets/dock/dock_area.py +139 -29
  66. bec_widgets/widgets/dock/dock_area.pyproject +1 -0
  67. bec_widgets/widgets/dock/dock_area_plugin.py +59 -0
  68. bec_widgets/widgets/dock/register_dock_area.py +15 -0
  69. bec_widgets/widgets/figure/figure.py +1 -3
  70. bec_widgets/widgets/figure/plots/axis_settings.ui +86 -100
  71. bec_widgets/widgets/figure/plots/image/image.py +85 -3
  72. bec_widgets/widgets/figure/plots/image/image_item.py +14 -0
  73. bec_widgets/widgets/image/__init__.py +0 -0
  74. bec_widgets/widgets/image/bec_image_widget.pyproject +1 -0
  75. bec_widgets/widgets/image/bec_image_widget_plugin.py +59 -0
  76. bec_widgets/widgets/image/image_widget.py +475 -0
  77. bec_widgets/widgets/image/register_bec_image_widget.py +15 -0
  78. bec_widgets/widgets/position_indicator/__init__.py +0 -0
  79. bec_widgets/widgets/position_indicator/position_indicator_plugin.py +7 -2
  80. bec_widgets/widgets/ring_progress_bar/register_ring_progress_bar.py +15 -0
  81. bec_widgets/widgets/ring_progress_bar/ring_progress_bar.pyproject +1 -0
  82. bec_widgets/widgets/ring_progress_bar/ring_progress_bar_plugin.py +58 -0
  83. bec_widgets/widgets/scan_control/register_scan_control.py +15 -0
  84. bec_widgets/widgets/scan_control/scan_control.pyproject +1 -0
  85. bec_widgets/widgets/scan_control/scan_control_plugin.py +58 -0
  86. bec_widgets/widgets/spinner/spinner_widget_plugin.py +7 -2
  87. bec_widgets/widgets/stop_button/stop_button_plugin.py +5 -3
  88. bec_widgets/widgets/text_box/register_text_box.py +15 -0
  89. bec_widgets/widgets/text_box/text_box.pyproject +1 -0
  90. bec_widgets/widgets/text_box/text_box_plugin.py +58 -0
  91. bec_widgets/widgets/toggle/toggle_switch_plugin.py +7 -2
  92. bec_widgets/widgets/vscode/register_vs_code_editor.py +15 -0
  93. bec_widgets/widgets/vscode/vs_code_editor.pyproject +1 -0
  94. bec_widgets/widgets/vscode/vs_code_editor_plugin.py +59 -0
  95. bec_widgets/widgets/waveform/bec_waveform_widget_plugin.py +1 -1
  96. bec_widgets/widgets/website/register_website_widget.py +15 -0
  97. bec_widgets/widgets/website/website_widget.pyproject +1 -0
  98. bec_widgets/widgets/website/website_widget_plugin.py +58 -0
  99. {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/METADATA +1 -1
  100. {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/RECORD +112 -45
  101. pyproject.toml +1 -1
  102. tests/unit_tests/client_mocks.py +9 -1
  103. tests/unit_tests/test_bec_dock.py +70 -30
  104. tests/unit_tests/test_bec_image_widget.py +218 -0
  105. tests/unit_tests/test_device_input_base.py +1 -1
  106. tests/unit_tests/test_device_input_widgets.py +2 -0
  107. tests/unit_tests/test_waveform_widget.py +1 -1
  108. bec_widgets/widgets/color_button/assets/color_button.png +0 -0
  109. bec_widgets/widgets/device_combobox/assets/device_combobox_icon.png +0 -0
  110. bec_widgets/widgets/device_line_edit/assets/line_edit_icon.png +0 -0
  111. bec_widgets/widgets/stop_button/assets/stop.png +0 -0
  112. /bec_widgets/assets/designer_icons/{BECWaveformWidget.png → waveform.png} +0 -0
  113. /bec_widgets/widgets/device_combobox/{device_combobox.pyproject → device_combo_box.pyproject} +0 -0
  114. {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/WHEEL +0 -0
  115. {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/entry_points.txt +0 -0
  116. {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
- return QIcon()
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 Buttons"
34
+ return "BEC Utils"
32
35
 
33
36
  def icon(self):
34
- current_path = os.path.dirname(__file__)
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
- return QIcon()
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", "BECWaveformWidget.png")
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()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.89.0
3
+ Version: 0.91.0
4
4
  Summary: BEC Widgets
5
5
  Project-URL: Bug Tracker, https://gitlab.psi.ch/bec/bec_widgets/issues
6
6
  Project-URL: Homepage, https://gitlab.psi.ch/bec/bec_widgets