+ uint id = 0;
+ KNotification *n = qobject_cast<KNotification *>(sender());
+ if(n && _notificationIds.contains(n))
+ id = _notificationIds.value(n);
+
+ notificationActivated(id);
+}
+
+void KNotificationBackend::notificationActivated(QSystemTrayIcon::ActivationReason reason) {
+ if(reason == QSystemTrayIcon::Trigger && _lastNotificationId > 0) {
+ notificationActivated(_lastNotificationId); // most recent one
+ }
+}
+
+void KNotificationBackend::notificationActivated(uint notificationId) {
+ removeNotificationById(notificationId);
+
+ QtUi::mainWindow()->systemTray()->setInhibitActivation();
+ emit activated(notificationId);
+
+ if(!_notificationIds.count())
+ QtUi::mainWindow()->systemTray()->setAlert(false);
+
+}
+
+void KNotificationBackend::notificationClosed() {
+ //KNotification *n = qobject_cast<KNotification *>(sender());
+ //if(n && _notificationIds.contains(n))
+ // _notificationIds.remove(n);