Parameter boxes

Input controls bound to experiment parameters: float, boolean and combo parameter boxes that write changes back immediately.

Overview

quatm/GUI/widgets/arg_boxes.py provides widgets that bind experiment parameter classes to Qt input controls: when the user changes a value it is written back to the experiment parameter (stored internally in SI units, converted for display as needed). They are usually created automatically by the “experiment parameter panel / parameter system” according to the parameter type.

Controls

ControlParameter typeDescription
FloatBoxNumeric parameterFloating-point input; converts units via unit and display_multiplier before writing back
BoolBoxBoolean parameterCheckbox; the value is written back as a boolean
ComboBoxList of stringsCombo box; takes the value from the string list by the selected index

Usage (schematic)

from quatm.GUI.widgets.arg_boxes import FloatBox, BoolBox, ComboBox

# numeric parameter: shown in kHz in the UI, stored in SI (Hz) underneath
fbox = FloatBox(argument=param_freq, unit="kHz", display_multiplier=1e3)

bcheck = BoolBox(parName="enable", value=param_enable)
cbox = ComboBox(parName="source", argument=param_source)  # the parameter class holds a stringlist

These controls are normally generated automatically by the parameter system from the experiment’s declarations, so there is no need to instantiate them by hand.