Home · API Reference · Modules |
Public Slots | |
virtual void | sendPreeditString (const QString &string, const QList< MInputMethod::PreeditTextFormat > &preeditFormats, int replacementStart=0, int replacementLength=0, int cursorPos=-1)=0 |
virtual void | sendCommitString (const QString &string, int replaceStart=0, int replaceLength=0, int cursorPos=-1)=0 |
virtual void | sendKeyEvent (const QKeyEvent &keyEvent, MInputMethod::EventRequestType requestType=MInputMethod::EventRequestBoth)=0 |
virtual void | notifyImInitiatedHiding ()=0 |
virtual void | copy ()=0 |
virtual void | paste ()=0 |
virtual void | setRedirectKeys (bool enabled)=0 |
virtual void | setDetectableAutoRepeat (bool enabled)=0 |
virtual void | setGlobalCorrectionEnabled (bool enabled)=0 |
virtual void | setInputModeIndicator (MInputMethod::InputModeIndicator mode)=0 |
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 |
virtual void | setOrientationAngleLocked (bool lock)=0 |
Signals | |
void | pluginsChanged () |
Public Member Functions | |
MAbstractInputMethodHost (QObject *parent=0) | |
virtual | ~MAbstractInputMethodHost () |
virtual int | contentType (bool &valid)=0 |
virtual bool | correctionEnabled (bool &valid)=0 |
virtual bool | predictionEnabled (bool &valid)=0 |
virtual bool | autoCapitalizationEnabled (bool &valid)=0 |
virtual bool | surroundingText (QString &text, int &cursorPosition)=0 |
virtual bool | hasSelection (bool &valid)=0 |
virtual int | inputMethodMode (bool &valid)=0 |
virtual QRect | preeditRectangle (bool &valid)=0 |
virtual QRect | cursorRectangle (bool &valid)=0 |
virtual int | anchorPosition (bool &valid)=0 |
virtual bool | hiddenText (bool &valid) |
virtual QString | selection (bool &valid)=0 |
QPixmap | background () const |
virtual QList < MImPluginDescription > | pluginDescriptions (MInputMethod::HandlerState state) const =0 |
virtual int | preeditClickPos (bool &valid) const |
virtual QList < MImSubViewDescription > | surroundingSubViewDescriptions (MInputMethod::HandlerState state) const |
virtual void | setLanguage (const QString &language) |
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.
MAbstractInputMethodHost::MAbstractInputMethodHost | ( | QObject * | parent = 0 |
) | [explicit] |
MAbstractInputMethodHost::~MAbstractInputMethodHost | ( | ) | [virtual] |
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 bool MAbstractInputMethodHost::correctionEnabled | ( | bool & | valid | ) | [pure virtual] |
returns input method correction hint if output parameter valid is true.
virtual bool MAbstractInputMethodHost::predictionEnabled | ( | bool & | valid | ) | [pure virtual] |
returns input method word prediction hint if output parameter valid is true.
virtual bool MAbstractInputMethodHost::autoCapitalizationEnabled | ( | bool & | valid | ) | [pure virtual] |
returns input method auto-capitalization hint if output parameter valid is true.
virtual bool MAbstractInputMethodHost::surroundingText | ( | QString & | text, | |
int & | cursorPosition | |||
) | [pure virtual] |
get surrounding text and cursor position information
virtual bool MAbstractInputMethodHost::hasSelection | ( | bool & | valid | ) | [pure virtual] |
returns true if there is selecting text
virtual int MAbstractInputMethodHost::inputMethodMode | ( | bool & | valid | ) | [pure virtual] |
get input method mode
virtual QRect MAbstractInputMethodHost::preeditRectangle | ( | bool & | valid | ) | [pure virtual] |
get preedit rectangle
virtual QRect MAbstractInputMethodHost::cursorRectangle | ( | bool & | valid | ) | [pure virtual] |
get cursor rectangle
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.
bool MAbstractInputMethodHost::hiddenText | ( | bool & | valid | ) | [virtual] |
true if text input is being made hidden, e.g. with password fields
virtual QString MAbstractInputMethodHost::selection | ( | bool & | valid | ) | [pure virtual] |
returns the selecting text
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.
void MAbstractInputMethodHost::pluginsChanged | ( | ) | [signal] |
This signal is emitted when input method plugins are loaded or unloaded.
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::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::notifyImInitiatedHiding | ( | ) | [pure virtual, slot] |
Notifies about hiding initiated by the input method.
virtual void MAbstractInputMethodHost::copy | ( | ) | [pure virtual, slot] |
copy selected text
virtual void MAbstractInputMethodHost::paste | ( | ) | [pure virtual, slot] |
paste plain text from clipboard
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::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::setInputModeIndicator | ( | MInputMethod::InputModeIndicator | mode | ) | [pure virtual, slot] |
Sets input mode indicator state.
mode | Input mode indicator state. |
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 |
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::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::setSelection | ( | int | start, | |
int | length | |||
) | [pure virtual, slot] |
Sets selection text from start with length in the application widget.
virtual void MAbstractInputMethodHost::setOrientationAngleLocked | ( | bool | lock | ) | [pure virtual, slot] |
virtual QList<MImPluginDescription> MAbstractInputMethodHost::pluginDescriptions | ( | MInputMethod::HandlerState | state | ) | const [pure virtual] |
Return information about loaded input method plugins which could work in specified state.
virtual int MAbstractInputMethodHost::preeditClickPos | ( | bool & | valid | ) | const [inline, virtual] |
returns the current cursor position within the preedit region
QList< MImSubViewDescription > MAbstractInputMethodHost::surroundingSubViewDescriptions | ( | MInputMethod::HandlerState | state | ) | const [virtual] |
Return information about enabled subviews which are neighbors (previous and next) of current active subview.
Previous subview is described by first list item, next subview is defined by last list item. Returned list is empty if there is exactly one enabled subview.
void MAbstractInputMethodHost::setLanguage | ( | const QString & | language | ) | [virtual] |
Sets current input method language.
language | ICU format locale ID string |
Copyright © 2011 Nokia Corporation | Maliit |