File indexing completed on 2024-05-12 15:54:51

0001 /*
0002  * SPDX-FileCopyrightText: (C) 2017 Atul Sharma <atulsharma406@gmail.com>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 #ifndef NOTIFICATION_MANAGER_H
0008 #define NOTIFICATION_MANAGER_H
0009 
0010 #include <QVariant>
0011 #include <knotification.h>
0012 
0013 class NotificationManager : public QObject
0014 {
0015     Q_OBJECT
0016 public:
0017     explicit NotificationManager(QObject *parent = nullptr);
0018     ~NotificationManager() = default;
0019 
0020     /**
0021      * @argument valid: to check whether the returned url after sharing is valid or not
0022      * @argument url: the valid url returned after sharing the image
0023      */
0024     Q_INVOKABLE void showNotification(bool valid, const QVariant &url = QVariant());
0025 
0026 private:
0027     KNotification *m_sharingSuccess;
0028     KNotification *m_sharingFailed;
0029 };
0030 #endif