realtimesensorwindow.h
1.18 KB
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
48
49
50
51
#ifndef REALTIMESENSORWINDOW_H
#define REALTIMESENSORWINDOW_H
#include <QMainWindow>
#include <qlabel.h>
#include "servicedata.h"
#define REALSENSOR_CONTROL_LIST_COL_MAX 4
#define REALSENSOR_CONTROL_LIST_ITEM_MAX 10
namespace Ui {
class RealtimeSensorWindow;
}
class RealtimeSensorWindow : public QMainWindow
{
Q_OBJECT
public:
explicit RealtimeSensorWindow(QWidget *parent = 0);
~RealtimeSensorWindow();
protected:
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
private slots:
void on_backButton_clicked();
void oneSecTimerFired(void);
void on_resetButton_clicked();
void on_helpButton_clicked();
private:
const uint16_t m_arrSensorItemIdxs[REALSENSOR_CONTROL_LIST_ITEM_MAX]={
0,1,3,4,5,6,7,8,12,13
};
const uint16_t m_arrCriticalValue[REALSENSOR_CONTROL_LIST_ITEM_MAX] = {
320,210,120,150,300,300,300,300,80,80
};
Ui::RealtimeSensorWindow *ui;
QLabel *m_arrLbState[REALSENSOR_CONTROL_LIST_COL_MAX][REALSENSOR_CONTROL_LIST_ITEM_MAX];
sensor_log_item* m_arrSensorItems[REALSENSOR_CONTROL_LIST_ITEM_MAX];
QTimer *timer;
void reloadUi(void);
};
#endif // REALTIMESENSORWINDOW_H