qpoint.h File Reference

#include <QtCore/qnamespace.h>

Go to the source code of this file.

Classes

class   QPoint
class   QPointF

Functions

  Q_DECLARE_TYPEINFO (QPoint, Q_MOVABLE_TYPE)
Q_CORE_EXPORT QDataStream operator<< (QDataStream &, const QPoint &)
Q_CORE_EXPORT QDataStream operator>> (QDataStream &, QPoint &)
bool  operator== (const QPoint &p1, const QPoint &p2)
bool  operator!= (const QPoint &p1, const QPoint &p2)
const QPoint  operator+ (const QPoint &p1, const QPoint &p2)
const QPoint  operator- (const QPoint &p1, const QPoint &p2)
const QPoint  operator* (const QPoint &p, qreal c)
const QPoint  operator* (qreal c, const QPoint &p)
const QPoint  operator- (const QPoint &p)
const QPoint  operator/ (const QPoint &p, qreal c)
Q_CORE_EXPORT QDebug  operator<< (QDebug, const QPoint &)
  Q_DECLARE_TYPEINFO (QPointF, Q_MOVABLE_TYPE)
Q_CORE_EXPORT QDataStream operator<< (QDataStream &, const QPointF &)
Q_CORE_EXPORT QDataStream operator>> (QDataStream &, QPointF &)
bool  operator== (const QPointF &p1, const QPointF &p2)
bool  operator!= (const QPointF &p1, const QPointF &p2)
const QPointF  operator+ (const QPointF &p1, const QPointF &p2)
const QPointF  operator- (const QPointF &p1, const QPointF &p2)
const QPointF  operator* (const QPointF &p, qreal c)
const QPointF  operator* (qreal c, const QPointF &p)
const QPointF  operator- (const QPointF &p)
const QPointF  operator/ (const QPointF &p, qreal c)
Q_CORE_EXPORT QDebug  operator<< (QDebug d, const QPointF &p)

Function Documentation

Q_DECLARE_TYPEINFO ( QPoint  ,
Q_MOVABLE_TYPE   
)
Q_CORE_EXPORT QDataStream& operator<< ( QDataStream ,
const QPoint  
)
Q_CORE_EXPORT QDataStream& operator>> ( QDataStream ,
QPoint  
)
bool operator== ( const QPoint p1,
const QPoint p2 
) [inline]

Definition at line 147 of file qpoint.h.

{ return p1.xp == p2.xp && p1.yp == p2.yp; }
bool operator!= ( const QPoint p1,
const QPoint p2 
) [inline]

Definition at line 150 of file qpoint.h.

{ return p1.xp != p2.xp || p1.yp != p2.yp; }
const QPoint operator+ ( const QPoint p1,
const QPoint p2 
) [inline]

Definition at line 153 of file qpoint.h.

{ return QPoint(p1.xp+p2.xp, p1.yp+p2.yp); }
const QPoint operator- ( const QPoint p1,
const QPoint p2 
) [inline]
Examples:
MeshDisplace/displacer.h.

Definition at line 156 of file qpoint.h.

{ return QPoint(p1.xp-p2.xp, p1.yp-p2.yp); }
const QPoint operator* ( const QPoint p,
qreal  c 
) [inline]

Definition at line 159 of file qpoint.h.

{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
const QPoint operator* ( qreal  c,
const QPoint p 
) [inline]

Definition at line 162 of file qpoint.h.

{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
const QPoint operator- ( const QPoint p ) [inline]

Definition at line 165 of file qpoint.h.

{ return QPoint(-p.xp, -p.yp); }
const QPoint operator/ ( const QPoint p,
qreal  c 
) [inline]

Definition at line 175 of file qpoint.h.

{
    return QPoint(qRound(p.xp/c), qRound(p.yp/c));
}
Q_CORE_EXPORT QDebug operator<< ( QDebug  ,
const QPoint  
)
Q_DECLARE_TYPEINFO ( QPointF  ,
Q_MOVABLE_TYPE   
)
Q_CORE_EXPORT QDataStream& operator<< ( QDataStream ,
const QPointF  
)
Q_CORE_EXPORT QDataStream& operator>> ( QDataStream ,
QPointF  
)
bool operator== ( const QPointF p1,
const QPointF p2 
) [inline]

Definition at line 303 of file qpoint.h.

{
    return qFuzzyIsNull(p1.xp - p2.xp) && qFuzzyIsNull(p1.yp - p2.yp);
}
bool operator!= ( const QPointF p1,
const QPointF p2 
) [inline]

Definition at line 308 of file qpoint.h.

{
    return !qFuzzyIsNull(p1.xp - p2.xp) || !qFuzzyIsNull(p1.yp - p2.yp);
}
const QPointF operator+ ( const QPointF p1,
const QPointF p2 
) [inline]

Definition at line 313 of file qpoint.h.

{
    return QPointF(p1.xp+p2.xp, p1.yp+p2.yp);
}
const QPointF operator- ( const QPointF p1,
const QPointF p2 
) [inline]

Definition at line 318 of file qpoint.h.

{
    return QPointF(p1.xp-p2.xp, p1.yp-p2.yp);
}
const QPointF operator* ( const QPointF p,
qreal  c 
) [inline]

Definition at line 323 of file qpoint.h.

{
    return QPointF(p.xp*c, p.yp*c);
}
const QPointF operator* ( qreal  c,
const QPointF p 
) [inline]

Definition at line 328 of file qpoint.h.

{
    return QPointF(p.xp*c, p.yp*c);
}
const QPointF operator- ( const QPointF p ) [inline]

Definition at line 333 of file qpoint.h.

{
    return QPointF(-p.xp, -p.yp);
}
const QPointF operator/ ( const QPointF p,
qreal  c 
) [inline]

Definition at line 345 of file qpoint.h.

{
    return QPointF(p.xp/c, p.yp/c);
}
Q_CORE_EXPORT QDebug operator<< ( QDebug  d,
const QPointF p 
)