Plasma-workspace
notificationsmodel.cpp
33 connect(&Server::self(), &Server::notificationAdded, this, [this](const Notification ¬ification) {
36 connect(&Server::self(), &Server::notificationReplaced, this, [this](uint replacedId, const Notification ¬ification) {
39 connect(&Server::self(), &Server::notificationRemoved, this, [this](uint removedId, Server::CloseReason reason) {
68void NotificationsModel::invokeDefaultAction(uint notificationId, Notifications::InvokeBehavior behavior)
77 qCWarning(NOTIFICATIONMANAGER) << "Trying to invoke default action on notification" << notificationId << "which doesn't have one";
88void NotificationsModel::invokeAction(uint notificationId, const QString &actionName, Notifications::InvokeBehavior behavior)
97 qCWarning(NOTIFICATIONMANAGER) << "Trying to invoke action" << actionName << "on notification" << notificationId << "which it doesn't have";
101 Server::self().invokeAction(notificationId, actionName, notification.d->xdgTokenAppId, behavior, window());
104void NotificationsModel::reply(uint notificationId, const QString &text, Notifications::InvokeBehavior behavior)
113 qCWarning(NOTIFICATIONMANAGER) << "Trying to reply to a notification which doesn't have a reply action";
143 qCWarning(NOTIFICATIONMANAGER) << "Trying to configure notification" << notificationId << "which isn't configurable";
146void NotificationsModel::configure(const QString &desktopEntry, const QString ¬ifyRcName, const QString &eventId)
166 QProcess::startDetached(QStringLiteral("kcmshell6"), {QStringLiteral("notifications"), QStringLiteral("--args"), KShell::joinArgs(args)});
@ DismissedByUser
The user explicitly closed or acknowledged the notification.
void notificationReplaced(uint replacedId, const Notification ¬ification)
Emitted when a notification is supposed to be updated This is emitted regardless of any filtering rul...
void serviceOwnershipLost()
Emitted when the ownership of the Notification DBus Service is lost.
void notificationRemoved(uint id, CloseReason reason)
Emitted when a notification got removed (closed)
void notificationAdded(const Notification ¬ification)
Emitted when a notification was added.
KCOREADDONS_EXPORT QString joinArgs(const QStringList &args)
void append(QList< T > &&value)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
bool isEmpty() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.