Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cfel-sc-public
Kamzik3
Commits
1165ee6e
Commit
1165ee6e
authored
May 16, 2022
by
Jerome Carnis
🦊
Browse files
deviceMethodWidget.py: fix return types
parent
b68e6af0
Changes
1
Hide whitespace changes
Inline
Side-by-side
kamzik3/gui/deviceMethodWidget.py
View file @
1165ee6e
...
...
@@ -229,7 +229,7 @@ class MethodEnabledByAttributeWidget(DeviceMethodEnabledWidget):
model_image
=
None
,
config
=
None
,
parent
=
None
,
):
)
->
None
:
self
.
external_device_attribute
=
external_device_attribute
self
.
_editable_widgets
:
List
[
int
]
=
[]
super
().
__init__
(
...
...
@@ -251,7 +251,7 @@ class MethodEnabledByAttributeWidget(DeviceMethodEnabledWidget):
else
:
self
.
input_value
.
children
()[
index
].
setEnabled
(
True
)
# type: ignore
def
_find_editable_widgets
(
self
):
def
_find_editable_widgets
(
self
)
->
None
:
"""Find the indices of the input fields that should be enabled/disabled"""
if
self
.
input_value
is
not
None
:
for
idx
,
child
in
enumerate
(
self
.
input_value
.
children
()):
...
...
@@ -262,7 +262,7 @@ class MethodEnabledByAttributeWidget(DeviceMethodEnabledWidget):
if
isinstance
(
grandchild
,
(
QSpinBox
,
QDoubleSpinBox
)):
self
.
_editable_widgets
.
append
(
idx
)
def
init_signals
(
self
):
def
init_signals
(
self
)
->
None
:
"""
Connect the signals to the slots.
...
...
@@ -272,7 +272,7 @@ class MethodEnabledByAttributeWidget(DeviceMethodEnabledWidget):
self
.
sig_control_changed
.
connect
(
self
.
control_changed
)
@
pyqtSlot
()
def
slot_handle_configuration
(
self
):
def
slot_handle_configuration
(
self
)
->
None
:
DeviceWidget
.
slot_handle_configuration
(
self
)
self
.
input_not_ready_placeholder
.
setParent
(
None
)
layout
=
self
.
widget_holder
.
layout
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment