• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi

Akonadi::CollectionModel

Akonadi::CollectionModel Class Reference

A model for collections. More...

#include <collectionmodel.h>

Inheritance diagram for Akonadi::CollectionModel:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Roles {
  OldCollectionIdRole = Qt::UserRole + 1, OldCollectionRole = Qt::UserRole + 2, CollectionIdRole = Qt::UserRole + 10, CollectionRole = Qt::UserRole + 11,
  UserRole = Qt::UserRole + 42
}

Public Member Functions

 CollectionModel (QObject *parent=0)
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
virtual bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
void fetchCollectionStatistics (bool enable)
virtual Qt::ItemFlags flags (const QModelIndex &index) const
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
void includeUnsubscribed (bool include=true)
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
virtual QMimeData * mimeData (const QModelIndexList &indexes) const
virtual QStringList mimeTypes () const
virtual QModelIndex parent (const QModelIndex &index) const
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
virtual bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
virtual bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
virtual Qt::DropActions supportedDropActions () const
virtual ~CollectionModel ()

Protected Member Functions

Collection collectionForId (Collection::Id id) const

Detailed Description

A model for collections.

This class provides the interface of QAbstractItemModel for the collection tree of the Akonadi storage.

   Akonadi::CollectionModel *model = new Akonadi::CollectionModel( this );

   QTreeView *view = new QTreeView( this );
   view->setModel( model );

If you want to list only collections of a special mime type, use CollectionFilterProxyModel on top of this model.

Author:
Volker Krause <vkrause@kde.org>

Definition at line 53 of file collectionmodel.h.


Member Enumeration Documentation

enum Akonadi::CollectionModel::Roles

Describes the roles for collections.

Enumerator:
OldCollectionIdRole 

The collection identifier. For binary compatibility to <4.3.

OldCollectionRole 

The actual collection object. For binary compatibility to <4.3.

CollectionIdRole 

The collection identifier.

CollectionRole 

The actual collection object.

UserRole 

Role for user extensions.

Reimplemented in Akonadi::CollectionStatisticsModel.

Definition at line 61 of file collectionmodel.h.


Constructor & Destructor Documentation

CollectionModel::CollectionModel ( QObject *  parent = 0  )  [explicit]

Creates a new collection model.

Parameters:
parent The parent object.

Definition at line 39 of file collectionmodel.cpp.

CollectionModel::~CollectionModel (  )  [virtual]

Destroys the collection model.

Definition at line 57 of file collectionmodel.cpp.


Member Function Documentation

Collection CollectionModel::collectionForId ( Collection::Id  id  )  const [protected]

Returns the collection for a given collection id.

Definition at line 295 of file collectionmodel.cpp.

void CollectionModel::fetchCollectionStatistics ( bool  enable  ) 

Sets whether collection statistics information shall be provided by the model.

See also:
CollectionStatistics.

Definition at line 301 of file collectionmodel.cpp.

void CollectionModel::includeUnsubscribed ( bool  include = true  ) 

Sets whether unsubscribed collections shall be listed in the model.

Definition at line 308 of file collectionmodel.cpp.


The documentation for this class was generated from the following files:
  • collectionmodel.h
  • collectionmodel.cpp

akonadi

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal