| Home · API Reference · Modules

Public Member Functions | List of all members
Maliit::StandaloneInputMethodHost Class Reference

`#include <standaloneinputmethodhost.h>`

Inheritance diagram for Maliit::StandaloneInputMethodHost:
[legend]

## Public Member Functions

| StandaloneInputMethodHost (MInputContextConnection *connection, WindowGroup *windowGroup)
int | contentType (bool &valid) override
bool | correctionEnabled (bool &valid) override
bool | predictionEnabled (bool &valid) override
bool | autoCapitalizationEnabled (bool &valid) override
bool | surroundingText (QString &text, int &cursorPosition) override
bool | hasSelection (bool &valid) override
int | inputMethodMode (bool &valid) override
QRect | preeditRectangle (bool &valid) override
QRect | cursorRectangle (bool &valid) override
int | anchorPosition (bool &valid) override
QString | selection (bool &valid) override
void | registerWindow (QWindow *window, Maliit::Position position) override
void | sendPreeditString (const QString &string, const QList< Maliit::PreeditTextFormat > &preeditFormats, int replacementStart, int replacementLength, int cursorPos) override
void | sendCommitString (const QString &string, int replaceStart, int replaceLength, int cursorPos) override
void | sendKeyEvent (const QKeyEvent &keyEvent, Maliit::EventRequestType requestType) override
void | notifyImInitiatedHiding () override
void | invokeAction (const QString &action, const QKeySequence &sequence) override
void | setRedirectKeys (bool enabled) override
void | setDetectableAutoRepeat (bool enabled) override
void | setGlobalCorrectionEnabled (bool enabled) override
void | switchPlugin (Maliit::SwitchDirection direction) override
void | switchPlugin (const QString &pluginName) override
void | setScreenRegion (const QRegion &region, QWindow *window) override
void | setInputMethodArea (const QRegion &region, QWindow *window) override
void | setSelection (int start, int length) override
void | setOrientationAngleLocked (bool lock) override
QList< MImPluginDescription > | pluginDescriptions (Maliit::HandlerState state) const override
Maliit::Plugins::AbstractPluginSetting * | registerPluginSetting (const QString &key, const QString &description, Maliit::SettingEntryType type, const QVariantMap &attributes) override
bool | hiddenText (bool &valid) override
void | setLanguage (const QString &language) override
QVariant | inputMethodQuery (Qt::InputMethodQuery query, const QVariant &argument) const override
Public Member Functions inherited from MAbstractInputMethodHost
| MAbstractInputMethodHost (QObject *parent=0)
virtual | ~MAbstractInputMethodHost ()
virtual int | preeditClickPos (bool &valid) const
virtual QList< MImSubViewDescription > | surroundingSubViewDescriptions (Maliit::HandlerState state) const

## Additional Inherited Members

Public Slots inherited from MAbstractInputMethodHost
virtual void | sendPreeditString (const QString &string, const QList< Maliit::PreeditTextFormat > &preeditFormats, int replacementStart=0, int replacementLength=0, int cursorPos=-1)=0
Signals inherited from MAbstractInputMethodHost
void | pluginsChanged ()

## Constructor & Destructor Documentation

## ◆ StandaloneInputMethodHost()

Maliit::StandaloneInputMethodHost::StandaloneInputMethodHost | ( | MInputContextConnection * | connection,
|  | WindowGroup * | windowGroup
| ) |  |

## Member Function Documentation

## ◆ anchorPosition()

int Maliit::StandaloneInputMethodHost::anchorPosition | ( | bool & | valid | ) |

override virtual

returns the position of the selection anchor.

This may be less or greater than cursor position, depending on which side of selection the cursor is. If there is no selection, it returns the same as cursor position.

Implements MAbstractInputMethodHost.

## ◆ autoCapitalizationEnabled()

bool Maliit::StandaloneInputMethodHost::autoCapitalizationEnabled | ( | bool & | valid | ) |

override virtual

returns input method auto-capitalization hint if output parameter valid is true.

Implements MAbstractInputMethodHost.

## ◆ contentType()

int Maliit::StandaloneInputMethodHost::contentType | ( | bool & | valid | ) |

override virtual

returns content type for focused widget if output parameter valid is true, value matches enum M::TextContentType

Implements MAbstractInputMethodHost.

## ◆ correctionEnabled()

bool Maliit::StandaloneInputMethodHost::correctionEnabled | ( | bool & | valid | ) |

override virtual

returns input method correction hint if output parameter valid is true.

Implements MAbstractInputMethodHost.

## ◆ cursorRectangle()

