![]() |
Qt 6.x
The Qt SDK
|
[38] More...
#include <qitemselectionmodel.h>
Public Types | |
enum | SelectionFlag { NoUpdate = 0x0000 , Clear = 0x0001 , Select = 0x0002 , Deselect = 0x0004 , Toggle = 0x0008 , Current = 0x0010 , Rows = 0x0020 , Columns = 0x0040 , SelectCurrent = Select | Current , ToggleCurrent = Toggle | Current , ClearAndSelect = Clear | Select , NoUpdate = 0x0000 , Clear = 0x0001 , Select = 0x0002 , Deselect = 0x0004 , Toggle = 0x0008 , Current = 0x0010 , Rows = 0x0020 , Columns = 0x0040 , SelectCurrent = Select | Current , ToggleCurrent = Toggle | Current , ClearAndSelect = Clear | Select } |
This enum describes the way the selection model will be updated. More... | |
enum | SelectionFlag { NoUpdate = 0x0000 , Clear = 0x0001 , Select = 0x0002 , Deselect = 0x0004 , Toggle = 0x0008 , Current = 0x0010 , Rows = 0x0020 , Columns = 0x0040 , SelectCurrent = Select | Current , ToggleCurrent = Toggle | Current , ClearAndSelect = Clear | Select , NoUpdate = 0x0000 , Clear = 0x0001 , Select = 0x0002 , Deselect = 0x0004 , Toggle = 0x0008 , Current = 0x0010 , Rows = 0x0020 , Columns = 0x0040 , SelectCurrent = Select | Current , ToggleCurrent = Toggle | Current , ClearAndSelect = Clear | Select } |
Public Slots | |
virtual void | setCurrentIndex (const QModelIndex &index, QItemSelectionModel::SelectionFlags command) |
Sets the model item index to be the current item, and emits currentChanged(). | |
virtual void | select (const QModelIndex &index, QItemSelectionModel::SelectionFlags command) |
Selects the model item index using the specified command, and emits selectionChanged(). | |
virtual void | select (const QItemSelection &selection, QItemSelectionModel::SelectionFlags command) |
Selects the item selection using the specified command, and emits selectionChanged(). | |
virtual void | clear () |
Clears the selection model. | |
virtual void | reset () |
Clears the selection model. | |
void | clearSelection () |
virtual void | clearCurrentIndex () |
Clears the current index. | |
![]() | |
void | deleteLater () |
\threadsafe | |
Signals | |
void | selectionChanged (const QItemSelection &selected, const QItemSelection &deselected) |
This signal is emitted whenever the selection changes. | |
void | currentChanged (const QModelIndex ¤t, const QModelIndex &previous) |
This signal is emitted whenever the current item changes. | |
void | currentRowChanged (const QModelIndex ¤t, const QModelIndex &previous) |
This signal is emitted if the current item changes and its row is different to the row of the previous current item. | |
void | currentColumnChanged (const QModelIndex ¤t, const QModelIndex &previous) |
This signal is emitted if the current item changes and its column is different to the column of the previous current item. | |
void | modelChanged (QAbstractItemModel *model) |
![]() | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
Public Member Functions | |
QItemSelectionModel (QAbstractItemModel *model=nullptr) | |
Constructs a selection model that operates on the specified item model. | |
QItemSelectionModel (QAbstractItemModel *model, QObject *parent) | |
Constructs a selection model that operates on the specified item model with parent. | |
virtual | ~QItemSelectionModel () |
Destroys the selection model. | |
QModelIndex | currentIndex () const |
Returns the model item index for the current item, or an invalid index if there is no current item. | |
Q_INVOKABLE bool | isSelected (const QModelIndex &index) const |
Returns true if the given model item index is selected. | |
Q_INVOKABLE bool | isRowSelected (int row, const QModelIndex &parent=QModelIndex()) const |
Returns true if all items are selected in the row with the given parent. | |
Q_INVOKABLE bool | isColumnSelected (int column, const QModelIndex &parent=QModelIndex()) const |
Returns true if all items are selected in the column with the given parent. | |
Q_INVOKABLE bool | rowIntersectsSelection (int row, const QModelIndex &parent=QModelIndex()) const |
Returns true if there are any items selected in the row with the given parent. | |
Q_INVOKABLE bool | columnIntersectsSelection (int column, const QModelIndex &parent=QModelIndex()) const |
Returns true if there are any items selected in the column with the given parent. | |
bool | hasSelection () const |
QModelIndexList | selectedIndexes () const |
Returns a list of all selected model item indexes. | |
Q_INVOKABLE QModelIndexList | selectedRows (int column=0) const |
Q_INVOKABLE QModelIndexList | selectedColumns (int row=0) const |
const QItemSelection | selection () const |
Returns the selection ranges stored in the selection model. | |
const QAbstractItemModel * | model () const |
Returns the item model operated on by the selection model. | |
QAbstractItemModel * | model () |
QBindable< QAbstractItemModel * > | bindableModel () |
void | setModel (QAbstractItemModel *model) |
![]() | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
template<typename T > | |
T | findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
Protected Member Functions | |
QItemSelectionModel (QItemSelectionModelPrivate &dd, QAbstractItemModel *model) | |
void | emitSelectionChanged (const QItemSelection &newSelection, const QItemSelection &oldSelection) |
Compares the two selections newSelection and oldSelection and emits selectionChanged() with the deselected and selected items. | |
![]() | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
Properties | |
QAbstractItemModel * | model |
bool | hasSelection |
QModelIndex | currentIndex |
QItemSelection | selection |
QModelIndexList | selectedIndexes |
![]() | |
QString | objectName |
the name of this object | |
Additional Inherited Members | |
![]() | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
![]() | |
QScopedPointer< QObjectData > | d_ptr |
![]() | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
[38]
\inmodule QtCore
[39]
The QItemSelectionModel class keeps track of a view's selected items.
A QItemSelectionModel keeps track of the selected items in a view, or in several views onto the same model. It also keeps track of the currently selected item in a view.
The QItemSelectionModel class is one of the \l{Model/View Classes} and is part of Qt's \l{Model/View Programming}{model/view framework}.
The selected items are stored using ranges. Whenever you want to modify the selected items use select() and provide either a QItemSelection, or a QModelIndex and a QItemSelectionModel::SelectionFlag.
The QItemSelectionModel takes a two layer approach to selection management, dealing with both selected items that have been committed and items that are part of the current selection. The current selected items are part of the current interactive selection (for example with rubber-band selection or keyboard-shift selections).
To update the currently selected items, use the bitwise OR of QItemSelectionModel::Current and any of the other SelectionFlags. If you omit the QItemSelectionModel::Current command, a new current selection will be created, and the previous one added to the whole selection. All functions operate on both layers; for example, \l {QTableWidget::selectedItems()}{selecteditems()} will return items from both layers.
Definition at line 336 of file src_corelib_kernel_qobject.cpp.
This enum describes the way the selection model will be updated.
\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.
Definition at line 342 of file src_corelib_kernel_qobject.cpp.
Definition at line 102 of file qitemselectionmodel.h.
|
explicit |
Constructs a selection model that operates on the specified item model.
Definition at line 1129 of file qitemselectionmodel.cpp.
References model.
|
explicit |
Constructs a selection model that operates on the specified item model with parent.
Definition at line 1138 of file qitemselectionmodel.cpp.
References model.
|
virtual |
Destroys the selection model.
Definition at line 1156 of file qitemselectionmodel.cpp.
|
protected |
Definition at line 1147 of file qitemselectionmodel.cpp.
References QItemSelectionModelPrivate::initModel(), and model.
QBindable< QAbstractItemModel * > QItemSelectionModel::bindableModel | ( | ) |
Definition at line 1868 of file qitemselectionmodel.cpp.
|
virtualslot |
Clears the selection model.
Emits selectionChanged() and currentChanged().
Definition at line 1328 of file qitemselectionmodel.cpp.
References clearCurrentIndex(), and clearSelection().
Referenced by QListWidget::clear(), QTableWidget::clear(), QTreeWidget::clear(), QTableWidget::clearContents(), reset(), QSidebar::selectUrl(), QCompleterPrivate::setCurrentIndex(), QTreeView::setSelection(), and QCalendarWidgetPrivate::update().
|
virtualslot |
Clears the current index.
Emits currentChanged().
Definition at line 1337 of file qitemselectionmodel.cpp.
References currentChanged(), currentColumnChanged(), currentRowChanged(), d, emit, and QModelIndex::isValid().
Referenced by clear().
|
slot |
Definition at line 1362 of file qitemselectionmodel.cpp.
References Clear, d, and select().
Referenced by clear(), and QQuickTableViewPrivate::clearSelection().
bool QItemSelectionModel::columnIntersectsSelection | ( | int | column, |
const QModelIndex & | parent = QModelIndex() |
||
) | const |
Returns true
if there are any items selected in the column with the given parent.
Definition at line 1644 of file qitemselectionmodel.cpp.
References d, isSelectableAndEnabled(), j, QItemSelection::merge(), and QObject::parent().
Referenced by QHeaderViewPrivate::columnIntersectsSelection().
|
signal |
This signal is emitted whenever the current item changes.
The previous model item index is replaced by the current index as the selection's current item.
Note that this signal will not be emitted when the item model is reset.
Referenced by clearCurrentIndex(), setCurrentIndex(), and QQuickTableView::setSelectionModel().
|
signal |
This signal is emitted if the current item changes and its column is different to the column of the previous current item.
Note that this signal will not be emitted when the item model is reset.
Referenced by clearCurrentIndex(), and setCurrentIndex().
QModelIndex QItemSelectionModel::currentIndex | ( | ) | const |
Returns the model item index for the current item, or an invalid index if there is no current item.
Definition at line 1411 of file qitemselectionmodel.cpp.
|
signal |
This signal is emitted if the current item changes and its row is different to the row of the previous current item.
Note that this signal will not be emitted when the item model is reset.
Referenced by clearCurrentIndex(), and setCurrentIndex().
|
protected |
Compares the two selections newSelection and oldSelection and emits selectionChanged() with the deselected and selected items.
Definition at line 1895 of file qitemselectionmodel.cpp.
References QList< T >::append(), QList< T >::at(), emit, i, QItemSelectionRange::intersected(), QItemSelectionRange::intersects(), QList< T >::isEmpty(), o, QList< T >::removeAt(), selectionChanged(), QList< T >::size(), and QItemSelection::split().
Referenced by select().
bool QItemSelectionModel::hasSelection | ( | ) | const |
Returns true
if the selection model contains any selected item, otherwise returns false
.
Definition at line 1691 of file qitemselectionmodel.cpp.
References d, Deselect, QAbstractItemModelPrivate::executePendingOperations(), QObjectPrivate::get(), QItemSelection::merge(), model, selectionIsEmpty(), and Toggle.
bool QItemSelectionModel::isColumnSelected | ( | int | column, |
const QModelIndex & | parent = QModelIndex() |
||
) | const |
Returns true
if all items are selected in the column with the given parent.
Note that this function is usually faster than calling isSelected() on all items in the same column and that unselectable items are ignored.
Definition at line 1536 of file qitemselectionmodel.cpp.
References QList< T >::constBegin(), QList< T >::constEnd(), d, Deselect, i, isSelectableAndEnabled(), it, j, QObject::parent(), qMax(), and Toggle.
Referenced by QHeaderViewPrivate::isColumnSelected(), and selectedColumns().
bool QItemSelectionModel::isRowSelected | ( | int | row, |
const QModelIndex & | parent = QModelIndex() |
||
) | const |
Returns true
if all items are selected in the row with the given parent.
Note that this function is usually faster than calling isSelected() on all items in the same row and that unselectable items are ignored.
Definition at line 1462 of file qitemselectionmodel.cpp.
References QList< T >::constBegin(), QList< T >::constEnd(), d, Deselect, i, isSelectableAndEnabled(), it, j, QObject::parent(), qMax(), and Toggle.
Referenced by QHeaderViewPrivate::isRowSelected().
bool QItemSelectionModel::isSelected | ( | const QModelIndex & | index | ) | const |
Returns true
if the given model item index is selected.
Definition at line 1419 of file qitemselectionmodel.cpp.
References d, Deselect, isSelectableAndEnabled(), it, Select, and Toggle.
Referenced by QTableViewPrivate::drawCell(), QAbstractItemViewPrivate::extendedSelectionCommand(), QQuickTableViewPrivate::handleTap(), QTableWidgetItem::isSelected(), QListView::paintEvent(), QQuickTableViewPrivate::selectedInSelectionModel(), and QAbstractItemViewPrivate::shouldEdit().
QAbstractItemModel * QItemSelectionModel::model | ( | ) |
const QAbstractItemModel * QItemSelectionModel::model | ( | ) | const |
Returns the item model operated on by the selection model.
Definition at line 1863 of file qitemselectionmodel.cpp.
|
signal |
This signal is emitted when the model is successfully set with setModel().
|
virtualslot |
Clears the selection model.
Does not emit any signals.
Definition at line 1352 of file qitemselectionmodel.cpp.
References clear().
bool QItemSelectionModel::rowIntersectsSelection | ( | int | row, |
const QModelIndex & | parent = QModelIndex() |
||
) | const |
Returns true
if there are any items selected in the row with the given parent.
Definition at line 1609 of file qitemselectionmodel.cpp.
References d, isSelectableAndEnabled(), j, QItemSelection::merge(), and QObject::parent().
Referenced by QHeaderViewPrivate::rowIntersectsSelection().
|
virtualslot |
Selects the item selection using the specified command, and emits selectionChanged().
Definition at line 1277 of file qitemselectionmodel.cpp.
References Clear, Columns, Current, d, Deselect, emitSelectionChanged(), QItemSelection::merge(), NoUpdate, qWarning, Rows, Select, selection, and Toggle.
|
virtualslot |
Selects the model item index using the specified command, and emits selectionChanged().
Definition at line 1166 of file qitemselectionmodel.cpp.
References select(), and selection.
Referenced by clearSelection(), main(), select(), QAbstractItemViewPrivate::selectAll(), QListViewPrivate::selectAll(), QTableViewPrivate::selectColumn(), QTableViewPrivate::selectRow(), QSidebar::selectUrl(), setCurrentIndex(), QTableWidget::setRangeSelected(), QTableWidgetItem::setSelected(), QTreeWidgetItem::setSelected(), QQuickTableViewPrivate::updateSelection(), and QQuickTreeViewPrivate::updateSelection().
QModelIndexList QItemSelectionModel::selectedColumns | ( | int | row = 0 | ) | const |
Definition at line 1784 of file qitemselectionmodel.cpp.
References QList< T >::append(), QList< T >::at(), QDuplicateTracker< T, Prealloc >::hasSeen(), i, QAbstractItemModel::index(), isColumnSelected(), model, QObject::parent(), selection, and QList< T >::size().
Referenced by QTableViewPrivate::selectColumn().
QModelIndexList QItemSelectionModel::selectedIndexes | ( | ) | const |
Returns a list of all selected model item indexes.
The list contains no duplicates, and is not sorted.
Definition at line 1721 of file qitemselectionmodel.cpp.
References d, QItemSelection::indexes(), and QItemSelection::merge().
QModelIndexList QItemSelectionModel::selectedRows | ( | int | column = 0 | ) | const |
Definition at line 1755 of file qitemselectionmodel.cpp.
References QList< T >::append(), QList< T >::at(), QDuplicateTracker< T, Prealloc >::hasSeen(), i, QAbstractTableModel::index(), model, parent, selection, and QList< T >::size().
Referenced by QInputDialogPrivate::listViewText(), and QTableViewPrivate::selectRow().
const QItemSelection QItemSelectionModel::selection | ( | ) | const |
Returns the selection ranges stored in the selection model.
Definition at line 1809 of file qitemselectionmodel.cpp.
References d, QItemSelection::merge(), and QList< T >::removeIf().
|
signal |
This signal is emitted whenever the selection changes.
The change in the selection is represented as an item selection of deselected items and an item selection of 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.
Items which stay selected but change their index are not included in selected and deselected. Thus, this signal might be emitted with both selected and deselected empty, if only the indices of selected items change.
Referenced by emitSelectionChanged(), and QQuickTableView::setSelectionModel().
|
virtualslot |
Sets the model item 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 command, the index can also become part of the current selection.
Definition at line 1382 of file qitemselectionmodel.cpp.
References QPersistentModelIndex::column(), currentChanged(), currentColumnChanged(), currentRowChanged(), d, emit, NoUpdate, QPersistentModelIndex::parent(), qWarning, QPersistentModelIndex::row(), and select().
Referenced by QAbstractItemView::focusInEvent(), QtPrivate::QCalendarView::mouseMoveEvent(), QtPrivate::QCalendarView::mousePressEvent(), QTableViewPrivate::selectColumn(), QTableViewPrivate::selectRow(), QQuickTableViewPrivate::setCurrentIndex(), QCompleterPrivate::setCurrentIndex(), QQuickTableViewPrivate::setCurrentIndexFromKeyEvent(), QListWidget::setCurrentRow(), QInputDialogPrivate::setListViewText(), QComboBox::showPopup(), QCalendarWidgetPrivate::update(), and QCalendarWidgetPrivate::updateCurrentPage().
void QItemSelectionModel::setModel | ( | QAbstractItemModel * | model | ) |
Sets the model to model. The modelChanged() signal will be emitted.
Definition at line 1880 of file qitemselectionmodel.cpp.
|
read |
Definition at line 77 of file qitemselectionmodel.h.
Referenced by QAbstractItemViewPrivate::checkPersistentEditorFocus(), QQuickTableViewPrivate::currentInSelectionModel(), QQuickTableViewPrivate::editFromKeyEvent(), QCompleterPrivate::setCurrentIndex(), QQuickTableViewPrivate::setCurrentIndexFromKeyEvent(), and QQuickTableViewPrivate::updateCurrentRowAndColumn().
|
read |
Definition at line 77 of file qitemselectionmodel.h.
Referenced by QComboBox::hidePopup(), QInputDialogPrivate::listViewText(), QHeaderViewPrivate::prepareSectionSelected(), QQuickTableViewPrivate::selectionChangedInSelectionModel(), and QInputDialogPrivate::setInputWidget().
|
readwrite |
Returns the item model operated on by the selection model.
Definition at line 77 of file qitemselectionmodel.h.
Referenced by QItemSelectionModel(), QItemSelectionModel(), QItemSelectionModel(), QQuickTableViewPrivate::currentChangedInSelectionModel(), QQuickTableViewPrivate::currentInSelectionModel(), QQuickTableViewPrivate::editFromKeyEvent(), hasSelection(), selectedColumns(), QQuickTableViewPrivate::selectedInSelectionModel(), QQuickTableViewPrivate::setCurrentIndexFromKeyEvent(), setModel(), QQuickTableViewPrivate::setSelectionEndPos(), QAbstractItemView::setSelectionModel(), QQuickTableViewPrivate::setSelectionStartPos(), and QQuickTableViewPrivate::updateSelection().
|
read |
Definition at line 77 of file qitemselectionmodel.h.
Referenced by QComboBoxPrivate::_q_editingFinished(), QTreeView::selectedIndexes(), QListWidget::selectedItems(), QTableWidget::selectedItems(), and QTreeWidget::selectedItems().
|
read |
Definition at line 77 of file qitemselectionmodel.h.
Referenced by QAbstractItemViewPrivate::clearOrRemove(), QComboBox::hidePopup(), select(), select(), selectedColumns(), QTableWidget::selectedRanges(), and QTreeWidget::setSelectionModel().