aboutsummaryrefslogtreecommitdiffstats
path: root/src/virtualkeyboard/selectionlistmodel.h
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2017-01-06 11:14:07 +0200
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2017-01-20 17:37:41 +0000
commit839a0afec5c39c92ac7221e2c5b6a866d6848382 (patch)
tree12a6bf83805af3cecc2887518d4ce12098dac817 /src/virtualkeyboard/selectionlistmodel.h
parente2c4fde1804654e449465aee1b9d217e05f06075 (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 'src/virtualkeyboard/selectionlistmodel.h')
-rw-r--r--src/virtualkeyboard/selectionlistmodel.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/virtualkeyboard/selectionlistmodel.h b/src/virtualkeyboard/selectionlistmodel.h
index e78e64d4..47153558 100644
--- a/src/virtualkeyboard/selectionlistmodel.h
+++ b/src/virtualkeyboard/selectionlistmodel.h
@@ -44,6 +44,7 @@ class SelectionListModel : public QAbstractListModel
Q_ENUMS(Type)
Q_ENUMS(Role)
Q_DECLARE_PRIVATE(SelectionListModel)
+ Q_PROPERTY(int count READ count NOTIFY countChanged)
explicit SelectionListModel(QObject *parent = 0);
@@ -65,10 +66,13 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QHash<int,QByteArray> roleNames() const;
+ int count() const;
+
Q_INVOKABLE void selectItem(int index);
Q_INVOKABLE QVariant dataAt(int index, int role = Qt::DisplayRole) const;
signals:
+ void countChanged();
void activeItemChanged(int index);
void itemSelected(int index);