-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgloveInterface.h
47 lines (36 loc) · 911 Bytes
/
gloveInterface.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
#ifndef GLOVEINTERFACE_H
#define GLOVEINTERFACE_H
#include <QObject>
#include <QList>
/**
* @file gloveInterface.h
*
* Implementation of GloveInterface class.
* All interaction with the glove comes through this class.
*/
class Glove;
class GloveInterface : public QObject
{
Q_OBJECT
public:
GloveInterface();
~GloveInterface();
/// Trying to connect mGlove with a real glove.
void setHardwareGlove(const QString& portName);
/// Returns true if mGlove serial port set.
bool isHardwareGloveSet();
/// Return true, if the port is open.
bool isDataSending() const;
/// Calls the appropriate method of the Glove class.
void startSendingDatas();
/// Calls the appropriate method of the Glove class.
void stopSendingDatas();
QList<int> gloveDatas();
signals:
/// Re emits the signal of the glove.
void dataIsRead();
private:
Glove *mGlove;
bool mIsConnected;
};
#endif // GLOVEINTERFACE_H