![]() |
Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions | ![]() |
The QPointF class provides a point object that uses floating point coordinates for accuracy. More...
#include <QPointF>
Part of the QtCore module.
The QPointF class provides a point object that uses floating point coordinates for accuracy.
A QPointF describes a point on a two-dimensional surface. The coordinates of the point are specified using floating point numbers for accuracy. If you only need the accuracy of integers, you may want to use QPoint instead of this class.
Convenience functions are provided for reading and writing the individual coordinates used to define the point: x(), y(), setX(), and setY(). QPointF also provides support for the standard arithmetic operators, treating each point as a vector from the origin.
See also QPoint.
Constructs a null point.
Copy constructor. Constructs a point using the values of the point specified.
Constructs a point with coordinates specified by x and y.
Returns true if the point is not set up; otherwise returns false.
Returns a reference to the x-coordinate of the point.
Returns a reference to the y-coordinate of the point.
Sets the x-coordinate of the point to the value specified by x.
Sets the y-coordinate of the point to the value specified by y.
Converts the coordinates of this point to integers and returns a QPoint with these coordinates.
See also QPoint.
Returns the x-coordinate of the point.
Returns the y-coordinate of the point.
Multiplies the coordinates of this point by the given scale factor, and returns a reference to this point with the new coordinates. (Scalar multiplication of a vector.)
See also operator*() and operator/=().
Adds the coordinates of this point to the corresponding coordinates of the other point, and returns a reference to this point with the new coordinates. (Vector addition.)
See also operator+() and operator-=().
Subtracts the coordinates of the other point from the corresponding coordinates of this point, and returns a reference to this point with the new coordinates. (Vector subtraction.)
See also operator-() and operator+=().
Divides the coordinates of this point by the given scale factor, and returns a references to this point with the new coordinates. (Scalar division of a vector.)
See also operator*().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Writes point p to the stream s and returns a reference to the stream.
See also Format of the QDataStream operators.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Reads a QPoint from the stream s into point p and returns a reference to the stream.
See also Format of the QDataStream operators.
Copyright © 2005 Trolltech | Trademarks | Qt 4.0.0-b2 |