src/corelib/tools/qrect.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
  1270     \relates QRect
  1270     \relates QRect
  1271 
  1271 
  1272     Writes the given \a rectangle to the given \a stream, and returns
  1272     Writes the given \a rectangle to the given \a stream, and returns
  1273     a reference to the stream.
  1273     a reference to the stream.
  1274 
  1274 
  1275     \sa {Format of the QDataStream Operators}
  1275     \sa {Serializing Qt Data Types}
  1276 */
  1276 */
  1277 
  1277 
  1278 QDataStream &operator<<(QDataStream &s, const QRect &r)
  1278 QDataStream &operator<<(QDataStream &s, const QRect &r)
  1279 {
  1279 {
  1280     if (s.version() == 1)
  1280     if (s.version() == 1)
  1291     \relates QRect
  1291     \relates QRect
  1292 
  1292 
  1293     Reads a rectangle from the given \a stream into the given \a
  1293     Reads a rectangle from the given \a stream into the given \a
  1294     rectangle, and returns a reference to the stream.
  1294     rectangle, and returns a reference to the stream.
  1295 
  1295 
  1296     \sa {Format of the QDataStream Operators}
  1296     \sa {Serializing Qt Data Types}
  1297 */
  1297 */
  1298 
  1298 
  1299 QDataStream &operator>>(QDataStream &s, QRect &r)
  1299 QDataStream &operator>>(QDataStream &s, QRect &r)
  1300 {
  1300 {
  1301     if (s.version() == 1) {
  1301     if (s.version() == 1) {
  2418     \relates QRectF
  2418     \relates QRectF
  2419 
  2419 
  2420     Writes the \a rectangle to the \a stream, and returns a reference to the
  2420     Writes the \a rectangle to the \a stream, and returns a reference to the
  2421     stream.
  2421     stream.
  2422 
  2422 
  2423     \sa \link datastreamformat.html Format of the QDataStream operators \endlink
  2423     \sa {Serializing Qt Data Types}
  2424 */
  2424 */
  2425 
  2425 
  2426 QDataStream &operator<<(QDataStream &s, const QRectF &r)
  2426 QDataStream &operator<<(QDataStream &s, const QRectF &r)
  2427 {
  2427 {
  2428     s << double(r.x()) << double(r.y()) << double(r.width()) << double(r.height());
  2428     s << double(r.x()) << double(r.y()) << double(r.width()) << double(r.height());
  2435     \relates QRectF
  2435     \relates QRectF
  2436 
  2436 
  2437     Reads a \a rectangle from the \a stream, and returns a reference to the
  2437     Reads a \a rectangle from the \a stream, and returns a reference to the
  2438     stream.
  2438     stream.
  2439 
  2439 
  2440     \sa \link datastreamformat.html Format of the QDataStream operators \endlink
  2440     \sa {Serializing Qt Data Types}
  2441 */
  2441 */
  2442 
  2442 
  2443 QDataStream &operator>>(QDataStream &s, QRectF &r)
  2443 QDataStream &operator>>(QDataStream &s, QRectF &r)
  2444 {
  2444 {
  2445     double x, y, w, h;
  2445     double x, y, w, h;