Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwidgetitemdata_p.h
Go to the documentation of this file.
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#ifndef QWIDGETITEMDATA_P_H
5#define QWIDGETITEMDATA_P_H
6
7#include <QtWidgets/private/qtwidgetsglobal_p.h>
8#include <QtCore/qdatastream.h>
9#include <QtCore/qvariant.h>
10
11//
12// W A R N I N G
13// -------------
14//
15// This file is not part of the Qt API. It exists purely as an
16// implementation detail. This header file may change from version to
17// version without notice, or even be removed.
18//
19// We mean it.
20//
21
23
25{
26public:
27 inline QWidgetItemData() : role(-1) {}
28 inline QWidgetItemData(int r, const QVariant &v) : role(r), value(v) {}
29 int role;
31 inline bool operator==(const QWidgetItemData &other) const { return role == other.role && value == other.value; }
32};
34
35#ifndef QT_NO_DATASTREAM
36
38{
39 in >> data.role;
40 in >> data.value;
41 return in;
42}
43
45{
46 out << data.role;
47 out << data.value;
48 return out;
49}
50
51#endif // QT_NO_DATASTREAM
52
54
55#endif // QWIDGETITEMDATA_P_H
\inmodule QtCore\reentrant
Definition qdatastream.h:46
\inmodule QtCore
Definition qvariant.h:65
QWidgetItemData(int r, const QVariant &v)
bool operator==(const QWidgetItemData &other) const
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLsizei const GLfloat * v
[13]
GLboolean r
[2]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint in
@ Q_RELOCATABLE_TYPE
Definition qtypeinfo.h:158
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
Definition qtypeinfo.h:180
QDataStream & operator<<(QDataStream &out, const QWidgetItemData &data)
QDataStream & operator>>(QDataStream &in, QWidgetItemData &data)
QTextStream out(stdout)
[7]
QSharedPointer< T > other(t)
[5]