Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 4823

qt-doc-4.8.5-10.fc18.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" />
<!-- qabstracttextdocumentlayout.cpp -->
  <title>Qt 4.8: QAbstractTextDocumentLayout 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>QAbstractTextDocumentLayout</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="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QAbstractTextDocumentLayout Class Reference</h1>
<!-- $$$QAbstractTextDocumentLayout-brief -->
<p>The QAbstractTextDocumentLayout class is an abstract base class used to implement custom layouts for QTextDocuments. <a href="#details">More...</a></p>
<!-- @@@QAbstractTextDocumentLayout -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QAbstractTextDocumentLayout&gt;</span></pre><p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<p><b>Inherited by: </b><a href="qplaintextdocumentlayout.html">QPlainTextDocumentLayout</a>.</p>
<p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<ul>
<li><a href="qabstracttextdocumentlayout-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="qabstracttextdocumentlayout-paintcontext.html">PaintContext</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout-selection.html">Selection</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="qabstracttextdocumentlayout.html#QAbstractTextDocumentLayout">QAbstractTextDocumentLayout</a></b> ( QTextDocument * <i>document</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#anchorAt">anchorAt</a></b> ( const QPointF &amp; <i>position</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QRectF </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#blockBoundingRect">blockBoundingRect</a></b> ( const QTextBlock &amp; <i>block</i> ) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextDocument * </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#document">document</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSizeF </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#documentSize">documentSize</a></b> () const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#draw">draw</a></b> ( QPainter * <i>painter</i>, const PaintContext &amp; <i>context</i> ) = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QRectF </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#frameBoundingRect">frameBoundingRect</a></b> ( QTextFrame * <i>frame</i> ) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextObjectInterface * </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#handlerForObject">handlerForObject</a></b> ( int <i>objectType</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#hitTest">hitTest</a></b> ( const QPointF &amp; <i>point</i>, Qt::HitTestAccuracy <i>accuracy</i> ) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#pageCount">pageCount</a></b> () const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPaintDevice * </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#paintDevice">paintDevice</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#registerHandler">registerHandler</a></b> ( int <i>objectType</i>, QObject * <i>component</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#setPaintDevice">setPaintDevice</a></b> ( QPaintDevice * <i>device</i> )</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#documentSizeChanged">documentSizeChanged</a></b> ( const QSizeF &amp; <i>newSize</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#pageCountChanged">pageCountChanged</a></b> ( int <i>newPages</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#update">update</a></b> ( const QRectF &amp; <i>rect</i> = QRectF( 0., 0., 1000000000., 1000000000. ) )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#updateBlock">updateBlock</a></b> ( const QTextBlock &amp; <i>block</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#documentChanged">documentChanged</a></b> ( int <i>position</i>, int <i>charsRemoved</i>, int <i>charsAdded</i> ) = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#drawInlineObject">drawInlineObject</a></b> ( QPainter * <i>painter</i>, const QRectF &amp; <i>rect</i>, QTextInlineObject <i>object</i>, int <i>posInDocument</i>, const QTextFormat &amp; <i>format</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTextCharFormat </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#format">format</a></b> ( int <i>position</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#positionInlineObject">positionInlineObject</a></b> ( QTextInlineObject <i>item</i>, int <i>posInDocument</i>, const QTextFormat &amp; <i>format</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#resizeInlineObject">resizeInlineObject</a></b> ( QTextInlineObject <i>item</i>, int <i>posInDocument</i>, const QTextFormat &amp; <i>format</i> )</td></tr>
</table>
<ul>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QAbstractTextDocumentLayout-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QAbstractTextDocumentLayout class is an abstract base class used to implement custom layouts for QTextDocuments.</p>
<p>The standard layout provided by Qt can handle simple word processing including inline images, lists and tables.</p>
<p>Some applications, e.g&#x2e;, a word processor or a DTP application might need more features than the ones provided by Qt's layout engine, in which case you can subclass QAbstractTextDocumentLayout to provide custom layout behavior for your text documents.</p>
<p>An instance of the QAbstractTextDocumentLayout subclass can be installed on a <a href="qtextdocument.html">QTextDocument</a> object with the <a href="qtextdocument.html#setDocumentLayout">setDocumentLayout()</a> function.</p>
<p>You can insert custom objects into a <a href="qtextdocument.html">QTextDocument</a>; see the <a href="qtextobjectinterface.html">QTextObjectInterface</a> class description for details.</p>
</div>
<p><b>See also </b><a href="qtextobjectinterface.html">QTextObjectInterface</a>.</p>
<!-- @@@QAbstractTextDocumentLayout -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QAbstractTextDocumentLayout[overload1]$$$QAbstractTextDocumentLayoutQTextDocument* -->
<h3 class="fn"><a name="QAbstractTextDocumentLayout"></a>QAbstractTextDocumentLayout::<span class="name">QAbstractTextDocumentLayout</span> ( <span class="type"><a href="qtextdocument.html">QTextDocument</a></span> * <i>document</i> )</h3>
<p>Creates a new text document layout for the given <i>document</i>.</p>
<!-- @@@QAbstractTextDocumentLayout -->
<!-- $$$anchorAt[overload1]$$$anchorAtconstQPointF& -->
<h3 class="fn"><a name="anchorAt"></a><span class="type"><a href="qstring.html">QString</a></span> QAbstractTextDocumentLayout::<span class="name">anchorAt</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>position</i> ) const</h3>
<p>Returns the reference of the anchor the given <i>position</i>, or an empty string if no anchor exists at that point.</p>
<!-- @@@anchorAt -->
<!-- $$$blockBoundingRect[overload1]$$$blockBoundingRectconstQTextBlock& -->
<h3 class="fn"><a name="blockBoundingRect"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QAbstractTextDocumentLayout::<span class="name">blockBoundingRect</span> ( const <span class="type"><a href="qtextblock.html">QTextBlock</a></span> &amp; <i>block</i> ) const<tt> [pure virtual]</tt></h3>
<p>Returns the bounding rectangle of <i>block</i>.</p>
<!-- @@@blockBoundingRect -->
<!-- $$$document[overload1]$$$document -->
<h3 class="fn"><a name="document"></a><span class="type"><a href="qtextdocument.html">QTextDocument</a></span> * QAbstractTextDocumentLayout::<span class="name">document</span> () const</h3>
<p>Returns the text document that this layout is operating on.</p>
<!-- @@@document -->
<!-- $$$documentChanged[overload1]$$$documentChangedintintint -->
<h3 class="fn"><a name="documentChanged"></a><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">documentChanged</span> ( <span class="type">int</span> <i>position</i>, <span class="type">int</span> <i>charsRemoved</i>, <span class="type">int</span> <i>charsAdded</i> )<tt> [pure virtual protected]</tt></h3>
<p>This function is called whenever the contents of the document change. A change occurs when text is inserted, removed, or a combination of these two. The change is specified by <i>position</i>, <i>charsRemoved</i>, and <i>charsAdded</i> corresponding to the starting character position of the change, the number of characters removed from the document, and the number of characters added.</p>
<p>For example, when inserting the text &quot;Hello&quot; into an empty document, <i>charsRemoved</i> would be 0 and <i>charsAdded</i> would be 5 (the length of the string).</p>
<p>Replacing text is a combination of removing and inserting. For example, if the text &quot;Hello&quot; gets replaced by &quot;Hi&quot;, <i>charsRemoved</i> would be 5 and <i>charsAdded</i> would be 2.</p>
<p>For subclasses of <a href="qabstracttextdocumentlayout.html">QAbstractTextDocumentLayout</a>, this is the central function where a large portion of the work to lay out and position document contents is done.</p>
<p>For example, in a subclass that only arranges blocks of text, an implementation of this function would have to do the following:</p>
<ul>
<li>Determine the list of changed <a href="qtextblock.html">QTextBlock</a>(s) using the parameters provided.</li>
<li>Each <a href="qtextblock.html">QTextBlock</a> object's corresponding <a href="qtextlayout.html">QTextLayout</a> object needs to be processed. You can access the <a href="qtextblock.html">QTextBlock</a>'s layout using the <a href="qtextblock.html#layout">QTextBlock::layout</a>() function. This processing should take the document's page size into consideration.</li>
<li>If the total number of pages changed, the <a href="qabstracttextdocumentlayout.html#pageCountChanged">pageCountChanged</a>() signal should be emitted.</li>
<li>If the total size changed, the <a href="qabstracttextdocumentlayout.html#documentSizeChanged">documentSizeChanged</a>() signal should be emitted.</li>
<li>The <a href="qabstracttextdocumentlayout.html#update">update</a>() signal should be emitted to schedule a repaint of areas in the layout that require repainting.</li>
</ul>
<p><b>See also </b><a href="qtextlayout.html">QTextLayout</a>.</p>
<!-- @@@documentChanged -->
<!-- $$$documentSize[overload1]$$$documentSize -->
<h3 class="fn"><a name="documentSize"></a><span class="type"><a href="qsizef.html">QSizeF</a></span> QAbstractTextDocumentLayout::<span class="name">documentSize</span> () const<tt> [pure virtual]</tt></h3>
<p>Returns the total size of the document's layout.</p>
<p>This information can be used by display widgets to update their scroll bars correctly.</p>
<p><b>See also </b><a href="qabstracttextdocumentlayout.html#documentSizeChanged">documentSizeChanged</a>() and <a href="qtextdocument.html#pageSize-prop">QTextDocument::pageSize</a>.</p>
<!-- @@@documentSize -->
<!-- $$$documentSizeChanged[overload1]$$$documentSizeChangedconstQSizeF& -->
<h3 class="fn"><a name="documentSizeChanged"></a><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">documentSizeChanged</span> ( const <span class="type"><a href="qsizef.html">QSizeF</a></span> &amp; <i>newSize</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the size of the document layout changes to <i>newSize</i>.</p>
<p>Subclasses of <a href="qabstracttextdocumentlayout.html">QAbstractTextDocumentLayout</a> should emit this signal when the document's entire layout size changes. This signal is useful for widgets that display text documents since it enables them to update their scroll bars correctly.</p>
<p><b>See also </b><a href="qabstracttextdocumentlayout.html#documentSize">documentSize</a>().</p>
<!-- @@@documentSizeChanged -->
<!-- $$$draw[overload1]$$$drawQPainter*constPaintContext& -->
<h3 class="fn"><a name="draw"></a><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">draw</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, const <span class="type"><a href="qabstracttextdocumentlayout-paintcontext.html">PaintContext</a></span> &amp; <i>context</i> )<tt> [pure virtual]</tt></h3>
<p>Draws the layout with the given <i>painter</i> using the given <i>context</i>.</p>
<!-- @@@draw -->
<!-- $$$drawInlineObject[overload1]$$$drawInlineObjectQPainter*constQRectF&QTextInlineObjectintconstQTextFormat& -->
<h3 class="fn"><a name="drawInlineObject"></a><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">drawInlineObject</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>rect</i>, <span class="type"><a href="qtextinlineobject.html">QTextInlineObject</a></span> <i>object</i>, <span class="type">int</span> <i>posInDocument</i>, const <span class="type"><a href="qtextformat.html">QTextFormat</a></span> &amp; <i>format</i> )<tt> [virtual protected]</tt></h3>
<p>This function is called to draw the inline object, <i>object</i>, with the given <i>painter</i> within the rectangle specified by <i>rect</i> using the specified text <i>format</i>.</p>
<p><i>posInDocument</i> specifies the position of the object within the document.</p>
<p>The default implementation calls drawObject() on the object handlers. This function is called only within Qt. Subclasses can reimplement this function to customize the drawing of inline objects.</p>
<p><b>See also </b><a href="qabstracttextdocumentlayout.html#draw">draw</a>().</p>
<!-- @@@drawInlineObject -->
<!-- $$$format[overload1]$$$formatint -->
<h3 class="fn"><a name="format"></a><span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span> QAbstractTextDocumentLayout::<span class="name">format</span> ( <span class="type">int</span> <i>position</i> )<tt> [protected]</tt></h3>
<p>Returns the character format that is applicable at the given <i>position</i>.</p>
<!-- @@@format -->
<!-- $$$frameBoundingRect[overload1]$$$frameBoundingRectQTextFrame* -->
<h3 class="fn"><a name="frameBoundingRect"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QAbstractTextDocumentLayout::<span class="name">frameBoundingRect</span> ( <span class="type"><a href="qtextframe.html">QTextFrame</a></span> * <i>frame</i> ) const<tt> [pure virtual]</tt></h3>
<p>Returns the bounding rectangle of <i>frame</i>.</p>
<!-- @@@frameBoundingRect -->
<!-- $$$handlerForObject[overload1]$$$handlerForObjectint -->
<h3 class="fn"><a name="handlerForObject"></a><span class="type"><a href="qtextobjectinterface.html">QTextObjectInterface</a></span> * QAbstractTextDocumentLayout::<span class="name">handlerForObject</span> ( <span class="type">int</span> <i>objectType</i> ) const</h3>
<p>Returns a handler for objects of the given <i>objectType</i>.</p>
<!-- @@@handlerForObject -->
<!-- $$$hitTest[overload1]$$$hitTestconstQPointF&Qt::HitTestAccuracy -->
<h3 class="fn"><a name="hitTest"></a><span class="type">int</span> QAbstractTextDocumentLayout::<span class="name">hitTest</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>point</i>, <span class="type"><a href="qt.html#HitTestAccuracy-enum">Qt::HitTestAccuracy</a></span> <i>accuracy</i> ) const<tt> [pure virtual]</tt></h3>
<p>Returns the cursor postion for the given <i>point</i> with the specified <i>accuracy</i>. Returns -1 if no valid cursor position was found.</p>
<!-- @@@hitTest -->
<!-- $$$pageCount[overload1]$$$pageCount -->
<h3 class="fn"><a name="pageCount"></a><span class="type">int</span> QAbstractTextDocumentLayout::<span class="name">pageCount</span> () const<tt> [pure virtual]</tt></h3>
<p>Returns the number of pages contained in the layout.</p>
<p><b>See also </b><a href="qabstracttextdocumentlayout.html#pageCountChanged">pageCountChanged</a>().</p>
<!-- @@@pageCount -->
<!-- $$$pageCountChanged[overload1]$$$pageCountChangedint -->
<h3 class="fn"><a name="pageCountChanged"></a><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">pageCountChanged</span> ( <span class="type">int</span> <i>newPages</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the number of pages in the layout changes; <i>newPages</i> is the updated page count.</p>
<p>Subclasses of <a href="qabstracttextdocumentlayout.html">QAbstractTextDocumentLayout</a> should emit this signal when the number of pages in the layout has changed. Changes to the page count are caused by changes to the layout or the document content itself.</p>
<p><b>See also </b><a href="qabstracttextdocumentlayout.html#pageCount">pageCount</a>().</p>
<!-- @@@pageCountChanged -->
<!-- $$$paintDevice[overload1]$$$paintDevice -->
<h3 class="fn"><a name="paintDevice"></a><span class="type"><a href="qpaintdevice.html">QPaintDevice</a></span> * QAbstractTextDocumentLayout::<span class="name">paintDevice</span> () const</h3>
<p>Returns the paint device used to render the document's layout.</p>
<p><b>See also </b><a href="qabstracttextdocumentlayout.html#setPaintDevice">setPaintDevice</a>().</p>
<!-- @@@paintDevice -->
<!-- $$$positionInlineObject[overload1]$$$positionInlineObjectQTextInlineObjectintconstQTextFormat& -->
<h3 class="fn"><a name="positionInlineObject"></a><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">positionInlineObject</span> ( <span class="type"><a href="qtextinlineobject.html">QTextInlineObject</a></span> <i>item</i>, <span class="type">int</span> <i>posInDocument</i>, const <span class="type"><a href="qtextformat.html">QTextFormat</a></span> &amp; <i>format</i> )<tt> [virtual protected]</tt></h3>
<p>Lays out the inline object <i>item</i> using the given text <i>format</i>.</p>
<p><i>posInDocument</i> specifies the position of the object within the document.</p>
<p>The default implementation does nothing. This function is called only within Qt. Subclasses can reimplement this function to customize the position of inline objects.</p>
<p><b>See also </b><a href="qabstracttextdocumentlayout.html#drawInlineObject">drawInlineObject</a>().</p>
<!-- @@@positionInlineObject -->
<!-- $$$registerHandler[overload1]$$$registerHandlerintQObject* -->
<h3 class="fn"><a name="registerHandler"></a><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">registerHandler</span> ( <span class="type">int</span> <i>objectType</i>, <span class="type"><a href="qobject.html">QObject</a></span> * <i>component</i> )</h3>
<p>Registers the given <i>component</i> as a handler for items of the given <i>objectType</i>.</p>
<p><b>Note:</b> registerHandler() has to be called once for each object type. This means that there is only one handler for multiple replacement characters of the same object type.</p>
<!-- @@@registerHandler -->
<!-- $$$resizeInlineObject[overload1]$$$resizeInlineObjectQTextInlineObjectintconstQTextFormat& -->
<h3 class="fn"><a name="resizeInlineObject"></a><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">resizeInlineObject</span> ( <span class="type"><a href="qtextinlineobject.html">QTextInlineObject</a></span> <i>item</i>, <span class="type">int</span> <i>posInDocument</i>, const <span class="type"><a href="qtextformat.html">QTextFormat</a></span> &amp; <i>format</i> )<tt> [virtual protected]</tt></h3>
<p>Sets the size of the inline object <i>item</i> corresponding to the text <i>format</i>.</p>
<p><i>posInDocument</i> specifies the position of the object within the document.</p>
<p>The default implementation resizes the <i>item</i> to the size returned by the object handler's intrinsicSize() function. This function is called only within Qt. Subclasses can reimplement this function to customize the resizing of inline objects.</p>
<!-- @@@resizeInlineObject -->
<!-- $$$setPaintDevice[overload1]$$$setPaintDeviceQPaintDevice* -->
<h3 class="fn"><a name="setPaintDevice"></a><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">setPaintDevice</span> ( <span class="type"><a href="qpaintdevice.html">QPaintDevice</a></span> * <i>device</i> )</h3>
<p>Sets the paint device used for rendering the document's layout to the given <i>device</i>.</p>
<p><b>See also </b><a href="qabstracttextdocumentlayout.html#paintDevice">paintDevice</a>().</p>
<!-- @@@setPaintDevice -->
<!-- $$$update[overload1]$$$updateconstQRectF& -->
<h3 class="fn"><a name="update"></a><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">update</span> ( const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>rect</i> = QRectF( 0., 0., 1000000000., 1000000000. ) )<tt> [signal]</tt></h3>
<p>This signal is emitted when the rectangle <i>rect</i> has been updated.</p>
<p>Subclasses of <a href="qabstracttextdocumentlayout.html">QAbstractTextDocumentLayout</a> should emit this signal when the layout of the contents change in order to repaint.</p>
<!-- @@@update -->
<!-- $$$updateBlock[overload1]$$$updateBlockconstQTextBlock& -->
<h3 class="fn"><a name="updateBlock"></a><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">updateBlock</span> ( const <span class="type"><a href="qtextblock.html">QTextBlock</a></span> &amp; <i>block</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the specified <i>block</i> has been updated.</p>
<p>Subclasses of <a href="qabstracttextdocumentlayout.html">QAbstractTextDocumentLayout</a> should emit this signal when the layout of <i>block</i> has changed in order to repaint.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@updateBlock -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. 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>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      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>