• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • AgentFilterProxyModel
Public Member Functions | Protected Member Functions | List of all members
Akonadi::AgentFilterProxyModel Class Reference

#include <agentfilterproxymodel.h>

Inherits QSortFilterProxyModel.

Public Member Functions

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

Protected Member Functions

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

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 );
Akonadi::AgentFilterProxyModel
A proxy model for filtering AgentType or AgentInstance.
Definition agentfilterproxymodel.h:53
Akonadi::AgentFilterProxyModel::addMimeTypeFilter
void addMimeTypeFilter(const QString &mimeType)
Accept agents supporting mimeType.
Definition agentfilterproxymodel.cpp:62
Akonadi::AgentInstanceModel
Provides a data model for agent instances.
Definition agentinstancemodel.h:51
Author
Volker Krause vkrau.nosp@m.se@k.nosp@m.de.or.nosp@m.g

Definition at line 52 of file agentfilterproxymodel.h.

Constructor & Destructor Documentation

◆ AgentFilterProxyModel()

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

Create a new agent filter proxy model.

By default no filtering is done.

Parameters
parentparent object

Definition at line 50 of file agentfilterproxymodel.cpp.

◆ ~AgentFilterProxyModel()

AgentFilterProxyModel::~AgentFilterProxyModel ( )

Destroys the agent filter proxy model.

Definition at line 57 of file agentfilterproxymodel.cpp.

Member Function Documentation

◆ addCapabilityFilter()

void AgentFilterProxyModel::addCapabilityFilter ( const QString & capability)

Accept agents with the given capability.

Definition at line 68 of file agentfilterproxymodel.cpp.

◆ addMimeTypeFilter()

void AgentFilterProxyModel::addMimeTypeFilter ( const QString & mimeType)

Accept agents supporting mimeType.

Definition at line 62 of file agentfilterproxymodel.cpp.

◆ clearFilters()

void AgentFilterProxyModel::clearFilters ( )

Clear the filters ( mimeTypes & capabilities ).

Definition at line 80 of file agentfilterproxymodel.cpp.

◆ excludeCapabilities()

void AgentFilterProxyModel::excludeCapabilities ( const QString & capability)

Excludes agents with the given capability.

Parameters
capabilityundesired agent capability
Since
4.6

Definition at line 74 of file agentfilterproxymodel.cpp.

◆ filterAcceptsRow()

bool AgentFilterProxyModel::filterAcceptsRow ( int row,
const QModelIndex & parent ) const
protected

Definition at line 103 of file agentfilterproxymodel.cpp.


The documentation for this class was generated from the following files:
  • agentfilterproxymodel.h
  • agentfilterproxymodel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal