-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdialog.h
More file actions
52 lines (41 loc) · 922 Bytes
/
Copy pathdialog.h
File metadata and controls
52 lines (41 loc) · 922 Bytes
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
#ifndef DIALOG_H
#define DIALOG_H
#include <QDialog>
#include <QSerialPort>
#include <QByteArray>
#include<QFile>
#include<QString>
#include<QtSql>
#include<QtDebug>
#include<QFileInfo>
#include<QSqlDatabase>
#include<QMessageBox>
namespace Ui {
class Dialog;
}
class Dialog : public QDialog
{
Q_OBJECT
public:
explicit Dialog(QWidget *parent = 0);
~Dialog();
private slots:
void readSerial();
void updateTemperature(QString);
void updateHumidity(QString);
void on_pushButton_clicked();
private:
Ui::Dialog *ui;
QSqlDatabase db;
QSqlQueryModel *querymodel;
QSerialPort *arduino;
static const quint16 arduino_uno_vendor_id = 9025;
static const quint16 arduino_uno_product_id = 67;
QByteArray serialData;
QString serialBuffer;
QString parsed_data;
QString parsed_data1;
double temperature_value;
double humidity_value;
};
#endif // DIALOG_H