00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef QABSTRACTINPUTMETHOD_H
00022 #define QABSTRACTINPUTMETHOD_H
00023
00024 #include <QObject>
00025
00026 class QAbstractInputMethod : public QObject
00027 {
00028 Q_OBJECT
00029 public:
00030 enum UpdateType {
00031 Update,
00032 FocusIn,
00033 FocusOut,
00034 Reset,
00035 Destroyed,
00036 };
00037 explicit QAbstractInputMethod(QObject *parent = 0);
00038 ~QAbstractInputMethod();
00039
00040 virtual bool filter(int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat) = 0;
00041 virtual void reset() = 0;
00042 virtual void updateHandler(UpdateType type) = 0;
00043
00044 virtual bool isComposing() const;
00045
00046 protected slots:
00047 virtual void setComposing(bool composing);
00048
00049 signals:
00050 void composingChanged(bool composing);
00051
00052 protected:
00053 virtual void sendCommitString(const QString &commitString) = 0;
00054 virtual void sendPreeditString(const QString &preeditString, int cursorPosition, int selectionLength = 0) = 0;
00055
00056 private:
00057 class Private;
00058 Private *d;
00059 };
00060
00061 #endif // QABSTRACTINPUTMETHOD_H