diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2017-01-06 11:14:07 +0200 |
---|---|---|
committer | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2017-01-20 17:37:41 +0000 |
commit | 839a0afec5c39c92ac7221e2c5b6a866d6848382 (patch) | |
tree | 12a6bf83805af3cecc2887518d4ce12098dac817 /tests/auto/inputpanel/data/inputpanel | |
parent | e2c4fde1804654e449465aee1b9d217e05f06075 (diff) |
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 <gordan.markus@pelagicore.com>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/inputpanel/data/inputpanel')
-rw-r--r-- | tests/auto/inputpanel/data/inputpanel/inputpanel.qml | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml index 1fb37d74..034150be 100644 --- a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml +++ b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml @@ -30,7 +30,7 @@ import QtTest 1.0 import QtQuick 2.0 import QtQuick.VirtualKeyboard 2.1 -import QtQuick.VirtualKeyboard.Settings 2.1 +import QtQuick.VirtualKeyboard.Settings 2.2 import "handwriting.js" as Handwriting import "utils.js" as Utils @@ -83,6 +83,7 @@ InputPanel { property alias soundEffectSpy: soundEffectSpy property alias inputMethodResultSpy: inputMethodResultSpy property alias wordCandidateListChangedSpy: wordCandidateListChangedSpy + property alias wordCandidateListVisibleSpy: wordCandidateListVisibleSpy property alias shiftStateSpy: shiftStateSpy signal inputMethodResult(var text) @@ -164,6 +165,12 @@ InputPanel { } SignalSpy { + id: wordCandidateListVisibleSpy + target: wordCandidateView + signalName: "onVisibleConditionChanged" + } + + SignalSpy { id: shiftStateSpy target: InputContext signalName: "onShiftChanged" @@ -207,6 +214,14 @@ InputPanel { VirtualKeyboardSettings.activeLocales = activeLocales } + function setWclAutoHideDelay(wclAutoHideDelay) { + VirtualKeyboardSettings.wordCandidateList.autoHideDelay = wclAutoHideDelay + } + + function setWclAlwaysVisible(wclAlwaysVisible) { + VirtualKeyboardSettings.wordCandidateList.alwaysVisible = wclAlwaysVisible + } + function mapInputMode(inputModeName) { if (inputModeName === "Latin") return InputEngine.Latin |