Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 462

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qline.cpp -->
  <title>QLineF Class | Qt Core 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtcore-index.html">Qt Core</a></td><td ><a href="qtcore-module.html">C++ Classes</a></td><td >QLineF</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#constraints">Constraints</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QLineF Class</h1>
<!-- $$$QLineF-brief -->
<p>The <a href="qlinef.html">QLineF</a> class provides a two-dimensional vector using floating point precision. <a href="#details">More...</a></p>
<!-- @@@QLineF -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QLineF&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += core</td></tr></table></div><ul>
<li><a href="qlinef-members.html">List of all members, including inherited members</a></li>
<li><a href="qlinef-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#IntersectType-enum">IntersectType</a></b> { NoIntersection, UnboundedIntersection, BoundedIntersection }</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#QLineF">QLineF</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#QLineF-1">QLineF</a></b>(const QPointF &amp;<i>p1</i>, const QPointF &amp;<i>p2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#QLineF-2">QLineF</a></b>(qreal <i>x1</i>, qreal <i>y1</i>, qreal <i>x2</i>, qreal <i>y2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#QLineF-3">QLineF</a></b>(const QLine &amp;<i>line</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#p1">p1</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#p2">p2</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#x1">x1</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#x2">x2</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#y1">y1</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#y2">y2</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#angle">angle</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#angleTo">angleTo</a></b>(const QLineF &amp;<i>line</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#center">center</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#dx">dx</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#dy">dy</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> IntersectType </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#intersect">intersect</a></b>(const QLineF &amp;<i>line</i>, QPointF *<i>intersectionPoint</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#isNull">isNull</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#length">length</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLineF </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#normalVector">normalVector</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#pointAt">pointAt</a></b>(qreal <i>t</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#setP1">setP1</a></b>(const QPointF &amp;<i>p1</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#setP2">setP2</a></b>(const QPointF &amp;<i>p2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#setAngle">setAngle</a></b>(qreal <i>angle</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#setLength">setLength</a></b>(qreal <i>length</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#setLine">setLine</a></b>(qreal <i>x1</i>, qreal <i>y1</i>, qreal <i>x2</i>, qreal <i>y2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#setPoints">setPoints</a></b>(const QPointF &amp;<i>p1</i>, const QPointF &amp;<i>p2</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLine </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#toLine">toLine</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#translate">translate</a></b>(const QPointF &amp;<i>offset</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#translate-1">translate</a></b>(qreal <i>dx</i>, qreal <i>dy</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLineF </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#translated">translated</a></b>(const QPointF &amp;<i>offset</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLineF </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#translated-1">translated</a></b>(qreal <i>dx</i>, qreal <i>dy</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLineF </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#unitVector">unitVector</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#operator-not-eq">operator!=</a></b>(const QLineF &amp;<i>line</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#operator-eq-eq">operator==</a></b>(const QLineF &amp;<i>line</i>) const</td></tr>
</table></div>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QLineF </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#fromPolar">fromPolar</a></b>(qreal <i>length</i>, qreal <i>angle</i>)</td></tr>
</table></div>
<a name="related-non-members"></a>
<h2 id="related-non-members">Related Non-Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp;</td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#operator-lt-lt">operator&lt;&lt;</a></b>(QDataStream &amp;<i>stream</i>, const QLineF &amp;<i>line</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp;</td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#operator-gt-gt">operator&gt;&gt;</a></b>(QDataStream &amp;<i>stream</i>, QLineF &amp;<i>line</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QLineF-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qlinef.html">QLineF</a> class provides a two-dimensional vector using floating point precision.</p>
<p>A <a href="qlinef.html">QLineF</a> describes a finite length line (or line segment) on a two-dimensional surface. <a href="qlinef.html">QLineF</a> defines the start and end points of the line using floating point accuracy for coordinates. Use the <a href="qlinef.html#toLine">toLine</a>() function to retrieve an integer based copy of this line.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><img src="images/qline-point.png" alt="" /></td><td ><img src="images/qline-coordinates.png" alt="" /></td></tr>
</table></div>
<p>The positions of the line's start and end points can be retrieved using the <a href="qlinef.html#p1">p1</a>(), <a href="qlinef.html#x1">x1</a>(), <a href="qlinef.html#y1">y1</a>(), <a href="qlinef.html#p2">p2</a>(), <a href="qlinef.html#x2">x2</a>(), and <a href="qlinef.html#y2">y2</a>() functions. The <a href="qlinef.html#dx">dx</a>() and <a href="qlinef.html#dy">dy</a>() functions return the horizontal and vertical components of the line, respectively.</p>
<p>The line's length can be retrieved using the <a href="qlinef.html#length">length</a>() function, and altered using the <a href="qlinef.html#setLength">setLength</a>() function. Similarly, <a href="qlinef.html#angle">angle</a>() and <a href="qlinef.html#setAngle">setAngle</a>() are respectively used for retrieving and altering the angle of the line. Use the <a href="qlinef.html#isNull">isNull</a>() function to determine whether the <a href="qlinef.html">QLineF</a> represents a valid line or a null line.</p>
<p>The <a href="qlinef.html#intersect">intersect</a>() function determines the <a href="qlinef.html#IntersectType-enum">IntersectType</a> for this line and a given line, while the <a href="qlinef.html#angleTo">angleTo</a>() function returns the angle between the lines. In addition, the <a href="qlinef.html#unitVector">unitVector</a>() function returns a line that has the same starting point as this line, but with a length of only 1, while the <a href="qlinef.html#normalVector">normalVector</a>() function returns a line that is perpendicular to this line with the same starting point and length.</p>
<p>Finally, the line can be translated a given offset using the <a href="qlinef.html#translate">translate</a>() function, and can be traversed using the <a href="qlinef.html#pointAt">pointAt</a>() function.</p>
<a name="constraints"></a>
<h3 >Constraints</h3>
<p><a href="qline.html">QLine</a> is limited to the minimum and maximum values for the <code>int</code> type. Operations on a <a href="qline.html">QLine</a> that could potentially result in values outside this range will result in undefined behavior.</p>
</div>
<p><b>See also </b><a href="qline.html">QLine</a>, <a href="../qtgui/qpolygonf.html">QPolygonF</a>, and <a href="qrectf.html">QRectF</a>.</p>
<!-- @@@QLineF -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$IntersectType$$$NoIntersection$$$BoundedIntersection$$$UnboundedIntersection -->
<h3 class="fn" id="IntersectType-enum"><a name="IntersectType-enum"></a>enum QLineF::<span class="name">IntersectType</span></h3>
<p>Describes the intersection between two lines.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><img src="images/qlinef-unbounded.png" alt="" /></td><td ><img src="images/qlinef-bounded.png" alt="" /></td></tr>
<tr valign="top" class="even"><td >QLineF::UnboundedIntersection</td><td >QLineF::BoundedIntersection</td></tr>
</table></div>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QLineF::NoIntersection</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Indicates that the lines do not intersect; i.e&#x2e; they are parallel.</td></tr>
<tr><td class="topAlign"><code>QLineF::UnboundedIntersection</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The two lines intersect, but not within the range defined by their lengths. This will be the case if the lines are not parallel.</td></tr>
</table></div>
<p><a href="qlinef.html#intersect">intersect</a>() will also return this value if the intersect point is within the start and end point of only one of the lines.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="even"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QLineF::BoundedIntersection</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The two lines intersect with each other within the start and end points of each line.</td></tr>
</table></div>
<p><b>See also </b><a href="qlinef.html#intersect">intersect</a>().</p>
<!-- @@@IntersectType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QLineF[overload1]$$$QLineF -->
<h3 class="fn" id="QLineF"><a name="QLineF"></a>QLineF::<span class="name">QLineF</span>()</h3>
<p>Constructs a null line.</p>
<!-- @@@QLineF -->
<!-- $$$QLineF$$$QLineFconstQPointF&constQPointF& -->
<h3 class="fn" id="QLineF-1"><a name="QLineF-1"></a>QLineF::<span class="name">QLineF</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>p1</i>, const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>p2</i>)</h3>
<p>Constructs a line object that represents the line between <i>p1</i> and <i>p2</i>.</p>
<!-- @@@QLineF -->
<!-- $$$QLineF$$$QLineFqrealqrealqrealqreal -->
<h3 class="fn" id="QLineF-2"><a name="QLineF-2"></a>QLineF::<span class="name">QLineF</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x1</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y1</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x2</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y2</i>)</h3>
<p>Constructs a line object that represents the line between (<i>x1</i>, <i>y1</i>) and (<i>x2</i>, <i>y2</i>).</p>
<!-- @@@QLineF -->
<!-- $$$QLineF$$$QLineFconstQLine& -->
<h3 class="fn" id="QLineF-3"><a name="QLineF-3"></a>QLineF::<span class="name">QLineF</span>(const <span class="type"><a href="qline.html">QLine</a></span> &amp;<i>line</i>)</h3>
<p>Construct a <a href="qlinef.html">QLineF</a> object from the given integer-based <i>line</i>.</p>
<p><b>See also </b><a href="qlinef.html#toLine">toLine</a>().</p>
<!-- @@@QLineF -->
<!-- $$$p1[overload1]$$$p1 -->
<h3 class="fn" id="p1"><a name="p1"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QLineF::<span class="name">p1</span>() const</h3>
<p>Returns the line's start point.</p>
<p><b>See also </b><a href="qlinef.html#setP1">setP1</a>(), <a href="qlinef.html#x1">x1</a>(), <a href="qlinef.html#y1">y1</a>(), and <a href="qlinef.html#p2">p2</a>().</p>
<!-- @@@p1 -->
<!-- $$$p2[overload1]$$$p2 -->
<h3 class="fn" id="p2"><a name="p2"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QLineF::<span class="name">p2</span>() const</h3>
<p>Returns the line's end point.</p>
<p><b>See also </b><a href="qlinef.html#setP2">setP2</a>(), <a href="qlinef.html#x2">x2</a>(), <a href="qlinef.html#y2">y2</a>(), and <a href="qlinef.html#p1">p1</a>().</p>
<!-- @@@p2 -->
<!-- $$$x1[overload1]$$$x1 -->
<h3 class="fn" id="x1"><a name="x1"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QLineF::<span class="name">x1</span>() const</h3>
<p>Returns the x-coordinate of the line's start point.</p>
<p><b>See also </b><a href="qlinef.html#p1">p1</a>().</p>
<!-- @@@x1 -->
<!-- $$$x2[overload1]$$$x2 -->
<h3 class="fn" id="x2"><a name="x2"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QLineF::<span class="name">x2</span>() const</h3>
<p>Returns the x-coordinate of the line's end point.</p>
<p><b>See also </b><a href="qlinef.html#p2">p2</a>().</p>
<!-- @@@x2 -->
<!-- $$$y1[overload1]$$$y1 -->
<h3 class="fn" id="y1"><a name="y1"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QLineF::<span class="name">y1</span>() const</h3>
<p>Returns the y-coordinate of the line's start point.</p>
<p><b>See also </b><a href="qlinef.html#p1">p1</a>().</p>
<!-- @@@y1 -->
<!-- $$$y2[overload1]$$$y2 -->
<h3 class="fn" id="y2"><a name="y2"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QLineF::<span class="name">y2</span>() const</h3>
<p>Returns the y-coordinate of the line's end point.</p>
<p><b>See also </b><a href="qlinef.html#p2">p2</a>().</p>
<!-- @@@y2 -->
<!-- $$$angle[overload1]$$$angle -->
<h3 class="fn" id="angle"><a name="angle"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QLineF::<span class="name">angle</span>() const</h3>
<p>Returns the angle of the line in degrees.</p>
<p>The return value will be in the range of values from 0.0 up to but not including 360.0&#x2e; The angles are measured counter-clockwise from a point on the x-axis to the right of the origin (x &gt; 0).</p>
<p>This function was introduced in  Qt 4.4.</p>
<p><b>See also </b><a href="qlinef.html#setAngle">setAngle</a>().</p>
<!-- @@@angle -->
<!-- $$$angleTo[overload1]$$$angleToconstQLineF& -->
<h3 class="fn" id="angleTo"><a name="angleTo"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QLineF::<span class="name">angleTo</span>(const <span class="type"><a href="qlinef.html#QLineF">QLineF</a></span> &amp;<i>line</i>) const</h3>
<p>Returns the angle (in degrees) from this line to the given <i>line</i>, taking the direction of the lines into account. If the lines do not intersect within their range, it is the intersection point of the extended lines that serves as origin (see <a href="qlinef.html#IntersectType-enum">QLineF::UnboundedIntersection</a>).</p>
<p>The returned value represents the number of degrees you need to add to this line to make it have the same angle as the given <i>line</i>, going counter-clockwise.</p>
<p>This function was introduced in  Qt 4.4.</p>
<p><b>See also </b><a href="qlinef.html#intersect">intersect</a>().</p>
<!-- @@@angleTo -->
<!-- $$$center[overload1]$$$center -->
<h3 class="fn" id="center"><a name="center"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QLineF::<span class="name">center</span>() const</h3>
<p>Returns the center point of this line. This is equivalent to 0.5 * <a href="qlinef.html#p1">p1</a>() + 0.5 * <a href="qlinef.html#p2">p2</a>().</p>
<p>This function was introduced in  Qt 5.8.</p>
<!-- @@@center -->
<!-- $$$dx[overload1]$$$dx -->
<h3 class="fn" id="dx"><a name="dx"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QLineF::<span class="name">dx</span>() const</h3>
<p>Returns the horizontal component of the line's vector.</p>
<p><b>See also </b><a href="qlinef.html#dy">dy</a>() and <a href="qlinef.html#pointAt">pointAt</a>().</p>
<!-- @@@dx -->
<!-- $$$dy[overload1]$$$dy -->
<h3 class="fn" id="dy"><a name="dy"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QLineF::<span class="name">dy</span>() const</h3>
<p>Returns the vertical component of the line's vector.</p>
<p><b>See also </b><a href="qlinef.html#dx">dx</a>() and <a href="qlinef.html#pointAt">pointAt</a>().</p>
<!-- @@@dy -->
<!-- $$$fromPolar[overload1]$$$fromPolarqrealqreal -->
<h3 class="fn" id="fromPolar"><a name="fromPolar"></a><code>[static] </code><span class="type"><a href="qlinef.html#QLineF">QLineF</a></span> QLineF::<span class="name">fromPolar</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>length</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>angle</i>)</h3>
<p>Returns a <a href="qlinef.html">QLineF</a> with the given <i>length</i> and <i>angle</i>.</p>
<p>The first point of the line will be on the origin.</p>
<p>Positive values for the angles mean counter-clockwise while negative values mean the clockwise direction. Zero degrees is at the 3 o'clock position.</p>
<p>This function was introduced in  Qt 4.4.</p>
<!-- @@@fromPolar -->
<!-- $$$intersect[overload1]$$$intersectconstQLineF&QPointF* -->
<h3 class="fn" id="intersect"><a name="intersect"></a><span class="type"><a href="qlinef.html#IntersectType-enum">IntersectType</a></span> QLineF::<span class="name">intersect</span>(const <span class="type"><a href="qlinef.html#QLineF">QLineF</a></span> &amp;<i>line</i>, <span class="type"><a href="qpointf.html">QPointF</a></span> *<i>intersectionPoint</i>) const</h3>
<p>Returns a value indicating whether or not <i>this</i> line intersects with the given <i>line</i>.</p>
<p>The actual intersection point is extracted to <i>intersectionPoint</i> (if the pointer is valid). If the lines are parallel, the intersection point is undefined.</p>
<!-- @@@intersect -->
<!-- $$$isNull[overload1]$$$isNull -->
<h3 class="fn" id="isNull"><a name="isNull"></a><span class="type">bool</span> QLineF::<span class="name">isNull</span>() const</h3>
<p>Returns <code>true</code> if the line is not set up with valid start and end point; otherwise returns <code>false</code>.</p>
<!-- @@@isNull -->
<!-- $$$length[overload1]$$$length -->
<h3 class="fn" id="length"><a name="length"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QLineF::<span class="name">length</span>() const</h3>
<p>Returns the length of the line.</p>
<p><b>See also </b><a href="qlinef.html#setLength">setLength</a>().</p>
<!-- @@@length -->
<!-- $$$normalVector[overload1]$$$normalVector -->
<h3 class="fn" id="normalVector"><a name="normalVector"></a><span class="type"><a href="qlinef.html#QLineF">QLineF</a></span> QLineF::<span class="name">normalVector</span>() const</h3>
<p>Returns a line that is perpendicular to this line with the same starting point and length.</p>
<p class="centerAlign"><img src="images/qlinef-normalvector.png" alt="" /></p><p><b>See also </b><a href="qlinef.html#unitVector">unitVector</a>().</p>
<!-- @@@normalVector -->
<!-- $$$pointAt[overload1]$$$pointAtqreal -->
<h3 class="fn" id="pointAt"><a name="pointAt"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QLineF::<span class="name">pointAt</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>t</i>) const</h3>
<p>Returns the point at the parameterized position specified by <i>t</i>. The function returns the line's start point if t = 0, and its end point if t = 1.</p>
<p><b>See also </b><a href="qlinef.html#dx">dx</a>() and <a href="qlinef.html#dy">dy</a>().</p>
<!-- @@@pointAt -->
<!-- $$$setP1[overload1]$$$setP1constQPointF& -->
<h3 class="fn" id="setP1"><a name="setP1"></a><span class="type">void</span> QLineF::<span class="name">setP1</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>p1</i>)</h3>
<p>Sets the starting point of this line to <i>p1</i>.</p>
<p>This function was introduced in  Qt 4.4.</p>
<p><b>See also </b><a href="qlinef.html#setP2">setP2</a>() and <a href="qlinef.html#p1">p1</a>().</p>
<!-- @@@setP1 -->
<!-- $$$setP2[overload1]$$$setP2constQPointF& -->
<h3 class="fn" id="setP2"><a name="setP2"></a><span class="type">void</span> QLineF::<span class="name">setP2</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>p2</i>)</h3>
<p>Sets the end point of this line to <i>p2</i>.</p>
<p>This function was introduced in  Qt 4.4.</p>
<p><b>See also </b><a href="qlinef.html#setP1">setP1</a>() and <a href="qlinef.html#p2">p2</a>().</p>
<!-- @@@setP2 -->
<!-- $$$setAngle[overload1]$$$setAngleqreal -->
<h3 class="fn" id="setAngle"><a name="setAngle"></a><span class="type">void</span> QLineF::<span class="name">setAngle</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>angle</i>)</h3>
<p>Sets the angle of the line to the given <i>angle</i> (in degrees). This will change the position of the second point of the line such that the line has the given angle.</p>
<p>Positive values for the angles mean counter-clockwise while negative values mean the clockwise direction. Zero degrees is at the 3 o'clock position.</p>
<p>This function was introduced in  Qt 4.4.</p>
<p><b>See also </b><a href="qlinef.html#angle">angle</a>().</p>
<!-- @@@setAngle -->
<!-- $$$setLength[overload1]$$$setLengthqreal -->
<h3 class="fn" id="setLength"><a name="setLength"></a><span class="type">void</span> QLineF::<span class="name">setLength</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>length</i>)</h3>
<p>Sets the length of the line to the given <i>length</i>. <a href="qlinef.html">QLineF</a> will move the end point - <a href="qlinef.html#p2">p2</a>() - of the line to give the line its new length.</p>
<p>If the line is a null line, the length will remain zero regardless of the length specified.</p>
<p><b>See also </b><a href="qlinef.html#length">length</a>() and <a href="qlinef.html#isNull">isNull</a>().</p>
<!-- @@@setLength -->
<!-- $$$setLine[overload1]$$$setLineqrealqrealqrealqreal -->
<h3 class="fn" id="setLine"><a name="setLine"></a><span class="type">void</span> QLineF::<span class="name">setLine</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x1</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y1</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x2</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y2</i>)</h3>
<p>Sets this line to the start in <i>x1</i>, <i>y1</i> and end in <i>x2</i>, <i>y2</i>.</p>
<p>This function was introduced in  Qt 4.4.</p>
<p><b>See also </b><a href="qlinef.html#setP1">setP1</a>(), <a href="qlinef.html#setP2">setP2</a>(), <a href="qlinef.html#p1">p1</a>(), and <a href="qlinef.html#p2">p2</a>().</p>
<!-- @@@setLine -->
<!-- $$$setPoints[overload1]$$$setPointsconstQPointF&constQPointF& -->
<h3 class="fn" id="setPoints"><a name="setPoints"></a><span class="type">void</span> QLineF::<span class="name">setPoints</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>p1</i>, const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>p2</i>)</h3>
<p>Sets the start point of this line to <i>p1</i> and the end point of this line to <i>p2</i>.</p>
<p>This function was introduced in  Qt 4.4.</p>
<p><b>See also </b><a href="qlinef.html#setP1">setP1</a>(), <a href="qlinef.html#setP2">setP2</a>(), <a href="qlinef.html#p1">p1</a>(), and <a href="qlinef.html#p2">p2</a>().</p>
<!-- @@@setPoints -->
<!-- $$$toLine[overload1]$$$toLine -->
<h3 class="fn" id="toLine"><a name="toLine"></a><span class="type"><a href="qline.html">QLine</a></span> QLineF::<span class="name">toLine</span>() const</h3>
<p>Returns an integer based copy of this line.</p>
<p>Note that the returned line's start and end points are rounded to the nearest integer.</p>
<p><b>See also </b><a href="qlinef.html#QLineF">QLineF</a>().</p>
<!-- @@@toLine -->
<!-- $$$translate[overload1]$$$translateconstQPointF& -->
<h3 class="fn" id="translate"><a name="translate"></a><span class="type">void</span> QLineF::<span class="name">translate</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>offset</i>)</h3>
<p>Translates this line by the given <i>offset</i>.</p>
<!-- @@@translate -->
<!-- $$$translate$$$translateqrealqreal -->
<h3 class="fn" id="translate-1"><a name="translate-1"></a><span class="type">void</span> QLineF::<span class="name">translate</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dx</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dy</i>)</h3>
<p>This is an overloaded function.</p>
<p>Translates this line the distance specified by <i>dx</i> and <i>dy</i>.</p>
<!-- @@@translate -->
<!-- $$$translated[overload1]$$$translatedconstQPointF& -->
<h3 class="fn" id="translated"><a name="translated"></a><span class="type"><a href="qlinef.html#QLineF">QLineF</a></span> QLineF::<span class="name">translated</span>(const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp;<i>offset</i>) const</h3>
<p>Returns this line translated by the given <i>offset</i>.</p>
<p>This function was introduced in  Qt 4.4.</p>
<!-- @@@translated -->
<!-- $$$translated$$$translatedqrealqreal -->
<h3 class="fn" id="translated-1"><a name="translated-1"></a><span class="type"><a href="qlinef.html#QLineF">QLineF</a></span> QLineF::<span class="name">translated</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dx</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dy</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns this line translated the distance specified by <i>dx</i> and <i>dy</i>.</p>
<p>This function was introduced in  Qt 4.4.</p>
<!-- @@@translated -->
<!-- $$$unitVector[overload1]$$$unitVector -->
<h3 class="fn" id="unitVector"><a name="unitVector"></a><span class="type"><a href="qlinef.html#QLineF">QLineF</a></span> QLineF::<span class="name">unitVector</span>() const</h3>
<p>Returns the unit vector for this line, i.e a line starting at the same point as <i>this</i> line with a length of 1.0&#x2e;</p>
<p><b>See also </b><a href="qlinef.html#normalVector">normalVector</a>().</p>
<!-- @@@unitVector -->
<!-- $$$operator!=[overload1]$$$operator!=constQLineF& -->
<h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> QLineF::<span class="name">operator!=</span>(const <span class="type"><a href="qlinef.html#QLineF">QLineF</a></span> &amp;<i>line</i>) const</h3>
<p>Returns <code>true</code> if the given <i>line</i> is not the same as <i>this</i> line.</p>
<p>A line is different from another line if their start or end points differ, or the internal order of the points is different.</p>
<!-- @@@operator!= -->
<!-- $$$operator==[overload1]$$$operator==constQLineF& -->
<h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QLineF::<span class="name">operator==</span>(const <span class="type"><a href="qlinef.html#QLineF">QLineF</a></span> &amp;<i>line</i>) const</h3>
<p>Returns <code>true</code> if the given <i>line</i> is the same as this line.</p>
<p>A line is identical to another line if the start and end points are identical, and the internal order of the points is the same.</p>
<!-- @@@operator== -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator<<[overload1]$$$operator<<QDataStream&constQLineF& -->
<h3 class="fn" id="operator-lt-lt"><a name="operator-lt-lt"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp;<span class="name">operator&lt;&lt;</span>(<span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp;<i>stream</i>, const <span class="type"><a href="qlinef.html#QLineF">QLineF</a></span> &amp;<i>line</i>)</h3>
<p>Writes the given <i>line</i> to the given <i>stream</i> and returns a reference to the stream.</p>
<p><b>See also </b><a href="datastreamformat.html">Serializing Qt Data Types</a>.</p>
<!-- @@@operator<< -->
<!-- $$$operator>>[overload1]$$$operator>>QDataStream&QLineF& -->
<h3 class="fn" id="operator-gt-gt"><a name="operator-gt-gt"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp;<span class="name">operator&gt;&gt;</span>(<span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp;<i>stream</i>, <span class="type"><a href="qlinef.html#QLineF">QLineF</a></span> &amp;<i>line</i>)</h3>
<p>Reads a line from the given <i>stream</i> into the given <i>line</i> and returns a reference to the stream.</p>
<p><b>See also </b><a href="datastreamformat.html">Serializing Qt Data Types</a>.</p>
<!-- @@@operator>> -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>