instrumentserver.gui.instruments#
Classes
|
A widget that allows parameter creation. |
|
Widget that allows the display of real time parameters and changing their values. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The delegate for the InstrumentParameters widget. |
|
|
|
|
|
|
|
|
|
- class instrumentserver.gui.instruments.AddParameterWidget(parent: QWidget | None = None, typeInput: bool = False)[source]#
Bases:
QWidgetA widget that allows parameter creation.
- Parameters:
parent – parent widget
typeInput – if
True, add input fields for creating a value validator.
- invalidParamRequested#
Signal(str)
- newParamRequested#
Signal(str, str, str, ParameterTypes, str)
- 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, **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.
- 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- 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)
- updateParameter(bp: ParameterBroadcastBluePrint) None[source]#
- class instrumentserver.gui.instruments.ParameterDelegate(parent: QObject | None = None)[source]#
Bases:
DelegateBaseThe delegate for the InstrumentParameters widget.
- class instrumentserver.gui.instruments.ParameterDeleteDelegate(parent: QObject | None = None)[source]#
Bases:
ParameterDelegate- createEditor(widget: QWidget, option: QStyleOptionViewItem, index: QModelIndex) QWidget[source]#
This is the function that is supposed to create the widget. It should return it.
- removeParameter#
Signal(str) Emits the name of the parameter to be deleted when the user presses the delete button.
- class instrumentserver.gui.instruments.ParameterManagerGui(instrument: ProxyInstrumentModule | ParameterManager, parent: QWidget | None = None, **kwargs: Any)[source]#
Bases:
InstrumentParameters- connectSignals() None[source]#
Connects all the signals to slots of different classes. Override to add more signals
- parameterCreated#
Signal() – emitted when a parameter was created successfully
- parameterCreationError#
Signal(str) – emitted when there’s an error during parameter creation.
- class instrumentserver.gui.instruments.ParameterManagerTreeView(model: QAbstractItemModel, *args: Any, **kwargs: Any)[source]#
Bases:
InstrumentTreeViewBase
- class instrumentserver.gui.instruments.ParametersTreeView(model: QAbstractItemModel, *args: Any, **kwargs: Any)[source]#
Bases:
InstrumentTreeViewBase