Qtopia library API Documentation

InputMethodInterface Struct Reference

Interface class for inputting keyboard events. More...

List of all members.

Public Member Functions

virtual QWidgetinputMethod (QWidget *parent, Qt::WFlags f)=0
 create a new widget which should be used as input

virtual void resetState ()=0
 Reset the state of the inputmethod.

virtual QPixmapicon ()=0
 The icon of your Input method.

virtual QString name ()=0
virtual void onKeyPress (QObject *receiver, const char *slot)=0
 pass your key event through


Detailed Description

Interface class for inputting keyboard events.

InputMethods are loaded by the Launcher/Server/Taskbar and are located inside OPIEDIR/plugins/inputmethods

Depending on the device these InputMethods are the only way to input charachters

Definition at line 41 of file inputmethodinterface.h.


Member Function Documentation

QWidget InputMethodInterface::inputMethod QWidget parent,
Qt::WFlags  f
[pure virtual]
 

create a new widget which should be used as input

This method will be called if the inputmethod is to be shown. Make sure that your widget is not too large. As of Opie1.1 InputMethods can be floating as well.

Delete the Widget yourself.

Parameters:
parent The parent of the to be created Input widget.
f The Qt::WFlags for the widget

void InputMethodInterface::resetState  )  [pure virtual]
 

Reset the state of the inputmethod.

If you're shown reset the state of the keyboard to the the default.

QPixmap * InputMethodInterface::icon  )  [pure virtual]
 

The icon of your Input method.

Return a pointer to a QPixmap symboling your inputmethod You need to delete the pixmap later yourself.

void InputMethodInterface::onKeyPress QObject receiver,
const char *  slot
[pure virtual]
 

pass your key event through

In your actual Input Implementation you'll need a SIGNAL with this void key(ushort,ushort,ushort,bool,bool) signal. The host of your input method requests you to connect your signal with the signal out of receiver and slot.

ushort == unicode value ushort == keycode ushort == modifiers from Qt::ButtonState bool == true if the key is pressed and false if released bool == autorepeat on or off.

See the QWSServer for more information about emitting keys

Parameters:
receiver the receiver to QObject::connect to
slot the slot to QObject::connect to


The documentation for this struct was generated from the following files:
KDE Logo
This file is part of the documentation for OPIE Version 1.5.5.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:22 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001