Changeset View
Changeset View
Standalone View
Standalone View
src/knotification.h
Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | 117 | * <pre> | |||
---|---|---|---|---|---|
122 | Action=Sound|Popup | 122 | Action=Sound|Popup | ||
123 | 123 | | |||
124 | [Event/contactOnline] | 124 | [Event/contactOnline] | ||
125 | Name=Contact goes online | 125 | Name=Contact goes online | ||
126 | Comment=One of your contact has been connected | 126 | Comment=One of your contact has been connected | ||
127 | Contexts=group | 127 | Contexts=group | ||
128 | Sound=filetoplay.ogg | 128 | Sound=filetoplay.ogg | ||
129 | Action=None | 129 | Action=None | ||
130 | Urgency=Low | ||||
130 | * </pre> | 131 | * </pre> | ||
131 | * These are the default settings for each notifiable event. | 132 | * These are the default settings for each notifiable event. | ||
132 | * Action is the string representing the action. Actions can be added to | 133 | * Action is the string representing the action. Actions can be added to | ||
133 | * KNotification as plugins, by deriving from KNotificationPlugin. | 134 | * KNotification as plugins, by deriving from KNotificationPlugin. | ||
134 | * At the time of writing, the following actions are available: Taskbar, | 135 | * At the time of writing, the following actions are available: Taskbar, | ||
135 | * Sound, Popup, Logfile, TTS, Execute. | 136 | * Sound, Popup, Logfile, TTS, Execute. | ||
136 | * Actions can be combined by separating them with '|'. | 137 | * Actions can be combined by separating them with '|'. | ||
137 | * | 138 | * | ||
138 | * Contexts is a comma separated list of possible context for this event. | 139 | * Contexts is a comma separated list of possible context for this event. | ||
139 | * | 140 | * | ||
141 | * Urgency can be any of: Low, Normal, Critical. | ||||
142 | * | ||||
140 | * \section userfile The user's config file | 143 | * \section userfile The user's config file | ||
141 | * | 144 | * | ||
142 | * This is an implementation detail, and is described here for your information. | 145 | * This is an implementation detail, and is described here for your information. | ||
143 | * | 146 | * | ||
144 | * In the config file, there are two parts: the event configuration, and the context information | 147 | * In the config file, there are two parts: the event configuration, and the context information | ||
145 | * \subsection context Context information | 148 | * \subsection context Context information | ||
146 | * These are hints for the configuration dialog. They contain both the internal id of the context, and the user visible string. | 149 | * These are hints for the configuration dialog. They contain both the internal id of the context, and the user visible string. | ||
147 | * <pre> | 150 | * <pre> | ||
▲ Show 20 Lines • Show All 117 Lines • ▼ Show 20 Line(s) | 193 | public: | |||
265 | Q_DECLARE_FLAGS(NotificationFlags, NotificationFlag) | 268 | Q_DECLARE_FLAGS(NotificationFlags, NotificationFlag) | ||
266 | 269 | | |||
267 | /** | 270 | /** | ||
268 | * default events you can use in the event function | 271 | * default events you can use in the event function | ||
269 | */ | 272 | */ | ||
270 | enum StandardEvent { Notification, Warning, Error, Catastrophe }; | 273 | enum StandardEvent { Notification, Warning, Error, Catastrophe }; | ||
271 | 274 | | |||
272 | /** | 275 | /** | ||
276 | * The urgency of a notification. | ||||
277 | * | ||||
278 | * @since 5.58 | ||||
279 | * @sa setUrgency | ||||
280 | */ | ||||
281 | enum Urgency { DefaultUrgency = -1, LowUrgency, NormalUrgency, CriticalUrgency }; | ||||
282 | | ||||
283 | /** | ||||
273 | * Create a new notification. | 284 | * Create a new notification. | ||
274 | * | 285 | * | ||
275 | * You have to use sendEvent to show the notification. | 286 | * You have to use sendEvent to show the notification. | ||
276 | * | 287 | * | ||
277 | * The pointer is automatically deleted when the event is closed. | 288 | * The pointer is automatically deleted when the event is closed. | ||
278 | * | 289 | * | ||
279 | * Make sure you use one of the NotificationFlags CloseOnTimeOut or | 290 | * Make sure you use one of the NotificationFlags CloseOnTimeOut or | ||
280 | * CloseWhenWidgetActivated, if not, | 291 | * CloseWhenWidgetActivated, if not, | ||
▲ Show 20 Lines • Show All 223 Lines • ▼ Show 20 Line(s) | |||||
504 | * @note This feature might not be supported by the user's notification service | 515 | * @note This feature might not be supported by the user's notification service | ||
505 | * | 516 | * | ||
506 | * @param urls A list of URLs | 517 | * @param urls A list of URLs | ||
507 | * @since 5.29 | 518 | * @since 5.29 | ||
508 | */ | 519 | */ | ||
509 | void setUrls(const QList<QUrl> &urls); | 520 | void setUrls(const QList<QUrl> &urls); | ||
510 | 521 | | |||
511 | /** | 522 | /** | ||
523 | * The urgency of the notification. | ||||
524 | * @since 5.58 | ||||
525 | */ | ||||
526 | Urgency urgency() const; | ||||
527 | | ||||
528 | /** | ||||
529 | * Sets the urgency of the notification. | ||||
530 | * | ||||
531 | * This defines the importance of the notification. For example, | ||||
532 | * a track change in a media player would be a low urgency. | ||||
533 | * "You have new mail" would be normal urgency. "Your battery level | ||||
534 | * is low" would be a critical urgency. | ||||
535 | * | ||||
536 | * Use critical notifications with care as they might be shown even | ||||
537 | * when giving a presentation or when notifications are turned off. | ||||
538 | * | ||||
539 | * @param urgency The urgency. | ||||
540 | * @since 5.58 | ||||
541 | */ | ||||
542 | void setUrgency(Urgency urgency); | ||||
543 | | ||||
544 | /** | ||||
512 | * @internal | 545 | * @internal | ||
513 | * the id given by the notification manager | 546 | * the id given by the notification manager | ||
514 | */ | 547 | */ | ||
515 | int id(); | 548 | int id(); | ||
516 | 549 | | |||
517 | /** | 550 | /** | ||
518 | * @internal | 551 | * @internal | ||
519 | * appname used for the D-Bus object | 552 | * appname used for the D-Bus object | ||
▲ Show 20 Lines • Show All 283 Lines • Show Last 20 Lines |