diff options
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) { |