/*************************************************************************** joystickenv.hpp - description ------------------- begin : Sun Nov 7 16:54:22 CET 2007 copyright : (C) 2007 by Harald Krippel email : harald@the-develop.net ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef JOYSTICKENV_H #define JOYSTICKENV_H /** *@author Harald Krippel */ #include #include class JoystickEnv : public QObject { // Q_OBJECT public: static JoystickEnv *theInstance(QObject *parent=0); JoystickEnv (QObject *parent=0); ~JoystickEnv (); void Init (); void update(); float getAxis(int j,int x); int getButtons(int j); private: jsJoystick *joystick[2] ; float axis[2][8] ; int buttons[2] ; static JoystickEnv *theInstancePtr; }; #endif // JOYSTICKENV_H