| Home · API Reference · Modules

Public Slots | Signals | Public Member Functions | Properties | List of all members
Maliit::InputMethodQuick Class Reference

`#include <inputmethodquick.h>`

Inheritance diagram for Maliit::InputMethodQuick:
[legend]

## Public Slots

void | sendPreedit (const QString &text, const QVariant &preeditFormats=QVariant(), int replacementStart=0, int replacementLength=0, int cursorPos=-1)
void | sendKey (int key, int modifiers=0, const QString &text=QString(), int type=MaliitQuick::KeyClick)
void | sendCommit (const QString &text, int replaceStart=0, int replaceLength=0, int cursorPos=-1)
void | pluginSwitchRequired (int switchDirection)
void | userHide ()

## Signals

void | screenHeightChanged (int height)
void | screenWidthChanged (int width)
void | appOrientationChanged (int angle)
void | inputMethodAreaChanged (const QRect &area)
void | actionKeyOverrideChanged (MKeyOverride *override)
void | activeChanged ()
void | focusTargetChanged (bool activeEditor)
void | inputMethodReset ()
void | editorStateUpdate ()
void | surroundingTextValidChanged ()
void | surroundingTextChanged ()
void | cursorPositionChanged ()
void | anchorPositionChanged ()
void | hasSelectionChanged ()
void | contentTypeChanged ()
void | predictionEnabledChanged ()
void | autoCapitalizationChanged ()
void | hiddenTextChanged ()
Signals inherited from MAbstractInputMethod
void | activeSubViewChanged (const QString &subViewId, Maliit::HandlerState state=Maliit::OnScreen)

## Public Member Functions

| InputMethodQuick (MAbstractInputMethodHost *host, const QString &qmlFileName, const QSharedPointer< Maliit::AbstractPlatform > &platform)
virtual | ~InputMethodQuick ()
void | propagateScreenSize ()
int | screenHeight () const
int | screenWidth () const
int | appOrientation () const
QRectF | inputMethodArea () const
Q_INVOKABLE void | setInputMethodArea (const QRectF &area)
Q_INVOKABLE void | setScreenRegion (const QRect &region)
KeyOverrideQuick * | actionKeyOverride () const
Q_INVOKABLE void | activateActionKey ()
bool | isActive () const
void | setActive (bool enable)
bool | surroundingTextValid ()
QString | surroundingText ()
int | cursorPosition ()
int | anchorPosition ()
bool | hasSelection ()
int | contentType ()
bool | predictionEnabled ()
bool | autoCapitalizationEnabled ()
bool | hiddenText ()
Public Member Functions inherited from MAbstractInputMethod
| MAbstractInputMethod (MAbstractInputMethodHost *host)
virtual | ~MAbstractInputMethod ()
MAbstractInputMethodHost * | inputMethodHost () const
virtual void | show ()
virtual void | hide ()
virtual void | setPreedit (const QString &preeditString, int cursorPos)
virtual void | update ()
virtual void | reset ()
virtual void | handleMouseClickOnPreedit (const QPoint &pos, const QRect &preeditRect)
virtual void | handleFocusChange (bool focusIn)
virtual void | handleVisualizationPriorityChange (bool priority)
virtual void | handleAppOrientationAboutToChange (int angle)
virtual void | handleAppOrientationChanged (int angle)
virtual void | processKeyEvent (QEvent::Type keyType, Qt::Key keyCode, Qt::KeyboardModifiers modifiers, const QString &text, bool autoRepeat, int count, quint32 nativeScanCode, quint32 nativeModifiers, unsigned long time)
virtual void | setState (const QSet< Maliit::HandlerState > &state)
virtual void | handleClientChange ()
virtual void | switchContext (Maliit::SwitchDirection direction, bool enableAnimation)
virtual QList< MInputMethodSubView > | subViews (Maliit::HandlerState state=Maliit::OnScreen) const
virtual void | showLanguageNotification ()
virtual void | setKeyOverrides (const QMap< QString, QSharedPointer< MKeyOverride > > &overrides)
virtual bool | imExtensionEvent (MImExtensionEvent *event)

## Properties

int | screenWidth
int | screenHeight
int | appOrientation
Maliit::KeyOverrideQuick * | actionKeyOverride
bool | active
bool | surroundingTextValid
QString | surroundingText
int | cursorPosition
int | anchorPosition
bool | hasSelection
int | contentType
bool | predictionEnabled
bool | autoCapitalizationEnabled
bool | hiddenText

## Detailed Description

Maliit::InputMethodQuick is used for QML-based input method plugins.

It defines the interface between framework, applications and QML-based input methods. Instead of allowing QML-based input methods to use the MAbstractInputMethodHost interface directly, this class will forward the necessary requests. QML-based input methods on the other hand can use the properties of this class to respond to requests from the framework.

## Constructor & Destructor Documentation

## ◆ InputMethodQuick()

