AttributeWidgets’ hierarchy is parallel to Attribute’ hierarchy
An instance attr of Attribute can create its AttributeWidget counterPart by calling attr.create_widget(name, parent).
pyrpl.widgets.attribute_widgets.
BaseAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: <MagicMock name='mock.QtWidgets' id='139827381765584'>.QWidget
Base class for attribute widgets.
The widget usually contains a label and a subwidget (property ‘widget’ of the instance), corresponding to the associated attribute. The subwidget is the created by the function make_widget.
AttributeWidgets are always contained in a ModuleWidget and should be fully managed by this ModuleWidget.
If widget_name==””, then only the subwidget is shown without label.
A minimum widget should implmenet set_widget, _update, and possibly module_value.
attribute_descriptor
¶attribute_value
¶value_changed
= <MagicMock name='mock.QtCore.Signal()' id='139827380610576'>¶widget_value
¶Property for the current value of the widget.
The associated setter takes care of not re-emitting signals when the gui value is modified through the setter.
pyrpl.widgets.attribute_widgets.
BasePropertyListPropertyWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.BaseAttributeWidget
A widget for a list of Attributes, deriving its functionality from the underlying widgets
element_widget_cls
¶insert
(index, value)[source]¶” make a new element widget - this function is called by the attribute
number
¶pyrpl.widgets.attribute_widgets.
BoolAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.BaseAttributeWidget
Checkbox for boolean attributes
pyrpl.widgets.attribute_widgets.
BoolIgnoreAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.BoolAttributeWidget
Like BoolAttributeWidget with additional option ‘ignore’ that is shown as a grey check in GUI
pyrpl.widgets.attribute_widgets.
ComplexAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.FloatAttributeWidget
Widget for complex values
SpinBox
¶alias of ComplexSpinBox
pyrpl.widgets.attribute_widgets.
CurveAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.DataAttributeWidget
Plots a curve (complex or real), with an id number as input.
pyrpl.widgets.attribute_widgets.
CurveSelectAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.SelectAttributeWidget
Select one or many curves.
pyrpl.widgets.attribute_widgets.
DataAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.PlotAttributeWidget
Plots a curve (complex or real), with an array as input.
pyrpl.widgets.attribute_widgets.
FilterAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.BaseAttributeWidget
Property for list of floats (to be chosen in a list of valid_frequencies) The attribute descriptor needs to expose a function valid_frequencies(module)
decimals
= 3¶pyrpl.widgets.attribute_widgets.
FloatAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.NumberAttributeWidget
Widget for float values
SpinBox
¶alias of FloatSpinBox
pyrpl.widgets.attribute_widgets.
IntAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.NumberAttributeWidget
Widget for integer values.
SpinBox
¶alias of IntSpinBox
pyrpl.widgets.attribute_widgets.
LedAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.BaseAttributeWidget
Boolean property with a button whose text and color indicates whether
pyrpl.widgets.attribute_widgets.
ListComboBox
(number, name, options, decimals=3)[source]¶Bases: <MagicMock name='mock.QtWidgets' id='139827381765584'>.QWidget
value_changed
= <MagicMock name='mock.QtCore.Signal()' id='139827380610576'>¶pyrpl.widgets.attribute_widgets.
ListElementWidget
(parent, startindex, *args, **kwargs)[source]¶Bases: pyrpl.widgets.attribute_widgets.BaseAttributeWidget
this is a wrapper class to embed any AttributeWidget as an element of BasePropertyListPropertyWidget. Its usage is found in the property element_widget_cls of BasePropertyListPropertyWidget.
attribute_value
¶index
¶pyrpl.widgets.attribute_widgets.
NumberAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.BaseAttributeWidget
Base widget for float and int.
SpinBox
¶alias of NumberSpinBox
pyrpl.widgets.attribute_widgets.
PlotAttributeWidget
(module, attribute_name, widget_name=None)[source]¶pyrpl.widgets.attribute_widgets.
SelectAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.BaseAttributeWidget
Multiple choice property.
change_options
(new_options=None)[source]¶The options of the combobox can be changed dynamically.
new_options is an argument that is ignored, since the new options are available as a property to the widget already.
options
¶pyrpl.widgets.attribute_widgets.
StringAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.BaseAttributeWidget
Widget for string values.
pyrpl.widgets.attribute_widgets.
TextAttributeWidget
(module, attribute_name, widget_name=None)[source]¶Bases: pyrpl.widgets.attribute_widgets.StringAttributeWidget
Property for multiline string values.
pyrpl.widgets.pyrpl_widget.
ExceptionLauncher
[source]¶Bases: <MagicMock name='mock.QtCore' id='139827381803152'>.QObject
show_exception
= <MagicMock name='mock.QtCore.Signal()' id='139827380610576'>¶show_log
= <MagicMock name='mock.QtCore.Signal()' id='139827380610576'>¶pyrpl.widgets.spinbox.
ComplexSpinBox
(*args, **kwargs)[source]¶Bases: pyrpl.widgets.spinbox.FloatSpinBox
Two spinboxes representing a complex number, with the right keyboard shortcuts (up down for imag, left/right for real).
val
¶pyrpl.widgets.spinbox.
FloatSpinBox
(label, decimals=4, min=-1, max=1, increment=0.0001220703125, **kwargs)[source]¶Bases: pyrpl.widgets.spinbox.NumberSpinBox
Number spin box for float values
max_num_letter
¶Returns the maximum number of letters
val
¶pyrpl.widgets.spinbox.
IntSpinBox
(label, min=-8192, max=8192, increment=1, per_second=10, **kwargs)[source]¶Bases: pyrpl.widgets.spinbox.NumberSpinBox
Number spin box for integer values
max_num_letter
¶Maximum number of letters in line
val
¶pyrpl.widgets.spinbox.
NumberSpinBox
(label='', min=-1, max=1, increment=0.0001220703125, log_increment=False, halflife_seconds=0.5, per_second=0.2)[source]¶Bases: <MagicMock name='mock.QtWidgets' id='139827381765584'>.QWidget
Base class for spinbox with numerical value.
increment, then, nothing happens during a time given by timer_initial_latency. Only after that the value is incremented by “increment” every timer_min_interval.
MOUSE_WHEEL_ACTIVATED
= False¶change_initial_latency
¶latency for continuous update when a button is pressed
change_interval
= 0.02¶change_sign
¶is_decreasing
¶is_increasing
¶max_num_letter
¶Returns the maximum number of letters
selected
= <MagicMock name='mock.QtCore.Signal()' id='139827380610576'>¶validate
()[source]¶make sure a new value is inside the allowed bounds after a manual change of the value
value_changed
= <MagicMock name='mock.QtCore.Signal()' id='139827380610576'>¶