-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathqanalogthread.h
More file actions
44 lines (31 loc) · 749 Bytes
/
qanalogthread.h
File metadata and controls
44 lines (31 loc) · 749 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
#ifndef QANALOGTHREAD_H
#define QANALOGTHREAD_H
#include <QThread>
#include <QEvent>
#include <QList>
#include <QByteArray>
class QAnalogThread : public QThread
{
Q_OBJECT
public:
static QAnalogThread* CreateInstance( );
void AddCmd( QByteArray& byCmd );
void ClearCmd( );
void SetStopSend( bool bStop );
void SetIntervalTime( int nTime );
void PostEvent( );
protected:
void run( );
void customEvent( QEvent *e );
private:
explicit QAnalogThread(QObject *parent = 0);
private:
static QAnalogThread* pAnalogThread;
QList< QByteArray > lstCmds;
bool bStopSend;
int nIntervalTime;
signals:
void Command( QByteArray byCmd );
public slots:
};
#endif // QANALOGTHREAD_H