<class name="QLine" doc="/** <p>The <a href="QLine.html#QLine()"><tt>QLine</tt></a> class provides a two-dimensional vector using integer precision.</p> <p>A <a href="QLine.html#QLine()"><tt>QLine</tt></a> describes a finite length line (or a line segment) on a two-dimensional surface. The start and end points of the line are specified using integer point accuracy for coordinates. Use the <a href="QLineF.html"><tt>QLineF</tt></a> constructor to retrieve a floating point copy.</p> <p><table align="center" cellpadding="2" cellspacing="1" border="0"> <tr valign="top" class="odd"><td><img src="%2E%2E/images/qline-point.png" /></td><td><img src="%2E%2E/images/qline-coordinates.png" /></td></tr> </table></p> <p>The positions of the line's start and end points can be retrieved using the <a href="QLine.html#p1()"><tt>p1</tt></a>, <a href="QLine.html#x1()"><tt>x1</tt></a>, <a href="QLine.html#y1()"><tt>y1</tt></a>, <a href="QLine.html#p2()"><tt>p2</tt></a>, <a href="QLine.html#x2()"><tt>x2</tt></a>, and <a href="QLine.html#y2()"><tt>y2</tt></a> functions. The <a href="QLine.html#dx()"><tt>dx</tt></a> and <a href="QLine.html#dy()"><tt>dy</tt></a> functions return the horizontal and vertical components of the line. Use <a href="QLine.html#isNull()"><tt>isNull</tt></a> to determine whether the <a href="QLine.html#QLine()"><tt>QLine</tt></a> represents a valid line or a null line.</p> <p>Finally, the line can be translated a given offset using the <a href="QLine.html#translate(com.trolltech.qt.core.QPoint)"><tt>translate</tt></a> function.</p> @see <a href="QLineF.html"><tt>QLineF</tt></a> @see <a href="QPolygon.html"><tt>QPolygon</tt></a> @see <a href="%2E%2E/core/QRect.html"><tt>QRect</tt></a> */"> <method name="public QLine(com.trolltech.qt.core.QPoint pt1, com.trolltech.qt.core.QPoint pt2)" doc="/** <p>Constructs a line object that represents the line between <tt>pt1</tt> and <tt>pt2</tt>.</p> */"/> <method name="public QLine(int x1, int y1, int x2, int y2)" doc="/** <p>Constructs a line object that represents the line between (<tt>x1</tt>, <tt>y1</tt>) and (<tt>x2</tt>, <tt>y2</tt>).</p> */"/> <method name="public QLine()" doc="/** <p>Constructs a null line.</p> */"/> <method name="public final int dx()" doc="/** <p>Returns the horizontal component of the line's vector.</p> @see <a href="QLine.html#dy()"><tt>dy</tt></a> */"/> <method name="public final int dy()" doc="/** <p>Returns the vertical component of the line's vector.</p> @see <a href="QLine.html#dx()"><tt>dx</tt></a> */"/> <method name="public final boolean isNull()" doc="/** <p>Returns true if the line is not set up with valid start and end point; otherwise returns false.</p> */"/> <method name="public final void writeTo(com.trolltech.qt.core.QDataStream arg__1)"/> <method name="public final void readFrom(com.trolltech.qt.core.QDataStream arg__1)"/> <method name="public final com.trolltech.qt.core.QPoint p1()" doc="/** <p>Returns the line's start point.</p> @see <a href="QLine.html#x1()"><tt>x1</tt></a> @see <a href="QLine.html#y1()"><tt>y1</tt></a> @see <a href="QLine.html#p2()"><tt>p2</tt></a> */"/> <method name="public final com.trolltech.qt.core.QPoint p2()" doc="/** <p>Returns the line's end point.</p> @see <a href="QLine.html#x2()"><tt>x2</tt></a> @see <a href="QLine.html#y2()"><tt>y2</tt></a> @see <a href="QLine.html#p1()"><tt>p1</tt></a> */"/> <method name="public final void translate(int dx, int dy)" doc="/** <p>Translates this line the distance specified by <tt>dx</tt> and <tt>dy</tt>.</p> */"/> <method name="public final void translate(com.trolltech.qt.core.QPoint p)" doc="/** <p>Translates this line by the given <tt>p</tt>.</p> */"/> <method name="public final int x1()" doc="/** <p>Returns the x-coordinate of the line's start point.</p> @see <a href="QLine.html#p1()"><tt>p1</tt></a> */"/> <method name="public final int x2()" doc="/** <p>Returns the x-coordinate of the line's end point.</p> @see <a href="QLine.html#p2()"><tt>p2</tt></a> */"/> <method name="public final int y1()" doc="/** <p>Returns the y-coordinate of the line's start point.</p> @see <a href="QLine.html#p1()"><tt>p1</tt></a> */"/> <method name="public final int y2()" doc="/** <p>Returns the y-coordinate of the line's end point.</p> @see <a href="QLine.html#p2()"><tt>p2</tt></a> */"/> </class>