10 #include "statusled.h" 12 class Environment :
public QGroupBox
15 Q_PROPERTY(
float dewarTemperature READ dewarTemperature)
16 Q_PROPERTY(
float dewarPressure READ dewarPressure)
17 Q_PROPERTY(
bool onUPS READ onUPS)
20 explicit Environment(QWidget *parent = 0);
21 float dewarTemperature()
const {
return m_dewarT; }
22 float dewarPressure()
const {
return m_dewarp; }
23 bool onUPS()
const {
return m_onups; }
26 void update(
const QDateTime &tstamp,
float T0,
float T1,
float T2,
float T3,
float p,
bool ups);
27 void gpioConnected() { gpioLED->setOn(); }
28 void gpioDisconnected() { gpioLED->setOff(); }
29 void gpioError() { gpioLED->setError(); }
30 void ifConnected() { ifLED->setOn(); }
31 void ifDisconnected() { ifLED->setOff(); }
32 void ifError() { ifLED->setError(); }
33 void backendConnected() { backendLED->setOn(); }
34 void backendDisconnected() { backendLED->setOff(); }
35 void backendError() { backendLED->setError(); }
36 void agilentConnected() { agilentLED->setOn(); }
37 void agilentDisconnected() { agilentLED->setOff(); }
38 void agilentError() { agilentLED->setError(); }
39 void mcConnected(
bool on) { on ? mcLED->setReady(
false) : mcLED->setOff(); }
40 void mcReady(
bool on) { mcLED->setReady(on); }
41 void mcError() { mcLED->setError(); }
42 void loggerRegistered(
const QString &) { envLED->setOn(); }
43 void loggerUnregistered(
const QString &) { envLED->setError(); }
46 QDateTime lastReading;
50 StatusLED *backendLED;
51 StatusLED *agilentLED;