Inputs classes

class pymeasure.display.inputs.BooleanInput(parameter, parent=None, **kwargs)

Bases: PyQt4.QtGui.QCheckBox, pymeasure.display.inputs.Input

Checkbox for boolean values, connected to a BooleanParameter.

set_parameter(parameter)

Connects a new parameter to the input box, and initializes the box value.

Parameters:parameter – parameter to connect.
class pymeasure.display.inputs.FloatInput(parameter, parent=None, **kwargs)

Bases: PyQt4.QtGui.QDoubleSpinBox, pymeasure.display.inputs.Input

Spin input box for floating-point values, connected to a FloatParameter.

See also

Class ScientificInput
For inputs in scientific notation.
set_parameter(parameter)

Connects a new parameter to the input box, and initializes the box value.

Parameters:parameter – parameter to connect.
class pymeasure.display.inputs.Input(parameter, **kwargs)

Bases: object

Mix-in class that connects a Parameter object to a GUI input box.

Parameters:parameter – The parameter to connect to this input box.
Attr parameter:Read-only property to access the associated parameter.
parameter

The connected parameter object. Read-only property; see set_parameter().

Note that reading this property will have the side-effect of updating its value from the GUI input box.

set_parameter(parameter)

Connects a new parameter to the input box, and initializes the box value.

Parameters:parameter – parameter to connect.
update_parameter()

Update the parameter value with the Input GUI element’s current value.

class pymeasure.display.inputs.IntegerInput(parameter, parent=None, **kwargs)

Bases: PyQt4.QtGui.QSpinBox, pymeasure.display.inputs.Input

Spin input box for integer values, connected to a IntegerParameter.

set_parameter(parameter)

Connects a new parameter to the input box, and initializes the box value.

Parameters:parameter – parameter to connect.
class pymeasure.display.inputs.ListInput(parameter, parent=None, **kwargs)

Bases: PyQt4.QtGui.QComboBox, pymeasure.display.inputs.Input

Dropdown for list values, connected to a ListParameter.

set_parameter(parameter)

Connects a new parameter to the input box, and initializes the box value.

Parameters:parameter – parameter to connect.
class pymeasure.display.inputs.ScientificInput(parameter, parent=None, **kwargs)

Bases: PyQt4.QtGui.QDoubleSpinBox, pymeasure.display.inputs.Input

Spinner input box for floating-point values, connected to a FloatParameter. This box will display and accept values in scientific notation when appropriate.

See also

Class FloatInput
For a non-scientific floating-point input box.
set_parameter(parameter)

Connects a new parameter to the input box, and initializes the box value.

Parameters:parameter – parameter to connect.
stepEnabled() → QAbstractSpinBox.StepEnabled
textFromValue(float) → str
validate(str, int) -> (QValidator.State, str, int)
valueFromText(str) → float
class pymeasure.display.inputs.StringInput(parameter, parent=None, **kwargs)

Bases: PyQt4.QtGui.QLineEdit, pymeasure.display.inputs.Input

String input box connected to a Parameter. Parameter subclasses that are string-based may also use this input, but non-string parameters should use more specialised input classes.