6#include <QtCore/qdebug.h>
7#include <QtCore/qdatastream.h>
14
15
16
17
18
19
20
21
22
23
24
25
26 bits.ctype = qCountTrailingZeroBits(quint32(type));
31 return QLayoutPolicy::ControlType(1 << bits.ctype);
34#ifndef QT_NO_DATASTREAM
37
38
39
40
41
42
46 quint32 data = (policy.bits.horPolicy |
47 policy.bits.verPolicy << 4 |
48 policy.bits.hfw << 8 |
49 policy.bits.ctype << 9 |
50 policy.bits.wfh << 14 |
52 policy.bits.verStretch << 16 |
53 policy.bits.horStretch << 24);
54 return stream << data;
57#define VALUE_OF_BITS(data, bitstart, bitcount) ((data >> bitstart) & ((1
<< bitcount) -1
))
60
61
62
63
64
65
75 policy.bits.padding = 0;
82#ifndef QT_NO_DEBUG_STREAM
85 QDebugStateSaver saver(dbg);
86 dbg.nospace() <<
"QLayoutPolicy(horizontalPolicy = " << p.horizontalPolicy()
87 <<
", verticalPolicy = " << p.verticalPolicy() <<
')';
94#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)
QDebug operator<<(QDebug dbg, const QLayoutPolicy &p)
#define VALUE_OF_BITS(data, bitstart, bitcount)