00001 /****************************************************************************** 00002 * This file is part of the Gluon Development Platform 00003 * Copyright (C) 2010 Kim Jung Nissen <jungnissen@gmail.com> 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 */ 00019 00020 #include "joystick.h" 00021 #include "joystickprivate.h" 00022 00023 using namespace GluonInput; 00024 00025 Joystick::Joystick( InputThread* inputThread, QObject* parent ) 00026 : InputDevice( inputThread, parent ) 00027 , d( new JoystickPrivate ) 00028 { 00029 connect( inputThread, SIGNAL( absAxisMoved( int, int ) ), SLOT( joystickMoved( int, int ) ), Qt::DirectConnection ); 00030 } 00031 00032 int Joystick::axisX() const 00033 { 00034 #ifdef __GNUC__ 00035 #warning fix the joystick thing, when I have a joystick to test with 00036 #endif 00037 return -1; 00038 } 00039 00040 int Joystick::axisY() const 00041 { 00042 // return absAxisValue(this->inputThread()->getJoystickYAxis()); 00043 return -1; 00044 } 00045 00046 int Joystick::axisZ() const 00047 { 00048 // return absAxisValue(this->inputThread()->getJoystickZAxis()); 00049 return -1; 00050 } 00051 00052 void Joystick::joystickMoved( int axis, int distance ) 00053 { 00054 } 00055 00056 #include "joystick.moc"