Home ยท API Reference |
Provides an interface for input method instances to connect to the environment. More...
Public Slots | |
virtual void | sendPreeditString (const QString &string, const QList< MInputMethod::PreeditTextFormat > &preeditFormats, int replacementStart=0, int replacementLength=0, int cursorPos=-1)=0 |
Updates pre-edit string in the application widget. | |
virtual void | sendCommitString (const QString &string, int replaceStart=0, int replaceLength=0, int cursorPos=-1)=0 |
Updates commit string in the application widget, and set cursor position. | |
virtual void | sendKeyEvent (const QKeyEvent &keyEvent, MInputMethod::EventRequestType requestType=MInputMethod::EventRequestBoth)=0 |
Sends key event to the application. | |
virtual void | notifyImInitiatedHiding ()=0 |
Notifies about hiding initiated by the input method. | |
virtual void | copy ()=0 |
copy selected text | |
virtual void | paste ()=0 |
paste plain text from clipboard | |
virtual void | setRedirectKeys (bool enabled)=0 |
Set if the input method wants to process all raw key events from hardware keyboard (via processKeyEvent calls). | |
virtual void | setDetectableAutoRepeat (bool enabled)=0 |
Set detectable autorepeat for X on/off. | |
virtual void | setGlobalCorrectionEnabled (bool enabled)=0 |
set global correction option enable/disable | |
virtual void | setInputModeIndicator (MInputMethod::InputModeIndicator mode)=0 |
Sets input mode indicator state. | |
virtual void | switchPlugin (MInputMethod::SwitchDirection direction)=0 |
virtual void | switchPlugin (const QString &pluginName)=0 |
virtual void | setScreenRegion (const QRegion ®ion)=0 |
virtual void | setInputMethodArea (const QRegion ®ion)=0 |
virtual void | setSelection (int start, int length)=0 |
Sets selection text from start with length in the application widget. | |
virtual void | setOrientationAngleLocked (bool lock)=0 |
Locks application orientation. | |
Signals | |
void | pluginsChanged () |
This signal is emitted when input method plugins are loaded or unloaded. | |
Public Member Functions | |
MAbstractInputMethodHost (QObject *parent=0) | |
virtual | ~MAbstractInputMethodHost () |
virtual int | contentType (bool &valid)=0 |
returns content type for focused widget if output parameter valid is true, value matches enum M::TextContentType | |
virtual bool | correctionEnabled (bool &valid)=0 |
returns input method correction hint if output parameter valid is true. | |
virtual bool | predictionEnabled (bool &valid)=0 |
returns input method word prediction hint if output parameter valid is true. | |
virtual bool | autoCapitalizationEnabled (bool &valid)=0 |
returns input method auto-capitalization hint if output parameter valid is true. | |
virtual bool | surroundingText (QString &text, int &cursorPosition)=0 |
get surrounding text and cursor position information | |
virtual bool | hasSelection (bool &valid)=0 |
returns true if there is selecting text | |
virtual int | inputMethodMode (bool &valid)=0 |
get input method mode | |
virtual QRect | preeditRectangle (bool &valid)=0 |
get preedit rectangle | |
virtual QRect | cursorRectangle (bool &valid)=0 |
get cursor rectangle | |
virtual int | anchorPosition (bool &valid)=0 |
returns the position of the selection anchor. | |
virtual bool | hiddenText (bool &valid) |
true if text input is being made hidden, e.g. with password fields | |
virtual QString | selection (bool &valid)=0 |
returns the selecting text | |
QPixmap | background () const |
returns a pixmap that needs to be drawn as the background of the input method. Pixmap contains the application's window contents. | |
virtual QList < MImPluginDescription > | pluginDescriptions (MInputMethod::HandlerState state) const =0 |
Return information about loaded input method plugins which could work in specified state. |
Provides an interface for input method instances to connect to the environment.
MAbstractInputMethodHost provides methods MAbstractInputMethod instances can use for interacting with the application that is using input method services and the input method framework state itself. Note: this is not meant to be derived by the input method framework users.
MAbstractInputMethodHost::MAbstractInputMethodHost | ( | QObject * | parent = 0 |
) | [explicit] |
MAbstractInputMethodHost::~MAbstractInputMethodHost | ( | ) | [virtual] |
virtual int MAbstractInputMethodHost::anchorPosition | ( | bool & | valid | ) | [pure 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.
virtual bool MAbstractInputMethodHost::autoCapitalizationEnabled | ( | bool & | valid | ) | [pure virtual] |
returns input method auto-capitalization hint if output parameter valid is true.
QPixmap MAbstractInputMethodHost::background | ( | ) | const |
returns a pixmap that needs to be drawn as the background of the input method. Pixmap contains the application's window contents.
virtual int MAbstractInputMethodHost::contentType | ( | bool & | valid | ) | [pure virtual] |
returns content type for focused widget if output parameter valid is true, value matches enum M::TextContentType
virtual void MAbstractInputMethodHost::copy | ( | ) | [pure virtual, slot] |
copy selected text
virtual bool MAbstractInputMethodHost::correctionEnabled | ( | bool & | valid | ) | [pure virtual] |
returns input method correction hint if output parameter valid is true.
virtual QRect MAbstractInputMethodHost::cursorRectangle | ( | bool & | valid | ) | [pure virtual] |
get cursor rectangle
virtual bool MAbstractInputMethodHost::hasSelection | ( | bool & | valid | ) | [pure virtual] |
returns true if there is selecting text
bool MAbstractInputMethodHost::hiddenText | ( | bool & | valid | ) | [virtual] |
true if text input is being made hidden, e.g. with password fields
virtual int MAbstractInputMethodHost::inputMethodMode | ( | bool & | valid | ) | [pure virtual] |
get input method mode
virtual void MAbstractInputMethodHost::notifyImInitiatedHiding | ( | ) | [pure virtual, slot] |
Notifies about hiding initiated by the input method.
virtual void MAbstractInputMethodHost::paste | ( | ) | [pure virtual, slot] |
paste plain text from clipboard
virtual QList<MImPluginDescription> MAbstractInputMethodHost::pluginDescriptions | ( | MInputMethod::HandlerState | state | ) | const [pure virtual] |
Return information about loaded input method plugins which could work in specified state.
void MAbstractInputMethodHost::pluginsChanged | ( | ) | [signal] |
This signal is emitted when input method plugins are loaded or unloaded.
virtual bool MAbstractInputMethodHost::predictionEnabled | ( | bool & | valid | ) | [pure virtual] |
returns input method word prediction hint if output parameter valid is true.
virtual QRect MAbstractInputMethodHost::preeditRectangle | ( | bool & | valid | ) | [pure virtual] |
get preedit rectangle
virtual QString MAbstractInputMethodHost::selection | ( | bool & | valid | ) | [pure virtual] |
returns the selecting text
virtual void MAbstractInputMethodHost::sendCommitString | ( | const QString & | string, | |
int | replaceStart = 0 , |
|||
int | replaceLength = 0 , |
|||
int | cursorPos = -1 | |||
) | [pure virtual, slot] |
Updates commit string in the application widget, and set cursor position.
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. |
virtual void MAbstractInputMethodHost::sendKeyEvent | ( | const QKeyEvent & | keyEvent, | |
MInputMethod::EventRequestType | requestType = MInputMethod::EventRequestBoth | |||
) | [pure virtual, slot] |
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.
keyEvent | The event to send | |
signalOnly | only the signal should be emitted. |
virtual void MAbstractInputMethodHost::sendPreeditString | ( | const QString & | string, | |
const QList< MInputMethod::PreeditTextFormat > & | preeditFormats, | |||
int | replacementStart = 0 , |
|||
int | replacementLength = 0 , |
|||
int | cursorPos = -1 | |||
) | [pure virtual, slot] |
Updates pre-edit string in the application widget.
string | The new pre-edit string | |
preeditFormats | Selects visual stylings for each part of preedit | |
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 |
virtual void MAbstractInputMethodHost::setDetectableAutoRepeat | ( | bool | enabled | ) | [pure virtual, slot] |
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.
virtual void MAbstractInputMethodHost::setGlobalCorrectionEnabled | ( | bool | enabled | ) | [pure virtual, slot] |
set global correction option enable/disable
virtual void MAbstractInputMethodHost::setInputMethodArea | ( | const QRegion & | region | ) | [pure virtual, slot] |
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.
region | the new region |
virtual void MAbstractInputMethodHost::setInputModeIndicator | ( | MInputMethod::InputModeIndicator | mode | ) | [pure virtual, slot] |
Sets input mode indicator state.
mode | Input mode indicator state. |
virtual void MAbstractInputMethodHost::setOrientationAngleLocked | ( | bool | lock | ) | [pure virtual, slot] |
Locks application orientation.
virtual void MAbstractInputMethodHost::setRedirectKeys | ( | bool | enabled | ) | [pure virtual, slot] |
Set if the input method wants to process all raw key events from hardware keyboard (via processKeyEvent calls).
virtual void MAbstractInputMethodHost::setScreenRegion | ( | const QRegion & | region | ) | [pure virtual, slot] |
Reserves screen area for input method. Mouse events on top of this area do not fall through to the application
region | the new region |
virtual void MAbstractInputMethodHost::setSelection | ( | int | start, | |
int | length | |||
) | [pure virtual, slot] |
Sets selection text from start with length in the application widget.
virtual bool MAbstractInputMethodHost::surroundingText | ( | QString & | text, | |
int & | cursorPosition | |||
) | [pure virtual] |
get surrounding text and cursor position information
virtual void MAbstractInputMethodHost::switchPlugin | ( | MInputMethod::SwitchDirection | direction | ) | [pure virtual, slot] |
Asks environment to change active plugin according to direction.
virtual void MAbstractInputMethodHost::switchPlugin | ( | const QString & | pluginName | ) | [pure virtual, slot] |
Asks environment to change active plugin to specified one.
pluginName | Name for plugin which will be activated |
Copyright © 2010 Nokia Corporation | MeeGo Touch |