Akonadi::EntityTreeModelPrivate Class Reference

#include <entitytreemodel_p.h>

List of all members.

Public Types

enum  RetrieveDepth { Base, Recursive }

Public Member Functions

 EntityTreeModelPrivate (EntityTreeModel *parent)
void ancestorsFetched (const Akonadi::Collection::List &collectionList)
void beginResetModel ()
Entity::Id childAt (Collection::Id, int position, bool *ok) const
Collection collectionForId (Collection::Id id) const
void collectionsFetched (const Akonadi::Collection::List &)
void dataChanged (const QModelIndex &top, const QModelIndex &bottom)
void deref (Collection::Id id)
void endResetModel ()
void fetchCollections (const Collection &collection, CollectionFetchJob::Type=CollectionFetchJob::FirstLevel)
void fetchItems (const Collection &collection)
void fetchJobDone (KJob *job)
void fetchTopLevelCollections () const
void fillModel ()
Item getItem (Item::Id id) const
ItemFetchJobgetItemFetchJob (const Item &item, const ItemFetchScope &scope) const
ItemFetchJobgetItemFetchJob (const Collection &parent, const ItemFetchScope &scope) const
Collection getParentCollection (const Collection &collection) const
Collection getParentCollection (Entity::Id id) const
Collection::List getParentCollections (const Item &item) const
QModelIndexList indexesForItem (const Item &item) const
QModelIndex indexForCollection (const Collection &collection) const
int indexOf (const QList< Node * > &list, Entity::Id id) const
int indexOf (Collection::Id parent, Collection::Id id) const
void init (ChangeRecorder *monitor)
void insertCollection (const Akonadi::Collection &collection, const Akonadi::Collection &parent)
void insertPendingCollection (const Akonadi::Collection &collection, const Akonadi::Collection &parent, QMutableListIterator< Collection > &it)
bool isHidden (const Entity &entity) const
Item itemForId (Item::Id id) const
void itemsFetched (const Akonadi::Item::List &)
void monitoredCollectionAdded (const Akonadi::Collection &, const Akonadi::Collection &)
void monitoredCollectionChanged (const Akonadi::Collection &)
void monitoredCollectionMoved (const Akonadi::Collection &, const Akonadi::Collection &, const Akonadi::Collection &)
void monitoredCollectionRemoved (const Akonadi::Collection &)
void monitoredCollectionStatisticsChanged (Akonadi::Collection::Id, const Akonadi::CollectionStatistics &)
void monitoredItemAdded (const Akonadi::Item &, const Akonadi::Collection &)
void monitoredItemChanged (const Akonadi::Item &, const QSet< QByteArray > &)
void monitoredItemLinked (const Akonadi::Item &, const Akonadi::Collection &)
void monitoredItemMoved (const Akonadi::Item &, const Akonadi::Collection &, const Akonadi::Collection &)
void monitoredItemRemoved (const Akonadi::Item &)
void monitoredItemUnlinked (const Akonadi::Item &, const Akonadi::Collection &)
void monitoredMimeTypeChanged (const QString &mimeType, bool monitored)
void pasteJobDone (KJob *job)
void purgeItems (Collection::Id id)
void ref (Collection::Id id)
void removeChildEntities (Collection::Id collectionId)
QList< Node * >::iterator removeItems (QList< Node * >::iterator it, QList< Node * >::iterator end, int *pos, const Collection &col)
void retrieveAncestors (const Akonadi::Collection &collection)
void rootCollectionFetched (const Collection::List &list)
void runItemFetchJob (ItemFetchJob *itemFetchJob, const Collection &parent) const
bool shouldPurge (Collection::Id id)
QList< Node * >::iterator skipCollections (QList< Node * >::iterator it, QList< Node * >::iterator end, int *pos)
void startFirstListJob ()
void topLevelCollectionsFetched (const Akonadi::Collection::List &collectionList)
void updateJobDone (KJob *job)

