KDEUI
klinkitemselectionmodel.cpp
Go to the documentation of this file.
34 KLinkItemSelectionModelPrivate(KLinkItemSelectionModel *proxySelectionModel, QAbstractItemModel *model,
40 m_indexMapper(new KModelIndexProxyMapper(model, linkedItemSelectionModel->model(), proxySelectionModel))
68KLinkItemSelectionModel::KLinkItemSelectionModel(QAbstractItemModel *model, QItemSelectionModel *proxySelector, QObject *parent)
72 connect(proxySelector, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(sourceSelectionChanged(QItemSelection,QItemSelection)));
73 connect(proxySelector, SIGNAL(currentChanged(QModelIndex,QModelIndex)), SLOT(sourceCurrentChanged(QModelIndex)));
82void KLinkItemSelectionModel::select(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
92 // Doing so would end up calling KLinkItemSelectionModel::select(QItemSelection, QItemSelectionModel::SelectionFlags)
94 // This is because the code for QItemSelectionModel::select(QModelIndex, QItemSelectionModel::SelectionFlags) looks like this:
134void KLinkItemSelectionModel::select(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command)
160void KLinkItemSelectionModelPrivate::sourceSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected)
Makes it possible to share a selection in multiple views which do not have the same source model.
Definition klinkitemselectionmodel.h:96
KLinkItemSelectionModelPrivate *const d_ptr
Definition klinkitemselectionmodel.h:108
void select(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
Definition klinkitemselectionmodel.cpp:82
KLinkItemSelectionModel(QAbstractItemModel *targetModel, QItemSelectionModel *linkedItemSelectionModel, QObject *parent=0)
Constructor.
Definition klinkitemselectionmodel.cpp:68
~KLinkItemSelectionModel()
Definition klinkitemselectionmodel.cpp:77
This class facilitates easy mapping of indexes and selections through proxy models.
Definition kmodelindexproxymapper.h:80
QModelIndex mapLeftToRight(const QModelIndex &index) const
Maps the index from the left model to the right model.
Definition kmodelindexproxymapper.cpp:173
QItemSelection mapSelectionRightToLeft(const QItemSelection &selection) const
Maps the selection from the right model to the left model.
Definition kmodelindexproxymapper.cpp:260
QModelIndex mapRightToLeft(const QModelIndex &index) const
Maps the index from the right model to the left model.
Definition kmodelindexproxymapper.cpp:182
#define kDebug
static QItemSelection klink_removeInvalidRanges(const QItemSelection &selection)
Definition klinkitemselectionmodel.cpp:121
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.