~gabriel1984sibiu/minitube/qt5.6

« back to all changes in this revision

Viewing changes to src/platformsupport/dbustray/qstatusnotifieritemadaptor_p.h

  • Committer: Grevutiu Gabriel
  • Date: 2017-06-13 08:43:17 UTC
  • Revision ID: gabriel1984sibiu@gmail.com-20170613084317-ek0zqe0u9g3ocvi8
OriginalĀ upstreamĀ code

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
**
 
3
** Copyright (C) 2016 The Qt Company Ltd.
 
4
** Contact: https://www.qt.io/licensing/
 
5
**
 
6
** This file is part of the QtGui module of the Qt Toolkit.
 
7
**
 
8
** $QT_BEGIN_LICENSE:LGPL$
 
9
** Commercial License Usage
 
10
** Licensees holding valid commercial Qt licenses may use this file in
 
11
** accordance with the commercial license agreement provided with the
 
12
** Software or, alternatively, in accordance with the terms contained in
 
13
** a written agreement between you and The Qt Company. For licensing terms
 
14
** and conditions see https://www.qt.io/terms-conditions. For further
 
15
** information use the contact form at https://www.qt.io/contact-us.
 
16
**
 
17
** GNU Lesser General Public License Usage
 
18
** Alternatively, this file may be used under the terms of the GNU Lesser
 
19
** General Public License version 3 as published by the Free Software
 
20
** Foundation and appearing in the file LICENSE.LGPL3 included in the
 
21
** packaging of this file. Please review the following information to
 
22
** ensure the GNU Lesser General Public License version 3 requirements
 
23
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
 
24
**
 
25
** GNU General Public License Usage
 
26
** Alternatively, this file may be used under the terms of the GNU
 
27
** General Public License version 2.0 or (at your option) the GNU General
 
28
** Public license version 3 or any later version approved by the KDE Free
 
29
** Qt Foundation. The licenses are as published by the Free Software
 
30
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
 
31
** included in the packaging of this file. Please review the following
 
32
** information to ensure the GNU General Public License requirements will
 
33
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
 
34
** https://www.gnu.org/licenses/gpl-3.0.html.
 
35
**
 
36
** $QT_END_LICENSE$
 
37
**
 
38
****************************************************************************/
 
39
 
 
40
/*
 
41
    This file was originally created by qdbusxml2cpp version 0.8
 
42
    Command line was:
 
43
    qdbusxml2cpp -a statusnotifieritem ../../3rdparty/dbus-ifaces/org.kde.StatusNotifierItem.xml
 
44
 
 
45
    However it is maintained manually.
 
46
 
 
47
    It is also not part of the public API. This header file may change from
 
48
    version to version without notice, or even be removed.
 
49
*/
 
50
 
 
51
#ifndef QSTATUSNOTIFIERITEMADAPTER_P_H
 
52
#define QSTATUSNOTIFIERITEMADAPTER_P_H
 
53
 
 
54
//
 
55
//  W A R N I N G
 
56
//  -------------
 
57
//
 
58
// This file is not part of the Qt API.  It exists purely as an
 
59
// implementation detail.  This header file may change from version to
 
60
// version without notice, or even be removed.
 
61
//
 
62
// We mean it.
 
63
//
 
64
 
 
65
#ifndef QT_NO_SYSTEMTRAYICON
 
66
 
 
67
#include <QtCore/QObject>
 
68
#include <QtDBus/QtDBus>
 
69
 
 
70
#include "qdbustraytypes_p.h"
 
71
 
 
72
QT_BEGIN_NAMESPACE
 
73
class QDBusTrayIcon;
 
74
 
 
75
/*
 
76
    Adaptor class for interface org.kde.StatusNotifierItem
 
77
    see http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/
 
78
    (also http://www.notmart.org/misc/statusnotifieritem/)
 
79
*/
 
80
class QStatusNotifierItemAdaptor: public QDBusAbstractAdaptor
 
