Plasma-workspace

watchednotificationsmodel.h
1/*
2 SPDX-FileCopyrightText: 2020 Shah Bhushan <bshah@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#pragma once
8
9#include "abstractnotificationsmodel.h"
10
11#include "notificationmanager_export.h"
12
13#include <qqmlregistration.h>
14
15namespace NotificationManager
16{
17// WARNING: this is unstable API and does not provide any API or ABI gurantee for future Plasma releases and can be removed without any further notice
18class NOTIFICATIONMANAGER_EXPORT WatchedNotificationsModel : public AbstractNotificationsModel
19{
20 Q_OBJECT
21 QML_ELEMENT
22
23 Q_PROPERTY(bool valid READ valid NOTIFY validChanged)
24
25public:
26 explicit WatchedNotificationsModel();
27 ~WatchedNotificationsModel();
28
29 Q_INVOKABLE void expire(uint notificationId) override;
30 Q_INVOKABLE void close(uint notificationId) override;
31
32 Q_INVOKABLE void invokeDefaultAction(uint notificationId, Notifications::InvokeBehavior behavior = Notifications::None) override;
33 Q_INVOKABLE void invokeAction(uint notificationId, const QString &actionName, Notifications::InvokeBehavior behavior = Notifications::None) override;
34 Q_INVOKABLE void reply(uint notificationId, const QString &text, Notifications::InvokeBehavior behavior = Notifications::None) override;
35 bool valid();
36
37Q_SIGNALS:
38 void validChanged(bool valid);
39
40private:
41 class Private;
42 Private *const d;
43 Q_DISABLE_COPY(WatchedNotificationsModel)
44};
45
46}
const QList< QKeySequence > & close()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:42 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.