File indexing completed on 2024-04-28 16:54:38
0001 /* 0002 SPDX-FileCopyrightText: 2020 Shah Bhushan <bshah@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #pragma once 0008 0009 #include "abstractnotificationsmodel.h" 0010 0011 #include "notificationmanager_export.h" 0012 0013 namespace NotificationManager 0014 { 0015 class NOTIFICATIONMANAGER_EXPORT WatchedNotificationsModel : public AbstractNotificationsModel 0016 { 0017 Q_OBJECT 0018 Q_PROPERTY(bool valid READ valid NOTIFY validChanged) 0019 0020 public: 0021 explicit WatchedNotificationsModel(); 0022 ~WatchedNotificationsModel(); 0023 0024 Q_INVOKABLE void expire(uint notificationId) override; 0025 Q_INVOKABLE void close(uint notificationId) override; 0026 0027 Q_INVOKABLE void invokeDefaultAction(uint notificationId, Notifications::InvokeBehavior behavior = Notifications::None) override; 0028 Q_INVOKABLE void invokeAction(uint notificationId, const QString &actionName, Notifications::InvokeBehavior behavior = Notifications::None) override; 0029 Q_INVOKABLE void reply(uint notificationId, const QString &text, Notifications::InvokeBehavior behavior = Notifications::None) override; 0030 bool valid(); 0031 0032 Q_SIGNALS: 0033 void validChanged(bool valid); 0034 0035 private: 0036 class Private; 0037 Private *const d; 0038 Q_DISABLE_COPY(WatchedNotificationsModel) 0039 }; 0040 0041 }