diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-30 15:18:02 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-30 15:18:02 +0200 |
commit | 211fdde3ab546142e8aaf9d2b6508c949474b634 (patch) | |
tree | 1ddd10924f91f33b1a405f4f8f6593d3d72c32b3 /framework/domain/outboxmodel.h | |
parent | 7339cc0c0a0c63576f38f0bc96c15f28967b92d1 (diff) | |
download | kube-211fdde3ab546142e8aaf9d2b6508c949474b634.tar.gz kube-211fdde3ab546142e8aaf9d2b6508c949474b634.zip |
Outbox: added resource state
Diffstat (limited to 'framework/domain/outboxmodel.h')
-rw-r--r-- | framework/domain/outboxmodel.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/framework/domain/outboxmodel.h b/framework/domain/outboxmodel.h index 4e226223..4be9c7f8 100644 --- a/framework/domain/outboxmodel.h +++ b/framework/domain/outboxmodel.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #pragma once | 21 | #pragma once |
22 | 22 | ||
23 | #include <sink/store.h> | 23 | #include <sink/store.h> |
24 | #include <sink/notifier.h> | ||
24 | 25 | ||
25 | #include <QSortFilterProxyModel> | 26 | #include <QSortFilterProxyModel> |
26 | #include <QSharedPointer> | 27 | #include <QSharedPointer> |
@@ -31,8 +32,11 @@ class OutboxModel : public QSortFilterProxyModel | |||
31 | Q_OBJECT | 32 | Q_OBJECT |
32 | 33 | ||
33 | Q_PROPERTY (int count READ count NOTIFY countChanged) | 34 | Q_PROPERTY (int count READ count NOTIFY countChanged) |
35 | Q_PROPERTY (int status READ status NOTIFY statusChanged) | ||
36 | |||
34 | public: | 37 | public: |
35 | enum Status { | 38 | enum Status { |
39 | NoStatus, | ||
36 | PendingStatus, | 40 | PendingStatus, |
37 | InProgressStatus, | 41 | InProgressStatus, |
38 | ErrorStatus | 42 | ErrorStatus |
@@ -60,9 +64,14 @@ public: | |||
60 | void runQuery(const Sink::Query &query); | 64 | void runQuery(const Sink::Query &query); |
61 | 65 | ||
62 | int count() const; | 66 | int count() const; |
67 | int status() const; | ||
68 | |||
63 | signals: | 69 | signals: |
70 | void statusChanged(); | ||
64 | void countChanged(); | 71 | void countChanged(); |
65 | 72 | ||
66 | private: | 73 | private: |
67 | QSharedPointer<QAbstractItemModel> m_model; | 74 | QSharedPointer<QAbstractItemModel> mModel; |
75 | QSharedPointer<Sink::Notifier> mNotifier; | ||
76 | int mStatus; | ||
68 | }; | 77 | }; |