examples/sensors/panoramaWithSense/inputcontroller.h
changeset 5 603d3f8b6302
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/sensors/panoramaWithSense/inputcontroller.h	Mon Oct 04 01:37:06 2010 +0300
@@ -0,0 +1,42 @@
+#ifndef INPUTCONTROLLER_H
+#define INPUTCONTROLLER_H
+
+#include <QKeyEvent>
+#include <qsensor.h>
+
+QTM_USE_NAMESPACE
+
+class InputController : public QObject
+{
+
+public:
+
+    InputController();
+    virtual ~InputController(){};
+    virtual void updateCoordinates();
+    virtual void keyPressEvent(QKeyEvent *e);
+
+    static int getX(), getY();
+    static void setX(int x), setY(int y);
+
+
+    static const QString QACCELEROMETER,
+    QORIENTATIONSENSOR, QROTATIONSENSOR,
+    QMAGNETOMETER, QTAPSENSOR, QCOMPASS, QKEYS;
+
+public slots:
+    virtual void doStart();
+    virtual void doStop();
+
+protected:
+    //current coordinates
+    static int m_x,m_y;
+    void setDataRate(QSensor* sensor);
+
+
+
+
+};
+
+
+#endif // INPUTCONTROLLER_H