Compare commits

...

2 Commits

Author SHA1 Message Date
ea6d07d9df Docstring change 2024-08-12 11:59:45 +08:00
f5338e97f3 Fix control method no bolding & underline at init 2024-08-12 11:41:03 +08:00
2 changed files with 7 additions and 4 deletions

View File

@ -57,7 +57,7 @@ class CtrlPanel(QObject):
for handle in sigActivated_handles[ch]:
param.child(*handle[0]).sigActivated.connect(handle[1])
def _indicate_usage(param, control_method):
def _indicate_usage(param, control_method="constant_current"):
for item in param.child("i_set").items:
is_constant_current = control_method == "constant_current"
font = item.font(0)
@ -71,7 +71,10 @@ class CtrlPanel(QObject):
font.setBold(is_temperature_pid)
item.setFont(0, font)
param.child("output", "control_method").sigValueChanged.connect(_indicate_usage)
param.child("output", "control_method").sigValueChanged.connect(
_indicate_usage
)
_indicate_usage(param.child("output", "control_method"))
for item in param.child("output", "control_method").items:
font = item.font(0)

View File

@ -23,8 +23,8 @@ class UnitfulSpinBox(SpinBox):
* The "pinSiPrefix" option, where the siPrefix could be fixed to a
particular scale instead of as determined by its value.
* The "noUnitEditing" option, where the unit portion of the
SpinBox text, including the siPrefix, is fixed and uneditable.
* The "noUnitEditing" option, where the suffix and pinned siPrefix
of the SpinBox text is fixed and uneditable.
"""
def __init__(self, parent=None, value=0.0, **kwargs):