24#include <qpa/qplatformnativeinterface.h>
25#include <qpa/qplatformsystemtrayicon.h>
26#include <qpa/qplatformtheme.h>
27#include <private/qguiapplication_p.h>
30#ifndef QT_NO_SYSTEMTRAYICON
90#ifndef QT_NO_CONTEXTMENU
92 q->contextMenu()->popup(globalPos);
98 emit q->messageClicked();
122#if QT_CONFIG(wheelevent)
162 , mTrayIcon(trayIcon)
171 void systemTrayWindowChanged(
QScreen *)
263 addPlatformMenu(
menu);
277#if QT_CONFIG(tooltip)
285 if (
sys &&
sys->isSystemTrayAvailable())
299 return sys->supportsMessages();
322#include "qsystemtrayicon_x11.moc"
static void hideBalloon()
static bool isBalloonVisible()
static void updateBalloonPosition(const QPoint &pos)
static void showBalloon(const QIcon &icon, const QString &title, const QString &msg, QSystemTrayIcon *trayIcon, const QPoint &pos, int timeout, bool showArrow=true)
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
static QPlatformTheme * platformTheme()
static QPlatformNativeInterface * platformNativeInterface()
QScreen * primaryScreen
the primary (or default) screen of the application.
QString platformName
The name of the underlying platform plugin.
The QIcon class provides scalable icons in different modes and states.
The QMoveEvent class contains event parameters for move events.
static QObjectPrivate * get(QObject *o)
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Q_WEAK_OVERLOAD void setObjectName(const QString &name)
Sets the object's name to name.
The QPaintEvent class contains event parameters for paint events.
The QPainter class performs low-level painting on widgets and other paint devices.
constexpr QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr QPoint center() const noexcept
Returns the center point of the rectangle.
The QResizeEvent class contains event parameters for resize events.
The QScreen class is used to query screen properties. \inmodule QtGui.
QPointF globalPosition() const
Returns the position of the point in this event on the screen or virtual desktop.
Qt::MouseButton button() const
Returns the button that caused the event.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static bool isSystemTrayAvailable_sys()
~QSystemTrayIconPrivate()
QSystemTrayWatcher * trayWatcher
QRect geometry_sys() const
static bool supportsMessages_sys()
QPlatformSystemTrayIcon * qpa_sys
void showMessage_sys(const QString &title, const QString &msg, const QIcon &icon, QSystemTrayIcon::MessageIcon msgIcon, int msecs)
QSystemTrayIcon * systemTrayIcon() const
virtual void moveEvent(QMoveEvent *) override
This event handler can be reimplemented in a subclass to receive widget move events which are passed ...
virtual bool event(QEvent *) override
This virtual function receives events to an object and should return true if the event e was recogniz...
virtual void mouseDoubleClickEvent(QMouseEvent *ev) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse double click...
virtual void paintEvent(QPaintEvent *) override
This event handler can be reimplemented in a subclass to receive paint events passed in event.
QRect globalGeometry() const
virtual void resizeEvent(QResizeEvent *) override
This event handler can be reimplemented in a subclass to receive widget resize events which are passe...
QSystemTrayIconSys(QSystemTrayIcon *q)
virtual void mousePressEvent(QMouseEvent *ev) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse press events...
The QSystemTrayIcon class provides an icon for an application in the system tray.
MessageIcon
This enum describes the icon that is shown when a balloon message is displayed.
QSystemTrayWatcher(QSystemTrayIcon *trayIcon)
Combined button and popup list for selecting options.
@ WA_TranslucentBackground
#define QByteArrayLiteral(str)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLsizei const GLchar * message
GLdouble GLdouble GLdouble GLdouble q
decorationRoleName setToolTip
#define QStringLiteral(str)
static unsigned long locateSystemTray()