mirror of https://github.com/m-labs/artiq.git
gui,environment: default step to 1.0
This commit is contained in:
parent
2c893ba0a2
commit
79ca0d50fa
|
@ -75,7 +75,6 @@ class _NumberEntry(QtGui.QDoubleSpinBox):
|
||||||
def __init__(self, procdesc):
|
def __init__(self, procdesc):
|
||||||
QtGui.QDoubleSpinBox.__init__(self)
|
QtGui.QDoubleSpinBox.__init__(self)
|
||||||
self.setDecimals(procdesc["ndecimals"])
|
self.setDecimals(procdesc["ndecimals"])
|
||||||
if procdesc["step"] is not None:
|
|
||||||
self.setSingleStep(procdesc["step"])
|
self.setSingleStep(procdesc["step"])
|
||||||
if procdesc["min"] is not None:
|
if procdesc["min"] is not None:
|
||||||
self.setMinimum(procdesc["min"])
|
self.setMinimum(procdesc["min"])
|
||||||
|
|
|
@ -76,7 +76,6 @@ class ScanController(LayoutWidget):
|
||||||
self.v_noscan.setMaximum(gmax)
|
self.v_noscan.setMaximum(gmax)
|
||||||
else:
|
else:
|
||||||
self.v_noscan.setMaximum(float("inf"))
|
self.v_noscan.setMaximum(float("inf"))
|
||||||
if gstep is not None:
|
|
||||||
self.v_noscan.setSingleStep(gstep)
|
self.v_noscan.setSingleStep(gstep)
|
||||||
if unit:
|
if unit:
|
||||||
self.v_noscan.setSuffix(" " + unit)
|
self.v_noscan.setSuffix(" " + unit)
|
||||||
|
|
|
@ -79,7 +79,7 @@ class NumberValue(_SimpleArgProcessor):
|
||||||
:param max: The maximum value of the argument.
|
:param max: The maximum value of the argument.
|
||||||
:param ndecimals: The number of decimals a UI should use.
|
:param ndecimals: The number of decimals a UI should use.
|
||||||
"""
|
"""
|
||||||
def __init__(self, default=NoDefault, unit="", step=None,
|
def __init__(self, default=NoDefault, unit="", step=1.0,
|
||||||
min=None, max=None, ndecimals=2):
|
min=None, max=None, ndecimals=2):
|
||||||
_SimpleArgProcessor.__init__(self, default)
|
_SimpleArgProcessor.__init__(self, default)
|
||||||
self.unit = unit
|
self.unit = unit
|
||||||
|
|
|
@ -121,7 +121,7 @@ class Scannable:
|
||||||
:param ndecimals: The number of decimals a UI should use.
|
:param ndecimals: The number of decimals a UI should use.
|
||||||
"""
|
"""
|
||||||
def __init__(self, default=NoDefault, unit="",
|
def __init__(self, default=NoDefault, unit="",
|
||||||
global_step=None, global_min=None, global_max=None,
|
global_step=1.0, global_min=None, global_max=None,
|
||||||
ndecimals=2):
|
ndecimals=2):
|
||||||
if default is not NoDefault:
|
if default is not NoDefault:
|
||||||
self.default_value = default
|
self.default_value = default
|
||||||
|
|
Loading…
Reference in New Issue