20 #ifndef KSELECTIONPROXYMODEL_H
21 #define KSELECTIONPROXYMODEL_H
23 #include <QtGui/QAbstractProxyModel>
29 class KSelectionProxyModelPrivate;
115 ChildrenOfExactSelection
117 Q_ENUMS(FilterBehavior)
233 void setFilterBehavior(FilterBehavior behavior);
234 FilterBehavior filterBehavior() const;
236 QModelIndex mapFromSource(const QModelIndex & sourceIndex) const;
237 QModelIndex mapToSource(const QModelIndex & proxyIndex) const;
239 QItemSelection mapSelectionFromSource(const QItemSelection& selection) const;
240 QItemSelection mapSelectionToSource(const QItemSelection& selection) const;
242 virtual Qt::ItemFlags flags(const QModelIndex &index) const;
243 QVariant data(const QModelIndex & index,
int role = Qt::DisplayRole) const;
244 virtual
int rowCount(const QModelIndex & parent = QModelIndex()) const;
245 virtual
QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const;
247 virtual QMimeData* mimeData(const QModelIndexList & indexes) const;
249 virtual Qt::DropActions supportedDropActions() const;
250 virtual
bool dropMimeData(const QMimeData* data, Qt::DropAction action,
int row,
int column, const QModelIndex& parent);
252 virtual
bool hasChildren(const QModelIndex & parent = QModelIndex()) const;
253 virtual QModelIndex index(
int,
int, const QModelIndex& = QModelIndex()) const;
254 virtual QModelIndex parent(const QModelIndex&) const;
255 virtual
int columnCount(const QModelIndex& = QModelIndex()) const;
257 virtual QModelIndexList match(const QModelIndex& start,
int role, const
QVariant& value,
int hits = 1,
258 Qt::MatchFlags flags = Qt::MatchFlags(Qt::MatchStartsWith | Qt::MatchWrap)) const;
261 #if !defined(Q_MOC_RUN) && !defined(DOXYGEN_SHOULD_SKIP_THIS) && !defined(IN_IDE_PARSER)
271 void rootIndexAboutToBeRemoved(
const QModelIndex &removeRootIndex);
279 void rootIndexAdded(
const QModelIndex &newIndex);
286 void rootSelectionAboutToBeRemoved(
const QItemSelection &selection);
293 void rootSelectionAdded(
const QItemSelection &selection);
301 KSelectionProxyModelPrivate *d_ptr;
303 Q_PRIVATE_SLOT(d_func(),
void sourceRowsAboutToBeInserted(const QModelIndex &,
int,
int))
304 Q_PRIVATE_SLOT(d_func(),
void sourceRowsInserted(const QModelIndex &,
int,
int))
305 Q_PRIVATE_SLOT(d_func(),
void sourceRowsAboutToBeRemoved(const QModelIndex &,
int,
int))
306 Q_PRIVATE_SLOT(d_func(),
void sourceRowsRemoved(const QModelIndex &,
int,
int))
307 Q_PRIVATE_SLOT(d_func(),
void sourceRowsAboutToBeMoved(const QModelIndex &,
int,
int, const QModelIndex &,
int))
308 Q_PRIVATE_SLOT(d_func(),
void sourceRowsMoved(const QModelIndex &,
int,
int, const QModelIndex &,
int))
309 Q_PRIVATE_SLOT(d_func(),
void sourceModelAboutToBeReset())
310 Q_PRIVATE_SLOT(d_func(),
void sourceModelReset())
311 Q_PRIVATE_SLOT(d_func(),
void sourceLayoutAboutToBeChanged())
312 Q_PRIVATE_SLOT(d_func(),
void sourceLayoutChanged())
313 Q_PRIVATE_SLOT(d_func(),
void sourceDataChanged(const QModelIndex &, const QModelIndex &))
314 Q_PRIVATE_SLOT(d_func(),
void selectionChanged(const QItemSelection & selected, const QItemSelection & deselected))
315 Q_PRIVATE_SLOT(d_func(),
void sourceModelDestroyed())
A Proxy Model which presents a subset of its source model to observers.