20 #include "selectionproxymodel.h"
22 #include "entitytreemodel.h"
24 using namespace Akonadi;
29 class SelectionProxyModelPrivate
33 : q_ptr( selectionProxyModel )
36 foreach (
const QModelIndex &rootIndex, q->sourceRootIndexes() ) {
37 rootIndexAdded( rootIndex );
40 ~SelectionProxyModelPrivate()
43 foreach(
const QModelIndex& idx, q->sourceRootIndexes()) {
44 rootIndexAboutToBeRemoved(idx);
51 void rootIndexAdded(
const QModelIndex &newRootIndex )
56 q->sourceModel()->fetchMore( newRootIndex );
62 void rootIndexAboutToBeRemoved(
const QModelIndex &removedRootIndex )
75 : KSelectionProxyModel( selectionModel, parent ), d_ptr( new SelectionProxyModelPrivate( this ) )
77 connect(
this, SIGNAL(rootIndexAdded(QModelIndex)), SLOT(rootIndexAdded(QModelIndex)) );
78 connect(
this, SIGNAL(rootIndexAboutToBeRemoved(QModelIndex)), SLOT(rootIndexAboutToBeRemoved(QModelIndex)) );
81 SelectionProxyModel::~SelectionProxyModel()
86 #include "moc_selectionproxymodel.cpp"