19#include <QtGui/private/qtguiglobal_p.h>
24#include <QTemporaryFile>
26#include "QtGui/qpa/qplatformsystemtrayicon.h"
27#include "private/qdbusmenuconnection_p.h"
31class QStatusNotifierItemAdaptor;
32class QDBusMenuAdaptor;
39 Q_PROPERTY(QString category READ category NOTIFY categoryChanged)
65 void showMessage(
const QString &title,
const QString &msg,
66 const QIcon &icon, MessageIcon iconType,
int msecs)
override;
99 void actionInvoked(uint id,
const QString &action);
100 void notificationClosed(uint id, uint reason);
101 void watcherServiceRegistered(
const QString &serviceName);
104 void setStatus(
const QString &status);
105 QTemporaryFile *tempIcon(
const QIcon &icon);
108 QDBusMenuConnection* m_dbusConnection;
110 QDBusMenuAdaptor *m_menuAdaptor;
113 QString m_instanceId;
115 QString m_defaultStatus;
118 QString m_messageTitle;
121 QTemporaryFile *m_tempIcon;
123 QIcon m_attentionIcon;
124 QTemporaryFile *m_tempAttentionIcon;
125 QString m_attentionIconName;
126 QTimer m_attentionTimer;
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
static const QString KDEWatcherService
static const QString DefaultAction
static const QString KDEItemFormat
static QString tempFileTemplate()
static const QString XdgNotificationPath
static QString iconTempPath()
static const QString XdgNotificationService
QT_REQUIRE_CONFIG(systemtrayicon)
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")