diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-03-02 12:00:54 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-03-02 12:03:04 +0100 |
commit | 03e8aabf1754f5061f207d2c9c082ba6199db0e5 (patch) | |
tree | 66124163b4da541dfb17c30299b9aeb82f9fad79 /framework/src/domain/folderlistmodel.h | |
parent | 795d551639340d81641aa8c6eabff1776e0b2ee1 (diff) | |
download | kube-03e8aabf1754f5061f207d2c9c082ba6199db0e5.tar.gz kube-03e8aabf1754f5061f207d2c9c082ba6199db0e5.zip |
Visualize that a folder has new mails.
We listen for new mail notifications, and highlight the folder
accordingly.
Diffstat (limited to 'framework/src/domain/folderlistmodel.h')
-rw-r--r-- | framework/src/domain/folderlistmodel.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/framework/src/domain/folderlistmodel.h b/framework/src/domain/folderlistmodel.h index 738cf4a0..d3bef397 100644 --- a/framework/src/domain/folderlistmodel.h +++ b/framework/src/domain/folderlistmodel.h | |||
@@ -22,6 +22,8 @@ | |||
22 | 22 | ||
23 | #include <krecursivefilterproxymodel.h> | 23 | #include <krecursivefilterproxymodel.h> |
24 | #include <QSharedPointer> | 24 | #include <QSharedPointer> |
25 | #include <QSet> | ||
26 | #include <sink/notifier.h> | ||
25 | 27 | ||
26 | namespace Sink { | 28 | namespace Sink { |
27 | class Query; | 29 | class Query; |
@@ -54,7 +56,8 @@ public: | |||
54 | Id, | 56 | Id, |
55 | DomainObject, | 57 | DomainObject, |
56 | Status, | 58 | Status, |
57 | Trash | 59 | Trash, |
60 | HasNewData | ||
58 | }; | 61 | }; |
59 | Q_ENUMS(Roles) | 62 | Q_ENUMS(Roles) |
60 | 63 | ||
@@ -68,8 +71,11 @@ public: | |||
68 | protected: | 71 | protected: |
69 | bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE; | 72 | bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE; |
70 | bool acceptRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE; | 73 | bool acceptRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE; |
74 | void fetchMore(const QModelIndex &left) Q_DECL_OVERRIDE; | ||
71 | 75 | ||
72 | private: | 76 | private: |
73 | void runQuery(const Sink::Query &query); | 77 | void runQuery(const Sink::Query &query); |
74 | QSharedPointer<QAbstractItemModel> mModel; | 78 | QSharedPointer<QAbstractItemModel> mModel; |
79 | QSet<QByteArray> mHasNewData; | ||
80 | QScopedPointer<Sink::Notifier> mNotifier; | ||
75 | }; | 81 | }; |