1 | /* |
2 | * Copyright (C) by Cédric Bellegarde <gnumdk@gmail.com> |
3 | * |
4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. |
8 | * |
9 | * This program is distributed in the hope that it will be useful, but |
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
11 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
12 | * for more details. |
13 | */ |
14 | |
15 | #ifndef SYSTRAY_H |
16 | #define SYSTRAY_H |
17 | |
18 | #include <QSystemTrayIcon> |
19 | |
20 | class QIcon; |
21 | |
22 | namespace OCC { |
23 | |
24 | #ifdef Q_OS_OSX |
25 | bool canOsXSendUserNotification(); |
26 | void sendOsXUserNotification(const QString &title, const QString &message); |
27 | #endif |
28 | |
29 | /** |
30 | * @brief The Systray class |
31 | * @ingroup gui |
32 | */ |
33 | class Systray : public QSystemTrayIcon |
34 | { |
35 | Q_OBJECT |
36 | public: |
37 | void showMessage(const QString &title, const QString &message, MessageIcon icon = Information, int millisecondsTimeoutHint = 10000); |
38 | void setToolTip(const QString &tip); |
39 | }; |
40 | |
41 | } // namespace OCC |
42 | |
43 | #endif //SYSTRAY_H |
44 | |