motile_plugin.widgets.motile.param_values

A module for widgets that hold parameter values. Each of these widgets implements the following interface:

class ParamValue(QWidget):

valueChanged = Signal(object)

def update_value(self, value: Any) -> None:

raise NotImplementedError()

def get_value(self) -> Any:

raise NotImplementedError

This “interface” is only enforced by duck typing, as is the pythonic way.

Classes

StaticParamValue

A widget for holding a parameter value (int or float) that cannot be

EditableParamValue

Module Contents

class motile_plugin.widgets.motile.param_values.StaticParamValue

Bases: qtpy.QtWidgets.QLabel

A widget for holding a parameter value (int or float) that cannot be changed from the UI. The valueChanged signal is just to fit my interface so that the compound widget can treat the static and editable children the same.

valueChanged
update_value(value: int | float | None) None
get_value() int | float
class motile_plugin.widgets.motile.param_values.EditableParamValue(dtype: type, negative: bool = True)

Bases: qtpy.QtWidgets.QDoubleSpinBox

valueChanged
max_val = 10000
min_val
update_value(value: int | float | None) None
get_value() int | float