Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

InputMethods Class Reference
[QtInputMethodsModule]

The InputMethods class provides an implementation of Qt Extended server input method handling. More...

    #include <InputMethods>

Inherits QWidget.

Public Types

Public Functions

Public Slots

Signals

Additional Inherited Members


Detailed Description

The InputMethods class provides an implementation of Qt Extended server input method handling.

InputMethods is the core class for the Qt Extended servers input method handling. It is very closely related to the InputMethod service and InputMethodSelector classes.

InputMethods is primarily resposible for loading input method plugins and maintaining the hints set for different widgets. It also acts on the messages from the InputMethod service, either taking direct action or passing them on to the InputMethodSelector.

This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.


Member Type Documentation

enum InputMethods::IMType

This enum describes which types of input an input method processes.

ConstantValueDescription
InputMethods::Any0The input method can process both mouse and keypad input
InputMethods::Mouse1The input method processes mouse or pointer input.
InputMethods::Keypad2The input method processes keypad input.

enum InputMethods::SystemMenuItemId

This enum defines values that input method menu items can return to activate system actions based for these menu items.

ConstantValueDescription
InputMethods::NextInputMethod-2This value results in the input method being changed to the next input method in alphabetic order.
InputMethods::ChangeInputMethod-3This value causes the input method selection menu to be shown, and to recieve keyboard focus, facilitating changing input methods with the keyboard.


Member Function Documentation

InputMethods::InputMethods ( QWidget * parent = 0, Qt::WFlags flags = 0, IMType t = Any )

Create a new InputMethods object with parent and flags that handles input according to t.

InputMethods::~InputMethods ()

Unloads all input methods.

void InputMethods::activateMenuItem ( int v )

Checks whether the activated menu item belonged to the server, and either responds or passes the information on to the current input method appropriately.

Server menu items typically have values less than 0, so v is generally passed to the current input method if it is greater than or equal to 0.

See also QtopiaInputMethod::menuActionActivated().

void InputMethods::changeInputMethod ()   [slot]

Activate the input method selector choice pop-up (a menu of available input methods), and give it keyboard focus.

QString InputMethods::currentShown () const   [slot]

Returns the name of the current input method, or an empty QString if there is no current input method.

See also QtopiaInputMethod::name().

void InputMethods::hideInputMethod ()   [slot]

Deactivates and hides the current input method.

void InputMethods::inputMethodHint ( int h, int wid, bool password = false )   [slot]

Sets the input hint for the current input method for widget wid. h is the hint for the input method, according to QtopiaApplication::InputMethodHint. The password flag sets password mode, indicating that input should be hidden after being entered, and defaults to false. This value is recorded for when this widget gains focus in the future, and if wid refers to the last active widget, the hint is forwarded to the current input method immediately.

void InputMethods::inputMethodHint ( const QString & h, int wid )   [slot]

This is an overloaded member function, provided for convenience.

Sets the input hint for widget wid, according to the hint h. This information is recorded for this widget should it gain focus, and if wid refers to the last active window, the hint is immediately forwarded to the current input method.

void InputMethods::inputMethodPasswordHint ( bool passwordFlag, int wid )   [slot]

Sets the password hint for wid to passwordFlag, provided an input hint has previously been set for that widget. If no hint has been set for that widget previously, this function does nothing.

See also inputMethodHint().

QRect InputMethods::inputRect () const

Returns the geometry of the current input methods input widget, or an empty QRect if there is no current input method, or no input widget for the current input method.

void InputMethods::inputToggled ( bool on )   [signal]

Connect to this signal to recieve notifications of changes in the state of input methods. on describes whether the input methods have just turned on (true), or off (false).

void InputMethods::loadInputMethods ()

Creates a QPluginManager for input methods to load input method plugins out of the plugins/inputmethods directory.

If InputMethods already has a QPluginManager, this function does nothing.

bool InputMethods::selectorShown () const

Returns true if the input method selector is visible, false otherwise. This indicates the visibility of the widget used to change input methods, not the drop-down menu itself. In Qtopia, this widget is only visible if at least 2 input methods have been loaded, and the widget with focus accepts text input.

See also InputMethodSelector::isVisible() and InputMethodSelector::count().

void InputMethods::setNextInputMethod ()   [slot]

Cycle to the next input method.

void InputMethods::setType ( IMType type )   [slot]

Set system-wide description for allowable inputmethods to the given type. Note: Triggers a reloading of all inputmethod plugins

void InputMethods::showInputMethod ( const QString & name )   [slot]

Selects the the input method named name, if it exists, and activates and shows it. If the named input method does not exist, this function activates the current input method.

void InputMethods::showInputMethod ()   [slot]

This is an overloaded member function, provided for convenience.

Shows and activates the current input method.

bool InputMethods::shown () const

Returns true if the current input method is active and visible, otherwise returns false.

void InputMethods::unloadInputMethods ()

Clears the current input method, and clears and destroys all previously loaded input methods. Called from InputMethods destructor.

void InputMethods::visibilityChanged ( bool visible )   [signal]

Connect to this signal to receive notification of changes in the visibility of input methods. This is synonymous with activation, input methods do not need to have an input widget to be visible in this sense. visible is true if the input method is becoming visible/activating, false if it becoming invisible/deactivating.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3