Added logs and check with trad RM we are working ok
This commit is contained in:
29
PowerPanel.h
Normal file
29
PowerPanel.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include <QWidget>
|
||||
|
||||
class QLabel;
|
||||
|
||||
class PowerPanel : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit PowerPanel(QWidget *parent = nullptr);
|
||||
void reset();
|
||||
void setStatus(const QString &raw);
|
||||
void setRatedVoltage(const QString &v);
|
||||
void setVoltages(const QStringList &v);
|
||||
|
||||
private:
|
||||
QString statusText(const QString &raw) const;
|
||||
QString statusColour(const QString &raw) const;
|
||||
QString voltColour(const QString &val) const;
|
||||
void applyLabel(QLabel *l, const QString &text, const QString &colour);
|
||||
|
||||
QLabel *m_statusLabel = nullptr;
|
||||
QLabel *m_supplyLabel = nullptr;
|
||||
QLabel *m_externalLabel = nullptr;
|
||||
QLabel *m_ratedLabel = nullptr;
|
||||
QLabel *m_batt1Label = nullptr;
|
||||
QLabel *m_batt2Label = nullptr;
|
||||
QLabel *m_batt3Label = nullptr;
|
||||
};
|
||||
Reference in New Issue
Block a user