Akonadi::AgentBase::ObserverV2 Class

class Akonadi::AgentBase::ObserverV2

Public Functions

virtual void collectionChanged(const Akonadi::Collection &collection, const QSet<QByteArray> &changedAttributes)
virtual void collectionMoved(const Akonadi::Collection &collection, const Akonadi::Collection &collectionSource, const Akonadi::Collection &collectionDestination)
virtual void itemLinked(const Akonadi::Item &item, const Akonadi::Collection &collection)
virtual void itemMoved(const Akonadi::Item &item, const Akonadi::Collection &collectionSource, const Akonadi::Collection &collectionDestination)
virtual void itemUnlinked(const Akonadi::Item &item, const Akonadi::Collection &collection)

Detailed Description

BC extension of Observer with support for monitoring item and collection moves. Use this one instead of Observer.

Member Function Documentation

[virtual] void ObserverV2::collectionChanged(const Akonadi::Collection &collection, const QSet<QByteArray> &changedAttributes)

Reimplement to handle changes to existing collections. collection The changed collection. changedAttributes The identifiers of the collection parts/attributes that has been changed.

[virtual] void ObserverV2::collectionMoved(const Akonadi::Collection &collection, const Akonadi::Collection &collectionSource, const Akonadi::Collection &collectionDestination)

Reimplement to handle collection moves. When using this class in combination with Akonadi::ResourceBase, inter-resource moves are handled internally already and the corresponding add or delete method is called instead.

collection The moved collection. collectionSource The previous parent collection. collectionDestination The new parent collection.

[virtual] void ObserverV2::itemLinked(const Akonadi::Item &item, const Akonadi::Collection &collection)

Reimplement to handle item linking. This is only relevant for virtual resources. item The linked item. collection The collection the item is linked to.

[virtual] void ObserverV2::itemMoved(const Akonadi::Item &item, const Akonadi::Collection &collectionSource, const Akonadi::Collection &collectionDestination)

Reimplement to handle item moves. When using this class in combination with Akonadi::ResourceBase, inter-resource moves are handled internally already and the corresponding add or delete method is called instead.

item The moved item. collectionSource The collection the item has been moved from. collectionDestination The collection the item has been moved to.

[virtual] void ObserverV2::itemUnlinked(const Akonadi::Item &item, const Akonadi::Collection &collection)

Reimplement to handle item unlinking. This is only relevant for virtual resources. item The unlinked item. collection The collection the item is unlinked from.