35 lines
815 B
C++
35 lines
815 B
C++
#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;
|
|
};
|