• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • EntityTreeModelPrivate
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Akonadi::EntityTreeModelPrivate Class Reference

#include <entitytreemodel_p.h>

Public Types

enum  ListingOrder { NotFirstListing, FirstListing }
 
enum  RetrieveDepth { Base, Recursive }
 

Public Member Functions

 EntityTreeModelPrivate (EntityTreeModel *parent)
 
void agentInstanceAdvancedStatusChanged (const QString &, const QVariantMap &)
 
void agentInstanceRemoved (const Akonadi::AgentInstance &instace)
 
void allCollectionsFetched (const Akonadi::Collection::List &)
 
void ancestorsFetched (const Akonadi::Collection::List &collectionList)
 
void beginResetModel ()
 
bool canFetchMore (const QModelIndex &parent) const
 
void changeFetchState (const Collection &parent)
 
QStringList childCollectionNames (const Collection &collection) const
 
Collection collectionForId (Collection::Id id) const
 
void collectionListFetched (const Akonadi::Collection::List &)
 
void collectionsFetched (const Akonadi::Collection::List &)
 
void collectionSubscribed (const Akonadi::Collection &, const Akonadi::Collection &)
 
void dataChanged (const QModelIndex &top, const QModelIndex &bottom)
 
void deref (Collection::Id id)
 
void endResetModel ()
 
void fetchCollections (const Collection &collection, CollectionFetchJob::Type=CollectionFetchJob::FirstLevel, ListingOrder=NotFirstListing)
 
void fetchItems (const Collection &collection)
 
void fetchJobDone (KJob *job)
 
void fetchTopLevelCollections () const
 
void fillModel ()
 
void firstCollectionsFetched (const Akonadi::Collection::List &)
 
void firstFetchJobDone (KJob *job)
 
ItemFetchJob * getItemFetchJob (const Collection &parent, const ItemFetchScope &scope) const
 
ItemFetchJob * getItemFetchJob (const Item &item, const ItemFetchScope &scope) const
 
Collection::List getParentCollections (const Item &item) const
 
QModelIndexList indexesForItem (const Item &item) const
 
QModelIndex indexForCollection (const Collection &collection) const
 
template<Node::Type Type>
int indexOf (const QList< Node * > &nodes, Entity::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, Node::Type type) const
 
template<typename T >
bool isHidden (const T &entity) const
 
Item itemForId (Item::Id id) const
 
void itemsFetched (KJob *)
 
void itemsFetched (const Akonadi::Item::List &items)
 
void itemsFetched (const Collection::Id collectionId, const Akonadi::Item::List &items)
 
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 monitoredCollectionsChanged (const Akonadi::Collection &collection, bool monitored)
 
void monitoredCollectionStatisticsChanged (Akonadi::Collection::Id, const Akonadi::CollectionStatistics &)
 
void monitoredCollectionUnsubscribed (const Akonadi::Collection &)
 
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 monitoredItemsChanged (const Akonadi::Item &item, bool monitored)
 
void monitoredItemsRetrieved (KJob *job)
 
void monitoredItemUnlinked (const Akonadi::Item &, const Akonadi::Collection &)
 
void monitoredMimeTypeChanged (const QString &mimeType, bool monitored)
 
void monitoredResourcesChanged (const QByteArray &resource, 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 rootFetchJobDone (KJob *job)
 
void runItemFetchJob (ItemFetchJob *itemFetchJob, const Collection &parent) const
 
void serverStarted ()
 
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 FetchCollectionId ()
 

Public Attributes

QHash< Collection::Id, QList
< Node * > > 
m_childEntities
 
EntityTreeModel::CollectionFetchStrategy m_collectionFetchStrategy
 
QHash< Collection::Id, Collection > m_collections
 
QSet< Collection::Id > m_collectionsWithoutItems
 
QHash< Collection::Id, uint > m_collectionSyncProgress
 
bool m_collectionTreeFetched
 
bool m_includeStatistics
 
bool m_includeUnsubscribed
 
EntityTreeModel::ItemPopulationStrategy m_itemPopulation
 
QHash< Entity::Id, Item > m_items
 
MimeTypeChecker m_mimeChecker
 
QStringList m_mimeTypeFilter
 
ChangeRecorder * m_monitor
 
QSet< Collection::Id > m_pendingCollectionRetrieveJobs
 
QVector< Entity::Id > m_pendingCutCollections
 
QVector< Entity::Id > m_pendingCutItems
 
QSet< Collection::Id > m_populatedCols
 
Collection m_rootCollection
 
QString m_rootCollectionDisplayName
 
Node * m_rootNode
 
Session * m_session
 
bool m_showRootCollection
 
bool m_showSystemEntities
 
EntityTreeModel *const q_ptr
 

Detailed Description

Definition at line 61 of file entitytreemodel_p.h.

Member Function Documentation

QStringList Akonadi::EntityTreeModelPrivate::childCollectionNames ( const Collection &  collection) const

Returns the list of names of the child collections of collection.

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.

static QByteArray Akonadi::EntityTreeModelPrivate::FetchCollectionId ( )
inlinestatic

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 212 of file entitytreemodel_p.h.

void Akonadi::EntityTreeModelPrivate::fillModel ( )

Start function for filling the Model, finds and fetches the root of the node tree Next relevant function for filling the model is startFirstListJob()

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.

template<Node::Type Type>
int Akonadi::EntityTreeModelPrivate::indexOf ( const QList< Node * > &  nodes,
Entity::Id  id 
) const
inline

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

Returns -1 if not found.

Definition at line 194 of file entitytreemodel_p.h.

bool Akonadi::EntityTreeModelPrivate::isHidden ( const Entity &  entity,
Node::Type  type 
) const
Returns
True if entity or one of its descemdants is hidden.
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
void Akonadi::EntityTreeModelPrivate::retrieveAncestors ( const Akonadi::Collection &  collection)

Fetch parent collections and insert this collection and its parents into the node tree.

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
void Akonadi::EntityTreeModelPrivate::startFirstListJob ( )

Called after the root collection was fetched by fillModel.

Initiates further fetching of collections depending on the monitored collections (in the monitor) and the m_collectionFetchStrategy.

Further collections are either fetched directly with fetchCollections and fetchItems or, in case that collections or resources are monitored explicitly via fetchTopLevelCollections


The documentation for this class was generated from the following file:
  • entitytreemodel_p.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal