![]() |
Qt 6.x
The Qt SDK
|
#include "qitemselectionmodel.h"
#include "qitemselectionmodel_p.h"
#include <private/qitemselectionmodel_p.h>
#include <private/qabstractitemmodel_p.h>
#include <private/qduplicatetracker_p.h>
#include <private/qoffsetstringarray_p.h>
#include <qdebug.h>
#include <algorithm>
#include <functional>
#include "moc_qitemselectionmodel.cpp"
Go to the source code of this file.
Classes | |
struct | RowOrColumnDefinition |
Namespaces | |
namespace | QtFunctionObjects |
|
static |
Definition at line 263 of file qitemselectionmodel.cpp.
References QModelIndex::column(), isSelectableAndEnabled(), QModelIndex::row(), and QModelIndex::sibling().
Referenced by QItemSelectionRange::indexes(), and qSelectionIndexes().
|
static |
Definition at line 257 of file qitemselectionmodel.cpp.
References Qt::ItemIsEnabled, and Qt::ItemIsSelectable.
Referenced by QItemSelectionModel::columnIntersectsSelection(), QItemSelection::contains(), indexesFromRange(), QItemSelectionModel::isColumnSelected(), QItemSelectionRange::isEmpty(), QItemSelectionModel::isRowSelected(), QItemSelectionModel::isSelected(), and QItemSelectionModel::rowIntersectsSelection().
|
static |
Merges indexes into an item selection made up of ranges. Assumes that the indexes are sorted.
Definition at line 914 of file qitemselectionmodel.cpp.
References QList< T >::append(), QList< T >::at(), QItemSelectionRange::bottomRight(), QPersistentModelIndex::column(), QModelIndex::column(), i, QPersistentModelIndex::isValid(), next, QModelIndex::parent(), QPersistentModelIndex::parent(), QPersistentModelIndex::row(), QModelIndex::row(), QList< T >::size(), and QItemSelectionRange::topLeft().
Referenced by QItemSelectionModelPrivate::_q_layoutChanged().
|
static |
Definition at line 874 of file qitemselectionmodel.cpp.
References QPersistentModelIndex::column(), i, QPersistentModelIndex::isValid(), next, QPersistentModelIndex::parent(), QPersistentModelIndex::row(), and QPersistentModelIndex::sibling().
Referenced by QItemSelectionModelPrivate::_q_layoutChanged().
QDebug operator<< | ( | QDebug | dbg, |
const QItemSelectionRange & | range | ||
) |
Definition at line 1965 of file qitemselectionmodel.cpp.
|
noexcept |
Definition at line 1738 of file qitemselectionmodel.cpp.
|
static |
Definition at line 281 of file qitemselectionmodel.cpp.
References indexesFromRange(), and selection.
|
static |
Definition at line 435 of file qitemselectionmodel.cpp.
References rowLengthsFromRange().
Referenced by QItemSelectionModelPrivate::_q_layoutAboutToBeChanged().
|
static |
Sort predicate function for QItemSelectionModelPrivate::_q_layoutChanged(), sorting by parent first in addition to operator<(). This is to prevent fragmentation of the selection by grouping indexes with the same row, column of different parents next to each other, which may happen when a selection spans sub-trees.
Definition at line 985 of file qitemselectionmodel.cpp.
References QPersistentModelIndex::parent().
Referenced by QItemSelectionModelPrivate::_q_layoutChanged().
|
static |
Definition at line 241 of file qitemselectionmodel.cpp.
References QModelIndex::column(), qMakePair(), QModelIndex::row(), and QModelIndex::sibling().
Referenced by qSelectionPersistentRowLengths().
|
static |
Check whether the selection is empty. In contrast to selection.isEmpty(), this takes into account whether items are enabled and whether they are selectable.
Definition at line 1679 of file qitemselectionmodel.cpp.
References QList< T >::begin(), QList< T >::end(), and selection.
Referenced by QItemSelectionModel::hasSelection().