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

akonadi

  • Akonadi
  • ContactsFilterProxyModel
Public Types | Public Slots | Public Member Functions | List of all members
Akonadi::ContactsFilterProxyModel Class Reference

#include <contactsfilterproxymodel.h>

Inherits QSortFilterProxyModel.

Public Types

enum  FilterFlag { HasEmail = 0x01 }
 

Public Slots

void setFilterString (const QString &filter)
 

Public Member Functions

 ContactsFilterProxyModel (QObject *parent=0)
 
virtual ~ContactsFilterProxyModel ()
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 
void setExcludeVirtualCollections (bool exclude)
 
void setFilterFlags (ContactsFilterProxyModel::FilterFlags flags)
 

Detailed Description

A proxy model for ContactsTreeModel models.

This class provides a filter proxy model for a ContactsTreeModel. The list of shown contacts or contact groups can be limited by settings a filter pattern. Only contacts or contact groups that contain this pattern as part of their data will be listed.

Example:

Akonadi::ContactsTreeModel *model = new Akonadi::ContactsTreeModel( ... );
Akonadi::ContactsFilterProxyModel *filter = new Akonadi::ContactsFilterProxyModel;
filter->setSourceModel( model );
Akonadi::EntityTreeView *view = new Akonadi::EntityTreeView;
view->setModel( filter );
QLineEdit *filterEdit = new QLineEdit;
connect( filterEdit, SIGNAL( textChanged( const QString& ) ),
filter, SLOT( setFilterString( const QString& ) ) );
Author
Tobias Koenig tokoe.nosp@m.@kde.nosp@m..org
Since
4.5

Definition at line 60 of file contactsfilterproxymodel.h.

Constructor & Destructor Documentation

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

Creates a new contacts filter proxy model.

Parameters
parentThe parent object.

Definition at line 48 of file contactsfilterproxymodel.cpp.

ContactsFilterProxyModel::~ContactsFilterProxyModel ( )
virtual

Destroys the contacts filter proxy model.

Definition at line 56 of file contactsfilterproxymodel.cpp.

Member Function Documentation

void ContactsFilterProxyModel::setExcludeVirtualCollections ( bool  exclude)

Sets whether we want virtual collections to be filtered or not.

By default, virtual collections are accepted.

Parameters
excludeIf true, virtual collections aren't accepted.
Since
4.8

Definition at line 131 of file contactsfilterproxymodel.cpp.

void ContactsFilterProxyModel::setFilterFlags ( ContactsFilterProxyModel::FilterFlags  flags)

Sets the filter flags.

By default ContactsFilterProxyModel::FilterString is set.

Parameters
flagsthe filter flags to set
Since
4.8

Definition at line 126 of file contactsfilterproxymodel.cpp.

void ContactsFilterProxyModel::setFilterString ( const QString &  filter)
slot

Sets the filter that is used to filter for matching contacts and contact groups.

Definition at line 61 of file contactsfilterproxymodel.cpp.


The documentation for this class was generated from the following files:
  • contactsfilterproxymodel.h
  • contactsfilterproxymodel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:28 by doxygen 1.8.7 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
  • Modules
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



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