57 QPoint(
int xpos,
int ypos);
66 int manhattanLength()
const;
72 QPoint &operator-=(
const QPoint &p);
74 QPoint &operator*=(
float c);
75 QPoint &operator*=(
double c);
76 QPoint &operator*=(
int c);
78 QPoint &operator/=(qreal c);
80 friend inline bool operator==(
const QPoint &,
const QPoint &);
81 friend inline bool operator!=(
const QPoint &,
const QPoint &);
82 friend inline const QPoint
operator+(
const QPoint &,
const QPoint &);
83 friend inline const QPoint
operator-(
const QPoint &,
const QPoint &);
84 friend inline const QPoint
operator*(
const QPoint &,
float);
85 friend inline const QPoint
operator*(
float,
const QPoint &);
86 friend inline const QPoint
operator*(
const QPoint &,
double);
87 friend inline const QPoint
operator*(
double,
const QPoint &);
88 friend inline const QPoint
operator*(
const QPoint &,
int);
89 friend inline const QPoint
operator*(
int,
const QPoint &);
90 friend inline const QPoint
operator-(
const QPoint &);
91 friend inline const QPoint
operator/(
const QPoint &, qreal);
96 #if defined(Q_OS_MAC) && !defined(Q_OS_IOS)
110 #ifndef QT_NO_DATASTREAM
123 { xp = xpos; yp = ypos; }
126 {
return xp == 0 && yp == 0; }
147 { xp+=p.xp; yp+=p.yp;
return *
this; }
150 { xp-=p.xp; yp-=p.yp;
return *
this; }
153 { xp = qRound(xp*c); yp = qRound(yp*c);
return *
this; }
156 { xp = qRound(xp*c); yp = qRound(yp*c);
return *
this; }
159 { xp = xp*
c; yp = yp*
c;
return *
this; }
162 {
return p1.xp == p2.xp && p1.yp == p2.yp; }
165 {
return p1.xp != p2.xp || p1.yp != p2.yp; }
168 {
return QPoint(p1.xp+p2.xp, p1.yp+p2.yp); }
171 {
return QPoint(p1.xp-p2.xp, p1.yp-p2.yp); }
174 {
return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
177 {
return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
180 {
return QPoint(p.xp*c, p.yp*c); }
183 {
return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
186 {
return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
189 {
return QPoint(p.xp*c, p.yp*c); }
192 {
return QPoint(-p.xp, -p.yp); }
203 return QPoint(qRound(p.xp/c), qRound(p.yp/c));
206 #ifndef QT_NO_DEBUG_STREAM
219 QPointF(qreal xpos, qreal ypos);
221 qreal manhattanLength()
const;
262 #ifndef QT_NO_DATASTREAM
279 return qIsNull(xp) && qIsNull(yp);
321 xp-=p.xp; yp-=p.yp;
return *
this;
326 xp*=
c; yp*=
c;
return *
this;
331 return qFuzzyIsNull(p1.xp - p2.xp) && qFuzzyIsNull(p1.yp - p2.yp);
336 return !qFuzzyIsNull(p1.xp - p2.xp) || !qFuzzyIsNull(p1.yp - p2.yp);
341 return QPointF(p1.xp+p2.xp, p1.yp+p2.yp);
346 return QPointF(p1.xp-p2.xp, p1.yp-p2.yp);
351 return QPointF(p.xp*c, p.yp*c);
356 return QPointF(p.xp*c, p.yp*c);
373 return QPointF(p.xp/c, p.yp/c);
378 return QPoint(qRound(xp), qRound(yp));
381 #ifndef QT_NO_DEBUG_STREAM
const QPoint operator/(const QPoint &p, qreal c)
QPoint & operator*=(float c)
QByteArray & operator+=(QByteArray &a, const QStringBuilder< A, B > &b)
bool operator!=(const QPoint &p1, const QPoint &p2)
Q_CORE_EXPORT QDataStream & operator<<(QDataStream &, const QPoint &)
#define QT_BEGIN_NAMESPACE
QPoint & operator+=(const QPoint &p)
QPointF & operator+=(const QPointF &p)
QPointF & operator/=(qreal c)
QPointF & operator*=(qreal c)
QPoint & operator/=(qreal c)
QPointF & operator-=(const QPointF &p)
Q_CORE_EXPORT QDataStream & operator>>(QDataStream &, QPoint &)
bool operator==(const QPoint &p1, const QPoint &p2)
const QPoint operator-(const QPoint &p1, const QPoint &p2)
QPoint & operator-=(const QPoint &p)
const QPoint operator*(const QPoint &p, float c)
Q_DECLARE_TYPEINFO(QPoint, Q_MOVABLE_TYPE)
const QPoint operator+(const QPoint &p1, const QPoint &p2)