00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef INPUTTHREAD_H
00022 #define INPUTTHREAD_H
00023
00024 #include "gluon_input_export.h"
00025 #include "gluonbuttons.h"
00026 #include "absval.h"
00027
00028 #include <QtCore/QThread>
00029
00030 namespace GluonInput
00031 {
00032 class GLUON_INPUT_EXPORT InputThread : public QThread
00033 {
00034 public:
00035 explicit InputThread( const QString& devicePath, QObject* parent = 0 );
00036 ~InputThread();
00037 void run();
00038
00039 int joystickXAxis();
00040 int joystickYAxis();
00041 int joystickZAxis();
00042 void stop();
00043
00044 int vendor() const;
00045 int product() const;
00046 int version() const;
00047 int bustype() const;
00048
00049 QList<int> buttonCapabilities() const;
00050 QList<int> absAxisCapabilities() const;
00051 QList<int> relAxisCapabilities() const;
00052 AbsVal axisInfo( int axisCode ) const;
00053
00054 const QString deviceName() const;
00055 GluonInput::DeviceFlag deviceType() const;
00056
00057 bool isEnabled() const;
00058
00059 bool error();
00060 QString msgError();
00061
00062 QObject* parent();
00063
00064 private:
00065 class InputThreadPrivate;
00066 InputThreadPrivate* const d;
00067 };
00068 }
00069
00070 #endif //INPUTTHREAD_H