| Home · All Classes · Annotated · Functions |
The QtopiaInputMethod class describes the minimum interface that an input method plug-in must provide. More...
#include <QtopiaInputMethod>
Inherits QObject.
The QtopiaInputMethod class describes the minimum interface that an input method plug-in must provide.
Input Methods may be added to Qtopia via plug-ins. In order to write an input method plug-in you must create an interface for your plug-in by deriving from the QtopiaInputMethod class.
At a minimum you will need to provide the methods name(), identifier(), version(), state(), properties(), icon() and reset().
Pop-up input methods that need to show a widget on the screen can do so by overriding inputWidget().
Filtering input methods that need to filter application pen or keyboard events can do so by overriding inputModifier()
The Properties flags describe how the input method behaves and under what conditions it should be loaded.
| Constant | Value | Description |
|---|---|---|
| QtopiaInputMethod::RequireMouse | 0x0001 | The input method should not be loaded if no pen input is available. |
| QtopiaInputMethod::RequireKeypad | 0x0002 | The input method should not be loaded if no phone keypad is available. A phone keypad consists of 0-9, * and # keys. |
| QtopiaInputMethod::InputModifier | 0x0004 | The input method can filter device pen and key events. |
| QtopiaInputMethod::InputWidget | 0x0010 | The input method has provides a popup widget receive input |
| QtopiaInputMethod::InteractiveIcon | 0x0008 | The icon representing the input method is interactive. It can be clicked or will animate to show the mode of the input method. |
This enum describe the state of the input method.
| Constant | Value | Description |
|---|---|---|
| QtopiaInputMethod::Sleeping | 0 | The input method is not able to provide input for the current input method hint. |
| QtopiaInputMethod::Ready | 1 | The input method is able to provide input for the current input method hint. |
Constructs an input method with the parent set to parent.
Destroys the input method.
This function is called when the user clicks on the status icon of the input method. It is only called doesn't provide its own status widget.
See also statusWidget().
Returns the icon associated with this input method.
Returns the indentifier of the input method. This is used to identify the input method in code.
Returns the input modifier for the input method.
The input modifer is installed as the current input method for the QWSServer when selected. This allows the input method to work by filtering pen movements on the screen or filterying device keys. Returning 0 indicates no input modifier is provided and that the input method uses some other method for the user to generated text.
The base class returns 0.
Returns the input widget for the input method. On the first call of this function it should create the widget with the given parent.
The widget is used for input methods that have the InputWidget property. It is shown when the user requests it to provide input or even simply provide additional keys. Returning 0 indicates no input widget is provided and that the input method uses some other method for the user to generate text.
The base class returns 0.
Returns the name of the input method. This is a end user visible string and should be translated to the users locale.
Returns the capability property flags for the input method.
See also Properties.
Resets the input method to its initial state.
Returns true if the current input method is restricted to providing input suitable for the current hint.
Sets the hint describing the sort of input the current input widget requires to hint. If restricted is true the widget only accepts one kind of input and input method should disable any mode switching. For example, the home screen Qtopia might set the hint to be restricted to phone numbers.
Example hints are words - Dictonary words such as some notes text - Names, passwords etc. extended - text with extensions for additional character sets number - 0-9 phone - Phone numbers, 0-9 plus phone control codes such as 'p' 'x' or 'w'.
Application may also define custom hints, such as email to describe an email address. Input methods should provide reasonable default behavior for hints they do not recognize.
Returns the current state of the input method.
This signal is emitted when the input method state changes to state.
See also state().
Returns the status widget for the input method. On the first call of this function it should create the widget with the given parent.
The status widget is displayed when the input method is selected and not in the Sleeping state. If no status widget is provided a label with the icon returned from icon() will be used instead.
The base class returns 0.
Returns true if the property flag p is set to true for this input method. Otherwise returns false.
Returns the version string of the input method.
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |