bec-widgets 0.93.0__py3-none-any.whl → 0.93.2__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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.93.2 (2024-08-07)
4
+
5
+ ### Fix
6
+
7
+ * fix(scan_group_box): Scan Spinboxes limits increased to max allowed values; setting dialog for step size and decimal precision for ScanDoubleSpinBox on right click ([`a372925`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/a372925fffa787c686198ae7cb3f9c15b459c109))
8
+
9
+ ## v0.93.1 (2024-08-06)
10
+
11
+ ### Documentation
12
+
13
+ * docs: added video tutorial section with BSEG YT video ([`302ae90`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/302ae90139f6a88e2401fe29fe312387486e27a9))
14
+
15
+ ### Fix
16
+
17
+ * fix(dock): docks have more recognizable red icon for closing docks ([`af86860`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/af86860bf35474805fb1a7bc3725cf8835ed4cc7))
18
+
3
19
  ## v0.93.0 (2024-08-05)
4
20
 
5
21
  ### Feature
@@ -131,21 +147,3 @@ This reverts commit fd6ae91993a23a7b8dbb2cf3c4b7c3eda6d2b0f6 ([`5aad401`](https:
131
147
  ### Test
132
148
 
133
149
  * test(image_widget): tests added ([`70fb276`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/70fb276fdf31dffc105435d3dfe7c5caea0b10ce))
134
-
135
- ## v0.89.0 (2024-07-22)
136
-
137
- ### Feature
138
-
139
- * feat(themes): moved themes to bec_qthemes ([`3798714`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/3798714369adf4023f833b7749d2f46a0ec74eee))
140
-
141
- ### Unknown
142
-
143
- * Revert "feat(themes): moved themes to bec_qthemes"
144
-
145
- This reverts commit 3798714369adf4023f833b7749d2f46a0ec74eee ([`fd6ae91`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/fd6ae91993a23a7b8dbb2cf3c4b7c3eda6d2b0f6))
146
-
147
- ## v0.88.1 (2024-07-22)
148
-
149
- ### Refactor
150
-
151
- * refactor(toolbar): generalizations of the ToolBarAction ([`ad112d1`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/ad112d1f08157f6987edd48a0bacf9f669ef1997))
PKG-INFO CHANGED
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.93.0
3
+ Version: 0.93.2
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
@@ -4,6 +4,7 @@ from typing import TYPE_CHECKING, Any, Literal, Optional
4
4
 
5
5
  from pydantic import Field
6
6
  from pyqtgraph.dockarea import Dock, DockLabel
7
+ from qtpy import QtCore, QtGui
7
8
 
8
9
  from bec_widgets.cli.rpc_wigdet_handler import widget_handler
9
10
  from bec_widgets.utils import ConnectionConfig, GridLayoutManager
@@ -12,8 +13,6 @@ from bec_widgets.utils.bec_widget import BECWidget
12
13
  if TYPE_CHECKING:
13
14
  from qtpy.QtWidgets import QWidget
14
15
 
15
- from bec_widgets.widgets.dock import BECDockArea
16
-
17
16
 
18
17
  class DockConfig(ConnectionConfig):
19
18
  widgets: dict[str, Any] = Field({}, description="The widgets in the dock.")
@@ -26,6 +25,23 @@ class DockConfig(ConnectionConfig):
26
25
 
27
26
 
28
27
  class CustomDockLabel(DockLabel):
28
+ def __init__(self, text: str, closable: bool = True):
29
+ super().__init__(text, closable)
30
+ if closable:
31
+ red_icon = QtGui.QIcon()
32
+ pixmap = QtGui.QPixmap(32, 32)
33
+ pixmap.fill(QtCore.Qt.GlobalColor.red)
34
+ painter = QtGui.QPainter(pixmap)
35
+ pen = QtGui.QPen(QtCore.Qt.GlobalColor.white)
36
+ pen.setWidth(2)
37
+ painter.setPen(pen)
38
+ painter.drawLine(8, 8, 24, 24)
39
+ painter.drawLine(24, 8, 8, 24)
40
+ painter.end()
41
+ red_icon.addPixmap(pixmap)
42
+
43
+ self.closeButton.setIcon(red_icon)
44
+
29
45
  def updateStyle(self):
30
46
  r = "3px"
31
47
  if self.dim:
@@ -1,9 +1,13 @@
1
1
  from typing import Literal
2
2
 
3
+ from qtpy.QtCore import Qt
3
4
  from qtpy.QtWidgets import (
4
5
  QCheckBox,
5
6
  QComboBox,
7
+ QDialog,
8
+ QDialogButtonBox,
6
9
  QDoubleSpinBox,
10
+ QFormLayout,
7
11
  QGridLayout,
8
12
  QGroupBox,
9
13
  QLabel,
@@ -25,13 +29,46 @@ class ScanArgType:
25
29
  LITERALS = "dict"
26
30
 
27
31
 
32
+ class SettingsDialog(QDialog):
33
+ def __init__(self, parent=None):
34
+ super().__init__(parent)
35
+ self.setWindowTitle("Settings")
36
+
37
+ layout = QFormLayout()
38
+
39
+ self.precision_spin_box = QSpinBox()
40
+ self.precision_spin_box.setRange(
41
+ -2147483647, 2147483647
42
+ ) # 2147483647 is the largest int which qt allows
43
+
44
+ self.step_size_spin_box = QDoubleSpinBox()
45
+ self.step_size_spin_box.setRange(-float("inf"), float("inf"))
46
+
47
+ fixed_width = 80
48
+ self.precision_spin_box.setFixedWidth(fixed_width)
49
+ self.step_size_spin_box.setFixedWidth(fixed_width)
50
+
51
+ layout.addRow("Decimal Precision:", self.precision_spin_box)
52
+ layout.addRow("Step Size:", self.step_size_spin_box)
53
+
54
+ button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
55
+ button_box.accepted.connect(self.accept)
56
+ button_box.rejected.connect(self.reject)
57
+ layout.addWidget(button_box)
58
+
59
+ self.setLayout(layout)
60
+
61
+ def getValues(self):
62
+ return self.precision_spin_box.value(), self.step_size_spin_box.value()
63
+
64
+
28
65
  class ScanSpinBox(QSpinBox):
29
66
  def __init__(
30
67
  self, parent=None, arg_name: str = None, default: int | None = None, *args, **kwargs
31
68
  ):
32
69
  super().__init__(parent=parent, *args, **kwargs)
33
70
  self.arg_name = arg_name
34
- self.setRange(-9999, 9999)
71
+ self.setRange(-2147483647, 2147483647) # 2147483647 is the largest int which qt allows
35
72
  if default is not None:
36
73
  self.setValue(default)
37
74
 
@@ -42,10 +79,25 @@ class ScanDoubleSpinBox(QDoubleSpinBox):
42
79
  ):
43
80
  super().__init__(parent=parent, *args, **kwargs)
44
81
  self.arg_name = arg_name
45
- self.setRange(-9999, 9999)
82
+ self.setRange(-float("inf"), float("inf"))
46
83
  if default is not None:
47
84
  self.setValue(default)
48
85
 
86
+ self.setContextMenuPolicy(Qt.CustomContextMenu)
87
+ self.customContextMenuRequested.connect(self.showSettingsDialog)
88
+
89
+ self.setToolTip("Right click to open settings dialog for decimal precision and step size.")
90
+
91
+ def showSettingsDialog(self):
92
+ dialog = SettingsDialog(self)
93
+ dialog.precision_spin_box.setValue(self.decimals())
94
+ dialog.step_size_spin_box.setValue(self.singleStep())
95
+
96
+ if dialog.exec_() == QDialog.Accepted:
97
+ precision, step_size = dialog.getValues()
98
+ self.setDecimals(precision)
99
+ self.setSingleStep(step_size)
100
+
49
101
 
50
102
  class ScanLineEdit(QLineEdit):
51
103
  def __init__(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.93.0
3
+ Version: 0.93.2
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
@@ -2,11 +2,11 @@
2
2
  .gitlab-ci.yml,sha256=BtKhZI3dhK09En1BfpglYi-ZJwG6ZdC-iJr7kXFVfCg,8346
3
3
  .pylintrc,sha256=eeY8YwSI74oFfq6IYIbCqnx3Vk8ZncKaatv96n_Y8Rs,18544
4
4
  .readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
5
- CHANGELOG.md,sha256=PtPZWne4JpK9xkQHLWcevAw8n6EoMbCud7Vs0ZndVaI,6784
5
+ CHANGELOG.md,sha256=spzDesIf7s2aE5sC5pxzLq1MdY_T2b6_do4e34BATH0,6847
6
6
  LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
7
- PKG-INFO,sha256=QipcnWkl-3rKW2eckl9UoMBZpbwC9V7v7wZOj_5bBPM,1307
7
+ PKG-INFO,sha256=TcCIhjrNtkkjWajNX4527UVSTz2fKUASrMkLpWld1bg,1307
8
8
  README.md,sha256=Od69x-RS85Hph0-WwWACwal4yUd67XkEn4APEfHhHFw,2649
9
- pyproject.toml,sha256=gNRSj12kQUPek79ogtapfwRpeUfK0sfO4Dy7P98TE-0,2356
9
+ pyproject.toml,sha256=Pv6pZHHF70YWR33PfBCPolOWW57nO6KLvd7iRLWgjPI,2356
10
10
  .git_hooks/pre-commit,sha256=n3RofIZHJl8zfJJIUomcMyYGFi_rwq4CC19z0snz3FI,286
11
11
  .gitlab/issue_templates/bug_report_template.md,sha256=gAuyEwl7XlnebBrkiJ9AqffSNOywmr8vygUFWKTuQeI,386
12
12
  .gitlab/issue_templates/documentation_update_template.md,sha256=FHLdb3TS_D9aL4CYZCjyXSulbaW5mrN2CmwTaeLPbNw,860
@@ -169,7 +169,7 @@ bec_widgets/widgets/device_line_edit/device_line_edit.pyproject,sha256=tqAYXRbxs
169
169
  bec_widgets/widgets/device_line_edit/device_line_edit_plugin.py,sha256=RPtGVPLadUVyfEvj1EAJ9ftXe3Htp40JdHGj9zBLukc,1462
170
170
  bec_widgets/widgets/device_line_edit/register_device_line_edit.py,sha256=8gEPnC8djYCw-idoZAENNB3bPOxM6pbzEp9A366EAGg,489
171
171
  bec_widgets/widgets/dock/__init__.py,sha256=B7foHt02gnhM7mFksa7GJVwT7n0j_JvYDCt6wc6XR5g,61
172
- bec_widgets/widgets/dock/dock.py,sha256=44Scpqz6ssGZvPs00G9CfC0XAMtKuvXBVEYjBEQNqqY,9645
172
+ bec_widgets/widgets/dock/dock.py,sha256=tucFaP4refSeMo2b2UK4nCiY0KCiZuePyBba7qbkvOI,10236
173
173
  bec_widgets/widgets/dock/dock_area.py,sha256=VPdDCM2z8K9u2xcfcHaEdsaOEgf8tJlPl4czogWyFP4,13114
174
174
  bec_widgets/widgets/dock/dock_area.pyproject,sha256=URW0UrDXCnkzk80rbQmUMgF6Uqay2TjHsq8Dq0g1j-c,37
175
175
  bec_widgets/widgets/dock/dock_area_plugin.py,sha256=oG2zDxUA1YLvSBoFVeFVkz4HIWLruAwOsCZ00H2Z70A,1345
@@ -220,7 +220,7 @@ bec_widgets/widgets/scan_control/register_scan_control.py,sha256=xUX2yR0-MaIMg9_
220
220
  bec_widgets/widgets/scan_control/scan_control.py,sha256=YT3Vvy27_FY3UY7IXvy87o9ZB_syauuEKzkJFOpbP4s,7610
221
221
  bec_widgets/widgets/scan_control/scan_control.pyproject,sha256=eTgVDFKToIH8_BbJjM2RvbOLr7HnYoidX0SAHx640DM,30
222
222
  bec_widgets/widgets/scan_control/scan_control_plugin.py,sha256=vglBKLZKVSFsVxiU1s6j1X4ASyfD2YWzMGBSeup_Q7E,1379
223
- bec_widgets/widgets/scan_control/scan_group_box.py,sha256=wrrJLfI0apfll0NKpqM8ymlbl5NaqA9cKNgyfVdYR00,7420
223
+ bec_widgets/widgets/scan_control/scan_group_box.py,sha256=BpX9ZphqOhdEbQnGzNeNlmuZsMS__U97CkBMical2FY,9300
224
224
  bec_widgets/widgets/spinner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
225
225
  bec_widgets/widgets/spinner/register_spinner_widget.py,sha256=_zCPjLh4M7NTSHP1Atdn6yu33zJ3LJkcBy3KOJ5eSVY,476
226
226
  bec_widgets/widgets/spinner/spinner.py,sha256=3A-VcX7HLDyqWsMoTUpB4jKHL26YuAbwOk3qonp3dI4,2591
@@ -290,10 +290,11 @@ docs/user/api_reference/api_reference.md,sha256=q2Imc48Rq6GcAP0R4bS3KuW5ptZZdsV4
290
290
  docs/user/applications/applications.md,sha256=yOECfaYRUEDIxF-O0duOwSJlG4f93RylrpMjbw1-8Dg,100
291
291
  docs/user/getting_started/BECDockArea.png,sha256=t3vSm_rVRk371J5LOutbolETuEjStNc2aTT1YFOcSSA,2046774
292
292
  docs/user/getting_started/auto_updates.md,sha256=Gicx3lplI6JRBlnPj_VL6IhqOIcsWjYF4_EdZSCje2A,3754
293
- docs/user/getting_started/getting_started.md,sha256=lxZXCr6HAkM61oo5Bu-YjINSKo4wihWhAPJdotEAAVQ,358
293
+ docs/user/getting_started/getting_started.md,sha256=3BCqXH1bTc128YJIrtXeF0GzJJxeB6YqQRP7hFjVtSw,375
294
294
  docs/user/getting_started/gui_complex_gui.gif,sha256=ovv9u371BGG5GqhzyBMl4mvqMHLfJS0ylr-dR0Ydwtw,6550393
295
295
  docs/user/getting_started/installation.md,sha256=VqtHasD0BAPt-K6YJQicWpyqb91RJYkZ8qpvwSLsgaY,1153
296
296
  docs/user/getting_started/quick_start.md,sha256=ABDRRB8DM8dFYdsWUfzQV0eaffRFAlcn2HIfw7yiUGs,9401
297
+ docs/user/getting_started/video_tutorials.md,sha256=rLIlyIwVH0fsi-CaY8FebUBzF4sWP3UPirB1LvbL1go,765
297
298
  docs/user/widgets/BECFigure.png,sha256=8dQr4u0uk_y0VV-R1Jh9yTR3Vidd9HDEno_07R0swaE,1605920
298
299
  docs/user/widgets/bec_figure.md,sha256=tNT-5QP3DekY_iC9jOMULzdxmUU8wMkkX5Ru9yq0Txo,6671
299
300
  docs/user/widgets/bec_figure_dap.gif,sha256=8EBRKcB7828M7w429c7djTZG2AbfJ-Zsy1epPvyYoII,4058735
@@ -369,8 +370,8 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
369
370
  tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
370
371
  tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
371
372
  tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
372
- bec_widgets-0.93.0.dist-info/METADATA,sha256=QipcnWkl-3rKW2eckl9UoMBZpbwC9V7v7wZOj_5bBPM,1307
373
- bec_widgets-0.93.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
374
- bec_widgets-0.93.0.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
375
- bec_widgets-0.93.0.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
376
- bec_widgets-0.93.0.dist-info/RECORD,,
373
+ bec_widgets-0.93.2.dist-info/METADATA,sha256=TcCIhjrNtkkjWajNX4527UVSTz2fKUASrMkLpWld1bg,1307
374
+ bec_widgets-0.93.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
375
+ bec_widgets-0.93.2.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
376
+ bec_widgets-0.93.2.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
377
+ bec_widgets-0.93.2.dist-info/RECORD,,
@@ -11,4 +11,5 @@ hidden: true
11
11
  installation/
12
12
  quick_start/
13
13
  auto_updates/
14
+ video_tutorials/
14
15
  ```
@@ -0,0 +1,17 @@
1
+ (user.video_tutorials)=
2
+
3
+ # Video Tutorials
4
+
5
+ This section includes video tutorials that demonstrate various use cases of `bec-widgets`, including video tutorials,
6
+ presentations, and conference talks.
7
+
8
+ ## BSEG Meeting 24th July 2024
9
+
10
+ This video is a presentation of the BEC Widgets project at the BSEG meeting on the 24th July 2024. The presentation
11
+ covers the basic interactions, including visualization of live data acquisition and how to steer experiments using
12
+ user-friendly tools. Learn how BEC Widgets can enhance your experimental control projects with its intuitive interface
13
+ and powerful features.
14
+
15
+ Used version of BEC Widgets: 0.91.0
16
+
17
+ <iframe width="560" height="315" src="https://www.youtube.com/embed/qZ8fWXRAdHE" frameborder="0" allowfullscreen></iframe>
pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "bec_widgets"
7
- version = "0.93.0"
7
+ version = "0.93.2"
8
8
  description = "BEC Widgets"
9
9
  requires-python = ">=3.10"
10
10
  classifiers = [