![]() |
Qt 4.8
|
The QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock. More...
#include <qtextobject.h>
Public Functions | |
| bool | atEnd () const |
| Returns true if the current item is the last item in the text block. More... | |
| QTextFragment | fragment () const |
| Returns the text fragment the iterator currently points to. More... | |
| iterator () | |
| Constructs an iterator for this text block. More... | |
| iterator (const iterator &o) | |
| Copy constructor. More... | |
| bool | operator!= (const iterator &o) const |
| Retuns true if this iterator is different from the other iterator; otherwise returns false. More... | |
| iterator & | operator++ () |
The prefix ++ operator (++i) advances the iterator to the next item in the hash and returns an iterator to the new current item. More... | |
| iterator | operator++ (int) |
The postfix ++ operator (i++) advances the iterator to the next item in the text block and returns an iterator to the old current item. More... | |
| iterator & | operator-- () |
The prefix – operator (–i) makes the preceding item current and returns an iterator pointing to the new current item. More... | |
| iterator | operator-- (int) |
The postfix – operator (i–) makes the preceding item current and returns an iterator to the old current item. More... | |
| bool | operator== (const iterator &o) const |
| Retuns true if this iterator is the same as the other iterator; otherwise returns false. More... | |
Private Functions | |
| iterator (const QTextDocumentPrivate *priv, int begin, int end, int f) | |
Properties | |
| int | b |
| int | e |
| int | n |
| const QTextDocumentPrivate * | p |
Friends | |
| class | QTextBlock |
The QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock.
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.
An iterator can be constructed and used to access the fragments within a text block in the following way:
Definition at line 251 of file qtextobject.h.
|
inlineprivate |
Definition at line 257 of file qtextobject.h.
|
inline |
|
inline |
Copy constructor.
Constructs a copy of the other iterator.
Definition at line 260 of file qtextobject.h.
|
inline |
Returns true if the current item is the last item in the text block.
Definition at line 264 of file qtextobject.h.
Referenced by QTextControlPrivate::activateLinkUnderCursor(), QTextHtmlExporter::emitBlock(), QTextHtmlExporter::emitBlockAttributes(), QTextHtmlExporter::emitFrame(), QTextControl::findNextPrevAnchor(), and QTextOdfWriter::writeBlock().
| QTextFragment QTextBlock::iterator::fragment | ( | ) | const |
Returns the text fragment the iterator currently points to.
Definition at line 1640 of file qtextobject.cpp.
Referenced by QTextControlPrivate::activateLinkUnderCursor(), QTextHtmlExporter::emitBlock(), and QTextControl::findNextPrevAnchor().
|
inline |
Retuns true if this iterator is different from the other iterator; otherwise returns false.
Definition at line 267 of file qtextobject.h.
| QTextBlock::iterator & QTextBlock::iterator::operator++ | ( | ) |
The prefix ++ operator (++i) advances the iterator to the next item in the hash and returns an iterator to the new current item.
Definition at line 1656 of file qtextobject.cpp.
|
inline |
The postfix ++ operator (i++) advances the iterator to the next item in the text block and returns an iterator to the old current item.
Definition at line 269 of file qtextobject.h.
Referenced by operator++().
| QTextBlock::iterator & QTextBlock::iterator::operator-- | ( | ) |
The prefix – operator (–i) makes the preceding item current and returns an iterator pointing to the new current item.
Definition at line 1672 of file qtextobject.cpp.
|
inline |
The postfix – operator (i–) makes the preceding item current and returns an iterator to the old current item.
Definition at line 271 of file qtextobject.h.
Referenced by operator--().
|
inline |
Retuns true if this iterator is the same as the other iterator; otherwise returns false.
Definition at line 266 of file qtextobject.h.
|
friend |
Definition at line 256 of file qtextobject.h.
|
private |
Definition at line 253 of file qtextobject.h.
|
private |
Definition at line 254 of file qtextobject.h.
|
private |
Definition at line 255 of file qtextobject.h.
Referenced by operator!=(), and operator==().
|
private |
Definition at line 252 of file qtextobject.h.
Referenced by operator!=(), and operator==().