[immodule-qt] Does QT 4 beta 1 support IM modules
lars at trolltech.com
Thu Feb 3 15:42:30 EET 2005
On Tuesday 01 February 2005 04:24, Daisuke Kameda wrote:
> On Sunday 16 January 2005 22:37, Daisuke Kameda wrote:
> > > > QMultiInputContext is never mere switcher.
> > > > QMultiInputContext which we implemented has the following roles.
> > > >
> > > >
> > > > 1. The input method which is able to delegate processing of events to
> > > > the arbitrary input methods can be created by inheriting
> > > > QMultiInputContext and using changeInputMethod(). This is one of the
> > > > meanings of "Multi."
> > > >
> > > > For example, IM can be more easily created by leaving
> > > > QSimpleInputContext except the state where isComposing() is true.
> > >
> > > I don't think I understand you here.
> > Sorry, I explain using other example.
> > Please assume the situation of wanting to make input method for using
> > Japanese and the language other than English. In this case, if it is
> > implemented as follows, it is realizable immediately. Only when a
> > Japanese input is active, Japanese input method (Anthy, canna, etc.) is
> > used, and when other, input method to which m17n-lib corresponds is used.
> > This is easily realizable if QMultiInputContext is used. The
> > QInputContext class which inherited QMultiInputContext is only
> > implemented, to which only when a specific key (for example,
> > Zenkaku_Hankaku) is pushed Japanese input method operates, and in other,
> > input method to which m17 n-lib corresponds operates.
> > Although I do not know since I am not a specialist, probably there will
> > be uses various otherwise.
> I have implemented QMultiInputContext only with this feature.
> The patch must be applied after applying setFocus patch.
> It has the minimum function at least.
> It will be necessary to consider individually about
> setting up default IM and changing IM by the context menu.
Thanks for the patch. If you would like to have the multi input context as a
base to build additional contexts on top, wouldn't it be better if it was
inside of Qt instead of being a plugin?
I have one question though. You added a signal and a slot to QInputContext
which I don't understand:
+ void imEventGenerated( QObject *receiver, QInputMethodEvent *e );
+ virtual void imEventReceived( QObject *receiver, QInputMethodEvent *e );
Are these really needed, as QInputContext::sendIMEvent() currently won't emit
the signal, and the signal provides no way of blocking the event from being
send to the widget.
And I think the slot doesn't make any sense in QInputContext itself. If the
signal is needed, it would be enough to add the slot to QMultiInputContext.
Could you please tell me why these two methods would be needed in the
QInputContext class itself?
If you want I can also add the simple input context to Qt. Please tell me if I
should do so.
Other than that, I have modified the QInputMethod event structure to be able
to deal with most things as requested from your side. Please have a look at
it and tell me if there are other requirements or something in the event
structure is not usable.
More information about the immodule-qt