aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2018-07-16 12:24:13 +0200
committerPaul Wicking <paul.wicking@qt.io>2018-07-16 11:15:24 +0000
commit59a692c16b8b07ce32c2266a8311b488792b779a (patch)
tree96f4e7565cfadd89f5690efe653c7e60b4f405d0 /src
parentf42207cbdb0cbe5e345bfd9e000b3e77b34a503c (diff)
Doc: Extend documentation for ItemSelectionModel
Add documentation for setCurrentIndex() and the select() methods. Include SelectionFlag enum values in select(index, command) description. Task-number: QTBUG-56320 Change-Id: Ia43fa2903656d89a1e80bef6097500d329df0c59 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/types/qqmlitemselectionmodel.qdoc41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/qml/types/qqmlitemselectionmodel.qdoc b/src/qml/types/qqmlitemselectionmodel.qdoc
index 29ac1aa17a..64c0429acd 100644
--- a/src/qml/types/qqmlitemselectionmodel.qdoc
+++ b/src/qml/types/qqmlitemselectionmodel.qdoc
@@ -108,14 +108,55 @@
/*!
\qmlmethod void ItemSelectionModel::setCurrentIndex(QModelIndex index, SelectionFlags command)
+
+ Sets the model item \a index to be the current item, and emits
+ currentChanged(). The current item is used for keyboard navigation and
+ focus indication; it is independent of any selected items, although a
+ selected item can also be the current item.
+
+ Depending on the specified \a command, the \a index can also become part
+ of the current selection.
+
+ Valid \a command values are described in \l {itemselectionmodelselectindex}
+ {select(\e index, \e command)}.
+
+ \sa select()
*/
/*!
\qmlmethod void ItemSelectionModel::select(QModelIndex index, SelectionFlags command)
+ \keyword itemselectionmodelselectindex
+
+ Selects the model item \a index using the specified \a command, and emits
+ selectionChanged().
+
+ Valid values for the \a command parameter, are:
+
+ \value NoUpdate No selection will be made.
+ \value Clear The complete selection will be cleared.
+ \value Select All specified indexes will be selected.
+ \value Deselect All specified indexes will be deselected.
+ \value Toggle All specified indexes will be selected or
+ deselected depending on their current state.
+ \value Current The current selection will be updated.
+ \value Rows All indexes will be expanded to span rows.
+ \value Columns All indexes will be expanded to span columns.
+ \value SelectCurrent A combination of Select and Current, provided for
+ convenience.
+ \value ToggleCurrent A combination of Toggle and Current, provided for
+ convenience.
+ \value ClearAndSelect A combination of Clear and Select, provided for
+ convenience.
*/
/*!
\qmlmethod void ItemSelectionModel::select(QItemSelection selection, SelectionFlags command)
+
+ Selects the item \a selection using the specified \a command, and emits
+ selectionChanged().
+
+ Valid \a command values are described in \l {itemselectionmodelselectindex}
+ {select(\e index, \e command)}.
*/
/*!