annotate ui/trayicon.h @ 1337:6c57223e464c

Fixed typo in admin help.
author Emanuel Schuetze <emanuel@intevation.de>
date Thu, 16 Oct 2014 14:55:52 +0200
parents 2a1aa9df8f11
children
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
1255
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1144
diff changeset
15 class QMessageBox;
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1144
diff changeset
16
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1144
diff changeset
17 /**@brief User notification interface
871
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
18 *
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
19 * 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
20 * 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
21 *
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
22 * 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
23 * 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
24 */
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
25 class TrayIcon : public QSystemTrayIcon
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
26 {
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
27 Q_OBJECT
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
28 public:
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
29 TrayIcon (QObject *parent);
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
30
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
31 void show();
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
32 bool isAlternative() {return useAlt;}
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
33
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
34 public Q_SLOTS:
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
35 void showMessage(const QString &title, const QString &msg,
1144
a4282bc67a8b (issue99) Make OK button in message box notification configurable and change it for list updates
Andre Heinecke <andre.heinecke@intevation.de>
parents: 969
diff changeset
36 QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::Information, int msecs = 10000,
a4282bc67a8b (issue99) Make OK button in message box notification configurable and change it for list updates
Andre Heinecke <andre.heinecke@intevation.de>
parents: 969
diff changeset
37 const QString &okBtnText = QString());
969
c096881e8ed0 (issue50) Make message box a member variable
Andre Heinecke <andre.heinecke@intevation.de>
parents: 871
diff changeset
38 private Q_SLOTS:
c096881e8ed0 (issue50) Make message box a member variable
Andre Heinecke <andre.heinecke@intevation.de>
parents: 871
diff changeset
39 void messageDestroyed();
c096881e8ed0 (issue50) Make message box a member variable
Andre Heinecke <andre.heinecke@intevation.de>
parents: 871
diff changeset
40
871
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
41 private:
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
42 bool useAlt;
969
c096881e8ed0 (issue50) Make message box a member variable
Andre Heinecke <andre.heinecke@intevation.de>
parents: 871
diff changeset
43 QMessageBox *mMessageBox;
871
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
44 };
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
45
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
46 #endif // TRAYICON_H

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