forked from M-Labs/thermostat
Compare commits
2 Commits
c6fa3cdb80
...
ea6d07d9df
Author | SHA1 | Date | |
---|---|---|---|
ea6d07d9df | |||
f5338e97f3 |
@ -57,7 +57,7 @@ class CtrlPanel(QObject):
|
|||||||
for handle in sigActivated_handles[ch]:
|
for handle in sigActivated_handles[ch]:
|
||||||
param.child(*handle[0]).sigActivated.connect(handle[1])
|
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:
|
for item in param.child("i_set").items:
|
||||||
is_constant_current = control_method == "constant_current"
|
is_constant_current = control_method == "constant_current"
|
||||||
font = item.font(0)
|
font = item.font(0)
|
||||||
@ -71,7 +71,10 @@ class CtrlPanel(QObject):
|
|||||||
font.setBold(is_temperature_pid)
|
font.setBold(is_temperature_pid)
|
||||||
item.setFont(0, font)
|
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:
|
for item in param.child("output", "control_method").items:
|
||||||
font = item.font(0)
|
font = item.font(0)
|
||||||
|
@ -23,8 +23,8 @@ class UnitfulSpinBox(SpinBox):
|
|||||||
|
|
||||||
* The "pinSiPrefix" option, where the siPrefix could be fixed to a
|
* The "pinSiPrefix" option, where the siPrefix could be fixed to a
|
||||||
particular scale instead of as determined by its value.
|
particular scale instead of as determined by its value.
|
||||||
* The "noUnitEditing" option, where the unit portion of the
|
* The "noUnitEditing" option, where the suffix and pinned siPrefix
|
||||||
SpinBox text, including the siPrefix, is fixed and uneditable.
|
of the SpinBox text is fixed and uneditable.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, parent=None, value=0.0, **kwargs):
|
def __init__(self, parent=None, value=0.0, **kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user