14 /** Cross-platform desktop notification client. */
15 class Notificator: public QObject
19 /** Create a new notificator.
20 @note Ownership of trayIcon is not transferred to this object.
22 Notificator(const QString &programName=QString(), QSystemTrayIcon *trayIcon=0, QWidget *parent=0);
28 Information, /**< Informational message */
29 Warning, /**< Notify user of potential problem */
30 Critical /**< An error occured */
35 /** Show notification message.
36 @param[in] cls general message class
37 @param[in] title title shown with message
38 @param[in] text message content
39 @param[in] icon optional icon to show with message
40 @param[in] millisTimeout notification timeout in milliseconds (defaults to 10 seconds)
41 @note Platform implementations are free to ignore any of the provided fields except for \a text.
43 void notify(Class cls, const QString &title, const QString &text,
44 const QIcon &icon = QIcon(), int millisTimeout = 10000);
49 None, /**< Ignore informational notifications, and show a modal pop-up dialog for Critical notifications. */
50 Freedesktop, /**< Use DBus org.freedesktop.Notifications */
51 QSystemTray, /**< Use QSystemTray::showMessage */
52 Growl12, /**< Use the Growl 1.2 notification system (Mac only) */
53 Growl13 /**< Use the Growl 1.3 notification system (Mac only) */
57 QSystemTrayIcon *trayIcon;
59 QDBusInterface *interface;
61 void notifyDBus(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout);
63 void notifySystray(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout);
65 void notifyGrowl(Class cls, const QString &title, const QString &text, const QIcon &icon);
69 #endif // NOTIFICATOR_H