14 // Cross-platform desktop notification client
15 class Notificator: public QObject
19 // Create a new notificator
20 // Ownership of trayIcon is not transferred to this object
21 Notificator(const QString &programName=QString(), QSystemTrayIcon *trayIcon=0, QWidget *parent=0);
34 /* Show notification message.
36 * cls: general message class
37 * title: title shown with message
38 * text: message content
39 * icon: optional icon to show with message
40 * millisTimeout: notification timeout in milliseconds (default 10 seconds)
42 void notify(Class cls, const QString &title, const QString &text,
43 const QIcon &icon = QIcon(), int millisTimeout = 10000);
49 Freedesktop, // Use DBus org.freedesktop.Notifications
50 QSystemTray, // Use QSystemTray::showMessage
51 Growl12, // Use the Growl 1.2 notification system (Mac only)
52 Growl13 // Use the Growl 1.3 notification system (Mac only)
56 QSystemTrayIcon *trayIcon;
58 QDBusInterface *interface;
60 void notifyDBus(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout);
62 void notifySystray(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout);
64 void notifyGrowl(Class cls, const QString &title, const QString &text, const QIcon &icon);
68 #endif // NOTIFICATOR_H