vent.gui package¶
Submodules¶
vent.gui.defaults module¶
vent.gui.styles module¶
Data
(float): inter-update interval (seconds) for |
Functions
|
Apply Dark Theme to the Qt application instance. |
-
vent.gui.styles.
MONITOR_UPDATE_INTERVAL
= 0.5¶ inter-update interval (seconds) for
Monitor
- Type
(float)
-
vent.gui.styles.
set_dark_palette
(app)[source]¶ Apply Dark Theme to the Qt application instance.
- borrowed from https://github.com/gmarull/qtmodern/blob/master/qtmodern/styles.py
- Args:
app (QApplication): QApplication instance.
vent.gui.widgets module¶
Module contents¶
Data
(bool): whether there hsould only be one GUI instance at a time. disabled during testing. |
|
Values to plot. |
Functions
Retreive the currently running instance of the GUI |
|
|
|
Load the monospaced font and set the module-global |
|
module function to return a |
|
|
Store the current instance of the GUI |
-
vent.gui.
LIMIT_GUI_INSTANCE
= True¶ whether there hsould only be one GUI instance at a time. disabled during testing.
- Type
(bool)
-
vent.gui.
PLOTS
= OrderedDict([(<ValueName.PRESSURE: 12>, {'name': 'Pressure', 'units': 'mmH2O', 'abs_range': (0, 70), 'safe_range': (0, 60), 'decimals': 1, 'default': None, 'color': '#FF6319'}), (<ValueName.TEMP: 9>, {'name': 'Temp', 'units': '°C', 'abs_range': (35, 40), 'safe_range': (36, 39), 'decimals': 1, 'default': None, 'color': '#EE352E'}), (<ValueName.HUMIDITY: 10>, {'name': 'Humidity', 'units': '%', 'abs_range': (0, 100), 'safe_range': (70, 100), 'decimals': 1, 'default': None, 'color': '#0039A6'})])¶ Values to plot.
Should have the same key as some key in
SENSOR
. If it does, it will be mutually connected to the resultinggui.widgets.Monitor_Value
such that the set limit range is updated when the horizontal bars on the plot are updated.:{ 'name' (str): title of plot, 'abs_range' (tuple): absolute limit of plot range, 'safe_range' (tuple): safe range, will be discolored outside of this range, 'color' (str): hex color of line (like "#FF0000") }
-
vent.gui.
set_gui_instance
(instance)[source]¶ Store the current instance of the GUI
- Parameters
instance (
Vent_Gui
) –
-
vent.gui.
mono_font
()[source]¶ module function to return a
PySide2.QtGui.QFont
to use as the mono font.use this instead of just making because
PySide2.QtGui.QFontDatabase
can’t be instantiated before thePySide2.QtWidgets.QApplication
is instantiated, so we load the font after the app