00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef QIMSYSKEYMANAGER_H
00022 #define QIMSYSKEYMANAGER_H
00023
00024 #include "qimsysglobal.h"
00025 #include "qimsysabstractipcobject.h"
00026
00027 class QIMSYS_EXPORT QimsysKeyManager : public QimsysAbstractIpcObject
00028 {
00029 Q_OBJECT
00030 Q_CLASSINFO("D-Bus Interface", "local.KeyManager")
00031 Q_PROPERTY(bool accepted READ isAccepted);
00032 Q_DISABLE_COPY(QimsysKeyManager)
00033 public:
00034 explicit QimsysKeyManager(QObject *parent = 0, Type type = Client);
00035 ~QimsysKeyManager();
00036 virtual bool init();
00037
00038
00039 public slots:
00040 void process(QString text, int keycode, int modifiers, bool isPress, bool autoRepeat);
00041 bool keyPress(const QString &text, int keycode, int modifiers, bool autoRepeat);
00042 bool keyRelease(const QString &text, int keycode, int modifiers, bool autoRepeat);
00043
00044 bool isAccepted() const;
00045 void accept();
00046
00047 signals:
00048 void keyPressed(const QString &text, int keycode, int modifiers, bool autoRepeat);
00049 void keyReleased(const QString &text, int keycode, int modifiers, bool autoRepeat);
00050
00051 protected:
00052 QimsysAbstractIpcObject *server() const;
00053
00054 private:
00055 void processKey(QString text, int keycode, int modifiers, bool isPress, bool autoRepeat);
00056
00057 private:
00058 class Private;
00059 Private *d;
00060 };
00061
00062 #endif//QIMSYSKEYMANAGER_H