AgentInstanceModel Class Reference
from PyKDE4.akonadi import *
Inherits: QAbstractItemModel → QObject
Namespace: Akonadi
Detailed Description
Provides a data model for agent instances.
This class provides the interface of a QAbstractItemModel to access all available agent instances: their name, identifier, supported mimetypes and capabilities.
Akonadi.AgentInstanceModel *model = new Akonadi.AgentInstanceModel( this ); QListView *view = new QListView( this ); view->setModel( model );
To show only agent instances that match a given mime type or special capabilities, use the AgentFilterProxyModel on top of this model.
Enumerations | |
Roles | { TypeRole, TypeIdentifierRole, DescriptionRole, MimeTypesRole, CapabilitiesRole, InstanceRole, InstanceIdentifierRole, StatusRole, StatusMessageRole, ProgressRole, OnlineRole, UserRole } |
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()) |
QModelIndex | parent (self, QModelIndex index) |
int | rowCount (self, QModelIndex parent=QModelIndex()) |
bool | setData (self, QModelIndex index, QVariant value, int role) |
Method Documentation
__init__ | ( | self, | ||
QObject | parent=0 | |||
) |
Creates a new agent instance 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() | |||
) |
QModelIndex parent | ( | self, | ||
QModelIndex | index | |||
) |
int rowCount | ( | self, | ||
QModelIndex | parent=QModelIndex() | |||
) |
bool setData | ( | self, | ||
QModelIndex | index, | |||
QVariant | value, | |||
int | role | |||
) |
Enumeration Documentation
Roles |
Describes the roles of this model.
- Enumerator:
-
TypeRole = Qt::UserRole+1 TypeIdentifierRole DescriptionRole MimeTypesRole CapabilitiesRole InstanceRole InstanceIdentifierRole StatusRole StatusMessageRole ProgressRole OnlineRole UserRole = Qt::UserRole+42