QRect Maliit::StandaloneInputMethodHost::cursorRectangle | ( | bool & | valid | ) |

override virtual

get cursor rectangle

Implements MAbstractInputMethodHost.

## ◆ hasSelection()

bool Maliit::StandaloneInputMethodHost::hasSelection | ( | bool & | valid | ) |

override virtual

returns true if there is selecting text

Implements MAbstractInputMethodHost.

## ◆ hiddenText()

bool Maliit::StandaloneInputMethodHost::hiddenText | ( | bool & | valid | ) |

override virtual

true if text input is being made hidden, e.g. with password fields

Reimplemented from MAbstractInputMethodHost.

## ◆ inputMethodMode()

int Maliit::StandaloneInputMethodHost::inputMethodMode | ( | bool & | valid | ) |

override virtual

get input method mode

Implements MAbstractInputMethodHost.

## ◆ inputMethodQuery()

QVariant Maliit::StandaloneInputMethodHost::inputMethodQuery | ( | Qt::InputMethodQuery | query,
|  | const QVariant & | argument
| ) |  | const

override virtual

Implements MAbstractInputMethodHost.

## ◆ invokeAction()

void Maliit::StandaloneInputMethodHost::invokeAction | ( | const QString & | action,
|  | const QKeySequence & | sequence
| ) |  |

override virtual

calls actions like "copy" or "paste" on the focused text entry.

Parameters

  action | The action to call
  sequence | The fall-back key sequence when action is not available

Implements MAbstractInputMethodHost.

## ◆ notifyImInitiatedHiding()

void Maliit::StandaloneInputMethodHost::notifyImInitiatedHiding | ( |  | ) |

override virtual

Notifies about hiding initiated by the input method.

Implements MAbstractInputMethodHost.

## ◆ pluginDescriptions()

QList< MImPluginDescription > Maliit::StandaloneInputMethodHost::pluginDescriptions | ( | Maliit::HandlerState | state | ) | const

override virtual

Return information about loaded input method plugins which could work in specified state.

See also
  MImPluginDesription

Implements MAbstractInputMethodHost.

## ◆ predictionEnabled()

bool Maliit::StandaloneInputMethodHost::predictionEnabled | ( | bool & | valid | ) |

override virtual

returns input method word prediction hint if output parameter valid is true.

Implements MAbstractInputMethodHost.

## ◆ preeditRectangle()

QRect Maliit::StandaloneInputMethodHost::preeditRectangle | ( | bool & | valid | ) |

override virtual

get preedit rectangle

Implements MAbstractInputMethodHost.

## ◆ registerPluginSetting()

Maliit::Plugins::AbstractPluginSetting * Maliit::StandaloneInputMethodHost::registerPluginSetting | ( | const QString & | key,
|  | const QString & | description,
|  | Maliit::SettingEntryType | type,
|  | const QVariantMap & | attributes
| ) |  |

override virtual

Register a new plugin setting.

Parameters

  key | name for the entry
  type | value type
  attributes | attribute map, the same used in SettingsEntry

Returns an object (owned by the plugin) that can be used to manipulate the setting entry.

See also
  Maliit::SettingEntryAttributes
  Maliit::SettingsEntry

Implements MAbstractInputMethodHost.

## ◆ registerWindow()

void Maliit::StandaloneInputMethodHost::registerWindow | ( | QWindow * | window,
|  | Maliit::Position | position
| ) |  |

override virtual

Registers a window in server.

Should be called for every QWindow created by plugin before calling create on it. Note that this function set some flags on the window, so be careful to not reset them by accident.

Implements MAbstractInputMethodHost.

## ◆ selection()

QString Maliit::StandaloneInputMethodHost::selection | ( | bool & | valid | ) |

override virtual

returns the selecting text

Implements MAbstractInputMethodHost.

## ◆ sendCommitString()

void Maliit::StandaloneInputMethodHost::sendCommitString | ( | const QString & | string,
|  | int | replaceStart,
|  | int | replaceLength,
|  | int | cursorPos
| ) |  |

override virtual

Updates commit string in the application widget, and set cursor position.

Parameters

  string | The string to be committed
  replaceStart | The position at which characters are to be replaced relative from the start of the preedit string.
  replaceLength | The number of characters to be replaced in the preedit string.
  cursorPos | The cursor position to be set. the cursorPos is the position relative to commit string start. Negative values are used as commit string end position. Cursor position is applied AFTER committing text. This means the position might be different than intended because of active validators etc.

Implements MAbstractInputMethodHost.

## ◆ sendKeyEvent()

