00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef PREEDIT_H
00022 #define PREEDIT_H
00023
00024 #include "qimsyspreedit.h"
00025 #include "qimsysconversionitem.h"
00026 #include "japanese.h"
00027
00028 namespace ja_JP
00029 {
00030
00031 class Preedit : public QimsysPreedit
00032 {
00033 Q_OBJECT
00034 public:
00035 static Preedit *instance();
00036 private:
00037 Preedit(QObject *parent = 0);
00038 public:
00039 ~Preedit();
00040 bool init();
00041
00042 void commit();
00043
00044 void move(int offset, bool selection);
00045
00046 int conversionIndex() const;
00047 int convercionCount() const;
00048
00049 public slots:
00050 void cancel();
00051 void setConversions(const QimsysConversionItemList &conversions);
00052 void setCurrentText(const QString &text);
00053
00054 signals:
00055 void committed(const QimsysConversionItemList &conversions);
00056
00057 private:
00058 class Private;
00059 Private *d;
00060 };
00061
00062 }
00063 #endif//PREEDIT_H