diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2015-10-05 14:57:43 +0300 |
---|---|---|
committer | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2015-10-15 15:01:38 +0000 |
commit | c46ab8f76f6c32f0e415b01977bc51101da83a6d (patch) | |
tree | ac1c2e9c2736b4dfb2ec0f0a3f73aab9ce47f52c /src/virtualkeyboard/abstractinputmethod.h | |
parent | 4b033851e66086e66af93940c134e1456b40d273 (diff) |
Add word reselection feature
This change adds support for word reselection.
By definition, word reselection means the ability to reselect any of the
existing words in the text by touching/clicking the word.
This change implements previously unused functionality provided by
QPlatformInputContext::invokeMethod(). This functionality is essential
for handling touch events inside a pre-edit text. The virtual keyboard
example app was previously blocking this function by overriding the
default touch handling for TextInput and TextEdit components.
Word reselection is currently implemented for the following input methods:
- HunspellInputMethod
- LipiInputMethod (by inheriting HunspellInputMethod)
- T9WriteInputMethod.
Change-Id: I66731e2d2831d4b3d43dac0503cd564ffb4d490f
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/virtualkeyboard/abstractinputmethod.h')
-rw-r--r-- | src/virtualkeyboard/abstractinputmethod.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/virtualkeyboard/abstractinputmethod.h b/src/virtualkeyboard/abstractinputmethod.h index c13cc7c1..12a11fea 100644 --- a/src/virtualkeyboard/abstractinputmethod.h +++ b/src/virtualkeyboard/abstractinputmethod.h @@ -61,6 +61,8 @@ public: const QVariantMap &traceCaptureDeviceInfo, const QVariantMap &traceScreenInfo); virtual bool traceEnd(DeclarativeTrace *trace); + virtual bool reselect(int cursorPosition, const DeclarativeInputEngine::ReselectFlags &reselectFlags); + signals: void selectionListChanged(int type); void selectionListActiveItemChanged(int type, int index); |