akonadi
#include <collectionmodel.h>
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 | ~CollectionModel () |
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 |
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.
If you want to list only collections of a special mime type, use CollectionFilterProxyModel on top of this model.
- Deprecated:
- Use Akonadi::EntityTreeModel instead
Definition at line 54 of file collectionmodel.h.
Member Enumeration Documentation
Describes the roles for collections.
Definition at line 62 of file collectionmodel.h.
Constructor & Destructor Documentation
|
explicit |
Creates a new collection model.
- Parameters
-
parent The parent object.
Definition at line 39 of file collectionmodel.cpp.
|
virtual |
Destroys the collection model.
Definition at line 57 of file collectionmodel.cpp.
Member Function Documentation
|
protected |
Returns the collection for a given collection id
.
Definition at line 309 of file collectionmodel.cpp.
void CollectionModel::fetchCollectionStatistics | ( | bool | enable | ) |
Sets whether collection statistics information shall be provided by the model.
- See also
- CollectionStatistics.
- Parameters
-
enable whether to fetch collecton statistics
Definition at line 315 of file collectionmodel.cpp.
void CollectionModel::includeUnsubscribed | ( | bool | include = true | ) |
Sets whether unsubscribed collections shall be listed in the model.
Definition at line 322 of file collectionmodel.cpp.
The documentation for this class was generated from the following files:
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.