instrumentserver.gui.parameters#
Functions
|
For displaying float numbers with scientific notation. |
Classes
|
|
|
Implementation of AnyInput that can process arguments and keyword arguments to use for methods. |
|
A text edit widget that checks whether its input can be read as a number. |
|
A widget that allows editing and/or displaying a parameter value. |
- class instrumentserver.gui.parameters.AnyInput(parent: QWidget | None = None)[source]#
Bases:
QWidget- inputChanged#
Signal(str) – emitted when the input field is changed, argument is the new value.
- class instrumentserver.gui.parameters.AnyInputForMethod(parent: QWidget | None = None)[source]#
Bases:
AnyInputImplementation of AnyInput that can process arguments and keyword arguments to use for methods. You can add multiple arguments if they are separated by a comma. If the ‘=’ is present in any argument, it will be treated like a keyword argument with the string in front of the equal sign as the key, and the evaluated value.
All arguments and keyword arguments are evaluated if the doEval button is checked, if not everything is treated like a long string.
- class instrumentserver.gui.parameters.NumberInput(parent: QWidget | None = None)[source]#
Bases:
QLineEditA text edit widget that checks whether its input can be read as a number.
- class instrumentserver.gui.parameters.ParameterWidget(parameter: Parameter, parent: QWidget | None = None, additionalWidgets: List[QWidget] | None = None)[source]#
Bases:
QWidgetA widget that allows editing and/or displaying a parameter value.
- onReturnPressed() None[source]#
Activates the setButton when the input is selected and enter is pressed.
- paramWidget: NumberInput | AnyInput | QLineEdit | QCheckBox | QLabel#
- parameterPending#
Signal(Any) – emitted when the parameter value is pending
- parameterSet#
Signal(Any) – emitted when the parameter was set successfully
- parameterSetError#
Signal(str) — emitted when setting gave an error. Argument is the error message.
- set_read_only(read_only: bool) None[source]#
Render the value read-only while the parameter’s Lock is locked (D3): the input and the set button are disabled, since a locked Follower refuses
set, and the get button stays enabled so the Target’s value still refreshes. A parameter without a set method was constructed with its set button disabled; it is never re-enabled here.- Parameters:
read_only – whether editing the value is refused.
- valueCommitted#
Signal() – emitted when the user commits a value via Return/Enter