1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
|
/****************************************************************************
** $Id: qt/datastreamformat.doc 3.0.3 edited Oct 12 12:18 $
**
** Documentation of the Format of the QDataStream operators
**
** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
**
** This file is part of the Qt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
** LICENSE.QPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
** licenses may use this file in accordance with the Qt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about Qt Commercial License Agreements.
** See http://www.trolltech.com/qpl/ for QPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
/*!
\page datastreamformat.html
\title Format of the QDataStream Operators
The \l QDataStream allows you to serialize some of the Qt data types.
The table below lists the data types that QDataStream can serialize
and how they are represented.
\list
\i Q_INT8
\list
\i signed byte
\endlist
\i Q_INT16
\list
\i signed 16 bit integer
\endlist
\i Q_INT32
\list
\i signed 32 bit integer
\endlist
\i Q_UINT8
\list
\i unsigned byte
\endlist
\i Q_UINT16
\list
\i unsigned 16 bit integer
\endlist
\i Q_UINT32
\list
\i unsigned 32 bit integer
\endlist
\i float
\list
\i 32-bit floating point number using the standard IEEE-754 format
\endlist
\i double
\list
\i 64-bit floating point number using the standard IEEE-754 format
\endlist
\i char *
\list
\i The size of the string including the terminating 0 (Q_UINT32)
\i The string bytes including the terminating 0
\endlist
The null string is represented as \c {(Q_UINT32) 0}.
\i QBitArray
\list
\i The array size (Q_UINT32)
\i The array bits, i.e. (size + 7)/8 bytes
\endlist
\i QBrush
\list
\i The brush style (Q_UINT8)
\i The brush color (QColor)
\i If style is CustomPattern, the brush pixmap (QPixmap)
\endlist
\i QByteArray
\list
\i The array size (Q_UINT32)
\i The array bytes, i.e. size bytes
\endlist
\i QCString
\list
\i The size of the string including the terminating 0 (Q_UINT32)
\i The string bytes including the terminating 0
\endlist
The null string is represented as \c {(Q_UINT32) 0}.
\i \l QColor
\list \i RGB value serialized as a Q_UINT32 \endlist
\i QColorGroup
\list
\i foreground (QBrush)
\i button (QBrush)
\i light (QBrush)
\i midLight (QBrush)
\i dark (QBrush)
\i mid (QBrush)
\i text (QBrush)
\i brightText (QBrush)
\i ButtonText (QBrush)
\i base (QBrush)
\i background (QBrush)
\i shadow (QBrush)
\i highlight (QBrush)
\i highlightedText (QBrush)
\endlist
\i QCursor
\list
\i Shape id (Q_INT16)
\i If shape is BitmapCursor: The bitmap (QPixmap), mask (QPixmap) and hot spot (QPoint)
\endlist
\i QDate
\list
\i Julian day (Q_UINT32)
\endlist
\i QDateTime
\list
\i Date (QDate)
\i Time (QTime)
\endlist
\i QFont
\list
\i The point size (Q_INT16)
\i The style hint (Q_UINT8)
\i The char set (Q_UINT8)
\i The weight (Q_UINT8)
\i The font bits (Q_UINT8)
\endlist
\i QImage
\list
\i Save it as a PNG image.
\endlist
\i QMap
\list
\i The number of items (Q_UINT32)
\i For all items, the key and value
\endlist
\i QPalette
\list
\i active (QColorGroup)
\i disabled (QColorGroup)
\i inactive (QColorGroup)
\endlist
\i QPen
\list
\i The pen styles (Q_UINT8)
\i The pen width (Q_UINT8)
\i The pen color (QColor)
\endlist
\i QPicture
\list
\i The size of the picture data (Q_UINT32)
\i The raw bytes of picture data (char)
\endlist
\i QPixmap
\list
\i Save it as a PNG image.
\endlist
\i QPoint
\list
\i The x coordinate (Q_INT32)
\i The y coordinate (Q_INT32)
\endlist
\i QPointArray
\list
\i The array size (Q_UINT32)
\i The array points (QPoint)
\endlist
\i QRect
\list
\i left (Q_INT32)
\i top (Q_INT32)
\i right (Q_INT32)
\i bottom (Q_INT32)
\endlist
\i QRegion
\list
\i The size of the data, i.e. 8 + 16 * (number of rectangles) (Q_UINT32)
\i QRGN_RECTS (Q_INT32)
\i The number of rectangles (Q_UINT32)
\i The rectangles in sequential order (QRect)
\endlist
\i QSize
\list
\i width (Q_INT32)
\i height (Q_INT32)
\endlist
\i QString
\list
\i If the string is null: 0xffffffff (Q_UINT32)
\i Otherwise: The string length (Q_UINT32) followed by the
data in UTF-16
\endlist
\i QTime
\list
\i Milliseconds since midnight (Q_UINT32)
\endlist
\i QValueList
\list
\i The number of list elements (Q_UINT32)
\i All the elements in sequential order
\endlist
\i QVariant
\list
\i The type of the data (Q_UINT32)
\i The data of the specified type
\endlist
\i QWMatrix
\list
\i m11 (double)
\i m12 (double)
\i m21 (double)
\i m22 (double)
\i dx (double)
\i dy (double)
\endlist
\endlist
*/
|