Detailed Description
Definition at line 53 of file qpoint.h.
#include <qpoint.h>
List of all
members.
Constructor & Destructor Documentation
| QPoint |
( |
int |
xpos, |
|
|
int |
ypos |
|
) |
|
[inline] |
Definition at line 114 of file qpoint.h.
{ xp = xpos; yp = ypos; }
Member Function Documentation
| bool isNull |
( |
|
) |
const [inline] |
Definition at line 117 of file qpoint.h.
{ return xp == 0 && yp == 0; }
| void setX |
( |
int |
x |
) |
[inline] |
| void setY |
( |
int |
y |
) |
[inline] |
| int manhattanLength |
( |
|
) |
const |
Definition at line 138 of file qpoint.h.
{ xp+=p.xp; yp+=p.yp; return *this; }
Definition at line 141 of file qpoint.h.
{ xp-=p.xp; yp-=p.yp; return *this; }
| QPoint & operator*= |
( |
qreal |
c |
) |
[inline] |
Definition at line 144 of file qpoint.h.
{ xp = qRound(xp*c); yp = qRound(yp*c); return *this; }
| QPoint & operator/= |
( |
qreal |
c |
) |
[inline] |
Definition at line 168 of file qpoint.h.
{
xp = qRound(xp/c);
yp = qRound(yp/c);
return *this;
}
Friends And Related Function Documentation
| bool operator== |
( |
const QPoint & |
p1, |
|
|
const QPoint & |
p2 |
|
) |
|
[friend] |
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 |
|
) |
|
[friend] |
Definition at line 150 of file qpoint.h.
{ return p1.xp != p2.xp || p1.yp != p2.yp; }
Definition at line 153 of file qpoint.h.
{ return QPoint(p1.xp+p2.xp, p1.yp+p2.yp); }
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 |
|
) |
|
[friend] |
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 |
|
) |
|
[friend] |
Definition at line 162 of file qpoint.h.
{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
| const QPoint operator/ |
( |
const QPoint & |
p, |
|
|
qreal |
c |
|
) |
|
[friend] |
Definition at line 175 of file qpoint.h.
{
return QPoint(qRound(p.xp/c), qRound(p.yp/c));
}
The documentation for this class was generated from the following
file: