StatisticsProxyModel Class Reference
from PyKDE4.akonadi import *
Inherits: QSortFilterProxyModel → QAbstractProxyModel → QAbstractItemModel → QObject
Namespace: Akonadi.StatisticsProxyModel
Detailed Description
A proxy model that exposes collection statistics through extra columns.
This class can be used on top of an EntityTreeModel to display extra columns summarizing statistics of collections.
Akonadi.EntityTreeModel *model = new Akonadi.EntityTreeModel( ... ); Akonadi.StatisticsProxyModel *proxy = new Akonadi.StatisticsProxyModel(); proxy->setSourceModel( model ); Akonadi.EntityTreeView *view = new Akonadi.EntityTreeView( this ); view->setModel( proxy );
- Since:
- 4.4
Methods | |
| __init__ (self, QObject parent=0) | |
| int | columnCount (self, QModelIndex parent=QModelIndex()) |
| QVariant | data (self, QModelIndex index, int role=Qt.DisplayRole) |
| Qt::ItemFlags | flags (self, QModelIndex index) |
| QVariant | headerData (self, int section, Qt::Orientation orientation, int role=Qt.DisplayRole) |
| QModelIndex | index (self, int row, int column, QModelIndex parent=QModelIndex()) |
| bool | isExtraColumnsEnabled (self) |
| bool | isToolTipEnabled (self) |
| setExtraColumnsEnabled (self, bool enable) | |
| setToolTipEnabled (self, bool enable) | |
Method Documentation
| __init__ | ( | self, | ||
| QObject | parent=0 | |||
| ) |
Creates a new statistics proxy model.
- Parameters:
-
parent The parent object.
| int columnCount | ( | self, | ||
| QModelIndex | parent=QModelIndex() | |||
| ) |
| QVariant data | ( | self, | ||
| QModelIndex | index, | |||
| int | role=Qt.DisplayRole | |||
| ) |
| Qt::ItemFlags flags | ( | self, | ||
| QModelIndex | index | |||
| ) |
| QVariant headerData | ( | self, | ||
| int | section, | |||
| Qt::Orientation | orientation, | |||
| int | role=Qt.DisplayRole | |||
| ) |
| QModelIndex index | ( | self, | ||
| int | row, | |||
| int | column, | |||
| QModelIndex | parent=QModelIndex() | |||
| ) |
| bool isExtraColumnsEnabled | ( | self ) |
Return true if we display extra statistics columns, otherwise false
| bool isToolTipEnabled | ( | self ) |
Return true if we display tooltips, otherwise false
| setExtraColumnsEnabled | ( | self, | ||
| bool | enable | |||
| ) |
- Parameters:
-
enable Display extra statistics columns
| setToolTipEnabled | ( | self, | ||
| bool | enable | |||
| ) |
- Parameters:
-
enable Display tooltips
KDE 4.4 PyKDE API Reference