Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qplatformsystemtrayicon.cpp |
Source code | Switch to Preprocessed file |
Line | Source | Count |
---|---|---|
1 | /**************************************************************************** | - |
2 | ** | - |
3 | ** Copyright (C) 2015 The Qt Company Ltd. | - |
4 | ** Copyright (C) 2012 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> | - |
5 | ** Contact: http://www.qt.io/licensing/ | - |
6 | ** | - |
7 | ** This file is part of the QtGui module of the Qt Toolkit. | - |
8 | ** | - |
9 | ** $QT_BEGIN_LICENSE:LGPL21$ | - |
10 | ** Commercial License Usage | - |
11 | ** Licensees holding valid commercial Qt licenses may use this file in | - |
12 | ** accordance with the commercial license agreement provided with the | - |
13 | ** Software or, alternatively, in accordance with the terms contained in | - |
14 | ** a written agreement between you and The Qt Company. For licensing terms | - |
15 | ** and conditions see http://www.qt.io/terms-conditions. For further | - |
16 | ** information use the contact form at http://www.qt.io/contact-us. | - |
17 | ** | - |
18 | ** GNU Lesser General Public License Usage | - |
19 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - |
20 | ** General Public License version 2.1 or version 3 as published by the Free | - |
21 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and | - |
22 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the | - |
23 | ** following information to ensure the GNU Lesser General Public License | - |
24 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and | - |
25 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | - |
26 | ** | - |
27 | ** As a special exception, The Qt Company gives you certain additional | - |
28 | ** rights. These rights are described in The Qt Company LGPL Exception | - |
29 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | - |
30 | ** | - |
31 | ** $QT_END_LICENSE$ | - |
32 | ** | - |
33 | ****************************************************************************/ | - |
34 | - | |
35 | #include "qplatformsystemtrayicon.h" | - |
36 | - | |
37 | #ifndef QT_NO_SYSTEMTRAYICON | - |
38 | - | |
39 | QT_BEGIN_NAMESPACE | - |
40 | - | |
41 | /*! | - |
42 | \class QPlatformSystemTrayIcon | - |
43 | \inmodule QtGui | - |
44 | \brief The QPlatformSystemTrayIcon class abstracts the system tray icon and interaction. | - |
45 | - | |
46 | \sa QSystemTrayIcon | - |
47 | */ | - |
48 | - | |
49 | /*! | - |
50 | \enum QPlatformSystemTrayIcon::MessageIcon | - |
51 | - | |
52 | This enum describes the icon that is shown when a balloon message is displayed. | - |
53 | - | |
54 | \value NoIcon No icon is shown. | - |
55 | \value Information An information icon is shown. | - |
56 | \value Warning A standard warning icon is shown. | - |
57 | \value Critical A critical warning icon is shown. | - |
58 | - | |
59 | \sa updateIcon(), showMessage(), QMessageBox | - |
60 | */ | - |
61 | - | |
62 | /*! | - |
63 | \enum QPlatformSystemTrayIcon::ActivationReason | - |
64 | - | |
65 | This enum describes the reason the system tray was activated. | - |
66 | - | |
67 | \value Unknown Unknown reason | - |
68 | \value Context The context menu for the system tray entry was requested | - |
69 | \value DoubleClick The system tray entry was double clicked | - |
70 | \value Trigger The system tray entry was clicked | - |
71 | \value MiddleClick The system tray entry was clicked with the middle mouse button | - |
72 | - | |
73 | \sa activated() | - |
74 | */ | - |
75 | - | |
76 | /*! | - |
77 | \internal | - |
78 | */ | - |
79 | QPlatformSystemTrayIcon::QPlatformSystemTrayIcon() | - |
80 | { | - |
81 | } | - |
82 | - | |
83 | /*! | - |
84 | \internal | - |
85 | */ | - |
86 | QPlatformSystemTrayIcon::~QPlatformSystemTrayIcon() | - |
87 | { | - |
88 | } | - |
89 | - | |
90 | /*! | - |
91 | \fn void QPlatformSystemTrayIcon::init() | - |
92 | This method is called to initialize the platform dependent implementation. | - |
93 | */ | - |
94 | - | |
95 | /*! | - |
96 | \fn void QPlatformSystemTrayIcon::cleanup() | - |
97 | This method is called to cleanup the platform dependent implementation. | - |
98 | */ | - |
99 | - | |
100 | /*! | - |
101 | \fn void QPlatformSystemTrayIcon::updateIcon(const QIcon &icon) | - |
102 | This method is called when the \a icon did change. | - |
103 | */ | - |
104 | - | |
105 | /*! | - |
106 | \fn void QPlatformSystemTrayIcon::updateToolTip(const QString &tooltip) | - |
107 | This method is called when the \a tooltip text did change. | - |
108 | */ | - |
109 | - | |
110 | /*! | - |
111 | \fn void QPlatformSystemTrayIcon::updateMenu(QPlatformMenu *menu) | - |
112 | This method is called when the system tray \a menu did change. | - |
113 | */ | - |
114 | - | |
115 | /*! | - |
116 | \fn QRect QPlatformSystemTrayIcon::geometry() const | - |
117 | This method returns the geometry of the platform dependent system tray icon on the screen. | - |
118 | */ | - |
119 | - | |
120 | /*! | - |
121 | \fn void QPlatformSystemTrayIcon::showMessage(const QString &title, const QString &msg, | - |
122 | const QIcon &icon, MessageIcon iconType, int msecs) | - |
123 | Shows a balloon message for the entry with the given \a title, message \a msg and \a icon for | - |
124 | the time specified in \a msecs. \a iconType is used as a hint for the implementing platform. | - |
125 | \sa QSystemTrayIcon::showMessage() | - |
126 | */ | - |
127 | - | |
128 | /*! | - |
129 | \fn bool QPlatformSystemTrayIcon::isSystemTrayAvailable() const | - |
130 | Returns \c true if the system tray is available on the platform. | - |
131 | */ | - |
132 | - | |
133 | /*! | - |
134 | \fn bool QPlatformSystemTrayIcon::supportsMessages() const | - |
135 | Returns \c true if the system tray supports messages on the platform. | - |
136 | */ | - |
137 | - | |
138 | /*! | - |
139 | \fn void QPlatformSystemTrayIcon::activated(QPlatformSystemTrayIcon::ActivationReason reason) | - |
140 | This signal is emitted when the user activates the system tray icon. | - |
141 | \a reason specifies the reason for activation. | - |
142 | \sa QSystemTrayIcon::ActivationReason | - |
143 | */ | - |
144 | - | |
145 | /*! | - |
146 | \fn void QPlatformSystemTrayIcon::messageClicked() | - |
147 | - | |
148 | This signal is emitted when the message displayed using showMessage() | - |
149 | was clicked by the user. | - |
150 | - | |
151 | \sa activated() | - |
152 | */ | - |
153 | - | |
154 | /*! | - |
155 | This method is called in case there is no QPlatformMenu available when | - |
156 | updating the menu. This allows the abstraction to provide a menu for the | - |
157 | system tray icon even if normally a non-native menu is used. | - |
158 | - | |
159 | The default implementation returns a null pointer. | - |
160 | - | |
161 | \sa updateMenu() | - |
162 | \since 5.3 | - |
163 | */ | - |
164 | - | |
165 | QPlatformMenu *QPlatformSystemTrayIcon::createMenu() const | - |
166 | { | - |
167 | return Q_NULLPTR; never executed: return nullptr; | 0 |
168 | } | - |
169 | - | |
170 | QT_END_NAMESPACE | - |
171 | - | |
172 | #include "moc_qplatformsystemtrayicon.cpp" | - |
173 | - | |
174 | #endif // QT_NO_SYSTEMTRAYICON | - |
Source code | Switch to Preprocessed file |