diff options
author | Javier <dev.git@javispedro.com> | 2015-04-24 23:00:56 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-04-24 23:00:56 +0200 |
commit | 247176e61399f14f6d52638d74d5a2a2579c1f55 (patch) | |
tree | 21a4fa54a082bff3f5db048441fcd38687316fe7 /notification.h | |
parent | 306e3e982d88c4c9ab776c5e2ebea49344a14349 (diff) | |
download | libwatchfish-247176e61399f14f6d52638d74d5a2a2579c1f55.tar.gz libwatchfish-247176e61399f14f6d52638d74d5a2a2579c1f55.zip |
added notificationmonitor, notification
Diffstat (limited to 'notification.h')
-rw-r--r-- | notification.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/notification.h b/notification.h new file mode 100644 index 0000000..46b6754 --- /dev/null +++ b/notification.h @@ -0,0 +1,51 @@ +#ifndef WATCHFISH_NOTIFICATION_H +#define WATCHFISH_NOTIFICATION_H + +#include <QtCore/QObject> +#include <QtCore/QDateTime> + +namespace watchfish +{ + +class Notification : 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) + Q_PROPERTY(QString icon READ icon NOTIFY iconChanged) + + explicit Notification(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; } + inline QString icon() const { return _icon; } + +signals: + void summaryChanged(); + void bodyChanged(); + void timestampChanged(); + void iconChanged(); + + void closed(int reason); + +private: + friend class NotificationMonitor; + + uint _id; + QString _sender; + QString _summary; + QString _body; + QDateTime _timestamp; + QString _icon; +}; + +} + +#endif // WATCHFISH_NOTIFICATION_H |