forked from dihonglongxi/FactoryTestApp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DutInfoWidget.h
47 lines (30 loc) · 835 Bytes
/
DutInfoWidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#include <QWidget>
#include <QLabel>
#include <QSharedPointer>
#include <QMutexLocker>
#include "DutButton.h"
#include "SessionManager.h"
class DutInfoWidget : public QWidget
{
Q_OBJECT
public:
DutInfoWidget(SessionManager* session, QWidget* parent = nullptr);
public slots:
void showDutInfo(int no);
void updateDut(Dut dut);
void setDutChecked(int no, bool checked);
private:
QMutex _updateMutex;
SessionManager* _session;
QLabel* _slot;
QString _slotTemplate = "<b>Slot:</b> %1";
QLabel* _id;
QString _idTemplate = "<b>Device ID:</b> %1";
QLabel* _status;
QString _statusTemplate = "<b>Status:</b> %1";
QLabel* _errorDesc;
QString _errorDescTemplate = "<b>Last error description:</b> %1";
QLabel* _checkState;
QMap<int, Dut> _duts;
};