# class CollectionStatistics

###

Module | akonadi
Namespace | Akonadi
Class | CollectionStatistics
Inherits |

Provides statistics information of a Collection.

This class contains information such as total number of items, number of new and unread items, etc.

These information might be expensive to obtain and are thus not included when fetching collection with a CollectionFetchJob. They can be retrieved spearately using CollectionStatisticsJob.

Example:

    Akonadi.Collection collection = ...

    Akonadi.CollectionStatisticsJob *job = new Akonadi.CollectionStatisticsJob( collection );
    if ( job->exec() ) {
    Akonadi.CollectionStatistics statistics = job->statistics();
    qDebug() << "Unread items:" << statistics.unreadCount();
    }

This class is implicitely shared.

Author Volker Krause <vkrause@kde.org>

### methods

- CollectionStatistics ( )

  returns ctor

  Creates a new collection statistics object.

- CollectionStatistics (other)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  other | Akonadi.CollectionStatistics |

  Creates a collection statistics object from an other one.

- count ( )

  returns qint64

  Returns the number of items in this collection or -1 if this information is not available.

  See also setCount()

  See also unreadCount()

- setCount (count)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  count | qint64 |

  Sets the number of items in this collection.

  count - The number of items.

  See also count()

- setUnreadCount (count)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  count | qint64 |

  Sets the number of unread items in this collection.

  count - The number of unread messages

  See also unreadCount()

- unreadCount ( )

  returns qint64

  Returns the number of unread items in this collection or -1 if this information is not available.

  See also setUnreadCount()

  See also count()