# class AgentFilterProxyModel

###

Module | akonadi
Namespace | Akonadi
Class | AgentFilterProxyModel
Inherits | QSortFilterProxyModel

A proxy model for filtering AgentType or AgentInstance

This filter proxy model works on top of a AgentTypeModel or AgentInstanceModel and can be used to show only AgentType or AgentInstance objects which provide a given mime type or capability.

    // Show only running agent instances that provide contacts
    Akonadi.AgentInstanceModel *model = new Akonadi.AgentInstanceModel( this );

    Akonadi.AgentFilterProxyModel *proxy = new Akonadi.AgentFilterProxyModel( this );
    proxy->addMimeTypeFilter( "text/directory" );

    proxy->setSourceModel( model );

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

Author Volker Krause <vkrause@kde.org>

### methods

- AgentFilterProxyModel (parent)

  returns ctor

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

  Create a new agent filter proxy model. By default no filtering is done.

- addCapabilityFilter (capability)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  capability | QString |

  Accept agents with the given capability.

- addMimeTypeFilter (mimeType)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  mimeType | QString |

  Accept agents supporting mimeType.

- clearFilters ( )

  returns Nothing

  Clear the filters ( mimeTypes & capabilities ).

- filterAcceptsRow (row, parent)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  row | int |
  parent | QModelIndex |