Plasma-workspace
notifications.h
29class NOTIFICATIONMANAGER_EXPORT Notifications : public QSortFilterProxyModel, public QQmlParserStatus
62 Q_PROPERTY(bool showDismissed READ showDismissed WRITE setShowDismissed NOTIFY showDismissedChanged)
71 Q_PROPERTY(bool showAddedDuringInhibition READ showAddedDuringInhibition WRITE setShowAddedDuringInhibition NOTIFY showAddedDuringInhibitionChanged)
79 Q_PROPERTY(QStringList blacklistedDesktopEntries READ blacklistedDesktopEntries WRITE setBlacklistedDesktopEntries NOTIFY blacklistedDesktopEntriesChanged)
87 Q_PROPERTY(QStringList blacklistedNotifyRcNames READ blacklistedNotifyRcNames WRITE setBlacklistedNotifyRcNames NOTIFY blacklistedNotifyRcNamesChanged)
99 Q_PROPERTY(QStringList whitelistedDesktopEntries READ whitelistedDesktopEntries WRITE setWhitelistedDesktopEntries NOTIFY whitelistedDesktopEntriesChanged)
111 Q_PROPERTY(QStringList whitelistedNotifyRcNames READ whitelistedNotifyRcNames WRITE setWhitelistedNotifyRcNames NOTIFY whitelistedNotifyRcNamesChanged)
118 Q_PROPERTY(bool showNotifications READ showNotifications WRITE setShowNotifications NOTIFY showNotificationsChanged)
176 Q_PROPERTY(bool expandUnread READ expandUnread WRITE setExpandUnread NOTIFY expandUnreadChanged)
186 Q_PROPERTY(int activeNotificationsCount READ activeNotificationsCount NOTIFY activeNotificationsCountChanged)
191 Q_PROPERTY(int expiredNotificationsCount READ expiredNotificationsCount NOTIFY expiredNotificationsCountChanged)
198 Q_PROPERTY(QDateTime lastRead READ lastRead WRITE setLastRead RESET resetLastRead NOTIFY lastReadChanged)
205 Q_PROPERTY(int unreadNotificationsCount READ unreadNotificationsCount NOTIFY unreadNotificationsCountChanged)
214 Q_PROPERTY(int dismissedResidentNotificationsCount READ dismissedResidentNotificationsCount NOTIFY dismissedResidentNotificationsCountChanged)
239 IdRole = Qt::UserRole + 1, ///< A notification identifier. This can be uint notification ID or string application job source.
241 ImageRole = Qt::DecorationRole, ///< The notification main image, which is not the application icon. Only valid for pixmap icons.
254 IconNameRole, ///< The notification main icon name, which is not the application icon. Only valid for icon names, if a URL supplied, it is loaded and
257 DesktopEntryRole, ///< The desktop entry (without .desktop suffix, e.g. org.kde.spectacle) of the application that sent the notification.
258 NotifyRcNameRole, ///< The notifyrc name (e.g. spectaclerc) of the application that sent the notification.
262 OriginNameRole, ///< The name of the device or account the notification originally came from, e.g. "My Phone" (in case of device sync) or
266 JobStateRole, ///< The state of the job, either JobStateJopped, JobStateSuspended, or JobStateRunning.
267 PercentageRole, ///< The percentage of the job. Use @c jobsPercentage to get a global percentage for all jobs.
271 JobDetailsRole, ///< A pointer to a Job item itself containing more detailed information about the job
273 ActionNamesRole, ///< The IDs of the actions, excluding the default and settings action, e.g. [action1, action2]
274 ActionLabelsRole, ///< The user-visible labels of the actions, excluding the default and settings action, e.g. ["Accept", "Reject"]
275 HasDefaultActionRole, ///< Whether the notification has a default action, which is one that is invoked when the popup itself is clicked
276 DefaultActionLabelRole, ///< The user-visible label of the default action, typically not shown as the popup itself becomes clickable
278 UrlsRole, ///< A list of URLs associated with the notification, e.g. a path to a screenshot that was just taken or image received
280 UrgencyRole, ///< The notification urgency, either LowUrgency, NormalUrgency, or CriticalUrgency. Jobs do not have an urgency.
281 TimeoutRole, ///< The timeout for the notification in milliseconds. 0 means the notification should not timeout, -1 means a sensible default should be
284 ConfigurableRole, ///< Whether the notification can be configured because a desktopEntry or notifyRcName is known, or the notification has a setting
287 ClosableRole, ///< Whether the item can be closed. Notifications are always closable, jobs are only when in JobStateStopped.
289 ExpiredRole, ///< The notification timed out and closed. Actions on it cannot be invoked anymore.
290 DismissedRole, ///< The notification got temporarily hidden by the user but could still be interacted with.
291 ReadRole, ///< Whether the notification got read by the user. If true, the notification isn't considered unread even if created after lastRead.
294 UserActionFeedbackRole, ///< Whether this notification is a response/confirmation to an explicit user action. @since 5.18
298 ReplyPlaceholderTextRole, ///< A custom placeholder text for the reply action, e.g. "Reply to Max...". @since 5.18
299 ReplySubmitButtonTextRole, ///< A custom text for the reply submit button, e.g. "Submit Comment". @since 5.18
301 CategoryRole, ///< The (optional) category of the notification. Notifications can optionally have a type indicator. Although neither client or nor
302 ///< server must support this, some may choose to. Those servers implementing categories may use them to intelligently display the
304 ResidentRole, ///< Whether the notification should keep its actions even when they were invoked. @since 5.22
305 TransientRole, ///< Whether the notification is transient and should not be kept in history. @since 5.22
307 WasAddedDuringInhibitionRole, ///< Whether the notification was added while inhibition was active. @since 6.3
330 LowUrgency = 1 << 0, ///< The notification has low urgency, it is not important and may not be shown or added to a history.
331 NormalUrgency = 1 << 1, ///< The notification has normal urgency. This is also the default if no urgecny is supplied.
353 JobStateStopped, ///< The job is stopped. It has either finished (error is 0) or failed (error is not 0)
365 SortByTypeAndUrgency, ///< Sort notifications taking into account their type and urgency. The order is (descending): Critical, jobs, Normal, Low.
498 Q_INVOKABLE void invokeAction(const QModelIndex &idx, const QString &actionId, InvokeBehavior = None);
QStringList whitelistedDesktopEntries
A list of desktop entries for which notifications should be shown.
Definition notifications.h:99
QStringList blacklistedNotifyRcNames
A list of notifyrc names for which no notifications should be shown.
Definition notifications.h:87
int unreadNotificationsCount
The number of notifications added since lastRead.
Definition notifications.h:205
bool expandUnread
Whether to automatically show notifications that are unread.
Definition notifications.h:176
Urgencies urgencies
The notification urgency types the model should contain.
Definition notifications.h:132
QStringList whitelistedNotifyRcNames
A list of notifyrc names for which notifications should be shown.
Definition notifications.h:111
@ SortByDate
Sort notifications strictly by the date they were updated or created.
Definition notifications.h:363
@ SortByTypeAndUrgency
Sort notifications taking into account their type and urgency. The order is (descending): Critical,...
Definition notifications.h:365
@ LowUrgency
The notification has low urgency, it is not important and may not be shown or added to a history.
Definition notifications.h:330
@ NormalUrgency
The notification has normal urgency. This is also the default if no urgecny is supplied.
Definition notifications.h:331
bool showAddedDuringInhibition
Whether to show notifications added during inhibition.
Definition notifications.h:71
@ JobStateStopped
The job is stopped. It has either finished (error is 0) or failed (error is not 0)
Definition notifications.h:353
int dismissedResidentNotificationsCount
The number of resident notifications that have been dismissed.
Definition notifications.h:214
QML_ELEMENTint limit
The number of notifications the model should at most contain.
Definition notifications.h:40
@ ApplicationNameRole
The user-visible name of the application (e.g. Spectacle)
Definition notifications.h:260
@ ConfigurableRole
Whether the notification can be configured because a desktopEntry or notifyRcName is known,...
Definition notifications.h:284
@ UpdatedRole
When the notification was last updated, invalid when it hasn't been updated.
Definition notifications.h:251
@ NotifyRcNameRole
The notifyrc name (e.g. spectaclerc) of the application that sent the notification.
Definition notifications.h:258
@ JobDetailsRole
A pointer to a Job item itself containing more detailed information about the job.
Definition notifications.h:271
@ ResidentRole
Whether the notification should keep its actions even when they were invoked.
Definition notifications.h:304
@ OriginNameRole
The name of the device or account the notification originally came from, e.g.
Definition notifications.h:262
@ DismissedRole
The notification got temporarily hidden by the user but could still be interacted with.
Definition notifications.h:290
@ DefaultActionLabelRole
The user-visible label of the default action, typically not shown as the popup itself becomes clickab...
Definition notifications.h:276
@ ActionLabelsRole
The user-visible labels of the actions, excluding the default and settings action,...
Definition notifications.h:274
@ IconNameRole
The notification main icon name, which is not the application icon.
Definition notifications.h:254
@ ReplySubmitButtonTextRole
A custom text for the reply submit button, e.g. "Submit Comment".
Definition notifications.h:299
@ IsGroupExpandedRole
Whether the group is expanded, this role is writable.
Definition notifications.h:246
@ HasDefaultActionRole
Whether the notification has a default action, which is one that is invoked when the popup itself is ...
Definition notifications.h:275
@ JobStateRole
The state of the job, either JobStateJopped, JobStateSuspended, or JobStateRunning.
Definition notifications.h:266
@ IdRole
A notification identifier. This can be uint notification ID or string application job source.
Definition notifications.h:239
@ DesktopEntryRole
The desktop entry (without .desktop suffix, e.g. org.kde.spectacle) of the application that sent the ...
Definition notifications.h:257
@ ConfigureActionLabelRole
The user-visible label for the settings action.
Definition notifications.h:286
@ ReplySubmitButtonIconNameRole
A custom icon name for the reply submit button.
Definition notifications.h:300
@ ActionNamesRole
The IDs of the actions, excluding the default and settings action, e.g. [action1, action2].
Definition notifications.h:273
@ WasAddedDuringInhibitionRole
Whether the notification was added while inhibition was active.
Definition notifications.h:307
@ ExpiredRole
The notification timed out and closed. Actions on it cannot be invoked anymore.
Definition notifications.h:289
@ HintsRole
To provide extra data to a notification server that the server may be able to make use of.
Definition notifications.h:308
@ UserActionFeedbackRole
Whether this notification is a response/confirmation to an explicit user action.
Definition notifications.h:294
@ ReplyPlaceholderTextRole
A custom placeholder text for the reply action, e.g. "Reply to Max...".
Definition notifications.h:298
@ ClosableRole
Whether the item can be closed. Notifications are always closable, jobs are only when in JobStateStop...
Definition notifications.h:287
@ UrgencyRole
The notification urgency, either LowUrgency, NormalUrgency, or CriticalUrgency. Jobs do not have an u...
Definition notifications.h:280
@ ImageRole
The notification main image, which is not the application icon. Only valid for pixmap icons.
Definition notifications.h:241
@ 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:278
@ ExpandedGroupChildrenCountRole
The number of children in a group that are expanded.
Definition notifications.h:245
@ TypeRole
The type of model entry, either NotificationType or JobType.
Definition notifications.h:249
@ PercentageRole
The percentage of the job. Use jobsPercentage to get a global percentage for all jobs.
Definition notifications.h:267
@ TransientRole
Whether the notification is transient and should not be kept in history.
Definition notifications.h:305
QDateTime lastRead
The time when the user last could read the notifications.
Definition notifications.h:198
QStringList blacklistedDesktopEntries
A list of desktop entries for which no notifications should be shown.
Definition notifications.h:79
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
QSortFilterProxyModel(QObject *parent)
virtual QModelIndex parent(const QModelIndex &child) const const override
UserRole
SortOrder
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 11 2025 11:52:44 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 11 2025 11:52:44 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.