summaryrefslogtreecommitdiff
path: root/saltoqd/notificationmonitor.h
diff options
context:
space:
mode:
Diffstat (limited to 'saltoqd/notificationmonitor.h')
-rw-r--r--saltoqd/notificationmonitor.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/saltoqd/notificationmonitor.h b/saltoqd/notificationmonitor.h
index 8ac49c5..f617817 100644
--- a/saltoqd/notificationmonitor.h
+++ b/saltoqd/notificationmonitor.h
@@ -5,26 +5,39 @@
#include <QtCore/QMap>
#include <QtCore/QDateTime>
-class IncomingNotification : public QObject
+class MonitoredNotification : public QObject
{
Q_OBJECT
+ Q_PROPERTY(uint id READ id CONSTANT)
Q_PROPERTY(QString sender READ sender)
Q_PROPERTY(QString summary READ summary NOTIFY summaryChanged)
+ Q_PROPERTY(QString body READ body NOTIFY bodyChanged)
+ Q_PROPERTY(QDateTime timestamp READ timestamp NOTIFY timestampChanged)
- explicit IncomingNotification(QObject *parent = 0);
+ explicit MonitoredNotification(QObject *parent = 0);
public:
+ inline uint id() const { return _id; }
inline QString sender() const { return _sender; }
inline QString summary() const { return _summary; }
+ inline QString body() const { return _body; }
+ inline QDateTime timestamp() const { return _timestamp; }
signals:
void summaryChanged();
+ void bodyChanged();
+ void timestampChanged();
+
+ void closed(int reason);
private:
friend class NotificationMonitor;
+ uint _id;
QString _sender;
QString _summary;
+ QString _body;
+ QDateTime _timestamp;
};
class NotificationMonitor : public QObject
@@ -40,11 +53,11 @@ public:
void processCloseNotification(quint32 id, quint32 reason);
signals:
- void notification(IncomingNotification *n);
+ void notification(MonitoredNotification *n);
private:
explicit NotificationMonitor(QObject *parent = 0);
- QMap<quint32, IncomingNotification*> _notifs;
+ QMap<quint32, MonitoredNotification*> _notifs;
};