diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | c90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch) | |
tree | 6d8391395bce9eaea4ad78958617edb20c6a7573 /libksirtet/lib/keys.h | |
download | tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libksirtet/lib/keys.h')
-rw-r--r-- | libksirtet/lib/keys.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/libksirtet/lib/keys.h b/libksirtet/lib/keys.h new file mode 100644 index 00000000..07c08419 --- /dev/null +++ b/libksirtet/lib/keys.h @@ -0,0 +1,42 @@ +#ifndef KEYS_H +#define KEYS_H + +#include <qmap.h> +#include <kaction.h> + +#include "mp_interface.h" + + +class KeyData : public QObject +{ + Q_OBJECT + public: + KeyData(uint maxNb, uint nbActions, const ActionData *, + QObject *parent); + void setKeycodes(uint nb, uint i, const int *keycodes); + + void setCurrentNb(uint nb); + void clear(); + void createActionCollection(uint index, QWidget *receiver); + void setEnabled(uint index, bool enabled); + void addKeys(KKeyDialog &); + void save(); + + void keyEvent(QKeyEvent *e, bool pressed); + + private: + uint _maxNb; + QMemArray<ActionData> _data; + QMap<int, QMap<int, QMemArray<int> > > _keycodes; + QMemArray<KActionCollection *> _cols; + struct SpecialData { + bool enabled; + QSignal *pressed, *released; + }; + QMap<KAction *, SpecialData> _specActions; + + QString group() const + { return QString("Keys (%1 humans)").arg(_cols.size()); } +}; + +#endif // KEYS_H |