BALL  1.5.0
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:
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);
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 
global.h
BALL::VIEW::InputDeviceDriver::setUp
virtual bool setUp()=0
BALL::VIEW::InputDeviceDriver::InputDeviceDriver
InputDeviceDriver(QWidget *reciever)
BALL::VIEW::InputDeviceDriver::setReceiver
void setReceiver(Scene *s)
BALL::VIEW::Scene
Definition: scene.h:141
BALL
Definition: constants.h:13
QWidget
BALL::VIEW::InputDeviceDriver::tearDown
virtual bool tearDown()=0
BALL::Constants::c
BALL_EXTERN_VARIABLE const double c
Definition: constants.h:149
BALL::VIEW::InputDeviceDriver::setEnabled
void setEnabled(bool enabled)
BALL::VIEW::InputDeviceDriver::emitPositionChange
void emitPositionChange(double x, double y, double z, double q1, double q2, double q3, double q4)
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
BALL::VIEW::InputDeviceDriver::getReceiver
QWidget * getReceiver()
BALL::VIEW::InputDeviceDriver::~InputDeviceDriver
virtual ~InputDeviceDriver()
BALL::VIEW::InputDeviceDriver::isEnabled
bool isEnabled()
Definition: inputDeviceDriver.h:28
BALL::VIEW::InputDeviceDriver::emitHeadChange
void emitHeadChange(double x, double y, double z, double q1, double q2, double q3, double q4)
BALL::VIEW::InputDeviceDriver::emitPositionChange
void emitPositionChange(double x, double y, double z, double a, double b, double c)
BALL::VIEW::InputDeviceDriver
Definition: inputDeviceDriver.h:19