KDEUI
kcheckableproxymodel.cpp
Go to the documentation of this file.
61 connect(itemSelectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(selectionChanged(QItemSelection,QItemSelection)));
88 return d->m_itemSelectionModel->selection().contains(mapToSource(index)) ? Qt::Checked : Qt::Unchecked;
105 bool result = select(QItemSelection(srcIndex, srcIndex), state == Qt::Checked ? QItemSelectionModel::Select : QItemSelectionModel::Deselect);
115 Q_ASSERT(d_ptr->m_itemSelectionModel ? d_ptr->m_itemSelectionModel->model() == sourceModel : true);
118void KCheckableProxyModelPrivate::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
127bool KCheckableProxyModel::select(const QItemSelection& selection, QItemSelectionModel::SelectionFlags command)
Adds a checkable capability to a source model.
Definition: kcheckableproxymodel.h:69
QItemSelectionModel * selectionModel() const
Definition: kcheckableproxymodel.cpp:64
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Definition: kcheckableproxymodel.cpp:93
void setSelectionModel(QItemSelectionModel *itemSelectionModel)
Definition: kcheckableproxymodel.cpp:56
~KCheckableProxyModel()
Definition: kcheckableproxymodel.cpp:51
KCheckableProxyModel(QObject *parent=0)
Definition: kcheckableproxymodel.cpp:45
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: kcheckableproxymodel.cpp:77
virtual bool select(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command)
Definition: kcheckableproxymodel.cpp:127
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: kcheckableproxymodel.cpp:70
void setSourceModel(QAbstractItemModel *sourceModel)
Definition: kcheckableproxymodel.cpp:112
The KIdentityProxyModel class proxies its source model unmodified.
Definition: kidentityproxymodel.h:32
QModelIndex mapToSource(const QModelIndex &proxyIndex) const
Definition: kidentityproxymodel.cpp:307
void setSourceModel(QAbstractItemModel *sourceModel)
Definition: kidentityproxymodel.cpp:409
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.