CollectionStatistics Class Reference
from PyKDE4.akonadi import *
Namespace: Akonadi
Detailed Description
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.
Methods | |
__init__ (self) | |
__init__ (self, Akonadi.CollectionStatistics other) | |
long | count (self) |
setCount (self, long count) | |
setSize (self, long size) | |
setUnreadCount (self, long count) | |
long | size (self) |
long | unreadCount (self) |
Method Documentation
__init__ | ( | self ) |
Creates a new collection statistics object.
__init__ | ( | self, | ||
Akonadi.CollectionStatistics | other | |||
) |
Creates a collection statistics object from an other one.
long count | ( | self ) |
Returns the number of items in this collection or -1 if this information is not available.
- See also:
- setCount()
- See also:
- unreadCount()
setCount | ( | self, | ||
long | count | |||
) |
Sets the number of items in this collection.
- Parameters:
-
count The number of items.
- See also:
- count()
setSize | ( | self, | ||
long | size | |||
) |
Sets the total size of the items in this collection.
- Parameters:
-
size The total size of the items
- See also:
- size()
- Since:
- 4.3
setUnreadCount | ( | self, | ||
long | count | |||
) |
Sets the number of unread items in this collection.
- Parameters:
-
count The number of unread messages.
- See also:
- unreadCount()
long size | ( | self ) |
Returns the total size of the items in this collection or -1 if this information is not available.
- See also:
- setSize()
- Since:
- 4.3
long unreadCount | ( | self ) |
Returns the number of unread items in this collection or -1 if this information is not available.
- See also:
- setUnreadCount()
- See also:
- count()