CollectionStatisticsModel Class Reference
from PyKDE4.akonadi import *
Inherits: Akonadi.CollectionModel
Namespace: Akonadi
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 or the number of read/unread items.
Example:
QTreeView *view = new QTreeView( this ); Akonadi.CollectionStatisticsModel *model = new Akonadi.CollectionStatisticsModel( view ); view->setModel( model );
Enumerations | |
Roles | { UnreadRole, TotalRole, StatisticsRole, RecursiveUnreadRole, RecursiveTotalRole, RecursiveStatisticsRole, UserRole } |
Methods | |
__init__ (self, QObject parent=0) | |
int | columnCount (self, QModelIndex parent=QModelIndex()) |
QVariant | data (self, QModelIndex index, int role=Qt.DisplayRole) |
QVariant | headerData (self, int section, Qt.Orientation orientation, int role=Qt.DisplayRole) |
Method Documentation
__init__ | ( | self, | ||
QObject | parent=0 | |||
) |
Creates a new collection statistics model.
- Parameters:
-
parent The parent object.
int columnCount | ( | self, | ||
QModelIndex | parent=QModelIndex() | |||
) |
QVariant data | ( | self, | ||
QModelIndex | index, | |||
int | role=Qt.DisplayRole | |||
) |
QVariant headerData | ( | self, | ||
int | section, | |||
Qt.Orientation | orientation, | |||
int | role=Qt.DisplayRole | |||
) |
Enumeration Documentation
Roles |
Describes the roles for the statistics collection model.
- Enumerator:
-
UnreadRole = CollectionModel::UserRole+1 TotalRole StatisticsRole RecursiveUnreadRole RecursiveTotalRole RecursiveStatisticsRole UserRole = CollectionModel::UserRole+42