bec-widgets 1.16.1__py3-none-any.whl → 1.16.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 +8 -0
- PKG-INFO +1 -1
- bec_widgets/utils/widget_io.py +16 -0
- {bec_widgets-1.16.1.dist-info → bec_widgets-1.16.2.dist-info}/METADATA +1 -1
- {bec_widgets-1.16.1.dist-info → bec_widgets-1.16.2.dist-info}/RECORD +9 -9
- pyproject.toml +1 -1
- {bec_widgets-1.16.1.dist-info → bec_widgets-1.16.2.dist-info}/WHEEL +0 -0
- {bec_widgets-1.16.1.dist-info → bec_widgets-1.16.2.dist-info}/entry_points.txt +0 -0
- {bec_widgets-1.16.1.dist-info → bec_widgets-1.16.2.dist-info}/licenses/LICENSE +0 -0
CHANGELOG.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
3
|
|
4
|
+
## v1.16.2 (2025-01-20)
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
- **widget_io**: Toggleswitchhandler added
|
9
|
+
([`889ea86`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/889ea8629fabdc8afe2211103f8b63dfa52cc262))
|
10
|
+
|
11
|
+
|
4
12
|
## v1.16.1 (2025-01-16)
|
5
13
|
|
6
14
|
### Bug Fixes
|
PKG-INFO
CHANGED
bec_widgets/utils/widget_io.py
CHANGED
@@ -15,6 +15,8 @@ from qtpy.QtWidgets import (
|
|
15
15
|
QWidget,
|
16
16
|
)
|
17
17
|
|
18
|
+
from bec_widgets.widgets.utility.toggle.toggle import ToggleSwitch
|
19
|
+
|
18
20
|
|
19
21
|
class WidgetHandler(ABC):
|
20
22
|
"""Abstract base class for all widget handlers."""
|
@@ -125,6 +127,19 @@ class CheckBoxHandler(WidgetHandler):
|
|
125
127
|
widget.toggled.connect(lambda val, w=widget: slot(w, val))
|
126
128
|
|
127
129
|
|
130
|
+
class ToggleSwitchHandler(WidgetHandler):
|
131
|
+
"""Handler for ToggleSwitch widgets."""
|
132
|
+
|
133
|
+
def get_value(self, widget, **kwargs):
|
134
|
+
return widget.checked
|
135
|
+
|
136
|
+
def set_value(self, widget, value):
|
137
|
+
widget.checked = value
|
138
|
+
|
139
|
+
def connect_change_signal(self, widget: ToggleSwitch, slot):
|
140
|
+
widget.enabled.connect(lambda val, w=widget: slot(w, val))
|
141
|
+
|
142
|
+
|
128
143
|
class LabelHandler(WidgetHandler):
|
129
144
|
"""Handler for QLabel widgets."""
|
130
145
|
|
@@ -149,6 +164,7 @@ class WidgetIO:
|
|
149
164
|
QDoubleSpinBox: SpinBoxHandler,
|
150
165
|
QCheckBox: CheckBoxHandler,
|
151
166
|
QLabel: LabelHandler,
|
167
|
+
ToggleSwitch: ToggleSwitchHandler,
|
152
168
|
}
|
153
169
|
|
154
170
|
@staticmethod
|
@@ -2,11 +2,11 @@
|
|
2
2
|
.gitlab-ci.yml,sha256=CLlFGYRGKp4FxCPTkyF9p-7qx67KmbM9Yok9JQEU_Ls,8677
|
3
3
|
.pylintrc,sha256=eeY8YwSI74oFfq6IYIbCqnx3Vk8ZncKaatv96n_Y8Rs,18544
|
4
4
|
.readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
|
5
|
-
CHANGELOG.md,sha256=
|
5
|
+
CHANGELOG.md,sha256=XB0U0tL8vwGYFTtxikpELHFwpOxSgylCVq09YQeNC9k,222517
|
6
6
|
LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
7
|
-
PKG-INFO,sha256=
|
7
|
+
PKG-INFO,sha256=sqiN3l6J2_T9py1gicYZ-ldmqwPwu-vnRMiT_ZtHYHo,1339
|
8
8
|
README.md,sha256=Od69x-RS85Hph0-WwWACwal4yUd67XkEn4APEfHhHFw,2649
|
9
|
-
pyproject.toml,sha256=
|
9
|
+
pyproject.toml,sha256=IkOST5eSW4k_6bbLffa2ELh2kDSyKebNhahDRm3fdXI,2596
|
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
|
@@ -82,7 +82,7 @@ bec_widgets/utils/rpc_decorator.py,sha256=pIvtqySQLnuS7l2Ti_UAe4WX7CRivZnsE5ZdKA
|
|
82
82
|
bec_widgets/utils/thread_checker.py,sha256=rDNuA3X6KQyA7JPb67mccTg0z8YkInynLAENQDQpbuE,1607
|
83
83
|
bec_widgets/utils/ui_loader.py,sha256=6z0Qvt99XWoIk_YMACShwQ1p7PbDh6uJ9wS6e2wZs0w,4878
|
84
84
|
bec_widgets/utils/validator_delegate.py,sha256=Emj1WF6W8Ke1ruBWUfmHdVJpmOSPezuOt4zvQTay_44,442
|
85
|
-
bec_widgets/utils/widget_io.py,sha256=
|
85
|
+
bec_widgets/utils/widget_io.py,sha256=gLyAwXZbkNQ8sMBmnNB822FrVEk9oSSm0l57tHAgdp0,15710
|
86
86
|
bec_widgets/utils/widget_state_manager.py,sha256=dtObn3xRY5mVTnkGTQDOPsAwkQ18pXJwYPgtCdRpKtc,4920
|
87
87
|
bec_widgets/utils/yaml_dialog.py,sha256=T6UyGNGdmpXW74fa_7Nk6b99T5pp2Wvyw3AOauRc8T8,2407
|
88
88
|
bec_widgets/utils/plugin_templates/plugin.template,sha256=DWtJdHpdsVtbiTTOniH3zBe5a40ztQ20o_-Hclyu38s,1266
|
@@ -326,8 +326,8 @@ bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.py,sha256=Z
|
|
326
326
|
bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.pyproject,sha256=Lbi9zb6HNlIq14k6hlzR-oz6PIFShBuF7QxE6d87d64,34
|
327
327
|
bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button_plugin.py,sha256=CzChz2SSETYsR8-36meqWnsXCT-FIy_J_xeU5coWDY8,1350
|
328
328
|
bec_widgets/widgets/utility/visual/dark_mode_button/register_dark_mode_button.py,sha256=rMpZ1CaoucwobgPj1FuKTnt07W82bV1GaSYdoqcdMb8,521
|
329
|
-
bec_widgets-1.16.
|
330
|
-
bec_widgets-1.16.
|
331
|
-
bec_widgets-1.16.
|
332
|
-
bec_widgets-1.16.
|
333
|
-
bec_widgets-1.16.
|
329
|
+
bec_widgets-1.16.2.dist-info/METADATA,sha256=sqiN3l6J2_T9py1gicYZ-ldmqwPwu-vnRMiT_ZtHYHo,1339
|
330
|
+
bec_widgets-1.16.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
331
|
+
bec_widgets-1.16.2.dist-info/entry_points.txt,sha256=dItMzmwA1wizJ1Itx15qnfJ0ZzKVYFLVJ1voxT7K7D4,214
|
332
|
+
bec_widgets-1.16.2.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
333
|
+
bec_widgets-1.16.2.dist-info/RECORD,,
|
pyproject.toml
CHANGED
File without changes
|
File without changes
|
File without changes
|