File indexing completed on 2024-04-28 11:43:48

0001 /*
0002     SPDX-FileCopyrightText: 2005-2006 Olivier Goffart <ogoffart at kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #include "notifybytaskbar.h"
0008 #include "debug_p.h"
0009 #include "knotification.h"
0010 #include "knotifyconfig.h"
0011 
0012 #include <QApplication>
0013 
0014 NotifyByTaskbar::NotifyByTaskbar(QObject *parent)
0015     : KNotificationPlugin(parent)
0016 {
0017 }
0018 
0019 NotifyByTaskbar::~NotifyByTaskbar()
0020 {
0021 }
0022 
0023 void NotifyByTaskbar::notify(KNotification *notification, KNotifyConfig *config)
0024 {
0025     Q_UNUSED(config);
0026     if (!notification->widget()) {
0027         qCWarning(LOG_KNOTIFICATIONS) << "Could not notify " << notification->eventId() << "by taskbar, notification has no associated widget";
0028         finish(notification);
0029         return;
0030     }
0031 
0032     QApplication::alert(notification->widget());
0033 
0034     finish(notification);
0035 }
0036 
0037 #include "moc_notifybytaskbar.cpp"