src/corelib/tools/qsize.cpp File Reference

#include "qsize.h"
#include "qdatastream.h"
#include "qdebug.h"

Include dependency graph for qsize.cpp:

Go to the source code of this file.

Functions

QDataStreamoperator<< (QDataStream &s, const QSize &sz)
QDataStreamoperator>> (QDataStream &s, QSize &sz)
QDebug operator<< (QDebug dbg, const QSize &s)
QDataStreamoperator<< (QDataStream &s, const QSizeF &sz)
QDataStreamoperator>> (QDataStream &s, QSizeF &sz)
QDebug operator<< (QDebug dbg, const QSizeF &s)


Function Documentation

QDebug operator<< ( QDebug  dbg,
const QSizeF s 
)

Definition at line 866 of file qsize.cpp.

00866                                                {
00867     dbg.nospace() << "QSizeF(" << s.width() << ',' << s.height() << ')';
00868     return dbg.space();
00869 }

QDataStream& operator<< ( QDataStream s,
const QSizeF sz 
) [related]

Definition at line 838 of file qsize.cpp.

00839 {
00840     s << double(sz.width()) << double(sz.height());
00841     return s;
00842 }

QDebug operator<< ( QDebug  dbg,
const QSize s 
)

Definition at line 436 of file qsize.cpp.

00436                                               {
00437     dbg.nospace() << "QSize(" << s.width() << ',' << s.height() << ')';
00438     return dbg.space();
00439 }

QDataStream& operator<< ( QDataStream s,
const QSize sz 
) [related]

Definition at line 400 of file qsize.cpp.

00401 {
00402     if (s.version() == 1)
00403         s << (qint16)sz.width() << (qint16)sz.height();
00404     else
00405         s << (qint32)sz.width() << (qint32)sz.height();
00406     return s;
00407 }

QDataStream& operator>> ( QDataStream s,
QSizeF sz 
) [related]

Definition at line 854 of file qsize.cpp.

00855 {
00856     double w, h;
00857     s >> w;
00858     s >> h;
00859     sz.setWidth(qreal(w));
00860     sz.setHeight(qreal(h));
00861     return s;
00862 }

QDataStream& operator>> ( QDataStream s,
QSize sz 
) [related]

Definition at line 419 of file qsize.cpp.

00420 {
00421     if (s.version() == 1) {
00422         qint16 w, h;
00423         s >> w;  sz.rwidth() = w;
00424         s >> h;  sz.rheight() = h;
00425     }
00426     else {
00427         qint32 w, h;
00428         s >> w;  sz.rwidth() = w;
00429         s >> h;  sz.rheight() = h;
00430     }
00431     return s;
00432 }


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