Base Widgets

This file contains the definitions of the fundamental widgets upon which all other QtPyVCP widgets are based.

class qtpyvcp.widgets.base_widgets.base_widget.CMDWidget(parent=None)[source]

Command Widget

This widget should be used as the base class for all widgets that control the machine. Eventually additional functionality will be added to this class.

class qtpyvcp.widgets.base_widgets.base_widget.ChanList[source]

Channel value list.

This list is intended to hold lambda functions for retrieving the current data channel values. When the list is indexed the function is called and the resulting value is returned.

class qtpyvcp.widgets.base_widgets.base_widget.HALWidget(parent=None)[source]

HAL Widget

This widget should be used as the base class for HAL widgets. ToDo: Implement HAL functionality.

class qtpyvcp.widgets.base_widgets.base_widget.QtPyVCPBaseWidget(parent=None)[source]

QtPyVCP Base Widget.

Class on which all other QtPyVCP widgets are based. This class handles the rules and other things that apply to all QtPyVCP widgets regardless of use.

rules

JSON formatted list of dictionaries, defining the widget rules.

Returns:str
setStyleClass(style_class)[source]

Set the QSS style class for the widget

style

QSS style class selector property.

This property can be changed dynamically to update the QSS style applied to the widget.

Example

The style property can be used as a selector in QSS to apply different styles depending on the value.

/* This will be applied when the `style` is set to "error" */
WidgetClass[style="error"] {
    color: red;
}

/* This will be applied when the `style` is not set */
WidgetClass {
    color: black;
}
Returns:str
class qtpyvcp.widgets.base_widgets.base_widget.VCPButton(parent=None)[source]

VCP Button Widget

This is a general purpose button widget for displaying data and other uses that do not involve user interaction.

class qtpyvcp.widgets.base_widgets.base_widget.VCPWidget(parent=None)[source]

VCP Widget

This is a general purpose widget for displaying data and other uses that do not involve user interaction.