Static Public Member Functions

static QByteArray ItemFetchCollectionId ()

Public Attributes

QHash< Collection::Id, QList
< Node * > > 
m_childEntities
EntityTreeModel::CollectionFetchStrategy m_collectionFetchStrategy
QHash< Collection::Id, Collectionm_collections
bool m_includeStatistics
bool m_includeUnsubscribed
EntityTreeModel::ItemPopulationStrategy m_itemPopulation
QHash< Entity::Id, Itemm_items
MimeTypeChecker m_mimeChecker
QStringList m_mimeTypeFilter
ChangeRecorderm_monitor
QList< Entity::Idm_pendingCutCollections
QList< Entity::Idm_pendingCutItems
QSet< Collection::Idm_populatedCols
Collection m_rootCollection
QString m_rootCollectionDisplayName
Node * m_rootNode
Sessionm_session
bool m_showRootCollection
bool m_showSystemEntities
EntityTreeModelq_ptr

Detailed Description

For internal use only.

Definition at line 59 of file entitytreemodel_p.h.


Member Function Documentation

Collection Akonadi::EntityTreeModelPrivate::collectionForId ( Collection::Id  id  )  const

Returns the collection for the given collection id.

void Akonadi::EntityTreeModelPrivate::dataChanged ( const QModelIndex &  top,
const QModelIndex &  bottom 
)

Emits the data changed signal for the entire row as in the subclass, instead of just for the first column.

QModelIndexList Akonadi::EntityTreeModelPrivate::indexesForItem ( const Item item  )  const

Returns the model indexes for the given item.

QModelIndex Akonadi::EntityTreeModelPrivate::indexForCollection ( const Collection collection  )  const

Returns the model index for the given collection.

int Akonadi::EntityTreeModelPrivate::indexOf ( const QList< Node * > &  list,
Entity::Id  id 
) const

Returns the index of the node in list with the id id.

Returns -1 if not found.

bool Akonadi::EntityTreeModelPrivate::isHidden ( const Entity entity  )  const
Returns:
True if entity or one of its descemdants is hidden.
static QByteArray Akonadi::EntityTreeModelPrivate::ItemFetchCollectionId (  )  [inline, static]

The id of the collection which starts an item fetch job.

This is part of a hack with QObject::sender in itemsReceivedFromJob to correctly insert items into the model.

Definition at line 152 of file entitytreemodel_p.h.

Item Akonadi::EntityTreeModelPrivate::itemForId ( Item::Id  id  )  const

Returns the item for the given item id.

void Akonadi::EntityTreeModelPrivate::purgeItems ( Collection::Id  id  ) 

Purges the items in the Collection id.

QList<Node*>::iterator Akonadi::EntityTreeModelPrivate::removeItems ( QList< Node * >::iterator  it,
QList< Node * >::iterator  end,
int *  pos,
const Collection col 
)

Removes the items starting from it and up to a maximum of end in Collection col.

pos should be the index of it in the m_childEntities before calling, and is updated to the position of the next Collection in m_childEntities afterward. This is required to emit model remove signals properly.

Returns:
an iterator pointing to the next Collection after it, or at end
bool Akonadi::EntityTreeModelPrivate::shouldPurge ( Collection::Id  id  ) 
Returns:
true if the Collection with the id of id should be purged.
QList<Node*>::iterator Akonadi::EntityTreeModelPrivate::skipCollections ( QList< Node * >::iterator  it,
QList< Node * >::iterator  end,
int *  pos 
)

Skips over Collections in m_childEntities up to a maximum of end.

it is an iterator pointing to the first Collection in a block of Collections, and pos initially describes the index of it in m_childEntities and is updated to point to the index of the next Item in the list.

Returns:
an iterator pointing to the next Item after it, or at end

The documentation for this class was generated from the following file:
KDE Home | KDE Accessibility Home | Description of Access Keys