1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
<?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">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <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)</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)</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)</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> QTextBlock.iterator it;
for (it = currentBlock.begin(); !(it.atEnd()); ++it) {
QTextFragment currentFragment = it.fragment();
if (currentFragment.isValid())
processFragment(currentFragment);
}</pre>
<p>See also <a href="qtextfragment.html">QTextFragment</a>.</p>
<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>)</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>
<a name="//apple_ref/cpp/instm/QTextBlock::iterator/fragment" />
<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>
<a name="//apple_ref/cpp/instm/QTextBlock::iterator/operator!=" />
<h3 class="fn"><a name="__eq__" />bool iterator.__eq__ (<i>self</i>, <a href="qtextblock-iterator.html">iterator</a>)</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>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.7.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt 4.6.2</td></tr></table></div></address></body></html>
|