-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocessthread.h
41 lines (37 loc) · 948 Bytes
/
processthread.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
#ifndef PROCESSTHREAD_H
#define PROCESSTHREAD_H
#include <QThread>
#include <QEventLoop>
#include <QByteArray>
#include <QDebug>
#include <QObject>
#include <QTimer>
class ProcessThread : public QThread
{
Q_OBJECT
public:
ProcessThread(){}
~ProcessThread(){
quit();
wait();
}
void run() override;
bool databaseMethodProcessType; // true: add new ID to database || false: check ID for sell
signals:
void afterProcessSignal(QString param);
void afterFuelProcessSignal(double);
void updateFuelValue(double);
public slots:
void threadStarter(bool);
void threadStopFuel();
private:
QString messageForUpdateUI;
bool threadWorkSitutation = false;
bool threadFuelWorkSituation = false;
double fuel_counter = 0.0;
double total_fuel = 0.0;
void database_com(QByteArray response);
private slots:
void fifteenSecondControllerTerminate();
};
#endif // PROCESSTHREAD_H