diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2011-10-02 16:39:40 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2011-10-02 16:39:40 +0200 |
commit | 0a656b75f3fc80f13424db0e7ec403dff28a366e (patch) | |
tree | 23f72a2fde3f718048b49d9806ded3d315d50a80 /meegohandsetnotification/meegohandsetnotification.cpp | |
parent | d9f132f3d5bf41ee4f30e7ea2bd1b61120fa29b7 (diff) | |
download | sowatch-0a656b75f3fc80f13424db0e7ec403dff28a366e.tar.gz sowatch-0a656b75f3fc80f13424db0e7ec403dff28a366e.zip |
new notifications list, time syncing
Diffstat (limited to 'meegohandsetnotification/meegohandsetnotification.cpp')
-rw-r--r-- | meegohandsetnotification/meegohandsetnotification.cpp | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/meegohandsetnotification/meegohandsetnotification.cpp b/meegohandsetnotification/meegohandsetnotification.cpp index 69e2bd5..41264b6 100644 --- a/meegohandsetnotification/meegohandsetnotification.cpp +++ b/meegohandsetnotification/meegohandsetnotification.cpp @@ -48,14 +48,35 @@ void MeegoHandsetNotification::activate() // TODO Actually do something } -void MeegoHandsetNotification::clear() +void MeegoHandsetNotification::dismiss() { - // TODO Actually clear... - emit cleared(); + // TODO Actually dismiss } void MeegoHandsetNotification::changeTo(const ::Notification ¬ification) { + uint oldCount = count(); + QDateTime oldDateTime = dateTime(); + QString oldTitle = title(); + QString oldBody = body(); _n = notification; + if (oldCount != count()) { + emit countChanged(); + } + if (oldDateTime != dateTime()) { + emit dateTimeChanged(); + emit displayTimeChanged(); + } + if (oldTitle != title()) { + emit titleChanged(); + } + if (oldBody != body()) { + emit bodyChanged(); + } emit changed(); } + +void MeegoHandsetNotification::remove() +{ + emit dismissed(); +} |