instrumentserver.gui.instruments#
Classes
|
Widget that allows the display of real time parameters and changing their values. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The delegate for the InstrumentParameters widget. |
|
|
|
Event filter installed on value input widgets to handle Escape, Tab, and Shift+Tab. |
- class instrumentserver.gui.instruments.GenericInstrument(ins: ProxyInstrumentModule | Instrument, parent: QWidget | None = None, **modelKwargs: Any)[source]#
Bases:
QWidgetWidget that allows the display of real time parameters and changing their values.
- class instrumentserver.gui.instruments.InstrumentMethods(instrument: Any, **kwargs: Any)[source]#
Bases:
InstrumentDisplayBase
- class instrumentserver.gui.instruments.InstrumentParameters(instrument: Any, parent: QWidget | None = None, viewType: type = <class 'instrumentserver.gui.instruments.ParametersTreeView'>, callSignals: bool = True, modelType: type = <class 'instrumentserver.gui.instruments.ModelParameters'>, **kwargs: Any)[source]#
Bases:
InstrumentDisplayBase
- class instrumentserver.gui.instruments.ItemParameters(unit: str = '', **kwargs: Any)[source]#
Bases:
ItemBase
- class instrumentserver.gui.instruments.MethodDisplay(fun: Callable, fullName: str | None = None, *args: Any, **kwargs: Any)[source]#
Bases:
QWidget- classmethod getTooltipFromFun(fun: Callable) str[source]#
Returns the signature of the function with its documentation underneath.
- runFailed#
Signal(str) emitted when the widget runs a function and fails. Emits the exception as a string.
- runSuccessful#
Signal(str) emitted when the widget runs a function and is successful. Emits the return value as a string.
- valueCommitted#
Signal() – emitted when the user commits via Return/Enter, regardless of success or failure
- class instrumentserver.gui.instruments.MethodsDelegate(parent: QObject | None = None)[source]#
Bases:
DelegateBase- createEditor(self, parent: QWidget | None, option: QStyleOptionViewItem, index: QModelIndex) QWidget | None[source]#
- methods: Dict[str, MethodDisplay]#
- class instrumentserver.gui.instruments.MethodsModel(*args: Any, **kwargs: Any)[source]#
Bases:
InstrumentModelBase
- class instrumentserver.gui.instruments.MethodsTreeView(model: QAbstractItemModel, *args: Any, **kwargs: Any)[source]#
Bases:
InstrumentTreeViewBase
- class instrumentserver.gui.instruments.ModelParameters(*args: Any, **kwargs: Any)[source]#
Bases:
InstrumentModelBase- headerLabels() List[str][source]#
The header label of every column: name, unit and delegate. A model with more columns extends this list and
rowItems()together.
- insertItemTo(parent: QStandardItem, item: QStandardItem) None[source]#
This is the only function that actually inserts items into the model. Overload for models that utilize more columns. Don’t call directly
If you are using delegates, this function should emit the newItem signal
- itemNewValue#
Emitted when an item in the model has received a new value, first object is the item’s name, second object is its new value
- Type:
Signal(item, object)
- rowItems(item: QStandardItem) List[QStandardItem][source]#
The items of one row,
itemfirst, one per column ofheaderLabels().insertItemTo()inserts them.
- updateParameter(bp: ParameterBroadcastBluePrint) None[source]#
- class instrumentserver.gui.instruments.ParameterDelegate(parent: QObject | None = None)[source]#
Bases:
DelegateBaseThe delegate for the InstrumentParameters widget.
- createEditor(widget: QWidget, option: QStyleOptionViewItem, index: QModelIndex) QWidget[source]#
This is the function that is supposed to create the widget. It should return it.
- makeParameterWidget(item: QStandardItem, parent: QWidget) ParameterWidget[source]#
The editor widget for the parameter of
item. A delegate that adds buttons next to the value overrides this;createEditor()does the rest (registering the widget and installing the navigation filter).
- class instrumentserver.gui.instruments.ParametersTreeView(model: QAbstractItemModel, *args: Any, **kwargs: Any)[source]#
Bases:
InstrumentTreeViewBase- delegateClass#
The delegate class of the value column (column 2).
alias of
ParameterDelegate
Bases:
QObjectEvent filter installed on value input widgets to handle Escape, Tab, and Shift+Tab.