Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 6760

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" />
<!-- qtextobject.cpp -->
  <title>Qt 4.8: QTextBlock 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>QTextBlock</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">QTextBlock Class Reference</h1>
<!-- $$$QTextBlock-brief -->
<p>The QTextBlock class provides a container for text fragments in a <a href="qtextdocument.html">QTextDocument</a>. <a href="#details">More...</a></p>
<!-- @@@QTextBlock -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QTextBlock&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="qtextblock-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"> class </td><td class="memItemRight bottomAlign"><b><a href="qtextblock-iterator.html">iterator</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#Iterator-typedef">Iterator</a></b></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="qtextblock.html#QTextBlock">QTextBlock</a></b> ( const QTextBlock &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> iterator </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#begin">begin</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextBlockFormat </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#blockFormat">blockFormat</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#blockFormatIndex">blockFormatIndex</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#blockNumber">blockNumber</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextCharFormat </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#charFormat">charFormat</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#charFormatIndex">charFormatIndex</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#clearLayout">clearLayout</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#contains">contains</a></b> ( int <i>position</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QTextDocument * </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#document">document</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> iterator </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#end">end</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#firstLineNumber">firstLineNumber</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#isVisible">isVisible</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextLayout * </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#layout">layout</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#length">length</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#lineCount">lineCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextBlock </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#next">next</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#position">position</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextBlock </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#previous">previous</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#revision">revision</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#setLineCount">setLineCount</a></b> ( int <i>count</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#setRevision">setRevision</a></b> ( int <i>rev</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#setUserData">setUserData</a></b> ( QTextBlockUserData * <i>data</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#setUserState">setUserState</a></b> ( int <i>state</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#setVisible">setVisible</a></b> ( bool <i>visible</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#text">text</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::LayoutDirection </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#textDirection">textDirection</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextList * </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#textList">textList</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextBlockUserData * </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#userData">userData</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#userState">userState</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#operator-not-eq">operator!=</a></b> ( const QTextBlock &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#operator-lt">operator&lt;</a></b> ( const QTextBlock &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextBlock &amp; </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#operator-eq">operator=</a></b> ( const QTextBlock &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtextblock.html#operator-eq-eq">operator==</a></b> ( const QTextBlock &amp; <i>other</i> ) const</td></tr>
</table>
<a name="details"></a>
<!-- $$$QTextBlock-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QTextBlock class provides a container for text fragments in a <a href="qtextdocument.html">QTextDocument</a>.</p>
<p>A text block encapsulates a block or paragraph of text in a <a href="qtextdocument.html">QTextDocument</a>. QTextBlock provides read-only access to the block/paragraph structure of QTextDocuments. It is mainly of use if you want to implement your own layouts for the visual representation of a <a href="qtextdocument.html">QTextDocument</a>, or if you want to iterate over a document and write out the contents in your own custom format.</p>
<p>Text blocks are created by their parent documents. If you need to create a new text block, or modify the contents of a document while examining its contents, use the cursor-based interface provided by <a href="qtextcursor.html">QTextCursor</a> instead.</p>
<p>Each text block is located at a specific <a href="qtextblock.html#position">position</a>() in a <a href="qtextblock.html#document">document</a>(). The contents of the block can be obtained by using the <a href="qtextblock.html#text">text</a>() function. The <a href="qtextblock.html#length">length</a>() function determines the block's size within the document (including formatting characters). The visual properties of the block are determined by its text <a href="qtextblock.html#layout">layout</a>(), its <a href="qtextblock.html#charFormat">charFormat</a>(), and its <a href="qtextblock.html#blockFormat">blockFormat</a>().</p>
<p>The <a href="qtextblock.html#next">next</a>() and <a href="qtextblock.html#previous">previous</a>() functions enable iteration over consecutive valid blocks in a document under the condition that the document is not modified by other means during the iteration process. Note that, although blocks are returned in sequence, adjacent blocks may come from different places in the document structure. The validity of a block can be determined by calling <a href="qtextblock.html#isValid">isValid</a>().</p>
<p>QTextBlock provides comparison operators to make it easier to work with blocks: <a href="qtextblock.html#operator-eq-eq">operator==</a>() compares two block for equality, <a href="qtextblock.html#operator-not-eq">operator!=</a>() compares two blocks for inequality, and <a href="qtextblock.html#operator-lt">operator&lt;</a>() determines whether a block precedes another in the same document.</p>
<p class="centerAlign"><img src="images/qtextblock-sequence.png" alt="" /></p></div>
<p><b>See also </b><a href="qtextblockformat.html">QTextBlockFormat</a>, <a href="qtextcharformat.html">QTextCharFormat</a>, and <a href="qtextfragment.html">QTextFragment</a>.</p>
<!-- @@@QTextBlock -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Iterator -->
<h3 class="fn"><a name="Iterator-typedef"></a>typedef QTextBlock::<span class="name">Iterator</span></h3>
<p>Qt-style synonym for <a href="qtextblock-iterator.html">QTextBlock::iterator</a>.</p>
<!-- @@@Iterator -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QTextBlock[overload1]$$$QTextBlockconstQTextBlock& -->
<h3 class="fn"><a name="QTextBlock"></a>QTextBlock::<span class="name">QTextBlock</span> ( const <span class="type">QTextBlock</span> &amp; <i>other</i> )</h3>
<p>Copies the <i>other</i> text block's attributes to this text block.</p>
<!-- @@@QTextBlock -->
<!-- $$$begin[overload1]$$$begin -->
<h3 class="fn"><a name="begin"></a><span class="type"><a href="qtextblock-iterator.html">iterator</a></span> QTextBlock::<span class="name">begin</span> () const</h3>
<p>Returns a text block iterator pointing to the beginning of the text block.</p>
<p><b>See also </b><a href="qtextblock.html#end">end</a>().</p>
<!-- @@@begin -->
<!-- $$$blockFormat[overload1]$$$blockFormat -->
<h3 class="fn"><a name="blockFormat"></a><span class="type"><a href="qtextblockformat.html">QTextBlockFormat</a></span> QTextBlock::<span class="name">blockFormat</span> () const</h3>
<p>Returns the <a href="qtextblockformat.html">QTextBlockFormat</a> that describes block-specific properties.</p>
<p><b>See also </b><a href="qtextblock.html#charFormat">charFormat</a>().</p>
<!-- @@@blockFormat -->
<!-- $$$blockFormatIndex[overload1]$$$blockFormatIndex -->
<h3 class="fn"><a name="blockFormatIndex"></a><span class="type">int</span> QTextBlock::<span class="name">blockFormatIndex</span> () const</h3>
<p>Returns an index into the document's internal list of block formats for the text block's format.</p>
<p><b>See also </b><a href="qtextdocument.html#allFormats">QTextDocument::allFormats</a>().</p>
<!-- @@@blockFormatIndex -->
<!-- $$$blockNumber[overload1]$$$blockNumber -->
<h3 class="fn"><a name="blockNumber"></a><span class="type">int</span> QTextBlock::<span class="name">blockNumber</span> () const</h3>
<p>Returns the number of this block, or -1 if the block is invalid.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qtextcursor.html#blockNumber">QTextCursor::blockNumber</a>().</p>
<!-- @@@blockNumber -->
<!-- $$$charFormat[overload1]$$$charFormat -->
<h3 class="fn"><a name="charFormat"></a><span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span> QTextBlock::<span class="name">charFormat</span> () const</h3>
<p>Returns the <a href="qtextcharformat.html">QTextCharFormat</a> that describes the block's character format. The block's character format is used when inserting text into an empty block.</p>
<p><b>See also </b><a href="qtextblock.html#blockFormat">blockFormat</a>().</p>
<!-- @@@charFormat -->
<!-- $$$charFormatIndex[overload1]$$$charFormatIndex -->
<h3 class="fn"><a name="charFormatIndex"></a><span class="type">int</span> QTextBlock::<span class="name">charFormatIndex</span> () const</h3>
<p>Returns an index into the document's internal list of character formats for the text block's character format.</p>
<p><b>See also </b><a href="qtextdocument.html#allFormats">QTextDocument::allFormats</a>().</p>
<!-- @@@charFormatIndex -->
<!-- $$$clearLayout[overload1]$$$clearLayout -->
<h3 class="fn"><a name="clearLayout"></a><span class="type">void</span> QTextBlock::<span class="name">clearLayout</span> ()</h3>
<p>Clears the <a href="qtextlayout.html">QTextLayout</a> that is used to lay out and display the block's contents.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qtextblock.html#layout">layout</a>().</p>
<!-- @@@clearLayout -->
<!-- $$$contains[overload1]$$$containsint -->
<h3 class="fn"><a name="contains"></a><span class="type">bool</span> QTextBlock::<span class="name">contains</span> ( <span class="type">int</span> <i>position</i> ) const</h3>
<p>Returns true if the given <i>position</i> is located within the text block; otherwise returns false.</p>
<!-- @@@contains -->
<!-- $$$document[overload1]$$$document -->
<h3 class="fn"><a name="document"></a>const <span class="type"><a href="qtextdocument.html">QTextDocument</a></span> * QTextBlock::<span class="name">document</span> () const</h3>
<p>Returns the text document this text block belongs to, or 0 if the text block does not belong to any document.</p>
<!-- @@@document -->
<!-- $$$end[overload1]$$$end -->
<h3 class="fn"><a name="end"></a><span class="type"><a href="qtextblock-iterator.html">iterator</a></span> QTextBlock::<span class="name">end</span> () const</h3>
<p>Returns a text block iterator pointing to the end of the text block.</p>
<p><b>See also </b><a href="qtextblock.html#begin">begin</a>(), <a href="qtextblock.html#next">next</a>(), and <a href="qtextblock.html#previous">previous</a>().</p>
<!-- @@@end -->
<!-- $$$firstLineNumber[overload1]$$$firstLineNumber -->
<h3 class="fn"><a name="firstLineNumber"></a><span class="type">int</span> QTextBlock::<span class="name">firstLineNumber</span> () const</h3>
<p>Returns the first line number of this block, or -1 if the block is invalid. Unless the layout supports it, the line number is identical to the block number.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qtextblock.html#blockNumber">QTextBlock::blockNumber</a>().</p>
<!-- @@@firstLineNumber -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn"><a name="isValid"></a><span class="type">bool</span> QTextBlock::<span class="name">isValid</span> () const</h3>
<p>Returns true if this text block is valid; otherwise returns false.</p>
<!-- @@@isValid -->
<!-- $$$isVisible[overload1]$$$isVisible -->
<h3 class="fn"><a name="isVisible"></a><span class="type">bool</span> QTextBlock::<span class="name">isVisible</span> () const</h3>
<p>Returns true if the block is visible; otherwise returns false.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qtextblock.html#setVisible">setVisible</a>().</p>
<!-- @@@isVisible -->
<!-- $$$layout[overload1]$$$layout -->
<h3 class="fn"><a name="layout"></a><span class="type"><a href="qtextlayout.html">QTextLayout</a></span> * QTextBlock::<span class="name">layout</span> () const</h3>
<p>Returns the <a href="qtextlayout.html">QTextLayout</a> that is used to lay out and display the block's contents.</p>
<p>Note that the returned <a href="qtextlayout.html">QTextLayout</a> object can only be modified from the documentChanged implementation of a <a href="qabstracttextdocumentlayout.html">QAbstractTextDocumentLayout</a> subclass. Any changes applied from the outside cause undefined behavior.</p>
<p><b>See also </b><a href="qtextblock.html#clearLayout">clearLayout</a>().</p>
<!-- @@@layout -->
<!-- $$$length[overload1]$$$length -->
<h3 class="fn"><a name="length"></a><span class="type">int</span> QTextBlock::<span class="name">length</span> () const</h3>
<p>Returns the length of the block in characters.</p>
<p><b>Note:</b> The length returned includes all formatting characters, for example, newline.</p>
<p><b>See also </b><a href="qtextblock.html#text">text</a>(), <a href="qtextblock.html#charFormat">charFormat</a>(), and <a href="qtextblock.html#blockFormat">blockFormat</a>().</p>
<!-- @@@length -->
<!-- $$$lineCount[overload1]$$$lineCount -->
<h3 class="fn"><a name="lineCount"></a><span class="type">int</span> QTextBlock::<span class="name">lineCount</span> () const</h3>
<p>Returns the line count. Not all document layouts support this feature.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qtextblock.html#setLineCount">setLineCount</a>().</p>
<!-- @@@lineCount -->
<!-- $$$next[overload1]$$$next -->
<h3 class="fn"><a name="next"></a><span class="type">QTextBlock</span> QTextBlock::<span class="name">next</span> () const</h3>
<p>Returns the text block in the document after this block, or an empty text block if this is the last one.</p>
<p>Note that the next block may be in a different frame or table to this block.</p>
<p><b>See also </b><a href="qtextblock.html#previous">previous</a>(), <a href="qtextblock.html#begin">begin</a>(), and <a href="qtextblock.html#end">end</a>().</p>
<!-- @@@next -->
<!-- $$$position[overload1]$$$position -->
<h3 class="fn"><a name="position"></a><span class="type">int</span> QTextBlock::<span class="name">position</span> () const</h3>
<p>Returns the index of the block's first character within the document.</p>
<!-- @@@position -->
<!-- $$$previous[overload1]$$$previous -->
<h3 class="fn"><a name="previous"></a><span class="type">QTextBlock</span> QTextBlock::<span class="name">previous</span> () const</h3>
<p>Returns the text block in the document before this block, or an empty text block if this is the first one.</p>
<p>Note that the next block may be in a different frame or table to this block.</p>
<p><b>See also </b><a href="qtextblock.html#next">next</a>(), <a href="qtextblock.html#begin">begin</a>(), and <a href="qtextblock.html#end">end</a>().</p>
<!-- @@@previous -->
<!-- $$$revision[overload1]$$$revision -->
<h3 class="fn"><a name="revision"></a><span class="type">int</span> QTextBlock::<span class="name">revision</span> () const</h3>
<p>Returns the blocks revision.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qtextblock.html#setRevision">setRevision</a>() and <a href="qtextdocument.html#revision">QTextDocument::revision</a>().</p>
<!-- @@@revision -->
<!-- $$$setLineCount[overload1]$$$setLineCountint -->
<h3 class="fn"><a name="setLineCount"></a><span class="type">void</span> QTextBlock::<span class="name">setLineCount</span> ( <span class="type">int</span> <i>count</i> )</h3>
<p>Sets the line count to <i>count</i>.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qtextblock.html#lineCount">lineCount</a>().</p>
<!-- @@@setLineCount -->
<!-- $$$setRevision[overload1]$$$setRevisionint -->
<h3 class="fn"><a name="setRevision"></a><span class="type">void</span> QTextBlock::<span class="name">setRevision</span> ( <span class="type">int</span> <i>rev</i> )</h3>
<p>Sets a blocks revision to <i>rev</i>.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qtextblock.html#revision">revision</a>() and <a href="qtextdocument.html#revision">QTextDocument::revision</a>().</p>
<!-- @@@setRevision -->
<!-- $$$setUserData[overload1]$$$setUserDataQTextBlockUserData* -->
<h3 class="fn"><a name="setUserData"></a><span class="type">void</span> QTextBlock::<span class="name">setUserData</span> ( <span class="type"><a href="qtextblockuserdata.html">QTextBlockUserData</a></span> * <i>data</i> )</h3>
<p>Attaches the given <i>data</i> object to the text block.</p>
<p><a href="qtextblockuserdata.html">QTextBlockUserData</a> can be used to store custom settings. The ownership is passed to the underlying text document, i.e&#x2e; the provided <a href="qtextblockuserdata.html">QTextBlockUserData</a> object will be deleted if the corresponding text block gets deleted. The user data object is not stored in the undo history, so it will not be available after undoing the deletion of a text block.</p>
<p>For example, if you write a programming editor in an IDE, you may want to let your user set breakpoints visually in your code for an integrated debugger. In a programming editor a line of text usually corresponds to one <a href="qtextblock.html">QTextBlock</a>. The <a href="qtextblockuserdata.html">QTextBlockUserData</a> interface allows the developer to store data for each <a href="qtextblock.html">QTextBlock</a>, like for example in which lines of the source code the user has a breakpoint set. Of course this could also be stored externally, but by storing it inside the <a href="qtextdocument.html">QTextDocument</a>, it will for example be automatically deleted when the user deletes the associated line. It's really just a way to store custom information in the <a href="qtextdocument.html">QTextDocument</a> without using custom properties in <a href="qtextformat.html">QTextFormat</a> which would affect the undo/redo stack.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qtextblock.html#userData">userData</a>().</p>
<!-- @@@setUserData -->
<!-- $$$setUserState[overload1]$$$setUserStateint -->
<h3 class="fn"><a name="setUserState"></a><span class="type">void</span> QTextBlock::<span class="name">setUserState</span> ( <span class="type">int</span> <i>state</i> )</h3>
<p>Stores the specified <i>state</i> integer value in the text block. This may be useful for example in a syntax highlighter to store a text parsing state.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qtextblock.html#userState">userState</a>().</p>
<!-- @@@setUserState -->
<!-- $$$setVisible[overload1]$$$setVisiblebool -->
<h3 class="fn"><a name="setVisible"></a><span class="type">void</span> QTextBlock::<span class="name">setVisible</span> ( <span class="type">bool</span> <i>visible</i> )</h3>
<p>Sets the block's visibility to <i>visible</i>.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qtextblock.html#isVisible">isVisible</a>().</p>
<!-- @@@setVisible -->
<!-- $$$text[overload1]$$$text -->
<h3 class="fn"><a name="text"></a><span class="type"><a href="qstring.html">QString</a></span> QTextBlock::<span class="name">text</span> () const</h3>
<p>Returns the block's contents as plain text.</p>
<p><b>See also </b><a href="qtextblock.html#length">length</a>(), <a href="qtextblock.html#charFormat">charFormat</a>(), and <a href="qtextblock.html#blockFormat">blockFormat</a>().</p>
<!-- @@@text -->
<!-- $$$textDirection[overload1]$$$textDirection -->
<h3 class="fn"><a name="textDirection"></a><span class="type"><a href="qt.html#LayoutDirection-enum">Qt::LayoutDirection</a></span> QTextBlock::<span class="name">textDirection</span> () const</h3>
<p>Returns the resolved text direction.</p>
<p>If the block has no explicit direction set, it will resolve the direction from the blocks content. Returns either <a href="qt.html#LayoutDirection-enum">Qt::LeftToRight</a> or <a href="qt.html#LayoutDirection-enum">Qt::RightToLeft</a>.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also </b><a href="qtextformat.html#layoutDirection">QTextFormat::layoutDirection</a>(), <a href="qstring.html#isRightToLeft">QString::isRightToLeft</a>(), and <a href="qt.html#LayoutDirection-enum">Qt::LayoutDirection</a>.</p>
<!-- @@@textDirection -->
<!-- $$$textList[overload1]$$$textList -->
<h3 class="fn"><a name="textList"></a><span class="type"><a href="qtextlist.html">QTextList</a></span> * QTextBlock::<span class="name">textList</span> () const</h3>
<p>If the block represents a list item, returns the list that the item belongs to; otherwise returns 0.</p>
<!-- @@@textList -->
<!-- $$$userData[overload1]$$$userData -->
<h3 class="fn"><a name="userData"></a><span class="type"><a href="qtextblockuserdata.html">QTextBlockUserData</a></span> * QTextBlock::<span class="name">userData</span> () const</h3>
<p>Returns a pointer to a <a href="qtextblockuserdata.html">QTextBlockUserData</a> object if previously set with <a href="qtextblock.html#setUserData">setUserData</a>() or a null pointer.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qtextblock.html#setUserData">setUserData</a>().</p>
<!-- @@@userData -->
<!-- $$$userState[overload1]$$$userState -->
<h3 class="fn"><a name="userState"></a><span class="type">int</span> QTextBlock::<span class="name">userState</span> () const</h3>
<p>Returns the integer value previously set with <a href="qtextblock.html#setUserState">setUserState</a>() or -1.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qtextblock.html#setUserState">setUserState</a>().</p>
<!-- @@@userState -->
<!-- $$$operator!=[overload1]$$$operator!=constQTextBlock& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QTextBlock::<span class="name">operator!=</span> ( const <span class="type">QTextBlock</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this text block is different from the <i>other</i> text block.</p>
<!-- @@@operator!= -->
<!-- $$$operator<[overload1]$$$operator<constQTextBlock& -->
<h3 class="fn"><a name="operator-lt"></a><span class="type">bool</span> QTextBlock::<span class="name">operator&lt;</span> ( const <span class="type">QTextBlock</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this text block occurs before the <i>other</i> text block in the document.</p>
<!-- @@@operator< -->
<!-- $$$operator=[overload1]$$$operator=constQTextBlock& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QTextBlock</span> &amp; QTextBlock::<span class="name">operator=</span> ( const <span class="type">QTextBlock</span> &amp; <i>other</i> )</h3>
<p>Assigns the <i>other</i> text block to this text block.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQTextBlock& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QTextBlock::<span class="name">operator==</span> ( const <span class="type">QTextBlock</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this text block is the same as the <i>other</i> text block.</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>