Sophie

Sophie

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

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

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qabstracttextdocumentlayout.cpp -->
  <title>QAbstractTextDocumentLayout Class | Qt GUI 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtgui-index.html">Qt GUI</a></td><td ><a href="qtgui-module.html">C++ Classes</a></td><td >QAbstractTextDocumentLayout</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#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>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QAbstractTextDocumentLayout Class</h1>
<!-- $$$QAbstractTextDocumentLayout-brief -->
<p>The <a href="qabstracttextdocumentlayout.html">QAbstractTextDocumentLayout</a> class is an abstract base class used to implement custom layouts for QTextDocuments. <a href="#details">More...</a></p>
<!-- @@@QAbstractTextDocumentLayout -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QAbstractTextDocumentLayout&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += gui</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="../qtcore/qobject.html">QObject</a></td></tr></table></div><ul>
<li><a href="qabstracttextdocumentlayout-members.html">List of all members, including inherited members</a></li>
</ul>
<p><b>Note:</b> All functions in this class are reentrant.</p>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><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></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="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"> QTextFormat </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#formatAt">formatAt</a></b>(const QPointF &amp;<i>pos</i>) const</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"> QString </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#imageAt">imageAt</a></b>(const QPointF &amp;<i>pos</i>) const</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>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstracttextdocumentlayout.html#unregisterHandler">unregisterHandler</a></b>(int <i>objectType</i>, QObject *<i>component</i> = Q_NULLPTR)</td></tr>
</table></div>
<ul>
<li class="fn">32 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><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></div>
<ul>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><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></div>
<ul>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
<li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li>
<li class="fn">10 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li>
<li class="fn">2 protected variables inherited from <a href="../qtcore/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QAbstractTextDocumentLayout-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qabstracttextdocumentlayout.html">QAbstractTextDocumentLayout</a> 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 <a href="qabstracttextdocumentlayout.html">QAbstractTextDocumentLayout</a> to provide custom layout behavior for your text documents.</p>
<p>An instance of the <a href="qabstracttextdocumentlayout.html">QAbstractTextDocumentLayout</a> 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" id="QAbstractTextDocumentLayout"><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" id="anchorAt"><a name="anchorAt"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QAbstractTextDocumentLayout::<span class="name">anchorAt</span>(const <span class="type"><a href="../qtcore/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" id="blockBoundingRect"><a name="blockBoundingRect"></a><code>[pure virtual] </code><span class="type"><a href="../qtcore/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</h3>
<p>Returns the bounding rectangle of <i>block</i>.</p>
<!-- @@@blockBoundingRect -->
<!-- $$$document[overload1]$$$document -->
<h3 class="fn" id="document"><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" id="documentChanged"><a name="documentChanged"></a><code>[pure virtual protected] </code><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>)</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" id="documentSize"><a name="documentSize"></a><code>[pure virtual] </code><span class="type"><a href="../qtcore/qsizef.html">QSizeF</a></span> QAbstractTextDocumentLayout::<span class="name">documentSize</span>() const</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" id="documentSizeChanged"><a name="documentSizeChanged"></a><code>[signal] </code><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">documentSizeChanged</span>(const <span class="type"><a href="../qtcore/qsizef.html">QSizeF</a></span> &amp;<i>newSize</i>)</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" id="draw"><a name="draw"></a><code>[pure virtual] </code><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>)</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" id="drawInlineObject"><a name="drawInlineObject"></a><code>[virtual protected] </code><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="../qtcore/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>)</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" id="format"><a name="format"></a><code>[protected] </code><span class="type"><a href="qtextcharformat.html">QTextCharFormat</a></span> QAbstractTextDocumentLayout::<span class="name">format</span>(<span class="type">int</span> <i>position</i>)</h3>
<p>Returns the character format that is applicable at the given <i>position</i>.</p>
<!-- @@@format -->
<!-- $$$formatAt[overload1]$$$formatAtconstQPointF& -->
<h3 class="fn" id="formatAt"><a name="formatAt"></a><span class="type"><a href="qtextformat.html">QTextFormat</a></span> QAbstractTextDocumentLayout::<span class="name">formatAt</span>(const <span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span> &amp;<i>pos</i>) const</h3>
<p>Returns the text format at the given position <i>pos</i>.</p>
<p>This function was introduced in  Qt 5.8.</p>
<!-- @@@formatAt -->
<!-- $$$frameBoundingRect[overload1]$$$frameBoundingRectQTextFrame* -->
<h3 class="fn" id="frameBoundingRect"><a name="frameBoundingRect"></a><code>[pure virtual] </code><span class="type"><a href="../qtcore/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</h3>
<p>Returns the bounding rectangle of <i>frame</i>.</p>
<!-- @@@frameBoundingRect -->
<!-- $$$handlerForObject[overload1]$$$handlerForObjectint -->
<h3 class="fn" id="handlerForObject"><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" id="hitTest"><a name="hitTest"></a><code>[pure virtual] </code><span class="type">int</span> QAbstractTextDocumentLayout::<span class="name">hitTest</span>(const <span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span> &amp;<i>point</i>, <span class="type"><a href="../qtcore/qt.html#HitTestAccuracy-enum">Qt::HitTestAccuracy</a></span> <i>accuracy</i>) const</h3>
<p>Returns the cursor position for the given <i>point</i> with the specified <i>accuracy</i>. Returns -1 if no valid cursor position was found.</p>
<!-- @@@hitTest -->
<!-- $$$imageAt[overload1]$$$imageAtconstQPointF& -->
<h3 class="fn" id="imageAt"><a name="imageAt"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QAbstractTextDocumentLayout::<span class="name">imageAt</span>(const <span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span> &amp;<i>pos</i>) const</h3>
<p>Returns the source of the image at the given position <i>pos</i>, or an empty string if no image exists at that point.</p>
<p>This function was introduced in  Qt 5.8.</p>
<!-- @@@imageAt -->
<!-- $$$pageCount[overload1]$$$pageCount -->
<h3 class="fn" id="pageCount"><a name="pageCount"></a><code>[pure virtual] </code><span class="type">int</span> QAbstractTextDocumentLayout::<span class="name">pageCount</span>() const</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" id="pageCountChanged"><a name="pageCountChanged"></a><code>[signal] </code><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">pageCountChanged</span>(<span class="type">int</span> <i>newPages</i>)</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" id="paintDevice"><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" id="positionInlineObject"><a name="positionInlineObject"></a><code>[virtual protected] </code><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>)</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" id="registerHandler"><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="../qtcore/qobject.html#QObject">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><p>The text document layout does not take ownership of <code>component</code>.</p>
<!-- @@@registerHandler -->
<!-- $$$resizeInlineObject[overload1]$$$resizeInlineObjectQTextInlineObjectintconstQTextFormat& -->
<h3 class="fn" id="resizeInlineObject"><a name="resizeInlineObject"></a><code>[virtual protected] </code><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>)</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" id="setPaintDevice"><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 -->
<!-- $$$unregisterHandler[overload1]$$$unregisterHandlerintQObject* -->
<h3 class="fn" id="unregisterHandler"><a name="unregisterHandler"></a><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">unregisterHandler</span>(<span class="type">int</span> <i>objectType</i>, <span class="type"><a href="../qtcore/qobject.html#QObject">QObject</a></span> *<i>component</i> = Q_NULLPTR)</h3>
<p>Unregisters the given <i>component</i> as a handler for items of the given <i>objectType</i>, or any handler if the <i>component</i> is not specified.</p>
<p>This function was introduced in  Qt 5.2.</p>
<!-- @@@unregisterHandler -->
<!-- $$$update[overload1]$$$updateconstQRectF& -->
<h3 class="fn" id="update"><a name="update"></a><code>[signal] </code><span class="type">void</span> QAbstractTextDocumentLayout::<span class="name">update</span>(const <span class="type"><a href="../qtcore/qrectf.html">QRectF</a></span> &amp;<i>rect</i> = QRectF( 0., 0., 1000000000., 1000000000. ))</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" id="updateBlock"><a name="updateBlock"></a><code>[signal] </code><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>)</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>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>