Qt 4.8
Classes | Functions
qpolygon.h File Reference
#include <QtCore/qvector.h>
#include <QtCore/qpoint.h>
#include <QtCore/qrect.h>

Go to the source code of this file.

Classes

class  QPolygon
 The QPolygon class provides a vector of points using integer precision. More...
 
class  QPolygonF
 The QPolygonF class provides a vector of points using floating point precision. More...
 

Functions

Q_GUI_EXPORT QDebug operator<< (QDebug, const QPolygon &)
 
Q_GUI_EXPORT QDataStreamoperator<< (QDataStream &stream, const QPolygon &polygon)
 
Q_GUI_EXPORT QDebug operator<< (QDebug, const QPolygonF &)
 
Q_GUI_EXPORT QDataStreamoperator<< (QDataStream &stream, const QPolygonF &array)
 
Q_GUI_EXPORT QDataStreamoperator>> (QDataStream &stream, QPolygon &polygon)
 
Q_GUI_EXPORT QDataStreamoperator>> (QDataStream &stream, QPolygonF &array)
 

Function Documentation

◆ operator<<() [1/4]

Q_GUI_EXPORT QDebug operator<< ( QDebug  ,
const QPolygon  
)

Definition at line 516 of file qpolygon.cpp.

517 {
518 #ifndef Q_BROKEN_DEBUG_STREAM
519  dbg.nospace() << "QPolygon(";
520  for (int i = 0; i < a.count(); ++i)
521  dbg.nospace() << a.at(i);
522  dbg.nospace() << ')';
523  return dbg.space();
524 #else
525  qWarning("This compiler doesn't support streaming QPolygon to QDebug");
526  return dbg;
527  Q_UNUSED(a);
528 #endif
529 }
long ASN1_INTEGER_get ASN1_INTEGER * a
Q_CORE_EXPORT void qWarning(const char *,...)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ operator<<() [2/4]

Q_GUI_EXPORT QDataStream& operator<< ( QDataStream stream,
const QPolygon polygon 
)
related

Definition at line 828 of file qpolygon.cpp.

829 {
830  const QVector<QPoint> &v = a;
831  return s << v;
832 }
long ASN1_INTEGER_get ASN1_INTEGER * a

◆ operator<<() [3/4]

Q_GUI_EXPORT QDebug operator<< ( QDebug  ,
const QPolygonF  
)

Definition at line 912 of file qpolygon.cpp.

913 {
914 #ifndef Q_BROKEN_DEBUG_STREAM
915  dbg.nospace() << "QPolygonF(";
916  for (int i = 0; i < a.count(); ++i)
917  dbg.nospace() << a.at(i);
918  dbg.nospace() << ')';
919  return dbg.space();
920 #else
921  qWarning("This compiler doesn't support streaming QPolygonF to QDebug");
922  return dbg;
923  Q_UNUSED(a);
924 #endif
925 }
long ASN1_INTEGER_get ASN1_INTEGER * a
Q_CORE_EXPORT void qWarning(const char *,...)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ operator<<() [4/4]

Q_GUI_EXPORT QDataStream& operator<< ( QDataStream stream,
const QPolygonF array 
)
related

Definition at line 871 of file qpolygon.cpp.

872 {
873  quint32 len = a.size();
874  uint i;
875 
876  s << len;
877  for (i = 0; i < len; ++i)
878  s << a.at(i);
879  return s;
880 }
long ASN1_INTEGER_get ASN1_INTEGER * a
unsigned int uint
Definition: qglobal.h:996
unsigned int quint32
Definition: qglobal.h:938

◆ operator>>() [1/2]

Q_GUI_EXPORT QDataStream& operator>> ( QDataStream stream,
QPolygon polygon 
)
related

Definition at line 847 of file qpolygon.cpp.

848 {
849  QVector<QPoint> &v = a;
850  return s >> v;
851 }
long ASN1_INTEGER_get ASN1_INTEGER * a

◆ operator>>() [2/2]

Q_GUI_EXPORT QDataStream& operator>> ( QDataStream stream,
QPolygonF array 
)
related

Definition at line 895 of file qpolygon.cpp.

896 {
897  quint32 len;
898  uint i;
899 
900  s >> len;
901  a.reserve(a.size() + (int)len);
902  QPointF p;
903  for (i = 0; i < len; ++i) {
904  s >> p;
905  a.insert(i, p);
906  }
907  return s;
908 }
The QPointF class defines a point in the plane using floating point precision.
Definition: qpoint.h:214
long ASN1_INTEGER_get ASN1_INTEGER * a
unsigned int uint
Definition: qglobal.h:996
unsigned int quint32
Definition: qglobal.h:938