SelectionListModel Class
(QtVirtualKeyboard::SelectionListModel)List model for selection lists. More...
Header: | #include <SelectionListModel> |
Instantiated By: | SelectionListModel |
Inherits: | QAbstractListModel |
Public Types
Public Functions
void | selectItem(int index) |
- 4 public functions inherited from QAbstractListModel
- 39 public functions inherited from QAbstractItemModel
- 31 public functions inherited from QObject
Signals
void | activeItemChanged(int index) |
void | itemSelected(int index) |
- 18 signals inherited from QAbstractItemModel
- 2 signals inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 2 public slots inherited from QAbstractItemModel
- 1 public slot inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 19 protected functions inherited from QAbstractItemModel
- 9 protected functions inherited from QObject
- 1 protected slot inherited from QAbstractItemModel
- 2 protected variables inherited from QObject
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 SelectionListModel::Role
This enum specifies a role of the data requested.
Constant | Value | Description |
---|---|---|
QtVirtualKeyboard::SelectionListModel::DisplayRole | Qt::DisplayRole | The data to be rendered in form of text. |
QtVirtualKeyboard::SelectionListModel::WordCompletionLengthRole | 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. |
enum SelectionListModel::Type
This enum specifies the type of selection list.
Constant | Value | Description |
---|---|---|
QtVirtualKeyboard::SelectionListModel::WordCandidateList | 0 | Shows list of word candidates |
Member Function Documentation
[signal]
void SelectionListModel::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.
[signal]
void SelectionListModel::itemSelected(int index)
This signal is emitted when an item at index is selected by the user.
void SelectionListModel::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.