-
Notifications
You must be signed in to change notification settings - Fork 0
/
historyshower.h
40 lines (38 loc) · 880 Bytes
/
historyshower.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
#ifndef HISTORYSHOWER_H
#define HISTORYSHOWER_H
#include <qcustomplot.h>
#include <globalstate.h>
#include <qdb.h>
class HistoryShower: public QCustomPlot
{
Q_OBJECT
public:
static const int DEV_NUM=5;
static unsigned int getCoulor(int index)
{
switch (index){
case 0:
return Qt::red;
case 1:
return Qt::green;
case 2:
return Qt::yellow;
case 3:
return Qt::blue;
case 4:
return Qt::darkRed;
default:
return Qt::white;
}
}
HistoryShower();
HistoryShower(QWidget* &);
void init();
void updateChart(qulonglong since);
private:
QVector<std::shared_ptr<QVector<double>>> x;
QVector<std::shared_ptr<QVector<double>>> y;
QVector<QString> id;
QCPLayoutGrid sublayout;
};
#endif // HISTORYSHOWER_H