![]() Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference |
![]() |
The ExtInputMethodInterface class provides an extended interface for Qtopia input methods. It allows implementing both Pop-up Input Methods and Composing Input Methods. More...
#include <qtopia/inputmethodinterface.h>
Pop-up Input Methods must supply a QWidget that will be shown on the screen and emit a signal when a key is Pressed. They can also be implemented using InputMethodInterface. The advantage to using the ExtInputMethodInterface to implement a Pop-up Input method is access to the Qtopia 1.6 input method API. To create a Pop-up Input Method implement keyboardWidget(). There is no onKeyPress method; use QWSServer::sendKeyEvent() to send key events when a key is pressed.
Composing Input Methods modify input from a separate keyboard (real or virtual). In this case, implement inputMethod() and statusWidget(). Composing input methods are mainly intended for languages such as Chinese, Japanese and Korean, however can be used to expand the capability of any text input, include that from Pop-up Input Methods.
There may be dependencies between specific Pop-up Input Methods and Composing Input Methods. This can be specified by implementing compatible().
Input methods may be added to Qtopia via plug-ins. In order to write an input method plug-in you must create an interface to your input method by deriving from the ExtInputMethodInterface class and implementing the pure virtual functions.
See also: Input Method Tutorial
Returns a list of plug-in library filenames that are compatible with this input method. An empty list means that there are no restrictions; it is compatible with anything.
Qtopia can allow loading two input methods at once if one input method provides a keyboardWidget and another provides an inputMethod. The compatible function allows tightly coupled keyboardWidget and inputMethod based input methods.
For example, two different keybaordWidget input methods might provide recognition of parts of characters. The first by interpreting strokes, the latter by a virtual keyboard with buttons for partial strokes. They will list in their compatible function an input method that provides the inputMethod function and can combine the parts of characters into whole characters to send to the application.
The icon() function returns the icon for the input method. This will be displayed in the taskbar when the input method is selected.
Returns 0 for a virtual keyboard.
For a virtual keyboard, creates keyboard widget (if not already created) and returns the keyboard widget. Returns 0 for a composing input method.
parent is the parent of the widget. f contains the flags to pass to the widget.
This widget will be display just above the task bar when the user needs to input text. You should always return the same widget if this function is called multiple times.
The name() function returns the name of the input method. This will be displayed in the pop-up list of available input methods.
The resetState() function should return the input method to its default state.
For a composing input method, this function returns a widget to be shown in the taskbar. parent and f are the standard QWidget parameters.
This file is part of the Qtopia platform, copyright © 1995-2005 Trolltech, all rights reserved.
Copyright © 2005 Trolltech | Trademarks | Qtopia version 2.2.0
|