81
{
 
82
    Q_OBJECT
 
83
    Q_CLASSINFO("D-Bus Interface", "org.kde.StatusNotifierItem")
 
84
    Q_CLASSINFO("D-Bus Introspection", ""
 
85
"  <interface name=\"org.kde.StatusNotifierItem\">\n"
 
86
"    <property access=\"read\" type=\"s\" name=\"Category\"/>\n"
 
87
"    <property access=\"read\" type=\"s\" name=\"Id\"/>\n"
 
88
"    <property access=\"read\" type=\"s\" name=\"Title\"/>\n"
 
89
"    <property access=\"read\" type=\"s\" name=\"Status\"/>\n"
 
90
"    <property access=\"read\" type=\"i\" name=\"WindowId\"/>\n"
 
91
"    <property access=\"read\" type=\"s\" name=\"IconThemePath\"/>\n"
 
92
"    <property access=\"read\" type=\"o\" name=\"Menu\"/>\n"
 
93
"    <property access=\"read\" type=\"b\" name=\"ItemIsMenu\"/>\n"
 
94
"    <property access=\"read\" type=\"s\" name=\"IconName\"/>\n"
 
95
"    <property access=\"read\" type=\"a(iiay)\" name=\"IconPixmap\">\n"
 
96
"      <annotation value=\"QXdgDBusImageVector\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"
 
97
"    </property>\n"
 
98
"    <property access=\"read\" type=\"s\" name=\"OverlayIconName\"/>\n"
 
99
"    <property access=\"read\" type=\"a(iiay)\" name=\"OverlayIconPixmap\">\n"
 
100
"      <annotation value=\"QXdgDBusImageVector\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"
 
101
"    </property>\n"
 
102
"    <property access=\"read\" type=\"s\" name=\"AttentionIconName\"/>\n"
 
103
"    <property access=\"read\" type=\"a(iiay)\" name=\"AttentionIconPixmap\">\n"
 
104
"      <annotation value=\"QXdgDBusImageVector\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"
 
105
"    </property>\n"
 
106
"    <property access=\"read\" type=\"s\" name=\"AttentionMovieName\"/>\n"
 
107
"    <property access=\"read\" type=\"(sa(iiay)ss)\" name=\"ToolTip\">\n"
 
108
"      <annotation value=\"QXdgDBusToolTipStruct\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"
 
109
"    </property>\n"
 
110
"    <method name=\"ContextMenu\">\n"
 
111
"      <arg direction=\"in\" type=\"i\" name=\"x\"/>\n"
 
112
"      <arg direction=\"in\" type=\"i\" name=\"y\"/>\n"
 
113
"    </method>\n"
 
114
"    <method name=\"Activate\">\n"
 
115
"      <arg direction=\"in\" type=\"i\" name=\"x\"/>\n"
 
116
"      <arg direction=\"in\" type=\"i\" name=\"y\"/>\n"
 
117
"    </method>\n"
 
118
"    <method name=\"SecondaryActivate\">\n"
 
119
"      <arg direction=\"in\" type=\"i\" name=\"x\"/>\n"
 
120
"      <arg direction=\"in\" type=\"i\" name=\"y\"/>\n"
 
121
"    </method>\n"
 
122
"    <method name=\"Scroll\">\n"
 
123
"      <arg direction=\"in\" type=\"i\" name=\"delta\"/>\n"
 
124
"      <arg direction=\"in\" type=\"s\" name=\"orientation\"/>\n"
 
125
"    </method>\n"
 
126
"    <signal name=\"NewTitle\"/>\n"
 
127
"    <signal name=\"NewIcon\"/>\n"
 
128
"    <signal name=\"NewAttentionIcon\"/>\n"
 
129
"    <signal name=\"NewOverlayIcon\"/>\n"
 
130
"    <signal name=\"NewToolTip\"/>\n"
 
131
"    <signal name=\"NewStatus\">\n"
 
132
"      <arg type=\"s\" name=\"status\"/>\n"
 
133
"    </signal>\n"
 
134
"  </interface>\n"
 
135
        "")
 
136
public:
 
137
    QStatusNotifierItemAdaptor(QDBusTrayIcon *parent);
 
138
    virtual ~QStatusNotifierItemAdaptor();
 
139
 
 
140
public: // PROPERTIES
 
141
    Q_PROPERTY(QString AttentionIconName READ attentionIconName)
 
142
    QString attentionIconName() const;
 
143
 
 
144
    Q_PROPERTY(QXdgDBusImageVector AttentionIconPixmap READ attentionIconPixmap)
 
145
    QXdgDBusImageVector attentionIconPixmap() const;
 
146
 
 
147
    Q_PROPERTY(QString AttentionMovieName READ attentionMovieName)
 
148
    QString attentionMovieName() const;
 
149
 
 
150
    Q_PROPERTY(QString Category READ category)
 
151
    QString category() const;
 
152
 
 
153
    Q_PROPERTY(QString IconName READ iconName)
 
154
    QString iconName() const;
 
155
 
 
156
    Q_PROPERTY(QXdgDBusImageVector IconPixmap READ iconPixmap)
 
157
    QXdgDBusImageVector iconPixmap() const;
 
158
 
 
159
    Q_PROPERTY(QString Id READ id)
 
160
    QString id() const;
 
161
 
 
162
    Q_PROPERTY(bool ItemIsMenu READ itemIsMenu)
 
163
    bool itemIsMenu() const;
 
164
 
 
165
    Q_PROPERTY(QDBusObjectPath Menu READ menu)
 
166
    QDBusObjectPath menu() const;
 
167
 
 
168
    Q_PROPERTY(QString OverlayIconName READ overlayIconName)
 
169
    QString overlayIconName() const;
 
170
 
 
171
    Q_PROPERTY(QXdgDBusImageVector OverlayIconPixmap READ overlayIconPixmap)
 
172
    QXdgDBusImageVector overlayIconPixmap() const;
 
173
 
 
174
    Q_PROPERTY(QString Status READ status)
 
175
    QString status() const;
 
176
 
 
177
    Q_PROPERTY(QString Title READ title)
 
178
    QString title() const;
 
179
 
 
180
    Q_PROPERTY(QXdgDBusToolTipStruct ToolTip READ toolTip)
 
181
    QXdgDBusToolTipStruct toolTip() const;
 
182
 
 
183
public Q_SLOTS: // METHODS
 
184
    void Activate(int x, int y);
 
185
    void ContextMenu(int x, int y);
 
186
    void Scroll(int delta, const QString &orientation);
 
187
    void SecondaryActivate(int x, int y);
 
188
Q_SIGNALS: // SIGNALS
 
189
    void NewAttentionIcon();
 
190
    void NewIcon();
 
191
    void NewOverlayIcon();
 
192
    void NewStatus(const QString &status);
 
193
    void NewTitle();
 
194
    void NewToolTip();
 
195
 
 
196
private:
 
197
    QDBusTrayIcon *m_trayIcon;
 
198
};
 
199
 
 
200
QT_END_NAMESPACE
 
201
#endif // QT_NO_SYSTEMTRAYICON
 
202
#endif // QSTATUSNOTIFIERITEMADAPTER_P_H