Debian Codegraph @

src/librssguard/miscellaneous/notificationfactory.h

raw symbols SCIP
1 // For license of this file, see <project-root-folder>/LICENSE.md.
2
3 #ifndef NOTIFICATIONFACTORY_H
4 #define NOTIFICATIONFACTORY_H
5
6 #include "miscellaneous/notification.h"
7
8 #include <QObject>
9
10 class Settings;
11
12 class NotificationFactory : public QObject {
13 Q_OBJECT
14
15 public:
16 explicit NotificationFactory(QObject* parent = nullptr);
17
18 QList<Notification> allNotifications() const;
19 Notification notificationForEvent(Notification::Event event) const;
20
21 // Determines whether balloon tips are enabled or not.
22 bool areNotificationsEnabled() const;
23 bool useToastNotifications() const;
24
25 public slots:
26 void load(Settings* settings);
27 void save(const QList<Notification>& new_notifications, Settings* settings);
28
29 private:
30 QList<Notification> m_notifications = {};
31 };
32
33 #endif // NOTIFICATIONFACTORY_H