akonadi
#include <entitytreemodel_p.h>
Public Types | |
enum | RetrieveDepth { Base , Recursive } |
Public Member Functions | |
EntityTreeModelPrivate (EntityTreeModel *parent) | |
void | agentInstanceRemoved (const Akonadi::AgentInstance &instace) |
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 |
void | collectionFetchJobDone (KJob *job) |
void | collectionListFetched (const Akonadi::Collection::List &) |
void | collectionsFetched (const Akonadi::Collection::List &) |
void | dataChanged (const QModelIndex &top, const QModelIndex &bottom) |
void | deref (Collection::Id id) |
void | endResetModel () |
void | fetchCollections (Akonadi::CollectionFetchJob *job) |
void | fetchCollections (const Collection &collection, CollectionFetchJob::Type type=CollectionFetchJob::FirstLevel) |
void | fetchCollections (const Collection::List &collections, CollectionFetchJob::Type type=CollectionFetchJob::FirstLevel) |
void | fetchItems (const Collection &collection) |
void | fetchTopLevelCollections () const |
void | fillModel () |
void | finalCollectionFetchJobDone (KJob *job) |
Collection::List | getParentCollections (const Item &item) const |
bool | hasChildCollection (const Collection &collection) 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 | isAncestorMonitored (const Collection &collection) const |
bool | isBuffered (Collection::Id id) |
bool | isHidden (const Entity &entity, Node::Type type) const |
template<typename T > | |
bool | isHidden (const T &entity) const |
bool | isMonitored (Collection::Id id) |
void | itemFetchJobDone (KJob *job) |
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 | 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, bool insertBaseCollection=true) |
void | rootFetchJobDone (KJob *job) |
void | serverStarted () |
bool | shouldBePartOfModel (const Collection &collection) 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 | 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 |
bool | m_collectionTreeFetched |
bool | m_includeStatistics |
EntityTreeModel::ItemPopulationStrategy | m_itemPopulation |
QHash< Entity::Id, Item > | m_items |
CollectionFetchScope::ListFilter | m_listFilter |
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 59 of file entitytreemodel_p.h.
Member Enumeration Documentation
◆ RetrieveDepth
enum Akonadi::EntityTreeModelPrivate::RetrieveDepth |
Definition at line 67 of file entitytreemodel_p.h.
Member Function Documentation
◆ childCollectionNames()
QStringList Akonadi::EntityTreeModelPrivate::childCollectionNames | ( | const Collection & | collection | ) | const |
Returns the list of names of the child collections of collection
.
◆ dataChanged()
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.
◆ 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 195 of file entitytreemodel_p.h.
◆ fillModel()
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()
◆ indexesForItem()
QModelIndexList Akonadi::EntityTreeModelPrivate::indexesForItem | ( | const Item & | item | ) | const |
Returns the model indexes for the given item
.
◆ indexForCollection()
QModelIndex Akonadi::EntityTreeModelPrivate::indexForCollection | ( | const Collection & | collection | ) | const |
Returns the model index for the given collection
.
◆ indexOf()
|
inline |
Returns the index of the node in list
with the id id
.
Returns -1 if not found.
Definition at line 178 of file entitytreemodel_p.h.
◆ isBuffered()
bool Akonadi::EntityTreeModelPrivate::isBuffered | ( | Collection::Id | id | ) |
- Returns
- true if the collection is buffered
purely for testing
◆ isHidden()
bool Akonadi::EntityTreeModelPrivate::isHidden | ( | const Entity & | entity, |
Node::Type | type | ||
) | const |
- Returns
- True if
entity
or one of its descemdants is hidden.
◆ isMonitored()
bool Akonadi::EntityTreeModelPrivate::isMonitored | ( | Collection::Id | id | ) |
- Returns
- true if the collection is actively monitored (referenced or buffered with refcounting enabled)
purely for testing
◆ purgeItems()
void Akonadi::EntityTreeModelPrivate::purgeItems | ( | Collection::Id | id | ) |
Purges the items in the Collection id
.
◆ removeItems()
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 atend
◆ retrieveAncestors()
void Akonadi::EntityTreeModelPrivate::retrieveAncestors | ( | const Akonadi::Collection & | collection, |
bool | insertBaseCollection = true |
||
) |
Fetch parent collections and insert this collection
and its parents into the node tree.
◆ shouldBePartOfModel()
bool Akonadi::EntityTreeModelPrivate::shouldBePartOfModel | ( | const Collection & | collection | ) | const |
Returns true if the collection matches all filters and should be part of the model.
This method checks all properties that could change by modifying the collection. Currently that includes:
- hidden attribute
- content mime types
◆ shouldPurge()
bool Akonadi::EntityTreeModelPrivate::shouldPurge | ( | Collection::Id | id | ) |
- Returns
- true if the Collection with the id of
id
should be purged.
◆ skipCollections()
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 atend
◆ startFirstListJob()
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
Member Data Documentation
◆ m_childEntities
QHash<Collection::Id, QList<Node *> > Akonadi::EntityTreeModelPrivate::m_childEntities |
Definition at line 131 of file entitytreemodel_p.h.
◆ m_collectionFetchStrategy
EntityTreeModel::CollectionFetchStrategy Akonadi::EntityTreeModelPrivate::m_collectionFetchStrategy |
Definition at line 145 of file entitytreemodel_p.h.
◆ m_collections
QHash<Collection::Id, Collection> Akonadi::EntityTreeModelPrivate::m_collections |
Definition at line 129 of file entitytreemodel_p.h.
◆ m_collectionsWithoutItems
QSet<Collection::Id> Akonadi::EntityTreeModelPrivate::m_collectionsWithoutItems |
Definition at line 133 of file entitytreemodel_p.h.
◆ m_collectionTreeFetched
bool Akonadi::EntityTreeModelPrivate::m_collectionTreeFetched |
Definition at line 150 of file entitytreemodel_p.h.
◆ m_includeStatistics
bool Akonadi::EntityTreeModelPrivate::m_includeStatistics |
Definition at line 148 of file entitytreemodel_p.h.
◆ m_itemPopulation
EntityTreeModel::ItemPopulationStrategy Akonadi::EntityTreeModelPrivate::m_itemPopulation |
Definition at line 146 of file entitytreemodel_p.h.
◆ m_items
QHash<Entity::Id, Item> Akonadi::EntityTreeModelPrivate::m_items |
Definition at line 130 of file entitytreemodel_p.h.
◆ m_listFilter
CollectionFetchScope::ListFilter Akonadi::EntityTreeModelPrivate::m_listFilter |
Definition at line 147 of file entitytreemodel_p.h.
◆ m_mimeChecker
MimeTypeChecker Akonadi::EntityTreeModelPrivate::m_mimeChecker |
Definition at line 144 of file entitytreemodel_p.h.
◆ m_mimeTypeFilter
QStringList Akonadi::EntityTreeModelPrivate::m_mimeTypeFilter |
Definition at line 143 of file entitytreemodel_p.h.
◆ m_monitor
ChangeRecorder* Akonadi::EntityTreeModelPrivate::m_monitor |
Definition at line 139 of file entitytreemodel_p.h.
◆ m_pendingCollectionRetrieveJobs
|
mutable |
Definition at line 137 of file entitytreemodel_p.h.
◆ m_pendingCutCollections
QVector<Entity::Id> Akonadi::EntityTreeModelPrivate::m_pendingCutCollections |
Definition at line 136 of file entitytreemodel_p.h.
◆ m_pendingCutItems
QVector<Entity::Id> Akonadi::EntityTreeModelPrivate::m_pendingCutItems |
Definition at line 135 of file entitytreemodel_p.h.
◆ m_populatedCols
QSet<Collection::Id> Akonadi::EntityTreeModelPrivate::m_populatedCols |
Definition at line 132 of file entitytreemodel_p.h.
◆ m_rootCollection
Collection Akonadi::EntityTreeModelPrivate::m_rootCollection |
Definition at line 140 of file entitytreemodel_p.h.
◆ m_rootCollectionDisplayName
QString Akonadi::EntityTreeModelPrivate::m_rootCollectionDisplayName |
Definition at line 142 of file entitytreemodel_p.h.
◆ m_rootNode
Node* Akonadi::EntityTreeModelPrivate::m_rootNode |
Definition at line 141 of file entitytreemodel_p.h.
◆ m_session
Session* Akonadi::EntityTreeModelPrivate::m_session |
Definition at line 199 of file entitytreemodel_p.h.
◆ m_showRootCollection
bool Akonadi::EntityTreeModelPrivate::m_showRootCollection |
Definition at line 149 of file entitytreemodel_p.h.
◆ m_showSystemEntities
bool Akonadi::EntityTreeModelPrivate::m_showSystemEntities |
Definition at line 214 of file entitytreemodel_p.h.
◆ q_ptr
EntityTreeModel* const Akonadi::EntityTreeModelPrivate::q_ptr |
Definition at line 65 of file entitytreemodel_p.h.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.