annotate ui/trayicon.h @ 955:0f7aeb12e5e9

(issue41) Add proxsettingsdialog
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 27 Aug 2014 16:31:11 +0200
parents 4efd6378c001
children c096881e8ed0
rev   line source
871
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
1 #ifndef TRAYICON_H
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
2 #define TRAYICON_H
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
3 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
4 * Software engineering by Intevation GmbH
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
5 *
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
6 * This file is Free Software under the GNU GPL (v>=2)
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
7 * and comes with ABSOLUTELY NO WARRANTY!
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
8 * See LICENSE.txt for details.
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
9 */
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
10
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
11 #include <QWidget>
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
12 #include <QSystemTrayIcon>
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
13
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
14
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
15 /**@brief Notification interface.
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
16 *
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
17 * This class provides an inherited implmentation of QSystemTrayIcon
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
18 * to be more flexible on platforms where no SystemTray is available.
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
19 *
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
20 * This class should become obsolete once Qt improves the support for
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
21 * StatusNotifier icons that are used in Plasma 5 and Unity.
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
22 */
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
23 class TrayIcon : public QSystemTrayIcon
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
24 {
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
25 Q_OBJECT
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
26 public:
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
27 TrayIcon (QObject *parent);
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
28
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
29 void show();
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
30 bool isAlternative() {return useAlt;}
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
31
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
32 public Q_SLOTS:
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
33 void showMessage(const QString &title, const QString &msg,
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
34 QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::Information, int msecs = 10000);
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
35 private:
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
36 bool useAlt;
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
37 };
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
38
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
39 #endif // TRAYICON_H

http://wald.intevation.org/projects/trustbridge/