• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi

Akonadi::AgentFilterProxyModel

Akonadi::AgentFilterProxyModel Class Reference

#include <agentfilterproxymodel.h>

Inheritance diagram for Akonadi::AgentFilterProxyModel:

Inheritance graph
[legend]

List of all members.


Detailed Description

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>

Definition at line 52 of file agentfilterproxymodel.h.


Public Member Functions

void addCapabilityFilter (const QString &capability)
void addMimeTypeFilter (const QString &mimeType)
 AgentFilterProxyModel (QObject *parent=0)
void clearFilters ()
 ~AgentFilterProxyModel ()

Protected Member Functions

bool filterAcceptsRow (int row, const QModelIndex &parent) const

Constructor & Destructor Documentation

AgentFilterProxyModel::AgentFilterProxyModel ( QObject *  parent = 0  )  [explicit]

Create a new agent filter proxy model.

By default no filtering is done.

Definition at line 48 of file agentfilterproxymodel.cpp.

AgentFilterProxyModel::~AgentFilterProxyModel (  ) 

Destroys the agent filter proxy model.

Definition at line 55 of file agentfilterproxymodel.cpp.


Member Function Documentation

void AgentFilterProxyModel::addCapabilityFilter ( const QString &  capability  ) 

Accept agents with the given capability.

Definition at line 66 of file agentfilterproxymodel.cpp.

void AgentFilterProxyModel::addMimeTypeFilter ( const QString &  mimeType  ) 

Accept agents supporting mimeType.

Definition at line 60 of file agentfilterproxymodel.cpp.

void AgentFilterProxyModel::clearFilters (  ) 

Clear the filters ( mimeTypes & capabilities ).

Definition at line 72 of file agentfilterproxymodel.cpp.


The documentation for this class was generated from the following files:
  • agentfilterproxymodel.h
  • agentfilterproxymodel.cpp

akonadi

Skip menu "akonadi"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal