Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 1153

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QTextBlock.iterator Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QTextBlock.iterator Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTextBlock.iterator class provides an iterator for reading
the contents of a <a href="qtextblock.html">QTextBlock</a>.
<a href="#details">More...</a></p>

<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtextblock-iterator.html#iterator">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextblock-iterator.html#iterator-2">__init__</a></b> (<i>self</i>, iterator&#160;<i>o</i>)</li><li><div class="fn" />bool <b><a href="qtextblock-iterator.html#atEnd">atEnd</a></b> (<i>self</i>)</li><li><div class="fn" />QTextFragment <b><a href="qtextblock-iterator.html#fragment">fragment</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qtextblock-iterator.html#__eq__">__eq__</a></b> (<i>self</i>, iterator&#160;<i>o</i>)</li><li><div class="fn" />iterator <b><a href="qtextblock-iterator.html#__iadd__">__iadd__</a></b> (<i>self</i>, int)</li><li><div class="fn" />iterator <b><a href="qtextblock-iterator.html#__isub__">__isub__</a></b> (<i>self</i>, int)</li><li><div class="fn" />bool <b><a href="qtextblock-iterator.html#__ne__">__ne__</a></b> (<i>self</i>, iterator&#160;<i>o</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTextBlock.iterator class provides an iterator for reading
the contents of a <a href="qtextblock.html">QTextBlock</a>.</p>
<p>A block consists of a sequence of text fragments. This class
provides a way to iterate over these, and read their contents. It
does not provide a way to modify the internal structure or contents
of the block.</p>
<p>An iterator can be constructed and used to access the fragments
within a text block in the following way:</p>
<pre class="cpp">
     <span class="type"><a href="qtextblock.html">QTextBlock</a></span><span class="operator">.</span>iterator it;
     <span class="keyword">for</span> (it <span class="operator">=</span> currentBlock<span class="operator">.</span>begin(); <span class="operator">!</span>(it<span class="operator">.</span>atEnd()); <span class="operator">+</span><span class="operator">+</span>it) {
         <span class="type"><a href="qtextfragment.html">QTextFragment</a></span> currentFragment <span class="operator">=</span> it<span class="operator">.</span>fragment();
         <span class="keyword">if</span> (currentFragment<span class="operator">.</span>isValid())
             processFragment(currentFragment);
     }
</pre><hr /><h2>Method Documentation</h2><h3 class="fn"><a name="iterator" />iterator.__init__ (<i>self</i>)</h3><p>Constructs an iterator for this text block.</p>


<h3 class="fn"><a name="iterator-2" />iterator.__init__ (<i>self</i>, <a href="qtextblock-iterator.html">iterator</a>&#160;<i>o</i>)</h3><h3 class="fn"><a name="atEnd" />bool iterator.atEnd (<i>self</i>)</h3><p>Returns true if the current item is the last item in the text
block.</p>


<h3 class="fn"><a name="fragment" /><a href="qtextfragment.html">QTextFragment</a> iterator.fragment (<i>self</i>)</h3><p>Returns the text fragment the iterator currently points to.</p>


<h3 class="fn"><a name="__eq__" />bool iterator.__eq__ (<i>self</i>, <a href="qtextblock-iterator.html">iterator</a>&#160;<i>o</i>)</h3><h3 class="fn"><a name="__iadd__" /><a href="qtextblock-iterator.html">iterator</a> iterator.__iadd__ (<i>self</i>, int)</h3><h3 class="fn"><a name="__isub__" /><a href="qtextblock-iterator.html">iterator</a> iterator.__isub__ (<i>self</i>, int)</h3><h3 class="fn"><a name="__ne__" />bool iterator.__ne__ (<i>self</i>, <a href="qtextblock-iterator.html">iterator</a>&#160;<i>o</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>