summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformsystemtrayicon.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-04-13 12:25:47 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-04-27 09:30:27 +0000
commit121a30ccef3b6306c1da4f415fe1305dbf2dd901 (patch)
tree007bf38149c62a95bcac98d9353918c9b7fad308 /src/gui/kernel/qplatformsystemtrayicon.cpp
parent940b36850d8b825493615ac6cf1a7c382a76a214 (diff)
QPlatformSystemTrayIcon: Add signal contextMenuRequested()
Add a signal passing the global position of the context menu. For platforms that do not provide native menus, QSystemTrayIcon will show a QMenu based menu. Change-Id: I799e4a84ca38e00ea33f3c842ea4ca43ecb8c83f Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/gui/kernel/qplatformsystemtrayicon.cpp')
-rw-r--r--src/gui/kernel/qplatformsystemtrayicon.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformsystemtrayicon.cpp b/src/gui/kernel/qplatformsystemtrayicon.cpp
index 5481997b3c..296beda0f9 100644
--- a/src/gui/kernel/qplatformsystemtrayicon.cpp
+++ b/src/gui/kernel/qplatformsystemtrayicon.cpp
@@ -140,10 +140,19 @@ QPlatformSystemTrayIcon::~QPlatformSystemTrayIcon()
*/
/*!
+ \fn void QPlatformSystemTrayIcon::contextMenuRequested(QPoint globalPos, const QPlatformScreen *screen)
+ This signal is emitted when the context menu is requested.
+ In particular, on platforms where createMenu() returns nullptr,
+ its emission will cause QSystemTrayIcon to show a QMenu-based menu.
+ \sa activated()
+ \since 5.10
+*/
+
+/*!
\fn void QPlatformSystemTrayIcon::activated(QPlatformSystemTrayIcon::ActivationReason reason)
This signal is emitted when the user activates the system tray icon.
\a reason specifies the reason for activation.
- \sa QSystemTrayIcon::ActivationReason
+ \sa QSystemTrayIcon::ActivationReason, contextMenuRequested()
*/
/*!