fakeDriver.h

Go to the documentation of this file.
00001 #include <BALL/VIEW/INPUT/inputDeviceDriver.h>
00002 
00003 namespace BALL
00004 {
00005   namespace VIEW
00006   {
00007     class FakeDriver : public InputDeviceDriver, protected QThread
00008     {
00009       public:
00010         FakeDriver(Scene* receiver)
00011           : InputDeviceDriver(receiver) {}
00012         bool setUp() { return true; }
00013         bool tearDown() { return true; }
00014 
00015         void setEnabled(bool enabled) { InputDeviceDriver::setEnabled(enabled); if(enabled) start(); }
00016 
00017       private:
00018         void run() { while(true) { emitPositionChange(1,2,-3,4,5,6); msleep(20); } }
00019     };
00020   }
00021 }