Tab based websocket comms looking like trad RM
This commit is contained in:
34
VersionsPanel.h
Normal file
34
VersionsPanel.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#include <QWidget>
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
|
||||
class QLabel;
|
||||
class QTreeWidget;
|
||||
class QTreeWidgetItem;
|
||||
|
||||
class VersionsPanel : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit VersionsPanel(QWidget *parent = nullptr);
|
||||
|
||||
void reset();
|
||||
void setDeviceName(const QString &name);
|
||||
void setRnpCount(int count);
|
||||
void setVersion(const QString &boardId, const QString &version);
|
||||
void setUid(const QString &boardId, const QString &uid);
|
||||
|
||||
private:
|
||||
void updateStatus();
|
||||
|
||||
QLabel *m_deviceNameLabel = nullptr;
|
||||
QTreeWidget *m_table = nullptr;
|
||||
QLabel *m_statusLabel = nullptr;
|
||||
|
||||
// boardId -> row index in tree (0 = master)
|
||||
QMap<QString, int> m_rowIndex;
|
||||
QString m_deviceName;
|
||||
int m_rnpCount = -1;
|
||||
int m_collected = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user