![]() Qtopia Home - Classes - Hierachy - Annotated - Functions - Qt Embedded |
![]() |
The ExtInputMethodInterface class provides an extended interface for Qtopia input methods. It allows implementing both Popup Input Methods and Composing Input Methods. More...
#include <qtopia/inputmethodinterface.h>
Popup 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 Popup Input method is access to the Qtopia 1.6 input method API. To create a Popup 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 Popup Input Methods.
There may be dependencies between specific Popup Input Methods and Composing Input Methods. This can be specified by implementing compatible().
Input methods may be added to Qtopia via plugins. In order to write an input method plugin 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
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 popup 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-2004 Trolltech, all rights reserved.
Copyright © 2001-2005 Trolltech | Trademarks | Qtopia version 2.1.1
|