qtmobility/examples/sensors/panorama/inputcontroller.h
changeset 11 06b8e2af4411
child 14 6fbed849b4f4
equal deleted inserted replaced
8:71781823f776 11:06b8e2af4411
       
     1 #ifndef INPUTCONTROLLER_H
       
     2 #define INPUTCONTROLLER_H
       
     3 
       
     4 #include <QString>
       
     5 #include <QWidget>
       
     6 
       
     7 
       
     8 class InputController : public QObject
       
     9 {
       
    10 //    Q_OBJECT
       
    11 public:
       
    12 
       
    13     InputController();
       
    14     void start();
       
    15     void stop();
       
    16     virtual void startTimer();
       
    17     virtual void stopTimer();
       
    18     virtual void startSensor();
       
    19     virtual void stopSensor();
       
    20     int getX(), getY();
       
    21     void setX(int x), setY(int y);
       
    22 
       
    23     virtual void keyPressEvent(QKeyEvent *e);
       
    24 
       
    25     static const QString QACCELEROMETER,
       
    26     QORIENTATIONSENSOR, QROTATIONSENSOR,
       
    27     QMAGNETOMETER, QTAPSENSOR, QCOMPASS, QKEYS;
       
    28 
       
    29 
       
    30 protected:
       
    31     //current coordinates
       
    32     int m_x,m_y;
       
    33 
       
    34 
       
    35 
       
    36 
       
    37 };
       
    38 
       
    39 
       
    40 #endif // INPUTCONTROLLER_H