vent.gui.widgets package

Submodules

vent.gui.widgets.components module

vent.gui.widgets.control module

vent.gui.widgets.monitor module

Classes

Monitor(value[, update_period, enum_name])

param value

class vent.gui.widgets.monitor.Monitor(value, update_period=0.5, enum_name=None)[source]

Bases: PySide2.QtWidgets.QWidget

Parameters
  • value (Value) –

  • update_period (float) – update period of monitor in s

Methods

__init__(value[, update_period, enum_name])

param value

_limits_changed(val)

check_alarm([value])

init_ui()

set_alarm(alarm)

Simple wrapper to set alarm state from a qt signal

timed_update()

toggle_alarm()

toggle_control(state)

update_boxes(new_values)

update_limits(new_limits)

update_value(new_value)

Attributes

alarm_state

alarm(*args, **kwargs) = <PySide2.QtCore.Signal object>
limits_changed(*args, **kwargs) = <PySide2.QtCore.Signal object>
__init__(value, update_period=0.5, enum_name=None)[source]
Parameters
  • value (Value) –

  • update_period (float) – update period of monitor in s

init_ui()[source]
toggle_control(state)[source]
update_boxes(new_values)[source]
update_value(new_value)[source]
update_limits(new_limits)[source]
timed_update()[source]
_limits_changed(val)[source]
property alarm_state
set_alarm(alarm)[source]

Simple wrapper to set alarm state from a qt signal

Parameters

alarm (bool) – Whether to set as alarm state or not

toggle_alarm()[source]
check_alarm(value=None)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

vent.gui.widgets.plot module

Data

PLOT_FREQ

Update frequency of Plot s in Hz

PLOT_TIMER

A QTimer that updates :class:`.TimedPlotCurveItem`s

Classes

Plot(name[, buffer_size, plot_duration, …])

When initializing PlotWidget, parent and background are passed to GraphicsWidget.__init__() and all others are passed to PlotItem.__init__().

vent.gui.widgets.plot.PLOT_TIMER = None

A QTimer that updates :class:`.TimedPlotCurveItem`s

vent.gui.widgets.plot.PLOT_FREQ = 5

Update frequency of Plot s in Hz

class vent.gui.widgets.plot.Plot(name, buffer_size=4092, plot_duration=5, abs_range=None, safe_range=None, color=None, units='', **kwargs)[source]

Bases: pyqtgraph.widgets.PlotWidget.PlotWidget

When initializing PlotWidget, parent and background are passed to GraphicsWidget.__init__() and all others are passed to PlotItem.__init__().

Methods

_safe_limits_changed(val)

set_duration(dur)

set_safe_limits(limits)

update_value(new_value)

new_value: (timestamp from time.time(), value)

limits_changed(*args, **kwargs) = <PySide2.QtCore.Signal object>
set_duration(dur)[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
update_value(new_value)[source]

new_value: (timestamp from time.time(), value)

_safe_limits_changed(val)[source]
set_safe_limits(limits)[source]

vent.gui.widgets.status_bar module

Classes

HeartBeat([update_interval, timeout_dur])

param update_interval

How often to do the heartbeat, in ms

Message_Display()

Power_Button()

Status_Bar()

  • Start/stop button

class vent.gui.widgets.status_bar.Status_Bar[source]

Bases: PySide2.QtWidgets.QWidget

  • Start/stop button

  • Status indicator - a clock that increments with heartbeats,

    or some other visual indicator that things are alright

  • Status bar - most recent alarm or notification w/ means of clearing

  • Override to give 100% oxygen and silence all alarms

Methods

init_ui()

init_ui()[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class vent.gui.widgets.status_bar.Message_Display[source]

Bases: PySide2.QtWidgets.QFrame

Attributes

alarm_level

Methods

clear_message()

draw_state([state])

init_ui()

make_icons()

update_message(alarm)

param alarm

message_cleared(*args, **kwargs) = <PySide2.QtCore.Signal object>
level_changed(*args, **kwargs) = <PySide2.QtCore.Signal object>
make_icons()[source]
init_ui()[source]
draw_state(state=None)[source]
update_message(alarm)[source]
Parameters

alarm (Alarm) –

clear_message()[source]
property alarm_level
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class vent.gui.widgets.status_bar.HeartBeat(update_interval=100, timeout_dur=5000)[source]

Bases: PySide2.QtWidgets.QFrame

Parameters
  • update_interval (int) – How often to do the heartbeat, in ms

  • timeout (int) – how long to wait before hearing from control process

Methods

__init__([update_interval, timeout_dur])

param update_interval

How often to do the heartbeat, in ms

_heartbeat()

Called every (update_interval) milliseconds to set the text of the timer.

beatheart(heartbeat_time)

check_timeout()

init_ui()

set_indicator([state])

start_timer([update_interval])

param update_interval

How often (in ms) the timer should be updated.

stop_timer()

you can read the sign ya punk

timeout(*args, **kwargs) = <PySide2.QtCore.Signal object>
heartbeat(*args, **kwargs) = <PySide2.QtCore.Signal object>
__init__(update_interval=100, timeout_dur=5000)[source]
Parameters
  • update_interval (int) – How often to do the heartbeat, in ms

  • timeout (int) – how long to wait before hearing from control process

init_ui()[source]
check_timeout()[source]
set_indicator(state=None)[source]
start_timer(update_interval=None)[source]
Parameters

update_interval (float) – How often (in ms) the timer should be updated.

stop_timer()[source]

you can read the sign ya punk

beatheart(heartbeat_time)[source]
_heartbeat()[source]

Called every (update_interval) milliseconds to set the text of the timer.

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class vent.gui.widgets.status_bar.Power_Button[source]

Bases: PySide2.QtWidgets.QPushButton

Methods

init_ui()

init_ui()[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>

Module contents