diff options
author | Javier <dev.git@javispedro.com> | 2015-04-24 23:02:53 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-04-24 23:02:53 +0200 |
commit | 725631cf66a5e4999a90fb82f54377cb92859e1c (patch) | |
tree | d6a373070f41919c0b8450c549e0c6607addfb77 /saltoqd/notificationmanager.cpp | |
parent | 2086bd4798521d2479b3776f6da25177be48209c (diff) | |
download | saltoq-725631cf66a5e4999a90fb82f54377cb92859e1c.tar.gz saltoq-725631cf66a5e4999a90fb82f54377cb92859e1c.zip |
changed to use new separate libwatchfish
Diffstat (limited to 'saltoqd/notificationmanager.cpp')
-rw-r--r-- | saltoqd/notificationmanager.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/saltoqd/notificationmanager.cpp b/saltoqd/notificationmanager.cpp index 35b5c00..8e0e5d2 100644 --- a/saltoqd/notificationmanager.cpp +++ b/saltoqd/notificationmanager.cpp @@ -1,6 +1,9 @@ #include <QtCore/QFileInfo> #include "notificationmanager.h" -#include "notificationmonitor.h" +#include "../libwatchfish/notification.h" +#include "../libwatchfish/notificationmonitor.h" + +using namespace watchfish; NotificationManager::NotificationManager(CardManager *card, ToqManager *toq) : QObject(toq), _toq(toq), _monitor(NotificationMonitor::instance()), @@ -13,7 +16,7 @@ NotificationManager::NotificationManager(CardManager *card, ToqManager *toq) : this, &NotificationManager::handleNotification); } -void NotificationManager::handleNotification(MonitoredNotification *n) +void NotificationManager::handleNotification(Notification *n) { uint notificationId = n->id(); @@ -40,9 +43,9 @@ void NotificationManager::handleNotification(MonitoredNotification *n) } } - connect(n, &MonitoredNotification::bodyChanged, + connect(n, &Notification::bodyChanged, this, &NotificationManager::handleNotificationBodyChanged); - connect(n, &MonitoredNotification::closed, + connect(n, &Notification::closed, this, &NotificationManager::handleClosedNotification); _cards.insert(notificationId, card); @@ -51,7 +54,7 @@ void NotificationManager::handleNotification(MonitoredNotification *n) void NotificationManager::handleNotificationBodyChanged() { - MonitoredNotification *n = static_cast<MonitoredNotification*>(sender()); + Notification *n = static_cast<Notification*>(sender()); uint notificationId = n->id(); Card *card = _cards.take(notificationId); if (card) { @@ -63,7 +66,7 @@ void NotificationManager::handleNotificationBodyChanged() void NotificationManager::handleClosedNotification() { - MonitoredNotification *n = static_cast<MonitoredNotification*>(sender()); + Notification *n = static_cast<Notification*>(sender()); uint notificationId = n->id(); Card *card = _cards.take(notificationId); if (card) { |