1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | /* |
5 | This file was originally created by qdbusxml2cpp version 0.8 |
6 | Command line was: |
7 | qdbusxml2cpp -a statusnotifieritem ../../3rdparty/dbus-ifaces/org.kde.StatusNotifierItem.xml |
8 | |
9 | However it is maintained manually. |
10 | |
11 | It is also not part of the public API. This header file may change from |
12 | version to version without notice, or even be removed. |
13 | */ |
14 | |
15 | #ifndef QSTATUSNOTIFIERITEMADAPTER_P_H |
16 | #define QSTATUSNOTIFIERITEMADAPTER_P_H |
17 | |
18 | // |
19 | // W A R N I N G |
20 | // ------------- |
21 | // |
22 | // This file is not part of the Qt API. It exists purely as an |
23 | // implementation detail. This header file may change from version to |
24 | // version without notice, or even be removed. |
25 | // |
26 | // We mean it. |
27 | // |
28 | |
29 | #include <private/qtguiglobal_p.h> |
30 | |
31 | QT_REQUIRE_CONFIG(systemtrayicon); |
32 | |
33 | #include <QObject> |
34 | #include <QDBusAbstractAdaptor> |
35 | |
36 | #include <private/qdbustraytypes_p.h> |
37 | |
38 | QT_BEGIN_NAMESPACE |
39 | class QDBusTrayIcon; |
40 | |
41 | /* |
42 | Adaptor class for interface org.kde.StatusNotifierItem |
43 | see http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/ |
44 | (also http://www.notmart.org/misc/statusnotifieritem/) |
45 | */ |
46 | class QStatusNotifierItemAdaptor: public QDBusAbstractAdaptor |
47 | { |
48 | Q_OBJECT |
49 | Q_CLASSINFO("D-Bus Interface" , "org.kde.StatusNotifierItem" ) |
50 | Q_CLASSINFO("D-Bus Introspection" , "" |
51 | " <interface name=\"org.kde.StatusNotifierItem\">\n" |
52 | " <property access=\"read\" type=\"s\" name=\"Category\"/>\n" |
53 | " <property access=\"read\" type=\"s\" name=\"Id\"/>\n" |
54 | " <property access=\"read\" type=\"s\" name=\"Title\"/>\n" |
55 | " <property access=\"read\" type=\"s\" name=\"Status\"/>\n" |
56 | " <property access=\"read\" type=\"i\" name=\"WindowId\"/>\n" |
57 | " <property access=\"read\" type=\"s\" name=\"IconThemePath\"/>\n" |
58 | " <property access=\"read\" type=\"o\" name=\"Menu\"/>\n" |
59 | " <property access=\"read\" type=\"b\" name=\"ItemIsMenu\"/>\n" |
60 | " <property access=\"read\" type=\"s\" name=\"IconName\"/>\n" |
61 | " <property access=\"read\" type=\"a(iiay)\" name=\"IconPixmap\">\n" |
62 | " <annotation value=\"QXdgDBusImageVector\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n" |
63 | " </property>\n" |
64 | " <property access=\"read\" type=\"s\" name=\"OverlayIconName\"/>\n" |
65 | " <property access=\"read\" type=\"a(iiay)\" name=\"OverlayIconPixmap\">\n" |
66 | " <annotation value=\"QXdgDBusImageVector\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n" |
67 | " </property>\n" |
68 | " <property access=\"read\" type=\"s\" name=\"AttentionIconName\"/>\n" |
69 | " <property access=\"read\" type=\"a(iiay)\" name=\"AttentionIconPixmap\">\n" |
70 | " <annotation value=\"QXdgDBusImageVector\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n" |
71 | " </property>\n" |
72 | " <property access=\"read\" type=\"s\" name=\"AttentionMovieName\"/>\n" |
73 | " <property access=\"read\" type=\"(sa(iiay)ss)\" name=\"ToolTip\">\n" |
74 | " <annotation value=\"QXdgDBusToolTipStruct\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n" |
75 | " </property>\n" |
76 | " <method name=\"ProvideXdgActivationToken\">\n" |
77 | " <arg name=\"token\" type=\"s\" direction=\"in\"/>\n" |
78 | " </method>\n" |
79 | " <method name=\"ContextMenu\">\n" |
80 | " <arg direction=\"in\" type=\"i\" name=\"x\"/>\n" |
81 | " <arg direction=\"in\" type=\"i\" name=\"y\"/>\n" |
82 | " </method>\n" |
83 | " <method name=\"Activate\">\n" |
84 | " <arg direction=\"in\" type=\"i\" name=\"x\"/>\n" |
85 | " <arg direction=\"in\" type=\"i\" name=\"y\"/>\n" |
86 | " </method>\n" |
87 | " <method name=\"SecondaryActivate\">\n" |
88 | " <arg direction=\"in\" type=\"i\" name=\"x\"/>\n" |
89 | " <arg direction=\"in\" type=\"i\" name=\"y\"/>\n" |
90 | " </method>\n" |
91 | " <method name=\"Scroll\">\n" |
92 | " <arg direction=\"in\" type=\"i\" name=\"delta\"/>\n" |
93 | " <arg direction=\"in\" type=\"s\" name=\"orientation\"/>\n" |
94 | " </method>\n" |
95 | " <signal name=\"NewTitle\"/>\n" |
96 | " <signal name=\"NewIcon\"/>\n" |
97 | " <signal name=\"NewAttentionIcon\"/>\n" |
98 | " <signal name=\"NewOverlayIcon\"/>\n" |
99 | " <signal name=\"NewMenu\"/>\n" |
100 | " <signal name=\"NewToolTip\"/>\n" |
101 | " <signal name=\"NewStatus\">\n" |
102 | " <arg type=\"s\" name=\"status\"/>\n" |
103 | " </signal>\n" |
104 | " </interface>\n" |
105 | "" ) |
106 | public: |
107 | QStatusNotifierItemAdaptor(QDBusTrayIcon *parent); |
108 | virtual ~QStatusNotifierItemAdaptor(); |
109 | |
110 | public: // PROPERTIES |
111 | Q_PROPERTY(QString AttentionIconName READ attentionIconName) |
112 | QString attentionIconName() const; |
113 | |
114 | Q_PROPERTY(QXdgDBusImageVector AttentionIconPixmap READ attentionIconPixmap) |
115 | QXdgDBusImageVector attentionIconPixmap() const; |
116 | |
117 | Q_PROPERTY(QString AttentionMovieName READ attentionMovieName) |
118 | QString attentionMovieName() const; |
119 | |
120 | Q_PROPERTY(QString Category READ category) |
121 | QString category() const; |
122 | |
123 | Q_PROPERTY(QString IconName READ iconName) |
124 | QString iconName() const; |
125 | |
126 | Q_PROPERTY(QXdgDBusImageVector IconPixmap READ iconPixmap) |
127 | QXdgDBusImageVector iconPixmap() const; |
128 | |
129 | Q_PROPERTY(QString Id READ id) |
130 | QString id() const; |
131 | |
132 | Q_PROPERTY(bool ItemIsMenu READ itemIsMenu) |
133 | bool () const; |
134 | |
135 | Q_PROPERTY(QDBusObjectPath Menu READ menu) |
136 | QDBusObjectPath () const; |
137 | |
138 | Q_PROPERTY(QString OverlayIconName READ overlayIconName) |
139 | QString overlayIconName() const; |
140 | |
141 | Q_PROPERTY(QXdgDBusImageVector OverlayIconPixmap READ overlayIconPixmap) |
142 | QXdgDBusImageVector overlayIconPixmap() const; |
143 | |
144 | Q_PROPERTY(QString Status READ status) |
145 | QString status() const; |
146 | |
147 | Q_PROPERTY(QString Title READ title) |
148 | QString title() const; |
149 | |
150 | Q_PROPERTY(QXdgDBusToolTipStruct ToolTip READ toolTip) |
151 | QXdgDBusToolTipStruct toolTip() const; |
152 | |
153 | public Q_SLOTS: // METHODS |
154 | void Activate(int x, int y); |
155 | void (int x, int y); |
156 | void ProvideXdgActivationToken(const QString &token); |
157 | void Scroll(int delta, const QString &orientation); |
158 | void SecondaryActivate(int x, int y); |
159 | Q_SIGNALS: // SIGNALS |
160 | void NewAttentionIcon(); |
161 | void NewIcon(); |
162 | void NewOverlayIcon(); |
163 | void (); |
164 | void NewStatus(const QString &status); |
165 | void NewTitle(); |
166 | void NewToolTip(); |
167 | |
168 | private: |
169 | QDBusTrayIcon *m_trayIcon; |
170 | }; |
171 | |
172 | QT_END_NAMESPACE |
173 | |
174 | #endif // QSTATUSNOTIFIERITEMADAPTER_P_H |
175 | |