diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2012-08-11 15:30:38 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2012-08-11 15:30:38 +0200 |
commit | 51701e30d710ad016ddf2d306cdd7be122ddf25b (patch) | |
tree | d4a85bd4926c3f94411d3f6fa572e1a99be6bbb4 /testnotification/testnotification.cpp | |
parent | f0564ad9d210cc68bfb1bfc6e56b86fa941ad830 (diff) | |
download | sowatch-51701e30d710ad016ddf2d306cdd7be122ddf25b.tar.gz sowatch-51701e30d710ad016ddf2d306cdd7be122ddf25b.zip |
adding test notification backend
Diffstat (limited to 'testnotification/testnotification.cpp')
-rw-r--r-- | testnotification/testnotification.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/testnotification/testnotification.cpp b/testnotification/testnotification.cpp new file mode 100644 index 0000000..fa904b9 --- /dev/null +++ b/testnotification/testnotification.cpp @@ -0,0 +1,48 @@ +#include "testnotification.h" + +using namespace sowatch; + +TestNotification::TestNotification(Type type, const QString &title, const QString &body, QObject *parent) + : Notification(parent), + _type(type), + _time(QDateTime::currentDateTime()), + _title(title), _body(body) +{ +} + +Notification::Type TestNotification::type() const +{ + return _type; +} + +uint TestNotification::count() const +{ + return 1; +} + +QDateTime TestNotification::dateTime() const +{ + return _time; +} + +QString TestNotification::title() const +{ + return _title; +} + +QString TestNotification::body() const +{ + return _body; +} + +void TestNotification::activate() +{ + // Do nothing +} + +void TestNotification::dismiss() +{ + deleteLater(); // We do not want to keep those around. +} + + |