Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |
The QPointF class provides a point object that uses floating point coordinates for accuracy. More...
#include <QPointF>
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. QPoint provides points with integer accuracy.
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 QPolygonF, QSizeF, QRectF, and QPoint.
Constructs a null point.
See also isNull().
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 null; otherwise returns false.
A point is considered to be null if both the x- and y-coordinates are equal to zero.
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.
See also setY(), x(), and rx().
Sets the y-coordinate of the point to the value specified by y.
See also setX(), y(), and ry().
Rounds the coordinates of this point to the nearest integer and returns a QPoint with these rounded coordinates.
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. This is equivalent to 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. This is equivalent to 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. This is equivalent to 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. This is equivalent to scalar division of a vector.
See also operator*().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Returns true if point1 is not equal to point2; otherwise returns false.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Multiplies the coordinates of the point by the given scale factor, and returns a point with the new coordinates. (Scalar multiplication of a vector.)
See also operator/().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Multiplies the coordinates of the point by the given scale factor, and returns a point with the new coordinates. (Scalar multiplication of a vector.)
See also operator/().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Adds the coordinates of the point to the corresponding coordinates of the other point, and returns a point with the new coordinates. (Vector addition.)
See also operator-().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Subtracts the coordinates of the other point from the corresponding coordinates of the given point, and returns a point with the new coordinates. (Vector subtraction.)
See also operator+().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Negates the coordinates of the point, and returns a point with the new coordinates. (Inversion).
Divides the coordinates of the point by the given scale factor, and returns a 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.
Returns true if point1 is equal to point2; otherwise returns false.
Two points are equal to each other if both x-coordinates and both y-coordinates are the same.
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.1.0 |