summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/folderlistmodel.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-03-02 12:00:54 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-03-02 12:03:04 +0100
commit03e8aabf1754f5061f207d2c9c082ba6199db0e5 (patch)
tree66124163b4da541dfb17c30299b9aeb82f9fad79 /framework/src/domain/folderlistmodel.h
parent795d551639340d81641aa8c6eabff1776e0b2ee1 (diff)
downloadkube-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.h8
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
26namespace Sink { 28namespace 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:
68protected: 71protected:
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
72private: 76private:
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};