Public Member Functions | Friends

QPointF Class Reference

Search for all occurrences

Detailed Description

Definition at line 188 of file qpoint.h.

#include <qpoint.h>

List of all members.

Public Member Functions

  QPointF ()
  QPointF (const QPoint &p)
  QPointF (qreal xpos, qreal ypos)
qreal  manhattanLength () const
bool  isNull () const
qreal  x () const
qreal  y () const
void  setX (qreal x)
void  setY (qreal y)
qreal &  rx ()
qreal &  ry ()
QPointF operator+= (const QPointF &p)
QPointF operator-= (const QPointF &p)
QPointF operator*= (qreal c)
QPointF operator/= (qreal c)
QPoint  toPoint () const

Friends

class  QMatrix
class  QTransform
bool  operator== (const QPointF &, const QPointF &)
bool  operator!= (const QPointF &, const QPointF &)
const QPointF  operator+ (const QPointF &, const QPointF &)
const QPointF  operator- (const QPointF &, const QPointF &)
const QPointF  operator* (qreal, const QPointF &)
const QPointF  operator* (const QPointF &, qreal)
const QPointF  operator- (const QPointF &)
const QPointF  operator/ (const QPointF &, qreal)

Constructor & Destructor Documentation

QPointF ( ) [inline]

Definition at line 245 of file qpoint.h.

: xp(0), yp(0) { }
QPointF ( const QPoint p ) [inline]

Definition at line 249 of file qpoint.h.

: xp(p.x()), yp(p.y()) { }
QPointF ( qreal  xpos,
qreal  ypos 
) [inline]

Definition at line 247 of file qpoint.h.

: xp(xpos), yp(ypos) { }

Member Function Documentation

qreal manhattanLength ( ) const
bool isNull ( ) const [inline]

Definition at line 251 of file qpoint.h.

{
    return qIsNull(xp) && qIsNull(yp);
}
qreal x ( ) const [inline]

Definition at line 256 of file qpoint.h.

{
    return xp;
}
qreal y ( ) const [inline]

Definition at line 261 of file qpoint.h.

{
    return yp;
}
void setX ( qreal  x ) [inline]

Definition at line 266 of file qpoint.h.

{
    xp = xpos;
}
void setY ( qreal  y ) [inline]

Definition at line 271 of file qpoint.h.

{
    yp = ypos;
}
qreal & rx ( ) [inline]

Definition at line 276 of file qpoint.h.

{
    return xp;
}
qreal & ry ( ) [inline]

Definition at line 281 of file qpoint.h.

{
    return yp;
}
QPointF & operator+= ( const QPointF p ) [inline]

Definition at line 286 of file qpoint.h.

{
    xp+=p.xp;
    yp+=p.yp;
    return *this;
}
QPointF & operator-= ( const QPointF p ) [inline]

Definition at line 293 of file qpoint.h.

{
    xp-=p.xp; yp-=p.yp; return *this;
}
QPointF & operator*= ( qreal  c ) [inline]

Definition at line 298 of file qpoint.h.

{
    xp*=c; yp*=c; return *this;
}
QPointF & operator/= ( qreal  c ) [inline]

Definition at line 338 of file qpoint.h.

{
    xp/=c;
    yp/=c;
    return *this;
}
QPoint toPoint ( ) const [inline]

Definition at line 350 of file qpoint.h.

{
    return QPoint(qRound(xp), qRound(yp));
}

Friends And Related Function Documentation

friend class QMatrix [friend]

Definition at line 224 of file qpoint.h.

friend class QTransform [friend]

Definition at line 225 of file qpoint.h.

bool operator== ( const QPointF p1,
const QPointF p2 
) [friend]

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 
) [friend]

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 
) [friend]

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 
) [friend]

Definition at line 318 of file qpoint.h.

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

Definition at line 328 of file qpoint.h.

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

Definition at line 323 of file qpoint.h.

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

Definition at line 333 of file qpoint.h.

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

Definition at line 345 of file qpoint.h.

{
    return QPointF(p.xp/c, p.yp/c);
}

The documentation for this class was generated from the following file:

QPointF QPointF QPointF QPointF QPointF QPointF QPointF QPointF QPointF QPointF
QPointF QPointF QPointF QPointF QPointF QPointF QPointF QPointF QPointF QPointF