-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathusr.h
57 lines (47 loc) · 1.16 KB
/
usr.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
48
49
50
51
52
53
54
55
56
57
#ifndef USR_H
#define USR_H
#include <QDialog>
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>
#include <qDebug>
#include <QString>
#include <windows.h>
#include <QTimer>
#include <qdatetime.h>
#include <QFile>
#include <QMessageBox>
#include <QUrl>
#include <QDesktopServices>
#include <QDir>
namespace Ui {
class usr;
}
class usr : public QDialog
{
Q_OBJECT
public:
explicit usr(QWidget *parent = 0);
~usr();
int bytesToInt(QByteArray bytes);
bool token = false; //用于自动控制监测
bool ifHandle = false; //用于判断是否是手动监测
private slots:
void on_send_clicked();
void Read_Data();
void on_openport_clicked();
void on_startAutoControl_clicked();
void sendchk();
void on_autoControlSwitch_stateChanged(int arg1);
void timerUpdate(void);
QString getTime();
void writeFile(QString str);
void log(QString str);
void on_write_clicked();
private:
void timerEvent(QTimerEvent *);
QSerialPort *serial;
Ui::usr *ui;
QByteArray requestData;//用于存储从串口那读取的数据
QTimer *timer;//用于计时
};
#endif // USR_H