.BI "void \fBsendIMEvent\fR ( QWSServer::IMState state, const QString & txt, int cpos, int selLen = 0 )"
.br
.in -1c
.SH DESCRIPTION
The QWSInputMethod class provides international input methods for Qt/Embedded.
.PP
Subclass this class to implement your own input method.
.PP
An input methods consists of a keyboard filter and optionally a graphical interface. The keyboard filter intercepts key events from physical or virtual keyboards by implementing the filter() function.
.PP
Use sendIMEvent() to send composition events. Composition starts with the input method sending an \fCIMStart\fR event, followed by a number of \fCIMCompose\fR events and ending with an \fCIMEnd\fR event or when the virtual reset() function is called.
.PP
The functions setMicroFocus() and setFont() can be reimplemented to receive more information about the state of the focus widget.
.PP
Use QWSServer::setCurrentInputMethod() to install an input method.
Destructs the input method uninstalling it if it is currently installed.
.SH "bool QWSInputMethod::filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat )\fC [pure virtual]\fR"
This function must be implemented in subclasses to handle key input from physical or virtual keyboards. Returning TRUE will block the event from further processing.
.PP
The Unicode value is given in \fIunicode\fR and the key code in \fIkeycode\fR. Keyboard modifiers are OR-ed together in \fImodifiers\fR. If \fIisPress\fR is TRUE this is a key press; otherwise it is a key release. If \fIautoRepeat\fR is TRUE this is an auto-repeated key press.
.PP
All normal key events should be blocked while in compose mode (i.e., between \fCIMStart\fR and \fCIMEnd\fR).
Implemented in subclasses to reset the state of the input method.
.SH "void QWSInputMethod::sendIMEvent ( QWSServer::IMState state, const QString & txt, int cpos, int selLen = 0 )\fC [protected]\fR"
Causes a QIMEvent to be sent to the focus widget. \fIstate\fR may be one of QWSServer::IMStart, QWSServer::IMCompose or QWSServer::IMEnd.
.PP
\fItxt\fR is the text being composed (or the finished text if state is \fCIMEnd\fR). \fIcpos\fR is the current cursor position.
.PP
If state is \fCIMCompose\fR, \fIselLen\fR is the number of characters in the composition string (starting at \fIcpos\fR) that should be marked as selected by the input widget receiving the event.