akonadi
#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& ) ) );
- Since:
- 4.5
Definition at line 60 of file contactsfilterproxymodel.h.
Constructor & Destructor Documentation
Akonadi::ContactsFilterProxyModel::ContactsFilterProxyModel | ( | QObject * | parent = 0 | ) | [explicit] |
Creates a new contacts filter proxy model.
- Parameters:
-
parent The parent object.
virtual Akonadi::ContactsFilterProxyModel::~ContactsFilterProxyModel | ( | ) | [virtual] |
Destroys the contacts filter proxy model.
Member Function Documentation
void Akonadi::ContactsFilterProxyModel::setExcludeVirtualCollections | ( | bool | exclude | ) |
Sets whether we want virtual collections to be filtered or not.
By default, virtual collections are accepted.
- Parameters:
-
exclude If true, virtual collections aren't accepted.
- Since:
- 4.8
void Akonadi::ContactsFilterProxyModel::setFilterFlags | ( | ContactsFilterProxyModel::FilterFlags | flags | ) |
Sets the filter flags
.
By default ContactsFilterProxyModel::FilterString is set.
- Since:
- 4.8
void Akonadi::ContactsFilterProxyModel::setFilterString | ( | const QString & | filter | ) | [slot] |
Sets the filter
that is used to filter for matching contacts and contact groups.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue May 8 2012 00:00:49 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.