Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 5651

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qline.cpp -->
  <title>Qt 4.8: QLineF Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtcore.html">QtCore</a></li>
<li>QLineF</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<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>
</ul>
</div>
<h1 class="title">QLineF Class Reference</h1>
<!-- $$$QLineF-brief -->
<p>The QLineF class provides a two-dimensional vector using floating point precision. <a href="#details">More...</a></p>
<!-- @@@QLineF -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QLineF&gt;</span></pre><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>Public Types</h2>
<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>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<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-2">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-3">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-4">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"> 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-2">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-2">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>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<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>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="qlinef.html#operator-lt-lt-173">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-91">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>stream</i>, QLineF &amp; <i>line</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QLineF-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QLineF class provides a two-dimensional vector using floating point precision.</p>
<p>A QLineF describes a finite length line (or line segment) on a two-dimensional surface. QLineF 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>
<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>
<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 QLineF 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>
</div>
<p><b>See also </b><a href="qline.html">QLine</a>, <a href="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"><a name="IntersectType-enum"></a>enum QLineF::<span class="name">IntersectType</span></h3>
<p>Describes the intersection between two lines.</p>
<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>
<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"><tt>QLineF::NoIntersection</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Indicates that the lines do not intersect; i.e&#x2e; they are parallel.</td></tr>
<tr><td class="topAlign"><tt>QLineF::UnboundedIntersection</tt></td><td class="topAlign"><tt>2</tt></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>
<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>
<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"><tt>QLineF::BoundedIntersection</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The two lines intersect with each other within the start and end points of each line.</td></tr>
</table>
<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"><a name="QLineF"></a>QLineF::<span class="name">QLineF</span> ()</h3>
<p>Constructs a null line.</p>
<!-- @@@QLineF -->
<!-- $$$QLineF$$$QLineFconstQPointF&constQPointF& -->
<h3 class="fn"><a name="QLineF-2"></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"><a name="QLineF-3"></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"><a name="QLineF-4"></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"><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"><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"><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"><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"><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"><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"><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"><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">QLineF</span> &amp; <i>line</i> ) const</h3>
<p>Returns the angle (in positive 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 -->
<!-- $$$dx[overload1]$$$dx -->
<h3 class="fn"><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. Return value is positive if <a href="qlinef.html#x2">x2</a>() &gt;= <a href="qlinef.html#x1">x1</a>() and negative if <a href="qlinef.html#x2">x2</a>() &lt; <a href="qlinef.html#x1">x1</a>().</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"><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. Return value is positive if <a href="qlinef.html#y2">y2</a>() &gt;= <a href="qlinef.html#y1">y1</a>() and negative if <a href="qlinef.html#y2">y2</a>() &lt; <a href="qlinef.html#y1">y1</a>().</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"><a name="fromPolar"></a><span class="type">QLineF</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> )<tt> [static]</tt></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"><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">QLineF</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"><a name="isNull"></a><span class="type">bool</span> QLineF::<span class="name">isNull</span> () const</h3>
<p>Returns true if the line is not set up with valid start and end point; otherwise returns false.</p>
<!-- @@@isNull -->
<!-- $$$length[overload1]$$$length -->
<h3 class="fn"><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"><a name="normalVector"></a><span class="type">QLineF</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"><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"><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"><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"><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"><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. If the given <i>length</i> is negative the <a href="qlinef.html#angle">angle</a>() is also changed.</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"><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"><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"><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"><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"><a name="translate-2"></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"><a name="translated"></a><span class="type">QLineF</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"><a name="translated-2"></a><span class="type">QLineF</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"><a name="unitVector"></a><span class="type">QLineF</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"><a name="operator-not-eq"></a><span class="type">bool</span> QLineF::<span class="name">operator!=</span> ( const <span class="type">QLineF</span> &amp; <i>line</i> ) const</h3>
<p>Returns true 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"><a name="operator-eq-eq"></a><span class="type">bool</span> QLineF::<span class="name">operator==</span> ( const <span class="type">QLineF</span> &amp; <i>line</i> ) const</h3>
<p>Returns true 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<<$$$operator<<QDataStream&constQLineF& -->
<h3 class="fn"><a name="operator-lt-lt-173"></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">QLineF</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>>$$$operator>>QDataStream&QLineF& -->
<h3 class="fn"><a name="operator-gt-gt-91"></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">QLineF</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 class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      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.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      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. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>