-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtc.hpp
executable file
·60 lines (54 loc) · 1.05 KB
/
tc.hpp
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
58
59
60
#ifndef TC_H
#define TC_H
#include <QDialog>
#include <QString>
#include <QThread>
#include <QFile>
#include "ui_termocoppia.h"
#include "serial.hpp"
#include <iostream>
#include <ctime>
#include <fstream>
#include <string>
//#include<QLed>
using namespace std;
class termocoppia;
class Thread :public QThread
{
public:
QString temperature;
termocoppia* mainwindow;
Q_OBJECT
public:
Thread(termocoppia *parent=0);
protected:
void run();
private:
volatile bool stopped;
serialport usb;
private slots:
void stop();
};
class termocoppia : public QDialog, public Ui_Dialog
{
Q_OBJECT
bool isrecording;
time_t rawtime;
ofstream logfile;
string* filename;
QTimer *tic;
QTimer *logtimer;
Thread *reader;
public:
termocoppia(QDialog *parent = 0);
void serial_port_enum(void);
private slots:
void update(void);
void start_recording(void);
void stop_recording(void);
void enableApply(void);
void disableApply(void);
void log(void);
void enable_open();
};
#endif