void Maliit::StandaloneInputMethodHost::sendKeyEvent | ( | const QKeyEvent & | keyEvent,
|  | Maliit::EventRequestType | requestType
| ) |  |

override virtual

Sends key event to the application.

This method is used to deliver the key event to active widget. A MInputMethodState::keyPress or MInputMethodState::keyRelease event is also emitted. Depending on the value of requestType parameter, a Qt::KeyEvent and/or a signal is emitted.

Parameters

  keyEvent | The event to send
  signalOnly | only the signal should be emitted.

Implements MAbstractInputMethodHost.

## ◆ sendPreeditString()

void Maliit::StandaloneInputMethodHost::sendPreeditString | ( | const QString & | string,
|  | const QList< Maliit::PreeditTextFormat > & | preeditFormats,
|  | int | replacementStart,
|  | int | replacementLength,
|  | int | cursorPos
| ) |  |

override

## ◆ setDetectableAutoRepeat()

void Maliit::StandaloneInputMethodHost::setDetectableAutoRepeat | ( | bool | enabled | ) |

override virtual

Set detectable autorepeat for X on/off.

Detectable autorepeat means that instead of press, release, press, release, press, release... sequence of key events you get press, press, press, release key events when a key is repeated. The setting is X client specific. This is intended to be used when key event redirection is enabled with setRedirectKeys.

Implements MAbstractInputMethodHost.

## ◆ setGlobalCorrectionEnabled()

void Maliit::StandaloneInputMethodHost::setGlobalCorrectionEnabled | ( | bool | enabled | ) |

override virtual

set global correction option enable/disable

Implements MAbstractInputMethodHost.

## ◆ setInputMethodArea()

void Maliit::StandaloneInputMethodHost::setInputMethodArea | ( | const QRegion & | region,
|  | QWindow * | window
| ) |  |

override virtual

Sets part of the screen area covered by the input method that should be avoided by the application receiving input in order not to be obscured.

For now this region must be so simple that its bounding box can be effectively used as the avoidance area.

Parameters

  region | the new region
  window | window for which input method area applies. If zero, first registered window is used.

Implements MAbstractInputMethodHost.

## ◆ setLanguage()

void Maliit::StandaloneInputMethodHost::setLanguage | ( | const QString & | language | ) |

override virtual

Sets current input method language.

Parameters

  language | ICU format locale ID string

This can be used as a hint to determine text direction in input fields, for example.

Reimplemented from MAbstractInputMethodHost.

## ◆ setOrientationAngleLocked()

void Maliit::StandaloneInputMethodHost::setOrientationAngleLocked | ( | bool | lock | ) |

override virtual

Locks application orientation.

Deprecated:
  Not implemented

Implements MAbstractInputMethodHost.

## ◆ setRedirectKeys()

void Maliit::StandaloneInputMethodHost::setRedirectKeys | ( | bool | enabled | ) |

override virtual

Set if the input method wants to process all raw key events from hardware keyboard (via processKeyEvent calls).

Implements MAbstractInputMethodHost.

## ◆ setScreenRegion()

void Maliit::StandaloneInputMethodHost::setScreenRegion | ( | const QRegion & | region,
|  | QWindow * | window
| ) |  |

override virtual

Reserves screen area for input method. Mouse events on top of this area do not fall through to the application

Parameters

  region | the new region
  window | window for which region applies. If zero, first registered window is used.

Implements MAbstractInputMethodHost.

## ◆ setSelection()

void Maliit::StandaloneInputMethodHost::setSelection | ( | int | start,
|  | int | length
| ) |  |

override virtual

Sets selection text from start with length in the application widget.

Implements MAbstractInputMethodHost.

## ◆ surroundingText()

bool Maliit::StandaloneInputMethodHost::surroundingText | ( | QString & | text,
|  | int & | cursorPosition
| ) |  |

override virtual

get surrounding text and cursor position information

Implements MAbstractInputMethodHost.

## ◆ switchPlugin() [1/2]

void Maliit::StandaloneInputMethodHost::switchPlugin | ( | const QString & | pluginName | ) |

override virtual

Asks environment to change active plugin to specified one.

Parameters

  pluginName | Name for plugin which will be activated

Implements MAbstractInputMethodHost.

## ◆ switchPlugin() [2/2]

void Maliit::StandaloneInputMethodHost::switchPlugin | ( | Maliit::SwitchDirection | direction | ) |

override virtual

Asks environment to change active plugin according to direction.

Implements MAbstractInputMethodHost.

Copyright © 2011 Nokia Corporation |  | Maliit