Maliit::InputMethodQuick::InputMethodQuick | ( | MAbstractInputMethodHost * | host,
|  | const QString & | qmlFileName,
|  | const QSharedPointer< Maliit::AbstractPlatform > & | platform )

explicit

Constructor

Parameters

  host | serves as communication link to framework and application. Managed by framework.
  qmlFileName | the QML file that will be loaded.
  platform | implementation used for e.g. setting input panel region.

## ◆ ~InputMethodQuick()

Maliit::InputMethodQuick::~InputMethodQuick | ( |  | ) |

virtual

## Member Function Documentation

## ◆ actionKeyOverride()

KeyOverrideQuick * Maliit::InputMethodQuick::actionKeyOverride | ( |  | ) | const

Returns action key override.

## ◆ actionKeyOverrideChanged

void Maliit::InputMethodQuick::actionKeyOverrideChanged | ( | MKeyOverride * | override | ) |

signal

Emitted when key action override changes.

## ◆ activateActionKey()

void Maliit::InputMethodQuick::activateActionKey | ( |  | ) |

Activates action key, that is - sends enter keypress.

## ◆ activeChanged

void Maliit::InputMethodQuick::activeChanged | ( |  | ) |

signal

## ◆ anchorPosition()

int Maliit::InputMethodQuick::anchorPosition | ( |  | ) |

## ◆ anchorPositionChanged

void Maliit::InputMethodQuick::anchorPositionChanged | ( |  | ) |

signal

## ◆ appOrientation()

int Maliit::InputMethodQuick::appOrientation | ( |  | ) | const

Returns application orientation.

## ◆ appOrientationChanged

void Maliit::InputMethodQuick::appOrientationChanged | ( | int | angle | ) |

signal

Emitted when application orientation changes.

## ◆ autoCapitalizationChanged

void Maliit::InputMethodQuick::autoCapitalizationChanged | ( |  | ) |

signal

## ◆ autoCapitalizationEnabled()

bool Maliit::InputMethodQuick::autoCapitalizationEnabled | ( |  | ) |

## ◆ contentType()

int Maliit::InputMethodQuick::contentType | ( |  | ) |

## ◆ contentTypeChanged

void Maliit::InputMethodQuick::contentTypeChanged | ( |  | ) |

signal

## ◆ cursorPosition()

int Maliit::InputMethodQuick::cursorPosition | ( |  | ) |

## ◆ cursorPositionChanged

void Maliit::InputMethodQuick::cursorPositionChanged | ( |  | ) |

signal

## ◆ editorStateUpdate

void Maliit::InputMethodQuick::editorStateUpdate | ( |  | ) |

signal

Emitted last when editor state has updated. In addition change signals are emitted for distinct property changes.

## ◆ focusTargetChanged

void Maliit::InputMethodQuick::focusTargetChanged | ( | bool | activeEditor | ) |

signal

Emitted when focus target changes. activeEditor is true if there's an active editor afterwards.

## ◆ hasSelection()

bool Maliit::InputMethodQuick::hasSelection | ( |  | ) |

## ◆ hasSelectionChanged

void Maliit::InputMethodQuick::hasSelectionChanged | ( |  | ) |

signal

## ◆ hiddenText()

bool Maliit::InputMethodQuick::hiddenText | ( |  | ) |

## ◆ hiddenTextChanged

void Maliit::InputMethodQuick::hiddenTextChanged | ( |  | ) |

signal

## ◆ inputMethodArea()

QRectF Maliit::InputMethodQuick::inputMethodArea | ( |  | ) | const

Returns input method area.

## ◆ inputMethodAreaChanged

void Maliit::InputMethodQuick::inputMethodAreaChanged | ( | const QRect & | area | ) |

signal

Emitted when input method area changes.

## ◆ inputMethodReset

void Maliit::InputMethodQuick::inputMethodReset | ( |  | ) |

signal

Emitted when input method state was reset from application side.

## ◆ isActive()

bool Maliit::InputMethodQuick::isActive | ( |  | ) | const

Return true on input method expected to be shown.

## ◆ pluginSwitchRequired

void Maliit::InputMethodQuick::pluginSwitchRequired | ( | int | switchDirection | ) |

slot

Tells the framework to switch plugins. Called by QML components.

## ◆ predictionEnabled()

bool Maliit::InputMethodQuick::predictionEnabled | ( |  | ) |

## ◆ predictionEnabledChanged

void Maliit::InputMethodQuick::predictionEnabledChanged | ( |  | ) |

signal

## ◆ propagateScreenSize()

void Maliit::InputMethodQuick::propagateScreenSize | ( |  | ) |

Propagates screen size to QML components.

## ◆ screenHeight()

int Maliit::InputMethodQuick::screenHeight | ( |  | ) | const

Returns screen height.

## ◆ screenHeightChanged

void Maliit::InputMethodQuick::screenHeightChanged | ( | int | height | ) |

signal

Emitted when screen height changes.

