From 0c91d01eb26793e745138c4598cf15d9a21c0136 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 21 Mar 2017 12:11:49 +0100 Subject: Filtering for maillistmodel and peoplemodel Works surprisingly well and is very useful for testing. The searchbar in the maillistmodel is a temporary solution as the global searchbar has some usability issues. E.g. how do we reset the search? As an intermediate step we could just hide the searchbar and make it visible by clicking on the search button. --- framework/domain/peoplemodel.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'framework/domain/peoplemodel.h') diff --git a/framework/domain/peoplemodel.h b/framework/domain/peoplemodel.h index 1e9d2d01..a59e752c 100644 --- a/framework/domain/peoplemodel.h +++ b/framework/domain/peoplemodel.h @@ -34,6 +34,7 @@ class PeopleModel : public QSortFilterProxyModel { Q_OBJECT Q_PROPERTY (QVariant addressbook READ addressbook WRITE setAddressbook) + Q_PROPERTY (QString filter READ filter WRITE setFilter) public: PeopleModel(QObject *parent = Q_NULLPTR); @@ -60,6 +61,9 @@ public: void setAddressbook(const QVariant &parentFolder); QVariant addressbook() const; + void setFilter(const QString &mail); + QString filter() const; + private: QSharedPointer mModel; }; -- cgit v1.2.3