StatisticsProxyModel Class Reference
from PyKDE4.akonadi import *
Inherits: QSortFilterProxyModel → QAbstractProxyModel → QAbstractItemModel → QObject
Namespace: Akonadi
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 );
- Author:
- Kevin Ottens <ervin@kde.org>
- 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) |
[QModelIndex] | match (self, QModelIndex start, int role, QVariant value, int hits=1, Qt::MatchFlags flags=Qt.MatchFlags(Qt.MatchStartsWith|Qt.MatchWrap)) |
| setExtraColumnsEnabled (self, bool enable) |
| setSourceModel (self, QAbstractItemModel sourceModel) |
| 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() |
|
) |
|
|
|
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 |
|
) |
|
|
|