Akonadi::ContactsFilterProxyModel Class Reference
#include <contactsfilterproxymodel.h>
Inherits QSortFilterProxyModel.
Public Slots | |
void | setFilterString (const QString &filter) |
Public Member Functions | |
ContactsFilterProxyModel (QObject *parent=0) | |
~ContactsFilterProxyModel () |
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
Constructor & Destructor Documentation
Akonadi::ContactsFilterProxyModel::ContactsFilterProxyModel | ( | QObject * | parent = 0 | ) | [explicit] |
Creates a new contacts filter proxy model.
- Parameters:
-
parent The parent object.
Akonadi::ContactsFilterProxyModel::~ContactsFilterProxyModel | ( | ) |
Destroys the contacts filter proxy model.
Member Function Documentation
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: