diff options
Diffstat (limited to 'src/virtualkeyboard/selectionlistmodel.cpp')
-rw-r--r-- | src/virtualkeyboard/selectionlistmodel.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/virtualkeyboard/selectionlistmodel.cpp b/src/virtualkeyboard/selectionlistmodel.cpp index 1f8f9db9..33ec8de9 100644 --- a/src/virtualkeyboard/selectionlistmodel.cpp +++ b/src/virtualkeyboard/selectionlistmodel.cpp @@ -118,6 +118,22 @@ public: the completion part expressed as the number of characters counted from the end of the string. + \value DictionaryTypeRole + An integer specifying \ l {QtVirtualKeyboard::SelectionListModel::DictionaryType}{dictionary type}. + \value CanRemoveSuggestionRole + A boolean value indicating if the word candidate + can be removed from dictionary. +*/ + +/*! + \enum QtVirtualKeyboard::SelectionListModel::DictionaryType + + This enum specifies the dictionary type of a word. + + \value DefaultDictionary + The word candidate is from the default dictionary. + \value UserDictionary + The word candidate is from the user dictionary. */ SelectionListModel::SelectionListModel(QObject *parent) : @@ -226,6 +242,14 @@ void SelectionListModel::selectItem(int index) } } +void SelectionListModel::removeItem(int index) +{ + Q_D(SelectionListModel); + if (index >= 0 && index < d->rowCount && d->dataSource) { + d->dataSource->selectionListRemoveItem(d->type, index); + } +} + /*! * \internal */ |