# class AgentTypeModel

###

Module | akonadi
Namespace | Akonadi
Class | AgentTypeModel
Inherits | QAbstractItemModel

Provides a data model for agent types.

This class provides the interface of a QAbstractItemModel to access all available agent types: their name, identifier, supported mimetypes and capabilities.

    Akonadi.AgentTypeModel *model = new Akonadi.AgentTypeModel( this );

    QListView *view = new QListView( this );
    view->setModel( model );

To show only agent types that match a given mime type or special capabilities, use the AgentFilterProxyModel on top of this model.

Author Tobias Koenig <tokoe@kde.org>

### enums

- Roles { TypeRole, IdentifierRole, DescriptionRole, MimeTypesRole, CapabilitiesRole, UserRole }

enum details

### methods

- AgentTypeModel (parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  parent | QObject | 0

  Creates a new agent type model.

- columnCount (parent)

  returns int

  Argument | Type | Default
  --- | --- | ---
  parent | QModelIndex | QModelIndex()

- data (index, role)

  returns QVariant

  Argument | Type | Default
  --- | --- | ---
  index | QModelIndex |
  role | int | Qt.DisplayRole

- index (row, column, parent)

  returns QModelIndex

  Argument | Type | Default
  --- | --- | ---
  row | int |
  column | int |
  parent | QModelIndex | QModelIndex()

- parent (index)

  returns QModelIndex

  Argument | Type | Default
  --- | --- | ---
  index | QModelIndex |

- rowCount (parent)

  returns int

  Argument | Type | Default
  --- | --- | ---
  parent | QModelIndex | QModelIndex()

### enums - detail

- Roles { TypeRole, IdentifierRole, DescriptionRole, MimeTypesRole, CapabilitiesRole, UserRole }

  Describes the roles of this model.

  | TypeRole | - Qt::UserRole+1 | - |
  | IdentifierRole | - | - |
  | DescriptionRole | - | - |
  | MimeTypesRole | - | - |
  | CapabilitiesRole | - | - |
  | UserRole | - Qt::UserRole+42 | - |