BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
inputDeviceDriver.h
Go to the documentation of this file.
1 #ifndef INPUTDEVICEDRIVER_H
2 #define INPUTDEVICEDRIVER_H
3 
4 #ifndef BALL_COMMON_GLOBAL_H
5 # include <BALL/COMMON/global.h>
6 #endif
7 
8 #include <QtCore/QMutex>
9 
10 class QWidget;
11 
12 namespace BALL
13 {
14  namespace VIEW
15  {
16  class Scene;
17 
19  {
20  public:
21  InputDeviceDriver(QWidget* reciever);
22  virtual ~InputDeviceDriver();
23 
24  virtual bool setUp() = 0;
25  virtual bool tearDown() = 0;
26 
27  void setEnabled(bool enabled);
28  bool isEnabled() { return enabled_; }
29 
30  void setReceiver(Scene* s);
31  QWidget* getReceiver();
32 
33  protected:
34  void emitPositionChange(double x, double y, double z, double a, double b, double c);
35  void emitPositionChange(double x, double y, double z, double q1, double q2, double q3, double q4);
36  void emitHeadChange(double x, double y, double z, double q1, double q2, double q3, double q4);
37 
38  private:
39  QMutex receiverLock;
40 
41  QWidget* receiver_;
42  bool enabled_;
43  };
44 
45  }
46 }
47 
48 #endif //INPUTDEVICEDRIVER_H
49 
BALL_EXTERN_VARIABLE const double c
Definition: constants.h:149
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52