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);
118 void KCheckableProxyModelPrivate::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
127 bool KCheckableProxyModel::select(const QItemSelection& selection, QItemSelectionModel::SelectionFlags command)
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Definition: kcheckableproxymodel.cpp:93
The KIdentityProxyModel class proxies its source model unmodified.
Definition: kidentityproxymodel.h:31
Adds a checkable capability to a source model.
Definition: kcheckableproxymodel.h:68
QModelIndex bottomRight() const
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: kcheckableproxymodel.cpp:77
QItemSelectionModel * selectionModel() const
Definition: kcheckableproxymodel.cpp:64
KCheckableProxyModel(QObject *parent=0)
Definition: kcheckableproxymodel.cpp:45
Definition: kstandardaction.h:133
bool isValid() const
~KCheckableProxyModel()
Definition: kcheckableproxymodel.cpp:51
int toInt(bool *ok) const
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
void setSourceModel(QAbstractItemModel *sourceModel)
Definition: kidentityproxymodel.cpp:409
QModelIndex mapToSource(const QModelIndex &proxyIndex) const
Definition: kidentityproxymodel.cpp:307
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: kcheckableproxymodel.cpp:70
void setSourceModel(QAbstractItemModel *sourceModel)
Definition: kcheckableproxymodel.cpp:112
virtual bool select(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command)
Definition: kcheckableproxymodel.cpp:127
virtual QVariant data(const QModelIndex &proxyIndex, int role) const
QAbstractItemModel * sourceModel() const
void setSelectionModel(QItemSelectionModel *itemSelectionModel)
Definition: kcheckableproxymodel.cpp:56
virtual Qt::ItemFlags flags(const QModelIndex &index) const
int column() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
typedef SelectionFlags
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
typedef ItemFlags
QModelIndex topLeft() const
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.