Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

InputMethodInterface Struct Reference

Interface class for inputting keyboard events. More...

#include </home/clem/local/src/opie/library/inputmethodinterface.h>

Inheritance diagram for InputMethodInterface:

Inheritance graph
[legend]
Collaboration diagram for InputMethodInterface:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual QWidget * inputMethod (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 QPixmap * icon ()=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

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.

Implemented in KeyboardImpl, ExampleboardImpl, QtDasherImpl, HandwritingImpl, PickboardImpl, and UniKeyboardImpl.

Referenced by InputMethod::icon().

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

Implemented in KeyboardImpl, ExampleboardImpl, QtDasherImpl, HandwritingImpl, PickboardImpl, and UniKeyboardImpl.

Referenced by InputMethods::loadInputMethods().

virtual QString InputMethodInterface::name  )  [pure virtual]
 

Implemented in KeyboardImpl, ExampleboardImpl, QtDasherImpl, HandwritingImpl, PickboardImpl, and UniKeyboardImpl.

Referenced by InputMethod::name().

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

Implemented in KeyboardImpl, ExampleboardImpl, QtDasherImpl, HandwritingImpl, PickboardImpl, and UniKeyboardImpl.

Referenced by InputMethods::loadInputMethods().

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.

Implemented in KeyboardImpl, ExampleboardImpl, QtDasherImpl, HandwritingImpl, PickboardImpl, and UniKeyboardImpl.

Referenced by InputMethod::resetState(), and InputMethods::resetStates().


The documentation for this struct was generated from the following files:
Generated on Sat Nov 5 17:36:07 2005 for OPIE by  doxygen 1.4.2