diff options
author | Paul Wicking <paul.wicking@qt.io> | 2018-07-16 15:35:47 +0200 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2018-07-30 15:01:37 +0000 |
commit | 9ee7b52f3234d12c7617ddf716f54e1923d3cded (patch) | |
tree | 09622a59da1890181b44fe2cdb291866463cf012 /src/qml/types | |
parent | 785451a30921f11a88d45c1f9e1a00f6c7e571d8 (diff) |
Doc: Extend ItemSelectionModel QML documentation
This change provides a bare minimum documentation for the
ItemSelectionModel QML type.
Task-number: QTBUG-58090
Change-Id: I0e232f8e05e7629d6f573f8dce21154d0ec307e5
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qml/types')
-rw-r--r-- | src/qml/types/qqmlitemselectionmodel.qdoc | 63 |
1 files changed, 59 insertions, 4 deletions
diff --git a/src/qml/types/qqmlitemselectionmodel.qdoc b/src/qml/types/qqmlitemselectionmodel.qdoc index 64c0429acd..7ddfd79217 100644 --- a/src/qml/types/qqmlitemselectionmodel.qdoc +++ b/src/qml/types/qqmlitemselectionmodel.qdoc @@ -35,9 +35,6 @@ \brief Instantiates a QItemSelectionModel to be used in conjunction with a QAbstractItemModel and any view supporting it. - This page only enumerates the properties, methods, and signals available in QML. - See \l QItemSelectionModel for the actual documentation of this class. - \sa QItemSelectionModel, {Models and Views in Qt Quick} */ @@ -76,34 +73,67 @@ /*! \qmlmethod bool ItemSelectionModel::isSelected(QModelIndex index) + + Returns \c true if the given model item \a index is selected. */ /*! \qmlmethod bool ItemSelectionModel::isRowSelected(int row, QModelIndex parent) + + Returns \c true if all items are selected in the \a row with the given + \a parent. + + Note that this function is usually faster than calling isSelected() + on all items in the same row, and that unselectable items are ignored. */ /*! \qmlmethod bool ItemSelectionModel::isColumnSelected(int column, QModelIndex parent) + + Returns \c true if all items are selected in the \a column with the given + \a parent. + + Note that this function is usually faster than calling isSelected() + on all items in the same column, and that unselectable items are ignored. */ /*! \qmlmethod bool ItemSelectionModel::rowIntersectsSelection(int row, QModelIndex parent) + + Returns \c true if there are any items selected in the \a row with the + given \a parent. */ /*! \qmlmethod bool ItemSelectionModel::columnIntersectsSelection(int column, QModelIndex parent) + + Returns \c true if there are any items selected in the \a column with the + given \a parent. */ /*! \qmlmethod QModelIndexList ItemSelectionModel::selectedRows(int column) + + Returns the indexes in the given \a column for the rows where all columns + are selected. + + \sa selectedColumns() */ /*! \qmlmethod QModelIndexList ItemSelectionModel::selectedColumns(int row) + + Returns the indexes in the given \a row for columns where all rows are + selected. + + \sa selectedRows() */ /*! - \qmlmethod QItemSelection ItemSelectionModel::selection() + \qmlproperty object ItemSelectionModel::selection + \readonly + + Holds the selection ranges stored in the selection model. */ /*! @@ -161,24 +191,49 @@ /*! \qmlmethod void ItemSelectionModel::clear() + + Clears the selection model. Emits selectionChanged() and currentChanged(). */ /*! \qmlmethod void ItemSelectionModel::reset() + + Clears the selection model. Does not emit any signals. */ /*! \qmlmethod void ItemSelectionModel::clearSelection() + + Clears the selection in the selection model. Emits selectionChanged(). */ /*! \qmlmethod void ItemSelectionModel::clearCurrentIndex() + + Clears the current index. Emits currentChanged(). */ /*! \qmlsignal ItemSelectionModel::selectionChanged(QItemSelection selected, QItemSelection deselected) + + This signal is emitted whenever the selection changes. The change in the + selection is represented as an item selection of \a deselected items and + an item selection of \a selected items. + + Note the that the current index changes independently from the selection. + Also note that this signal will not be emitted when the item model is reset. + + \sa select(), currentChanged() */ /*! \qmlsignal ItemSelectionModel::currentChanged(QModelIndex current, QModelIndex previous) + + This signal is emitted whenever the current item changes. The \a previous + model item index is replaced by the \a current index as the selection's + current item. + + Note that this signal will not be emitted when the item model is reset. + + \sa currentIndex(), setCurrentIndex(), selectionChanged() */ |