Qt API | Qtopia API Qtopia Documentation

ExtInputMethodInterface Class Reference

The ExtInputMethodInterface class provides an extended interface for Qtopia input methods. More...

#include <qtopia/inputmethodinterface.h>

List of all member functions.

Public Members


Detailed Description

The ExtInputMethodInterface class provides an extended interface for Qtopia input methods.

There are two kinds of input methods that may be implemented using this interface.

One is a virtual keyboard like InputMethodInterface, but with access to the Qtopia 1.6 input method API. In this case, implement keyboardWidget(). There is no onKeyPress method; use QWSServer::sendKeyEvent() to send key events when a key is pressed.

The other is a composing input methods that modifies input from a separate keyboard (real or virtual). In this case, implement inputMethod() and statusWidget(). Composing input methods are used to implement text input for languages such as Chinese, Japanese and Korean.

There may be dependencies between specific virtual keyboard 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


Member Function Documentation

QStringList ExtInputMethodInterface::compatible () [pure virtual]

Returns a list of plugin library filenames that are compatible with this input method. An empty list means that there are no restrictions; it is compatible with anything.

QPixmap * ExtInputMethodInterface::icon () [pure virtual]

The icon() function returns the icon for the input method. This will be displayed in the taskbar when the input method is selected.

QWSInputMethod * ExtInputMethodInterface::inputMethod () [pure virtual]

If this is a composing input method, this function returns the input method object, which is a subclass of QWSInputMethod.

Returns 0 for a virtual keyboard.

QWidget * ExtInputMethodInterface::keyboardWidget ( QWidget * parent, Qt::WFlags f ) [pure virtual]

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.

QString ExtInputMethodInterface::name () [pure virtual]

The name() function returns the name of the input method. This will be displayed in the popup list of available input methods.

void ExtInputMethodInterface::qcopReceive ( const QCString & msg, const QByteArray & data ) [pure virtual]

Reimplemented to receive QCop messages from the input method channel.

void ExtInputMethodInterface::resetState () [pure virtual]

The resetState() function should return the input method to its default state.

QWidget * ExtInputMethodInterface::statusWidget ( QWidget * parent, Qt::WFlags f ) [pure virtual]

For a composing input method, this function returns a widget to be shown in the taskbar, which


This file is part of the Qtopia , copyright © 1995-2002 Trolltech, all rights reserved.


Copyright © 2001-2002 TrolltechTrademarks
Qtopia version 1.7.0