Cross-platform desktop notification client.
More...
#include <notificator.h>
|
| void | notify (Class cls, const QString &title, const QString &text, const QIcon &icon=QIcon(), int millisTimeout=10000) |
| | Show notification message. More...
|
| |
|
| void | notifySystray (Class cls, const QString &title, const QString &text, int millisTimeout) |
| |
Cross-platform desktop notification client.
Definition at line 24 of file notificator.h.
◆ Class
| Enumerator |
|---|
| Information | Informational message.
|
| Warning | Notify user of potential problem.
|
| Critical | An error occurred.
|
Definition at line 36 of file notificator.h.
◆ Mode
| Enumerator |
|---|
| None | Ignore informational notifications, and show a modal pop-up dialog for Critical notifications.
|
| Freedesktop | Use DBus org.freedesktop.Notifications.
|
| QSystemTray | Use QSystemTrayIcon::showMessage()
|
| UserNotificationCenter | Use the 10.8+ User Notification Center (Mac only)
|
Definition at line 57 of file notificator.h.
◆ Notificator()
| Notificator::Notificator |
( |
const QString & |
programName, |
|
|
QSystemTrayIcon * |
trayIcon, |
|
|
QWidget * |
parent |
|
) |
| |
Create a new notificator.
- Note
- Ownership of trayIcon is not transferred to this object.
Definition at line 30 of file notificator.cpp.
◆ ~Notificator()
| Notificator::~Notificator |
( |
| ) |
|
◆ notify
| void Notificator::notify |
( |
Class |
cls, |
|
|
const QString & |
title, |
|
|
const QString & |
text, |
|
|
const QIcon & |
icon = QIcon(), |
|
|
int |
millisTimeout = 10000 |
|
) |
| |
|
slot |
Show notification message.
- Parameters
-
| [in] | cls | general message class |
| [in] | title | title shown with message |
| [in] | text | message content |
| [in] | icon | optional icon to show with message |
| [in] | millisTimeout | notification timeout in milliseconds (defaults to 10 seconds) |
- Note
- Platform implementations are free to ignore any of the provided fields except for text.
Definition at line 227 of file notificator.cpp.
◆ notifySystray()
| void Notificator::notifySystray |
( |
Class |
cls, |
|
|
const QString & |
title, |
|
|
const QString & |
text, |
|
|
int |
millisTimeout |
|
) |
| |
|
private |
◆ mode
◆ parent
| QWidget* Notificator::parent |
|
private |
◆ programName
| QString Notificator::programName |
|
private |
◆ trayIcon
| QSystemTrayIcon* Notificator::trayIcon |
|
private |
The documentation for this class was generated from the following files: