src/corelib/tools/qpoint.cpp File Reference

#include "qpoint.h"
#include "qdatastream.h"
#include "qdebug.h"

Include dependency graph for qpoint.cpp:

Go to the source code of this file.

Functions

QDataStreamoperator<< (QDataStream &s, const QPoint &p)
QDataStreamoperator>> (QDataStream &s, QPoint &p)
QDebug operator<< (QDebug dbg, const QPoint &p)
QDebug operator<< (QDebug d, const QPointF &p)
QDataStreamoperator<< (QDataStream &s, const QPointF &p)
QDataStreamoperator>> (QDataStream &s, QPointF &p)


Function Documentation

QDataStream& operator<< ( QDataStream s,
const QPointF p 
) [related]

Definition at line 682 of file qpoint.cpp.

00683 {
00684     s << double(p.x()) << double(p.y());
00685     return s;
00686 }

QDebug operator<< ( QDebug  d,
const QPointF p 
)

Definition at line 392 of file qpoint.cpp.

00393 {
00394     d << "QPointF(" << p.x() << ", " << p.y() << ")";
00395     return d;
00396 }

QDebug operator<< ( QDebug  dbg,
const QPoint p 
)

Definition at line 387 of file qpoint.cpp.

00387                                                {
00388     dbg.nospace() << "QPoint(" << p.x() << ',' << p.y() << ')';
00389     return dbg.space();
00390 }

QDataStream& operator<< ( QDataStream s,
const QPoint p 
) [related]

Definition at line 319 of file qpoint.cpp.

00320 {
00321     if (s.version() == 1)
00322         s << (qint16)p.x() << (qint16)p.y();
00323     else
00324         s << (qint32)p.x() << (qint32)p.y();
00325     return s;
00326 }

QDataStream& operator>> ( QDataStream s,
QPointF p 
) [related]

Definition at line 698 of file qpoint.cpp.

00699 {
00700     double x, y;
00701     s >> x;
00702     s >> y;
00703     p.setX(qreal(x));
00704     p.setY(qreal(y));
00705     return s;
00706 }

QDataStream& operator>> ( QDataStream s,
QPoint p 
) [related]

Definition at line 338 of file qpoint.cpp.

00339 {
00340     if (s.version() == 1) {
00341         qint16 x, y;
00342         s >> x;  p.rx() = x;
00343         s >> y;  p.ry() = y;
00344     }
00345     else {
00346         qint32 x, y;
00347         s >> x;  p.rx() = x;
00348         s >> y;  p.ry() = y;
00349     }
00350     return s;
00351 }


Generated on Thu Mar 15 13:08:38 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1