Plasma-workspace
abstractnotificationsmodel.cpp
66 qCDebug(NOTIFICATIONMANAGER) << "Reached the notification limit of" << s_notificationsLimit << ", discarding the oldest" << cleanupCount
84void AbstractNotificationsModel::Private::onNotificationReplaced(uint replacedId, const Notification ¬ification)
102 // or created() which should indicate the original date, whereas updated() is when it was last updated
113void AbstractNotificationsModel::Private::onNotificationRemoved(uint removedId, Server::CloseReason reason)
161void AbstractNotificationsModel::Private::setupNotificationTimeout(const Notification ¬ification)
183 timer->setInterval(60000 /*1min*/ + (notification.timeout() == -1 ? 120000 /*2min, max configurable default timeout*/ : notification.timeout()));
233 auto it = std::find_if(d->notifications.constBegin(), d->notifications.constEnd(), [id](const Notification &item) {
396bool AbstractNotificationsModel::setData(const QModelIndex &index, const QVariant &value, int role)
412 // Allows to mark a notification as expired without actually sending that out through expire() for persistency
485void AbstractNotificationsModel::onNotificationReplaced(uint replacedId, const Notification ¬ification)
490void AbstractNotificationsModel::onNotificationRemoved(uint notificationId, Server::CloseReason reason)
@ ApplicationNameRole
The user-visible name of the application (e.g. Spectacle)
Definition notifications.h:242
@ ConfigurableRole
Whether the notification can be configured because a desktopEntry or notifyRcName is known,...
Definition notifications.h:266
@ UpdatedRole
When the notification was last updated, invalid when it hasn't been updated.
Definition notifications.h:233
@ NotifyRcNameRole
The notifyrc name (e.g. spectaclerc) of the application that sent the notification.
Definition notifications.h:240
@ ResidentRole
Whether the notification should keep its actions even when they were invoked.
Definition notifications.h:286
@ OriginNameRole
The name of the device or account the notification originally came from, e.g.
Definition notifications.h:244
@ DefaultActionLabelRole
The user-visible label of the default action, typically not shown as the popup itself becomes clickab...
Definition notifications.h:258
@ ActionLabelsRole
The user-visible labels of the actions, excluding the default and settings action,...
Definition notifications.h:256
@ IconNameRole
The notification main icon name, which is not the application icon.
Definition notifications.h:236
@ ReplySubmitButtonTextRole
A custom text for the reply submit button, e.g. "Submit Comment".
Definition notifications.h:281
@ HasDefaultActionRole
Whether the notification has a default action, which is one that is invoked when the popup itself is ...
Definition notifications.h:257
@ IdRole
A notification identifier. This can be uint notification ID or string application job source.
Definition notifications.h:221
@ DesktopEntryRole
The desktop entry (without .desktop suffix, e.g. org.kde.spectacle) of the application that sent the ...
Definition notifications.h:239
@ ConfigureActionLabelRole
The user-visible label for the settings action.
Definition notifications.h:268
@ ReplySubmitButtonIconNameRole
A custom icon name for the reply submit button.
Definition notifications.h:282
@ ActionNamesRole
The IDs of the actions, excluding the default and settings action, e.g. [action1, action2].
Definition notifications.h:255
@ ExpiredRole
The notification timed out and closed. Actions on it cannot be invoked anymore.
Definition notifications.h:271
@ UserActionFeedbackRole
Whether this notification is a response/confirmation to an explicit user action.
Definition notifications.h:276
@ ReplyPlaceholderTextRole
A custom placeholder text for the reply action, e.g. "Reply to Max...".
Definition notifications.h:280
@ ClosableRole
Whether the item can be closed. Notifications are always closable, jobs are only when in JobStateStop...
Definition notifications.h:269
@ UrgencyRole
The notification urgency, either LowUrgency, NormalUrgency, or CriticalUrgency. Jobs do not have an u...
Definition notifications.h:262
@ ImageRole
The notification main image, which is not the application icon. Only valid for pixmap icons.
Definition notifications.h:223
@ UrlsRole
A list of URLs associated with the notification, e.g. a path to a screenshot that was just taken or i...
Definition notifications.h:260
@ TypeRole
The type of model entry, either NotificationType or JobType.
Definition notifications.h:231
@ TransientRole
Whether the notification is transient and should not be kept in history.
Definition notifications.h:287
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QWidget * window(QObject *job)
void beginInsertRows(const QModelIndex &parent, int first, int last)
void beginRemoveRows(const QModelIndex &parent, int first, int last)
bool checkIndex(const QModelIndex &index, CheckIndexOptions options) const const
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList< int > &roles)
void endInsertRows()
void endRemoveRows()
virtual Qt::ItemFlags flags(const QModelIndex &index) const const override
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
bool isValid() const const
bool isNull() const const
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
iterator begin()
qsizetype count() const const
iterator end()
T & first()
bool isEmpty() const const
T & last()
void reserve(qsizetype size)
int row() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void destroyed(QObject *obj)
bool disconnect(const QMetaObject::Connection &connection)
QObject * parent() const const
QVariant property(const char *name) const const
bool setProperty(const char *name, QVariant &&value)
AccessibleDescriptionRole
QTextDocumentFragment fromHtml(const QString &text, const QTextDocument *resourceProvider)
QString toPlainText() const const
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void setInterval(int msec)
void setSingleShot(bool singleShot)
void start()
void stop()
void timeout()
QVariant fromValue(T &&value)
bool toBool() const const
uint toUInt(bool *ok) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.