From 839a0afec5c39c92ac7221e2c5b6a866d6848382 Mon Sep 17 00:00:00 2001 From: Jarkko Koivikko Date: Fri, 6 Jan 2017 11:14:07 +0200 Subject: Automatically hide word candidate list This change adds support for automatically hiding word candidate list when inactive. This feature includes the following enhancements: - Added new settings: * VirtualKeyboardSettings.wordCandidateList.autoHideDelay * VirtualKeyboardSettings.wordCandidateList.alwaysVisible - Automatic hiding of word candidate list when inactive and when autoHideDelay elapsed. - alwaysVisible setting restores the old functionality. - Added new signal selectionListsChanged() to input method, allowing the input method to dynamically allocate or deallocate selection lists. - HunspellInputMethod does not allocate selection list when dictionary cannot be loaded, or Qt::ImhNoPredictiveText is enabled. Also, it will no longer use pre-edit text in this case. - OpenWnnInputMethod does not allocate selection list if not needed. [ChangeLog] Automatically hide word candidate list when inactive. Change-Id: Ifa95ae8a7c47a96719ffdc2929601ff2ef9c0d2e Reviewed-by: Gordan Markus Reviewed-by: Mitch Curtis --- src/virtualkeyboard/hunspellinputmethod_p.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/virtualkeyboard/hunspellinputmethod_p.h') diff --git a/src/virtualkeyboard/hunspellinputmethod_p.h b/src/virtualkeyboard/hunspellinputmethod_p.h index 1a56defa..a73273b2 100644 --- a/src/virtualkeyboard/hunspellinputmethod_p.h +++ b/src/virtualkeyboard/hunspellinputmethod_p.h @@ -43,6 +43,12 @@ public: HunspellInputMethodPrivate(HunspellInputMethod *q_ptr); ~HunspellInputMethodPrivate(); + enum DictionaryState { + DictionaryNotLoaded, + DictionaryLoading, + DictionaryReady + }; + bool createHunspell(const QString &locale); void reset(); bool updateSuggestions(); @@ -61,6 +67,7 @@ public: int wordCompletionPoint; bool ignoreUpdate; bool autoSpaceAllowed; + DictionaryState dictionaryState; }; } // namespace QtVirtualKeyboard -- cgit v1.2.3