## ◆ screenWidth()

int Maliit::InputMethodQuick::screenWidth | ( |  | ) | const

Returns screen width.

## ◆ screenWidthChanged

void Maliit::InputMethodQuick::screenWidthChanged | ( | int | width | ) |

signal

Emitted when screen width changes.

## ◆ sendCommit

void Maliit::InputMethodQuick::sendCommit | ( | const QString & | text,
|  | int | replaceStart = 0,
|  | int | replaceLength = 0,
|  | int | cursorPos = -1 )

slot

Sends commit string. Called by QML components. For params, see also MAbstractInputMethodHost::sendCommitString()

Parameters

  text | the commit string.
  replaceStart | The position at which characters are to be replaced relative to 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, relative to commit string start. Negative values are used as commit string end position.

## ◆ sendKey

void Maliit::InputMethodQuick::sendKey | ( | int | key,
|  | int | modifiers = 0,
|  | const QString & | text = QString(),
|  | int | type = MaliitQuick::KeyClick )

slot

Sends an arbitrary key, optionally with modifiers.

Parameters

  key | the Qt keycode to be sent, e.g., Qt.Key_Up.
  modifiers | optional modifiers to send along, like Qt.ControlModifier.
  text | an optional text to send along with the QKeyEvent.
  type | MaliitQuick.KeyPress, KeyRelease or KeyClick for both

## ◆ sendPreedit

void Maliit::InputMethodQuick::sendPreedit | ( | const QString & | text,
|  | const QVariant & | preeditFormats = QVariant(),
|  | int | replacementStart = 0,
|  | int | replacementLength = 0,
|  | int | cursorPos = -1 )

slot

Sends preedit string. Called by QML components. See also MAbstractInputMethodHost::sendPreeditString()

Parameters

  text | the preedit string.
  preeditFormats | Selects visual stylings for each part of preedit. The value can be either: Maliit.PreeditFace for applying one style for whole string or list of lists containing [PreeditFace, start, length]
  replacementStart | The position at which characters are to be replaced relative from the start of the preedit string.
  replacementLength | The number of characters to be replaced in the preedit string.
  cursorPos | The cursur position inside preedit

## ◆ setActive()

void Maliit::InputMethodQuick::setActive | ( | bool | enable | ) |

Sets input method expected to be shown/hidden.

## ◆ setInputMethodArea()

void Maliit::InputMethodQuick::setInputMethodArea | ( | const QRectF & | area | ) |

Sets input method area. Called by QML components. area the area consumed by the QML input method. On transitions can reserve target area at start.

## ◆ setScreenRegion()

void Maliit::InputMethodQuick::setScreenRegion | ( | const QRect & | region | ) |

Sets area input method is actually using from the screen.

## ◆ surroundingText()

QString Maliit::InputMethodQuick::surroundingText | ( |  | ) |

## ◆ surroundingTextChanged

void Maliit::InputMethodQuick::surroundingTextChanged | ( |  | ) |

signal

## ◆ surroundingTextValid()

bool Maliit::InputMethodQuick::surroundingTextValid | ( |  | ) |

## ◆ surroundingTextValidChanged

void Maliit::InputMethodQuick::surroundingTextValidChanged | ( |  | ) |

signal

## ◆ userHide

void Maliit::InputMethodQuick::userHide | ( |  | ) |

slot

Tells the framework to close keyboard. Called by QML components.

## Property Documentation

## ◆ actionKeyOverride

Maliit::KeyOverrideQuick * Maliit::InputMethodQuick::actionKeyOverride

read

Propagates action key override to QML components.

## ◆ active

bool Maliit::InputMethodQuick::active

read

Property for whether input method is active.

## ◆ anchorPosition

int Maliit::InputMethodQuick::anchorPosition

read

## ◆ appOrientation

int Maliit::InputMethodQuick::appOrientation

read

Propagates application orientation to QML components.

## ◆ autoCapitalizationEnabled

bool Maliit::InputMethodQuick::autoCapitalizationEnabled

read

## ◆ contentType

int Maliit::InputMethodQuick::contentType

read

## ◆ cursorPosition

int Maliit::InputMethodQuick::cursorPosition

read

## ◆ hasSelection

bool Maliit::InputMethodQuick::hasSelection

read

## ◆ hiddenText

bool Maliit::InputMethodQuick::hiddenText

read

## ◆ predictionEnabled

bool Maliit::InputMethodQuick::predictionEnabled

read

## ◆ screenHeight

int Maliit::InputMethodQuick::screenHeight

read

Propagates screen height to QML components.

## ◆ screenWidth

int Maliit::InputMethodQuick::screenWidth

read

Propagates screen width to QML components.

## ◆ surroundingText

QString Maliit::InputMethodQuick::surroundingText

read

## ◆ surroundingTextValid

bool Maliit::InputMethodQuick::surroundingTextValid

read

Copyright © 2011 Nokia Corporation |  | Maliit