Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qdbustraytypes_p.h
Go to the documentation of this file.
1// Copyright (C) 2009 Marco Martin <notmart@gmail.com>
2// Copyright (C) 2016 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5
6#ifndef QDBUSTRAYTYPES_P_H
7#define QDBUSTRAYTYPES_P_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists for the convenience
14// of other Qt classes. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QtGui/private/qtguiglobal_p.h>
21
23
24#include <QObject>
25#include <QString>
26#include <QDBusArgument>
27#include <QDBusConnection>
28#include <QDBusObjectPath>
29#include <QPixmap>
30
31QT_BEGIN_NAMESPACE
32
33// Custom message type to send icons across D-Bus
34struct QXdgDBusImageStruct
35{
36 QXdgDBusImageStruct() { }
37 QXdgDBusImageStruct(int w, int h)
38 : width(w), height(h), data(width * height * 4, 0) { }
39 int width;
40 int height;
41 QByteArray data;
42};
44
45using QXdgDBusImageVector = QList<QXdgDBusImageStruct>;
46
48
49// Custom message type to send tooltips across D-Bus
58
59const QDBusArgument &operator<<(QDBusArgument &argument, const QXdgDBusImageStruct &icon);
60const QDBusArgument &operator>>(const QDBusArgument &argument, QXdgDBusImageStruct &icon);
61
62const QDBusArgument &operator<<(QDBusArgument &argument, const QXdgDBusImageVector &iconVector);
63const QDBusArgument &operator>>(const QDBusArgument &argument, QXdgDBusImageVector &iconVector);
64
65const QDBusArgument &operator<<(QDBusArgument &argument, const QXdgDBusToolTipStruct &toolTip);
66const QDBusArgument &operator>>(const QDBusArgument &argument, QXdgDBusToolTipStruct &toolTip);
67
68QT_END_NAMESPACE
69
70QT_DECL_METATYPE_EXTERN(QXdgDBusImageStruct, Q_GUI_EXPORT)
71QT_DECL_METATYPE_EXTERN(QXdgDBusImageVector, Q_GUI_EXPORT)
72QT_DECL_METATYPE_EXTERN(QXdgDBusToolTipStruct, Q_GUI_EXPORT)
73
74#endif // QDBUSTRAYTYPES_P_H
QT_REQUIRE_CONFIG(systemtrayicon)
const QDBusArgument & operator>>(const QDBusArgument &argument, QXdgDBusImageVector &iconVector)
static const int IconNormalMediumSize
const QDBusArgument & operator>>(const QDBusArgument &argument, QXdgDBusImageStruct &icon)
const QDBusArgument & operator>>(const QDBusArgument &argument, QXdgDBusToolTipStruct &toolTip)
static const int IconNormalSmallSize
QXdgDBusImageVector iconToQXdgDBusImageVector(const QIcon &icon)
const QDBusArgument & operator<<(QDBusArgument &argument, const QXdgDBusImageStruct &icon)
const QDBusArgument & operator<<(QDBusArgument &argument, const QXdgDBusToolTipStruct &toolTip)
Q_DECLARE_TYPEINFO(QXdgDBusImageStruct, Q_RELOCATABLE_TYPE)
Q_DECLARE_TYPEINFO(QXdgDBusToolTipStruct, Q_RELOCATABLE_TYPE)
QDataStream & operator<<(QDataStream &stream, const QImage &image)
[0]
Definition qimage.cpp:4006
QXdgDBusImageVector image