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))
68 KLinkItemSelectionModel::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)));
74 connect(this, SIGNAL(currentChanged(QModelIndex,QModelIndex)), SLOT(slotCurrentChanged(QModelIndex)));
82 void 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:
106 d->m_linkedItemSelectionModel->select(d->m_indexMapper->mapSelectionLeftToRight(QItemSelection(index, index)), command);
134 void KLinkItemSelectionModel::select(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command)
160 void KLinkItemSelectionModelPrivate::sourceSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected)
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
static QItemSelection klink_removeInvalidRanges(const QItemSelection &selection)
Definition: klinkitemselectionmodel.cpp:121
KLinkItemSelectionModel(QAbstractItemModel *targetModel, QItemSelectionModel *linkedItemSelectionModel, QObject *parent=0)
Constructor.
Definition: klinkitemselectionmodel.cpp:68
~KLinkItemSelectionModel()
Definition: klinkitemselectionmodel.cpp:77
void select(const QModelIndex &topLeft, const QModelIndex &bottomRight)
Makes it possible to share a selection in multiple views which do not have the same source model...
Definition: klinkitemselectionmodel.h:95
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
Definition: kstandardaction.h:133
bool isValid() const
KLinkItemSelectionModelPrivate *const d_ptr
Definition: klinkitemselectionmodel.h:108
const QItemSelection selection() const
virtual void select(const QModelIndex &index, QFlags< QItemSelectionModel::SelectionFlag > command)
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
This class facilitates easy mapping of indexes and selections through proxy models.
Definition: kmodelindexproxymapper.h:79
void select(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
Definition: klinkitemselectionmodel.cpp:82
bool isValid() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
typedef SelectionFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.