19#include <QtGui/private/qtguiglobal_p.h>
24#include <QTemporaryFile>
27#include "QtGui/qpa/qplatformsystemtrayicon.h"
28#include "private/qdbusmenuconnection_p.h"
32class QStatusNotifierItemAdaptor;
33class QDBusMenuAdaptor;
40 Q_PROPERTY(QString category READ category NOTIFY categoryChanged)
66 void showMessage(
const QString &title,
const QString &msg,
67 const QIcon &icon, MessageIcon iconType,
int msecs)
override;
100 void actionInvoked(uint id,
const QString &action);
101 void notificationClosed(uint id, uint reason);
102 void watcherServiceRegistered(
const QString &serviceName);
105 void setStatus(
const QString &status);
106 QTemporaryFile *tempIcon(
const QIcon &icon);
109 QDBusMenuConnection* m_dbusConnection;
111 QDBusMenuAdaptor *m_menuAdaptor;
114 QString m_instanceId;
116 QString m_defaultStatus;
119 QString m_messageTitle;
122 QTemporaryFile *m_tempIcon;
124 QIcon m_attentionIcon;
125 QTemporaryFile *m_tempAttentionIcon;
126 QString m_attentionIconName;
127 QTimer m_attentionTimer;
129 QSet<uint> m_ownMessageIDs;
141Q_DECLARE_METATYPE(QDBusTrayImage)
void init() override
This method is called to initialize the platform dependent implementation.
void updateMenu(QPlatformMenu *menu) override
This method is called when the system tray menu did change.
void statusChanged(QString arg)
bool isRequestingAttention() const
void showMessage(const QString &title, const QString &msg, const QIcon &icon, MessageIcon iconType, int msecs) override
Shows a balloon message for the entry with the given title, message msg and icon for the time specifi...
QString attentionIconName() const
QDBusMenuConnection * dBusConnection()
void cleanup() override
This method is called to cleanup the platform dependent implementation.
const QIcon & icon() const
QRect geometry() const override
This method returns the geometry of the platform dependent system tray icon on the screen.
QString instanceId() const
void updateIcon(const QIcon &icon) override
This method is called when the icon did change.
void updateToolTip(const QString &tooltip) override
This method is called when the tooltip text did change.
QString attentionTitle() const
bool supportsMessages() const override
Returns true if the system tray supports messages on the platform.
QDBusPlatformMenu * menu()
bool isSystemTrayAvailable() const override
Returns true if the system tray is available on the platform.
QPlatformMenu * createMenu() const override
This method allows platforms to use a different QPlatformMenu for system tray menus than what would n...
QString attentionMessage() const
const QIcon & attentionIcon() const
QDBusArgument & operator<<(QDBusArgument &argument, const QDBusTrayImage &img)
static const QString KDEWatcherService
static const QString DefaultAction
static const QString KDEItemFormat
static QString tempFileTemplate()
const QDBusArgument & operator>>(const QDBusArgument &argument, QDBusTrayImage &)
static const QString XdgNotificationPath
static QString iconTempPath()
static const QString XdgNotificationService
QT_REQUIRE_CONFIG(systemtrayicon)
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")