KDE 4.5 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

AgentFilterProxyModel Class Reference

from PyKDE4.akonadi import *

Inherits: QSortFilterProxyModel → QAbstractProxyModel → QAbstractItemModel → QObject
Namespace: Akonadi

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>


Methods

 __init__ (self, QObject parent=0)
 addCapabilityFilter (self, QString capability)
 addMimeTypeFilter (self, QString mimeType)
 clearFilters (self)
bool filterAcceptsRow (self, int row, QModelIndex parent)

Method Documentation

__init__ (  self,
QObject  parent=0
)

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

addCapabilityFilter (  self,
QString  capability
)

Accept agents with the given capability.

addMimeTypeFilter (  self,
QString  mimeType
)

Accept agents supporting mimeType.

clearFilters (   self )

Clear the filters ( mimeTypes & capabilities ).

bool filterAcceptsRow (  self,
int  row,
QModelIndex  parent
)
  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal