Sophie

Sophie

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

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" />
<!-- qtextlayout.cpp -->
  <title>Qt 4.8: QTextLine 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="qtgui.html">QtGui</a></li>
<li>QTextLine</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="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QTextLine Class Reference</h1>
<!-- $$$QTextLine-brief -->
<p>The QTextLine class represents a line of text inside a <a href="qtextlayout.html">QTextLayout</a>. <a href="#details">More...</a></p>
<!-- @@@QTextLine -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QTextLine&gt;</span></pre><p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<ul>
<li><a href="qtextline-members.html">List of all members, including inherited 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="qtextline.html#CursorPosition-enum">CursorPosition</a></b> { CursorBetweenCharacters, CursorOnCharacter }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#Edge-enum">Edge</a></b> { Leading, Trailing }</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="qtextline.html#QTextLine">QTextLine</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#ascent">ascent</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#cursorToX">cursorToX</a></b> ( int * <i>cursorPos</i>, Edge <i>edge</i> = Leading ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#cursorToX-2">cursorToX</a></b> ( int <i>cursorPos</i>, Edge <i>edge</i> = Leading ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#descent">descent</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#draw">draw</a></b> ( QPainter * <i>painter</i>, const QPointF &amp; <i>position</i>, const QTextLayout::FormatRange * <i>selection</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#height">height</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#horizontalAdvance">horizontalAdvance</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#leading">leading</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#leadingIncluded">leadingIncluded</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#lineNumber">lineNumber</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#naturalTextRect">naturalTextRect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#naturalTextWidth">naturalTextWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#position">position</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#rect">rect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#setLeadingIncluded">setLeadingIncluded</a></b> ( bool <i>included</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#setLineWidth">setLineWidth</a></b> ( qreal <i>width</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#setNumColumns">setNumColumns</a></b> ( int <i>numColumns</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#setNumColumns-2">setNumColumns</a></b> ( int <i>numColumns</i>, qreal <i>alignmentWidth</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#setPosition">setPosition</a></b> ( const QPointF &amp; <i>pos</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#textLength">textLength</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#textStart">textStart</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#width">width</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#x">x</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#xToCursor">xToCursor</a></b> ( qreal <i>x</i>, CursorPosition <i>cpos</i> = CursorBetweenCharacters ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qtextline.html#y">y</a></b> () const</td></tr>
</table>
<a name="details"></a>
<!-- $$$QTextLine-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QTextLine class represents a line of text inside a <a href="qtextlayout.html">QTextLayout</a>.</p>
<p>A text line is usually created by <a href="qtextlayout.html#createLine">QTextLayout::createLine</a>().</p>
<p>After being created, the line can be filled using the <a href="qtextline.html#setLineWidth">setLineWidth</a>() or <a href="qtextline.html#setNumColumns">setNumColumns</a>() functions. A line has a number of attributes including the rectangle it occupies, <a href="qtextline.html#rect">rect</a>(), its coordinates, <a href="qtextline.html#x">x</a>() and <a href="qtextline.html#y">y</a>(), its <a href="qtextline.html#textLength">textLength</a>(), <a href="qtextline.html#width">width</a>() and <a href="qtextline.html#naturalTextWidth">naturalTextWidth</a>(), and its <a href="qtextline.html#ascent">ascent</a>() and decent() relative to the text. The position of the cursor in terms of the line is available from <a href="qtextline.html#cursorToX">cursorToX</a>() and its inverse from <a href="qtextline.html#xToCursor">xToCursor</a>(). A line can be moved with <a href="qtextline.html#setPosition">setPosition</a>().</p>
</div>
<!-- @@@QTextLine -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$CursorPosition$$$CursorBetweenCharacters$$$CursorOnCharacter -->
<h3 class="fn"><a name="CursorPosition-enum"></a>enum QTextLine::<span class="name">CursorPosition</span></h3>
<table class="valuelist"><tr><th class="tblConst">Constant</th><th class="tblVal">Value</th></tr>
<tr><td class="topAlign"><tt>QTextLine::CursorBetweenCharacters</tt></td><td class="topAlign"><tt>0</tt></td></tr>
<tr><td class="topAlign"><tt>QTextLine::CursorOnCharacter</tt></td><td class="topAlign"><tt>1</tt></td></tr>
</table>
<!-- @@@CursorPosition -->
<!-- $$$Edge$$$Leading$$$Trailing -->
<h3 class="fn"><a name="Edge-enum"></a>enum QTextLine::<span class="name">Edge</span></h3>
<table class="valuelist"><tr><th class="tblConst">Constant</th><th class="tblVal">Value</th></tr>
<tr><td class="topAlign"><tt>QTextLine::Leading</tt></td><td class="topAlign"><tt>0</tt></td></tr>
<tr><td class="topAlign"><tt>QTextLine::Trailing</tt></td><td class="topAlign"><tt>1</tt></td></tr>
</table>
<!-- @@@Edge -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QTextLine[overload1]$$$QTextLine -->
<h3 class="fn"><a name="QTextLine"></a>QTextLine::<span class="name">QTextLine</span> ()</h3>
<p>Creates an invalid line.</p>
<!-- @@@QTextLine -->
<!-- $$$ascent[overload1]$$$ascent -->
<h3 class="fn"><a name="ascent"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTextLine::<span class="name">ascent</span> () const</h3>
<p>Returns the line's ascent.</p>
<p><b>See also </b><a href="qtextline.html#descent">descent</a>() and <a href="qtextline.html#height">height</a>().</p>
<!-- @@@ascent -->
<!-- $$$cursorToX[overload1]$$$cursorToXint*Edge -->
<h3 class="fn"><a name="cursorToX"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTextLine::<span class="name">cursorToX</span> ( <span class="type">int</span> * <i>cursorPos</i>, <span class="type"><a href="qtextline.html#Edge-enum">Edge</a></span> <i>edge</i> = Leading ) const</h3>
<p>Converts the cursor position <i>cursorPos</i> to the corresponding x position inside the line, taking account of the <i>edge</i>.</p>
<p>If <i>cursorPos</i> is not a valid cursor position, the nearest valid cursor position will be used instead, and cpos will be modified to point to this valid cursor position.</p>
<p><b>See also </b><a href="qtextline.html#xToCursor">xToCursor</a>().</p>
<!-- @@@cursorToX -->
<!-- $$$cursorToX$$$cursorToXintEdge -->
<h3 class="fn"><a name="cursorToX-2"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTextLine::<span class="name">cursorToX</span> ( <span class="type">int</span> <i>cursorPos</i>, <span class="type"><a href="qtextline.html#Edge-enum">Edge</a></span> <i>edge</i> = Leading ) const</h3>
<p>This is an overloaded function.</p>
<!-- @@@cursorToX -->
<!-- $$$descent[overload1]$$$descent -->
<h3 class="fn"><a name="descent"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTextLine::<span class="name">descent</span> () const</h3>
<p>Returns the line's descent.</p>
<p><b>See also </b><a href="qtextline.html#ascent">ascent</a>() and <a href="qtextline.html#height">height</a>().</p>
<!-- @@@descent -->
<!-- $$$draw[overload1]$$$drawQPainter*constQPointF&constQTextLayout::FormatRange* -->
<h3 class="fn"><a name="draw"></a><span class="type">void</span> QTextLine::<span class="name">draw</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>position</i>, const <span class="type"><a href="qtextlayout-formatrange.html">QTextLayout::FormatRange</a></span> * <i>selection</i> = 0 ) const</h3>
<p>Draws a line on the given <i>painter</i> at the specified <i>position</i>. The <i>selection</i> is reserved for internal use.</p>
<!-- @@@draw -->
<!-- $$$height[overload1]$$$height -->
<h3 class="fn"><a name="height"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTextLine::<span class="name">height</span> () const</h3>
<p>Returns the line's height. This is equal to <a href="qtextline.html#ascent">ascent</a>() + <a href="qtextline.html#descent">descent</a>() + 1 if leading is not included. If leading is included, this equals to <a href="qtextline.html#ascent">ascent</a>() + <a href="qtextline.html#descent">descent</a>() + <a href="qtextline.html#leading">leading</a>() + 1.</p>
<p><b>See also </b><a href="qtextline.html#ascent">ascent</a>(), <a href="qtextline.html#descent">descent</a>(), <a href="qtextline.html#leading">leading</a>(), and <a href="qtextline.html#setLeadingIncluded">setLeadingIncluded</a>().</p>
<!-- @@@height -->
<!-- $$$horizontalAdvance[overload1]$$$horizontalAdvance -->
<h3 class="fn"><a name="horizontalAdvance"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTextLine::<span class="name">horizontalAdvance</span> () const</h3>
<p>Returns the horizontal advance of the text. The advance of the text is the distance from its position to the next position at which text would naturally be drawn.</p>
<p>By adding the advance to the position of the text line and using this as the position of a second text line, you will be able to position the two lines side-by-side without gaps in-between.</p>
<p>This function was introduced in Qt 4.7.</p>
<!-- @@@horizontalAdvance -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn"><a name="isValid"></a><span class="type">bool</span> QTextLine::<span class="name">isValid</span> () const</h3>
<p>Returns true if this text line is valid; otherwise returns false.</p>
<!-- @@@isValid -->
<!-- $$$leading[overload1]$$$leading -->
<h3 class="fn"><a name="leading"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTextLine::<span class="name">leading</span> () const</h3>
<p>Returns the line's leading.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qtextline.html#ascent">ascent</a>(), <a href="qtextline.html#descent">descent</a>(), and <a href="qtextline.html#height">height</a>().</p>
<!-- @@@leading -->
<!-- $$$leadingIncluded[overload1]$$$leadingIncluded -->
<h3 class="fn"><a name="leadingIncluded"></a><span class="type">bool</span> QTextLine::<span class="name">leadingIncluded</span> () const</h3>
<p>Returns true if positive leading is included into the line's height; otherwise returns false.</p>
<p>By default, leading is not included.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qtextline.html#setLeadingIncluded">setLeadingIncluded</a>().</p>
<!-- @@@leadingIncluded -->
<!-- $$$lineNumber[overload1]$$$lineNumber -->
<h3 class="fn"><a name="lineNumber"></a><span class="type">int</span> QTextLine::<span class="name">lineNumber</span> () const</h3>
<p>Returns the position of the line in the text engine.</p>
<!-- @@@lineNumber -->
<!-- $$$naturalTextRect[overload1]$$$naturalTextRect -->
<h3 class="fn"><a name="naturalTextRect"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QTextLine::<span class="name">naturalTextRect</span> () const</h3>
<p>Returns the rectangle covered by the line.</p>
<!-- @@@naturalTextRect -->
<!-- $$$naturalTextWidth[overload1]$$$naturalTextWidth -->
<h3 class="fn"><a name="naturalTextWidth"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTextLine::<span class="name">naturalTextWidth</span> () const</h3>
<p>Returns the width of the line that is occupied by text. This is always &lt;= to <a href="qtextline.html#width">width</a>(), and is the minimum width that could be used by layout() without changing the line break position.</p>
<!-- @@@naturalTextWidth -->
<!-- $$$position[overload1]$$$position -->
<h3 class="fn"><a name="position"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QTextLine::<span class="name">position</span> () const</h3>
<p>Returns the line's position relative to the text layout's position.</p>
<p><b>See also </b><a href="qtextline.html#setPosition">setPosition</a>().</p>
<!-- @@@position -->
<!-- $$$rect[overload1]$$$rect -->
<h3 class="fn"><a name="rect"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QTextLine::<span class="name">rect</span> () const</h3>
<p>Returns the line's bounding rectangle.</p>
<p><b>See also </b><a href="qtextline.html#x">x</a>(), <a href="qtextline.html#y">y</a>(), <a href="qtextline.html#textLength">textLength</a>(), and <a href="qtextline.html#width">width</a>().</p>
<!-- @@@rect -->
<!-- $$$setLeadingIncluded[overload1]$$$setLeadingIncludedbool -->
<h3 class="fn"><a name="setLeadingIncluded"></a><span class="type">void</span> QTextLine::<span class="name">setLeadingIncluded</span> ( <span class="type">bool</span> <i>included</i> )</h3>
<p>Includes positive leading into the line's height if <i>included</i> is true; otherwise does not include leading.</p>
<p>By default, leading is not included.</p>
<p>Note that negative leading is ignored, it must be handled in the code using the text lines by letting the lines overlap.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qtextline.html#leadingIncluded">leadingIncluded</a>().</p>
<!-- @@@setLeadingIncluded -->
<!-- $$$setLineWidth[overload1]$$$setLineWidthqreal -->
<h3 class="fn"><a name="setLineWidth"></a><span class="type">void</span> QTextLine::<span class="name">setLineWidth</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>width</i> )</h3>
<p>Lays out the line with the given <i>width</i>. The line is filled from its starting position with as many characters as will fit into the line. In case the text cannot be split at the end of the line, it will be filled with additional characters to the next whitespace or end of the text.</p>
<!-- @@@setLineWidth -->
<!-- $$$setNumColumns[overload1]$$$setNumColumnsint -->
<h3 class="fn"><a name="setNumColumns"></a><span class="type">void</span> QTextLine::<span class="name">setNumColumns</span> ( <span class="type">int</span> <i>numColumns</i> )</h3>
<p>Lays out the line. The line is filled from its starting position with as many characters as are specified by <i>numColumns</i>. In case the text cannot be split until <i>numColumns</i> characters, the line will be filled with as many characters to the next whitespace or end of the text.</p>
<!-- @@@setNumColumns -->
<!-- $$$setNumColumns$$$setNumColumnsintqreal -->
<h3 class="fn"><a name="setNumColumns-2"></a><span class="type">void</span> QTextLine::<span class="name">setNumColumns</span> ( <span class="type">int</span> <i>numColumns</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>alignmentWidth</i> )</h3>
<p>Lays out the line. The line is filled from its starting position with as many characters as are specified by <i>numColumns</i>. In case the text cannot be split until <i>numColumns</i> characters, the line will be filled with as many characters to the next whitespace or end of the text. The provided <i>alignmentWidth</i> is used as reference width for alignment.</p>
<!-- @@@setNumColumns -->
<!-- $$$setPosition[overload1]$$$setPositionconstQPointF& -->
<h3 class="fn"><a name="setPosition"></a><span class="type">void</span> QTextLine::<span class="name">setPosition</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>pos</i> )</h3>
<p>Moves the line to position <i>pos</i>.</p>
<p><b>See also </b><a href="qtextline.html#position">position</a>().</p>
<!-- @@@setPosition -->
<!-- $$$textLength[overload1]$$$textLength -->
<h3 class="fn"><a name="textLength"></a><span class="type">int</span> QTextLine::<span class="name">textLength</span> () const</h3>
<p>Returns the length of the text in the line.</p>
<p><b>See also </b><a href="qtextline.html#naturalTextWidth">naturalTextWidth</a>().</p>
<!-- @@@textLength -->
<!-- $$$textStart[overload1]$$$textStart -->
<h3 class="fn"><a name="textStart"></a><span class="type">int</span> QTextLine::<span class="name">textStart</span> () const</h3>
<p>Returns the start of the line from the beginning of the string passed to the <a href="qtextlayout.html">QTextLayout</a>.</p>
<!-- @@@textStart -->
<!-- $$$width[overload1]$$$width -->
<h3 class="fn"><a name="width"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTextLine::<span class="name">width</span> () const</h3>
<p>Returns the line's width as specified by the layout() function.</p>
<p><b>See also </b><a href="qtextline.html#naturalTextWidth">naturalTextWidth</a>(), <a href="qtextline.html#x">x</a>(), <a href="qtextline.html#y">y</a>(), <a href="qtextline.html#textLength">textLength</a>(), and <a href="qtextline.html#rect">rect</a>().</p>
<!-- @@@width -->
<!-- $$$x[overload1]$$$x -->
<h3 class="fn"><a name="x"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTextLine::<span class="name">x</span> () const</h3>
<p>Returns the line's x position.</p>
<p><b>See also </b><a href="qtextline.html#rect">rect</a>(), <a href="qtextline.html#y">y</a>(), <a href="qtextline.html#textLength">textLength</a>(), and <a href="qtextline.html#width">width</a>().</p>
<!-- @@@x -->
<!-- $$$xToCursor[overload1]$$$xToCursorqrealCursorPosition -->
<h3 class="fn"><a name="xToCursor"></a><span class="type">int</span> QTextLine::<span class="name">xToCursor</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtextline.html#CursorPosition-enum">CursorPosition</a></span> <i>cpos</i> = CursorBetweenCharacters ) const</h3>
<p>Converts the x-coordinate <i>x</i>, to the nearest matching cursor position, depending on the cursor position type, <i>cpos</i>.</p>
<p><b>See also </b><a href="qtextline.html#cursorToX">cursorToX</a>().</p>
<!-- @@@xToCursor -->
<!-- $$$y[overload1]$$$y -->
<h3 class="fn"><a name="y"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTextLine::<span class="name">y</span> () const</h3>
<p>Returns the line's y position.</p>
<p><b>See also </b><a href="qtextline.html#x">x</a>(), <a href="qtextline.html#rect">rect</a>(), <a href="qtextline.html#textLength">textLength</a>(), and <a href="qtextline.html#width">width</a>().</p>
<!-- @@@y -->
</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>