![]() |
Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions | ![]() |
The QLine class provides a two-dimensional vector that uses integer point coordinates for accuracy. More...
#include <QLine>
Part of the QtCore module.
The QLine class provides a two-dimensional vector that uses integer point coordinates for accuracy.
A QLine describes a finite length line on a two-dimensional surface. The start and end points of the line are specified using floating point coordinates for accuracy.
Use isNull() to determine whether the QLine represents a valid line or a null line.
The positions of the line's end points can be found with the x1(), y1(), x2(), and y2() functions. The horizontal and vertical components of the line are returned by the dx() and dy() functions.
The line can be translated along the length of another line with the translate() function.
See also QPoint, QSize, QRect, and QLineF.
Constructs a null line.
Constructs a line object that represents the line between pt1 and pt2.
Constructs a line object that represents the line between (x1, y1) and (x2, y2).
Returns the horizontal component of the line's vector.
Returns the vertical component of the line's vector.
Returns true if the line is not set up with valid start and end point; otherwise returns false.
Returns the line's start point.
Returns the line's end point.
Translates this line with the point given.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Translates this line the distance dx and dy.
Returns the x-coordinate of the line's start point.
Returns the x-coordinate of the line's end point.
Returns the y-coordinate of the line's start point.
Returns the y-coordinate of the line's end point.
Returns true if other is the same line as this line.
A line is identical if the two points are the same and their order is the same.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Writes the line to the stream 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 QLine from the stream into the line and returns a reference to the stream.
See also Format of the QDataStream operators.
Copyright © 2005 Trolltech | Trademarks | Qt 4.0.0-b2 |