# class CollectionStatisticsModel

###

Module | akonadi
Namespace | Akonadi
Class | CollectionStatisticsModel
Inherits | Akonadi::CollectionModel

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 or the number of read/unread items.

Example:

    QTreeView *view = new QTreeView( this );

    Akonadi.CollectionStatisticsModel *model = new Akonadi.CollectionStatisticsModel( view );
    view->setModel( model );

Author Volker Krause <vkrause@kde.org>

### enums

- Roles { UnreadRole, TotalRole, StatisticsRole, RecursiveUnreadRole, RecursiveTotalRole, RecursiveStatisticsRole, UserRole }

enum details

### methods

- CollectionStatisticsModel (parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  parent | QObject | 0

  Creates a new collection statistics model.

  parent - The parent object.

- columnCount (parent)

  returns int

  Argument | Type | Default
  --- | --- | ---
  parent | QModelIndex | QModelIndex()

- data (index, role)

  returns QVariant

  Argument | Type | Default
  --- | --- | ---
  index | QModelIndex |
  role | int | Qt.DisplayRole

- headerData (section, orientation, role)

  returns QVariant

  Argument | Type | Default
  --- | --- | ---
  section | int |
  orientation | Qt.Orientation |
  role | int | Qt.DisplayRole

### enums - detail

- Roles { UnreadRole, TotalRole, StatisticsRole, RecursiveUnreadRole, RecursiveTotalRole, RecursiveStatisticsRole, UserRole }

  Describes the roles for the statistics collection model.

  | UnreadRole | - CollectionModel::UserRole+1 | - |
  | TotalRole | - | - |
  | StatisticsRole | - | - |
  | RecursiveUnreadRole | - | - |
  | RecursiveTotalRole | - | - |
  | RecursiveStatisticsRole | - | - |
  | UserRole | - CollectionModel::UserRole+42 | - |