QVirtualKeyboardSelectionListModel Class
List model for selection lists. More...
Header: | #include <QVirtualKeyboardSelectionListModel> |
qmake: | QT += virtualkeyboard |
Instantiated By: | SelectionListModel |
Inherits: | QAbstractListModel |
Public Types
enum | DictionaryType { Default, User } |
enum | Role { Display, DisplayRole, WordCompletionLength, WordCompletionLengthRole, Dictionary, CanRemoveSuggestion } |
enum | Type { WordCandidateList } |
Public Functions
int | count() const |
void | removeItem(int index) |
void | selectItem(int index) |
- 4 public functions inherited from QAbstractListModel
- 40 public functions inherited from QAbstractItemModel
- 31 public functions inherited from QObject
Signals
void | activeItemChanged(int index) |
void | countChanged() |
void | itemSelected(int index) |
- 18 signals inherited from QAbstractItemModel
- 2 signals inherited from QObject
Static Public Members
const QMetaObject | staticMetaObject |
- 9 static public members inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 2 public slots inherited from QAbstractItemModel
- 1 public slot inherited from QObject
- 19 protected functions inherited from QAbstractItemModel
- 9 protected functions inherited from QObject
- 1 protected slot inherited from QAbstractItemModel
Detailed Description
List model for selection lists.
This class acts as a bridge between the UI and the input method that provides the data for selection lists.
Member Type Documentation
enum QVirtualKeyboardSelectionListModel::DictionaryType
This enum specifies the dictionary type of a word.
Constant | Value | Description |
---|---|---|
QVirtualKeyboardSelectionListModel::Default | 0 | The word candidate is from the default dictionary. |
QVirtualKeyboardSelectionListModel::User | 1 | The word candidate is from the user dictionary. |
enum QVirtualKeyboardSelectionListModel::Role
This enum specifies a role of the data requested.
Constant | Value | Description |
---|---|---|
QVirtualKeyboardSelectionListModel::Display | Qt::DisplayRole | The data to be rendered in form of text. |
QVirtualKeyboardSelectionListModel::DisplayRole | Display | obsolete Use Role::Display. |
QVirtualKeyboardSelectionListModel::WordCompletionLength | Qt::UserRole + 1 | An integer specifying the length of the word the completion part expressed as the number of characters counted from the end of the string. |
QVirtualKeyboardSelectionListModel::WordCompletionLengthRole | WordCompletionLength | obsolete Use Role::WordCompletionLength. |
QVirtualKeyboardSelectionListModel::Dictionary | 258 | An integer specifying l {QVirtualKeyboardSelectionListModel::DictionaryType}{dictionary type}. |
QVirtualKeyboardSelectionListModel::CanRemoveSuggestion | 259 | A boolean value indicating if the word candidate can be removed from the dictionary. |
enum QVirtualKeyboardSelectionListModel::Type
This enum specifies the type of selection list.
Constant | Value | Description |
---|---|---|
QVirtualKeyboardSelectionListModel::WordCandidateList | 0 | Shows list of word candidates. |
Member Function Documentation
[signal]
void QVirtualKeyboardSelectionListModel::activeItemChanged(int index)
This signal is emitted when the active item in the list changes. The UI should react to this signal by highlighting the item at index in the list.
int QVirtualKeyboardSelectionListModel::count() const
[signal]
void QVirtualKeyboardSelectionListModel::countChanged()
[signal]
void QVirtualKeyboardSelectionListModel::itemSelected(int index)
This signal is emitted when an item at index is selected by the user.
void QVirtualKeyboardSelectionListModel::removeItem(int index)
This method should be called when the user removes an item at position index from the list. The removal is forwarded to the input method for further processing.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void QVirtualKeyboardSelectionListModel::selectItem(int index)
This method should be called when the user selects an item at position index from the list. The selection is forwarded to the input method for further processing.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.