A proxy model that filters collections by mime type.
This class can be used on top of a CollectionModel to filter out
all collections that doesn't match a given mime type.
For instance, a mail application will use addMimeType( "message/rfc822" ) to only show
collections containing mail.
Akonadi.CollectionModel *model = new Akonadi.CollectionModel( this );
Akonadi.CollectionFilterProxy *proxy = new Akonadi.CollectionFilterProxyModel();
proxy->addMimeTypeFilter( "message/rfc822" );
proxy->setSourceModel( model );
QTreeView *view = new QTreeView( this );
view->setModel( proxy );
Author Bruno Virlet
|