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

TrashFilterProxyModel Class Reference

from PyKDE4.akonadi import *

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

Detailed Description

Filter model which hides/shows entites marked as trash

Filter model which either hides all entities marked as trash, or the ones not marked. Subentities of collections marked as trash are also shown in the trash.

The Base model must be an EntityTreeModel and the EntityDeletedAttribute must be available.

Example:


 ChangeRecorder *monitor = new Akonadi.ChangeRecorder( this );
 monitor->itemFetchScope().fetchAttribute<Akonadi.EntityDisplayAttribute>(true);

 Akonadi.EntityTreeModel *sourcemodel = new Akonadi.EntityTreeModel(monitor, this);

 TrashFilterProxyModel *model = new TrashFilterProxyModel(this);
 model->setDynamicSortFilter(true);
 model->setSourceModel(sourcemodel);

Author:
Christian Mollekopf <chrigi_1@fastmail.fm>
Since:
4.8


Methods

 __init__ (self, QObject parent=0)
bool acceptRow (self, int sourceRow, QModelIndex sourceParent)
 showTrash (self, bool enable)
bool trashIsShown (self)

Method Documentation

__init__ (  self,
QObject  parent=0
)
bool acceptRow (  self,
int  sourceRow,
QModelIndex  sourceParent
)

Sort filter criterias, according to how expensive the operation is

showTrash (  self,
bool  enable
)
bool trashIsShown (   self )
  • 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