Home · API Reference · Modules
Public Member Functions | List of all members
Maliit::StandaloneInputMethodHost Class Reference

#include <standaloneinputmethodhost.h>

Inheritance diagram for Maliit::StandaloneInputMethodHost:
Inheritance graph
[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< MImPluginDescriptionpluginDescriptions (Maliit::HandlerState state) const override
 
Maliit::Plugins::AbstractPluginSettingregisterPluginSetting (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< MImSubViewDescriptionsurroundingSubViewDescriptions (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)
overridevirtual

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)
overridevirtual

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

Implements MAbstractInputMethodHost.

◆ contentType()

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

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)
overridevirtual

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

Implements MAbstractInputMethodHost.

◆ cursorRectangle()

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

get cursor rectangle

Implements MAbstractInputMethodHost.

◆ hasSelection()

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

returns true if there is selecting text

Implements MAbstractInputMethodHost.

◆ hiddenText()

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

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

Reimplemented from MAbstractInputMethodHost.

◆ inputMethodMode()

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

get input method mode

Implements MAbstractInputMethodHost.

◆ inputMethodQuery()

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

◆ invokeAction()

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

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

Parameters
actionThe action to call
sequenceThe fall-back key sequence when action is not available

Implements MAbstractInputMethodHost.

◆ notifyImInitiatedHiding()

void Maliit::StandaloneInputMethodHost::notifyImInitiatedHiding ( )
overridevirtual

Notifies about hiding initiated by the input method.

Implements MAbstractInputMethodHost.

◆ pluginDescriptions()

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

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)
overridevirtual

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

Implements MAbstractInputMethodHost.

◆ preeditRectangle()

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

get preedit rectangle

Implements MAbstractInputMethodHost.

◆ registerPluginSetting()

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

Register a new plugin setting.

Parameters
keyname for the entry
typevalue type
attributesattribute 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 )
overridevirtual

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)
overridevirtual

returns the selecting text

Implements MAbstractInputMethodHost.

◆ sendCommitString()

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

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

Parameters
stringThe string to be committed
replaceStartThe position at which characters are to be replaced relative from the start of the preedit string.
replaceLengthThe number of characters to be replaced in the preedit string.
cursorPosThe 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 )
overridevirtual

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
keyEventThe event to send
signalOnlyonly 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)
overridevirtual

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)
overridevirtual

set global correction option enable/disable

Implements MAbstractInputMethodHost.

◆ setInputMethodArea()

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

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
regionthe new region
windowwindow for which input method area applies. If zero, first registered window is used.

Implements MAbstractInputMethodHost.

◆ setLanguage()

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

Sets current input method language.

Parameters
languageICU 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)
overridevirtual

Locks application orientation.

Deprecated
Not implemented

Implements MAbstractInputMethodHost.

◆ setRedirectKeys()

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

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 )
overridevirtual

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

Parameters
regionthe new region
windowwindow for which region applies. If zero, first registered window is used.

Implements MAbstractInputMethodHost.

◆ setSelection()

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

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

Implements MAbstractInputMethodHost.

◆ surroundingText()

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

get surrounding text and cursor position information

Implements MAbstractInputMethodHost.

◆ switchPlugin() [1/2]

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

Asks environment to change active plugin to specified one.

Parameters
pluginNameName for plugin which will be activated

Implements MAbstractInputMethodHost.

◆ switchPlugin() [2/2]

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

Asks environment to change active plugin according to direction.

Implements MAbstractInputMethodHost.


Copyright © 2011 Nokia Corporation
Maliit