6#include <QtCore/qdebug.h>
7#include <QtCore/qdatastream.h>
12
13
14
15
19
20
21
22
23
24
25
26
27
28
29
30
31 bits.ctype = qCountTrailingZeroBits(quint32(type));
36 return QLayoutPolicy::ControlType(1 << bits.ctype);
39#ifndef QT_NO_DATASTREAM
42
43
44
45
46
47
51 quint32 data = (policy.bits.horPolicy |
52 policy.bits.verPolicy << 4 |
53 policy.bits.hfw << 8 |
54 policy.bits.ctype << 9 |
55 policy.bits.wfh << 14 |
57 policy.bits.verStretch << 16 |
58 policy.bits.horStretch << 24);
59 return stream << data;
62#define VALUE_OF_BITS(data, bitstart, bitcount) ((data >> bitstart) & ((1
<< bitcount) -1
))
65
66
67
68
69
70
80 policy.bits.padding = 0;
87#ifndef QT_NO_DEBUG_STREAM
90 QDebugStateSaver saver(dbg);
91 dbg.nospace() <<
"QLayoutPolicy(horizontalPolicy = " << p.horizontalPolicy()
92 <<
", verticalPolicy = " << p.verticalPolicy() <<
')';
99#include "moc_qlayoutpolicy_p.cpp"
friend QDataStream & operator>>(QDataStream &, QLayoutPolicy &)
Reads the size policy from the data stream stream.
friend QDataStream & operator<<(QDataStream &, const QLayoutPolicy &)
Writes the size policy to the data stream stream.
Q_GUI_EXPORT void setControlType(ControlType type)
Combined button and popup list for selecting options.
QDebug operator<<(QDebug dbg, const QLayoutPolicy &p)
#define VALUE_OF_BITS(data, bitstart, bitcount)