00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef CUSTOMINPUT_H
00020 #define CUSTOMINPUT_H
00021
00022 #include "gluon_input_export.h"
00023 #include "gluondevices.h"
00024
00025 #include <QtCore/QObject>
00026 #include <QtCore/QList>
00027 #include <QtCore/QPair>
00028 #include <QtCore/QSharedData>
00029
00030 namespace GluonInput
00031 {
00032 class InputDevice;
00033 class InputEvent;
00034 class CustomInputPrivate;
00035
00036 class GLUON_INPUT_EXPORT CustomInput : public QObject
00037 {
00038 Q_OBJECT
00039 public:
00040 CustomInput( QObject* parent = 0 );
00041 ~CustomInput();
00042
00043 void setButton( const QString& name, InputDevice* input, int keyCode );
00044 void setButton( const QString& name );
00045 void remButton( const QString& name );
00046 void setAbsAxis( const QString& name, InputDevice* input, int axis );
00047 void setRelAxis( const QString& name, InputDevice* input, int axis );
00048 void remAbsAxis( const QString& name );
00049 void remRelAxis( const QString& name );
00050
00051 QStringList buttonNameList();
00052 QStringList absAxisNameList();
00053 QStringList relAxisNameList();
00054
00055 signals:
00056 void buttonPressed( QString name );
00057 void buttonReleased( QString name );
00058 void absAxisChanged( QString name, int value );
00059 void relAxisChanged( QString name, int value );
00060
00061 private:
00062 QSharedDataPointer<CustomInputPrivate> d;
00063 };
00064 }
00065
00066 #endif // KCLCUSTOMINPUT_H