[immodule-qt] Some more things for Qt 4
Daisuke Kameda
kaminmat at cc.rim.or.jp
Sun Oct 24 12:26:03 EEST 2004
I am sorry that the reply have been very late.
Lars Knoll <lars at trolltech.com> wrote:
> * I would like to unify the virtual imStart,imCompose and imEndEvent methods
> into one virtual QWidget::imEvent() method. This will give us more
> flexibility in the future to change and extend the QIMEvent structure.
I think that this proposal is good too.
> * The input method needs a way to query properties of the input widget. One
> example is surrounding text, another one is reconversion. The patch I saw for
> surrounding relying on a virtual method to return exatly this one property.
> This has the disadvantage that it is not extensible in the future. For that
> reason I'd like to propose that we add a slightly different virtual method to
> QWidget:
> virtual QVariant imQuery(IMProperty prop);
> IMProperty is an enum, that will contain several things:
> enum IMProperty {
> IMCursorPosition,
> IMSurroundingText,
> IMCurrentSelection, // for reconversion
> ....
> };
>
> The advantage of returning a QVariant is that we can put all the information
> we need into this one method, and can freely extend the enum later without
> having to break binary or backwards compatibility.
I feel this solution is good. Please tell me example usage about
surrounding text for more detailed discussion. Especially, I want to know
about how getting and using data from QVAriant object.
And, I want to know whether this solution can be used for QIMEvent sending
the property (not text) of pre edit or commited string.
> * imDeleteSurrounding() could then be replaced by a special QIMEvent.
It will be good if possible.
--
Daisuke Kameda <kaminmat at cc.rim.or.jp>
More information about the immodule-qt
mailing list