<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- /tmp/qt-4.3.4-qt-1203442408707/qt-x11-opensource-src-4.3.4/src/gui/text/qtextobject.cpp --> <head> <title>Qt 4.3: QTextFrame::iterator Class Reference</title> <link href="classic.css" rel="stylesheet" type="text/css" /> </head> <body> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td> <td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td> <td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QTextFrame::iterator Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1> <p>The iterator class provides an iterator for reading the contents of a <a href="qtextframe.html">QTextFrame</a>. <a href="#details">More...</a></p> <pre> #include <<a href="qtextframe.html">QTextFrame</a>></pre><ul> <li><a href="qtextframe-iterator-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-functions"></a> <h3>Public Functions</h3> <ul> <li><div class="fn"/><b><a href="qtextframe-iterator.html#iterator">iterator</a></b> ()</li> <li><div class="fn"/><b><a href="qtextframe-iterator.html#iterator-3">iterator</a></b> ( const iterator & <i>other</i> )</li> <li><div class="fn"/>bool <b><a href="qtextframe-iterator.html#atEnd">atEnd</a></b> () const</li> <li><div class="fn"/>QTextBlock <b><a href="qtextframe-iterator.html#currentBlock">currentBlock</a></b> () const</li> <li><div class="fn"/>QTextFrame * <b><a href="qtextframe-iterator.html#currentFrame">currentFrame</a></b> () const</li> <li><div class="fn"/>QTextFrame * <b><a href="qtextframe-iterator.html#parentFrame">parentFrame</a></b> () const</li> <li><div class="fn"/>bool <b><a href="qtextframe-iterator.html#operator-not-eq">operator!=</a></b> ( const iterator & <i>other</i> ) const</li> <li><div class="fn"/>iterator & <b><a href="qtextframe-iterator.html#operator-2b-2b">operator++</a></b> ()</li> <li><div class="fn"/>iterator <b><a href="qtextframe-iterator.html#operator-2b-2b-2">operator++</a></b> ( int )</li> <li><div class="fn"/>iterator & <b><a href="qtextframe-iterator.html#operator--">operator--</a></b> ()</li> <li><div class="fn"/>iterator <b><a href="qtextframe-iterator.html#operator---2">operator--</a></b> ( int )</li> <li><div class="fn"/>iterator & <b><a href="qtextframe-iterator.html#operator-eq">operator=</a></b> ( const iterator & <i>other</i> )</li> <li><div class="fn"/>bool <b><a href="qtextframe-iterator.html#operator-eq-eq">operator==</a></b> ( const iterator & <i>other</i> ) const</li> </ul> <a name="details"></a> <hr /> <h2>Detailed Description</h2> <p>The iterator class provides an iterator for reading the contents of a <a href="qtextframe.html">QTextFrame</a>.</p> <p>A frame consists of an arbitrary sequence of <a href="qtextblock.html">QTextBlock</a>s and child <a href="qtextframe.html">QTextFrame</a>s. This class provides a way to iterate over the child objects of a frame, and read their contents. It does not provide a way to modify the contents of the frame.</p> <hr /> <h2>Member Function Documentation</h2> <h3 class="fn"><a name="iterator"></a>iterator::iterator ()</h3> <p>Constructs an invalid iterator.</p> <h3 class="fn"><a name="iterator-3"></a>iterator::iterator ( const iterator & <i>other</i> )</h3> <p>Copy constructor. Constructs a copy of the <i>other</i> iterator.</p> <h3 class="fn"><a name="atEnd"></a>bool iterator::atEnd () const</h3> <p>Returns true if the current item is the last item in the text frame.</p> <h3 class="fn"><a name="currentBlock"></a><a href="qtextblock.html">QTextBlock</a> iterator::currentBlock () const</h3> <p>Returns the current block the iterator points to. If the iterator points to a child frame, the returned block is invalid.</p> <p>See also <a href="qtextframe-iterator.html#currentFrame">currentFrame</a>().</p> <h3 class="fn"><a name="currentFrame"></a><a href="qtextframe.html">QTextFrame</a> * iterator::currentFrame () const</h3> <p>Returns the current frame pointed to by the iterator, or 0 if the iterator currently points to a block.</p> <p>See also <a href="qtextframe-iterator.html#currentBlock">currentBlock</a>().</p> <h3 class="fn"><a name="parentFrame"></a><a href="qtextframe.html">QTextFrame</a> * iterator::parentFrame () const</h3> <p>Returns the parent frame of the current frame.</p> <p>See also <a href="qtextframe-iterator.html#currentFrame">currentFrame</a>() and <a href="qtextframe.html#parentFrame">QTextFrame::parentFrame</a>().</p> <h3 class="fn"><a name="operator-not-eq"></a>bool iterator::operator!= ( const iterator & <i>other</i> ) const</h3> <p>Retuns true if the iterator is different from the <i>other</i> iterator; otherwise returns false.</p> <h3 class="fn"><a name="operator-2b-2b"></a>iterator & iterator::operator++ ()</h3> <p>Moves the iterator to the next frame or block.</p> <p>See also <a href="qtextframe-iterator.html#currentBlock">currentBlock</a>() and <a href="qtextframe-iterator.html#currentFrame">currentFrame</a>().</p> <h3 class="fn"><a name="operator-2b-2b-2"></a>iterator iterator::operator++ ( int )</h3> <p>This is an overloaded member function, provided for convenience.</p> <p>The postfix ++ operator (<tt>i++</tt>) advances the iterator to the next item in the text frame, and returns an iterator to the old item.</p> <h3 class="fn"><a name="operator--"></a>iterator & iterator::operator-- ()</h3> <p>Moves the iterator to the previous frame or block.</p> <p>See also <a href="qtextframe-iterator.html#currentBlock">currentBlock</a>() and <a href="qtextframe-iterator.html#currentFrame">currentFrame</a>().</p> <h3 class="fn"><a name="operator---2"></a>iterator iterator::operator-- ( int )</h3> <p>This is an overloaded member function, provided for convenience.</p> <p>The postfix -- operator (<tt>i--</tt>) makes the preceding item in the current frame, and returns an iterator to the old item.</p> <h3 class="fn"><a name="operator-eq"></a>iterator & iterator::operator= ( const iterator & <i>other</i> )</h3> <p>Assigns <i>other</i> to this iterator and returns a reference to this iterator.</p> <h3 class="fn"><a name="operator-eq-eq"></a>bool iterator::operator== ( const iterator & <i>other</i> ) const</h3> <p>Retuns true if the iterator is the same as the <i>other</i> iterator; otherwise returns false.</p> <p /><address><hr /><div align="center"> <table width="100%" cellspacing="0" border="0"><tr class="address"> <td width="30%">Copyright © 2008 <a href="trolltech.html">Trolltech</a></td> <td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td> <td width="30%" align="right"><div align="right">Qt 4.3.4</div></td> </tr></table></div></address></body> </html>