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

akonadi

  • Akonadi
  • CollectionStatisticsModel
Public Types | Public Member Functions | List of all members
Akonadi::CollectionStatisticsModel Class Reference

#include <collectionstatisticsmodel.h>

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

Public Types

enum  Roles {
  UnreadRole = CollectionModel::UserRole + 1, TotalRole, StatisticsRole, RecursiveUnreadRole,
  RecursiveTotalRole, RecursiveStatisticsRole, SizeRole, RecursiveSizeRole,
  UserRole = CollectionModel::UserRole + 42
}
 
- Public Types inherited from Akonadi::CollectionModel
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

 CollectionStatisticsModel (QObject *parent=0)
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
- Public Member Functions inherited from Akonadi::CollectionModel
 CollectionModel (QObject *parent=0)
 
virtual ~CollectionModel ()
 
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
 
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
 

Additional Inherited Members

- Protected Member Functions inherited from Akonadi::CollectionModel
Collection collectionForId (Collection::Id id) const
 

Detailed Description

A model that provides statistics for collections.

This model extends the CollectionModel by providing additional information about the collections, e.g. the number of items in a collection, the number of read/unread items, or the total size of the collection.

Example:

QTreeView *view = new QTreeView( this );
Akonadi::CollectionStatisticsModel *model = new Akonadi::CollectionStatisticsModel( view );
view->setModel( model );
Author
Volker Krause vkrau.nosp@m.se@k.nosp@m.de.or.nosp@m.g
Deprecated:
Use Akonadi::EntityTreeModel with an Akonadi::StatisticsProxyModel on top

Definition at line 52 of file collectionstatisticsmodel.h.

Member Enumeration Documentation

enum Akonadi::CollectionStatisticsModel::Roles

Describes the roles for the statistics collection model.

Enumerator
UnreadRole 

The number of unread items in this collection.

TotalRole 

The number of items in this collection.

StatisticsRole 

A statistics object of this collection.

RecursiveUnreadRole 

The number of unread items in this collection and its children.

RecursiveTotalRole 

The number of items in this collection and its children.

RecursiveStatisticsRole 

A statistics object of this collection and its children.

SizeRole 

The total size of the items in this collection.

RecursiveSizeRole 

The total size of the items in this collection and its children.

UserRole 

Role for user extensions.

Definition at line 61 of file collectionstatisticsmodel.h.

Constructor & Destructor Documentation

CollectionStatisticsModel::CollectionStatisticsModel ( QObject *  parent = 0)
explicit

Creates a new collection statistics model.

Parameters
parentThe parent object.

Definition at line 73 of file collectionstatisticsmodel.cpp.

Member Function Documentation

int CollectionStatisticsModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
virtual
Parameters
parentparent model index
Returns
column count

Reimplemented from Akonadi::CollectionModel.

Definition at line 79 of file collectionstatisticsmodel.cpp.

QVariant CollectionStatisticsModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual
Parameters
indexmodel index
roledata role

Reimplemented from Akonadi::CollectionModel.

Definition at line 87 of file collectionstatisticsmodel.cpp.

QVariant CollectionStatisticsModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
virtual
Parameters
sectionsection of header
orientationof the data
roledata role

Reimplemented from Akonadi::CollectionModel.

Definition at line 159 of file collectionstatisticsmodel.cpp.


The documentation for this class was generated from the following files:
  • collectionstatisticsmodel.h
  • collectionstatisticsmodel.cpp
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