File indexing completed on 2022-09-27 15:54:08

0001 // SPDX-FileCopyrightText: (C) 2017 Atul Sharma <atulsharma406@gmail.com>
0002 // SPDX-License-Identifier: LGPL-2.0-or-later
0003 
0004 #include "notificationmanager.h"
0005 #include <klocalizedstring.h>
0006 
0007 NotificationManager::NotificationManager(QObject *parent)
0008     : QObject(parent)
0009 {
0010     m_sharingSuccess = new KNotification(QStringLiteral("sharingSuccess"), KNotification::Persistent, this);
0011 }
0012 
0013 NotificationManager::~NotificationManager()
0014 {
0015 }
0016 
0017 void NotificationManager::showNotification(const QString &url)
0018 {
0019     m_sharingSuccess->setText(i18n("Shared url for image is <a href='%1'>%1</a>", url));
0020     m_sharingSuccess->sendEvent();
0021 }