Qt 4.8
|
The iterator class provides an iterator for reading the contents of a QTextFrame. More...
#include <qtextobject.h>
Public Functions | |
bool | atEnd () const |
Returns true if the current item is the last item in the text frame. More... | |
QTextBlock | currentBlock () const |
Returns the current block the iterator points to. More... | |
QTextFrame * | currentFrame () const |
Returns the current frame pointed to by the iterator, or 0 if the iterator currently points to a block. More... | |
iterator () | |
Constructs an invalid iterator. More... | |
iterator (const iterator &o) | |
Copy constructor. More... | |
bool | operator!= (const iterator &o) const |
Retuns true if the iterator is different from the other iterator; otherwise returns false. More... | |
iterator & | operator++ () |
Moves the iterator to the next frame or block. More... | |
iterator | operator++ (int) |
The postfix ++ operator (i++ ) advances the iterator to the next item in the text frame, and returns an iterator to the old item. More... | |
iterator & | operator-- () |
Moves the iterator to the previous frame or block. More... | |
iterator | operator-- (int) |
The postfix – operator (i– ) makes the preceding item in the current frame, and returns an iterator to the old item. More... | |
iterator & | operator= (const iterator &o) |
Assigns other to this iterator and returns a reference to this iterator. More... | |
bool | operator== (const iterator &o) const |
Retuns true if the iterator is the same as the other iterator; otherwise returns false. More... | |
QTextFrame * | parentFrame () const |
Returns the parent frame of the current frame. More... | |
Private Functions | |
iterator (QTextFrame *frame, int block, int begin, int end) | |
Properties | |
int | b |
int | cb |
QTextFrame * | cf |
int | e |
QTextFrame * | f |
Friends | |
class | QTextDocumentLayoutPrivate |
class | QTextFrame |
class | QTextTableCell |
The iterator class provides an iterator for reading the contents of a QTextFrame.
A frame consists of an arbitrary sequence of QTextBlock and child QTextFrame. 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.
Definition at line 144 of file qtextobject.h.
|
private |
Definition at line 695 of file qtextobject.cpp.
QTextFrame::iterator::iterator | ( | ) |
QTextFrame::iterator::iterator | ( | const iterator & | other | ) |
Copy constructor.
Constructs a copy of the other iterator.
Definition at line 707 of file qtextobject.cpp.
|
inline |
Returns true if the current item is the last item in the text frame.
Definition at line 165 of file qtextobject.h.
Referenced by QTextDocumentLayoutPrivate::drawFlow(), QTextHtmlExporter::emitFrame(), flowPosition(), QTextDocumentLayoutPrivate::hitTest(), isEmptyBlockBeforeTable(), QTextDocumentLayoutPrivate::layoutFlow(), and QTextOdfWriter::writeFrame().
QTextBlock QTextFrame::iterator::currentBlock | ( | ) | const |
Returns the current block the iterator points to.
If the iterator points to a child frame, the returned block is invalid.
Definition at line 747 of file qtextobject.cpp.
Referenced by QTextDocumentLayoutPrivate::drawFlow(), QTextHtmlExporter::emitFrame(), flowPosition(), QTextDocumentLayoutPrivate::hitTest(), isEmptyBlockBeforeTable(), QTextDocumentLayoutPrivate::layoutFlow(), and QTextOdfWriter::writeFrame().
QTextFrame * QTextFrame::iterator::currentFrame | ( | ) | const |
Returns the current frame pointed to by the iterator, or 0 if the iterator currently points to a block.
Definition at line 736 of file qtextobject.cpp.
Referenced by QTextDocumentLayoutPrivate::drawFlow(), QTextHtmlExporter::emitFrame(), flowPosition(), QTextDocumentLayoutPrivate::hitTest(), isEmptyBlockBeforeTable(), QTextDocumentLayoutPrivate::layoutFlow(), and QTextOdfWriter::writeFrame().
|
inline |
Retuns true if the iterator is different from the other iterator; otherwise returns false.
Definition at line 168 of file qtextobject.h.
QTextFrame::iterator & QTextFrame::iterator::operator++ | ( | ) |
Moves the iterator to the next frame or block.
Definition at line 759 of file qtextobject.cpp.
|
inline |
The postfix ++ operator (i++
) advances the iterator to the next item in the text frame, and returns an iterator to the old item.
Definition at line 170 of file qtextobject.h.
Referenced by operator++().
QTextFrame::iterator & QTextFrame::iterator::operator-- | ( | ) |
Moves the iterator to the previous frame or block.
Definition at line 797 of file qtextobject.cpp.
|
inline |
The postfix – operator (i–
) makes the preceding item in the current frame, and returns an iterator to the old item.
Definition at line 172 of file qtextobject.h.
Referenced by operator--().
QTextFrame::iterator & QTextFrame::iterator::operator= | ( | const iterator & | o | ) |
Assigns other to this iterator and returns a reference to this iterator.
Definition at line 720 of file qtextobject.cpp.
|
inline |
Retuns true if the iterator is the same as the other iterator; otherwise returns false.
Definition at line 167 of file qtextobject.h.
|
inline |
Returns the parent frame of the current frame.
Definition at line 160 of file qtextobject.h.
Referenced by QTextDocumentLayoutPrivate::drawFlow(), QTextHtmlExporter::emitFrame(), QTextDocumentLayoutPrivate::hitTest(), and QTextDocumentLayoutPrivate::layoutFlow().
|
friend |
Definition at line 153 of file qtextobject.h.
|
friend |
Definition at line 151 of file qtextobject.h.
|
friend |
Definition at line 152 of file qtextobject.h.
|
private |
Definition at line 146 of file qtextobject.h.
Referenced by iterator(), and operator=().
|
private |
Definition at line 149 of file qtextobject.h.
Referenced by QTextDocumentLayoutPrivate::frameIteratorForTextPosition(), iterator(), operator!=(), operator=(), and operator==().
|
private |
Definition at line 148 of file qtextobject.h.
Referenced by QTextDocumentLayoutPrivate::frameIteratorForTextPosition(), iterator(), operator!=(), operator=(), and operator==().
|
private |
Definition at line 147 of file qtextobject.h.
Referenced by iterator(), and operator=().
|
private |
Definition at line 145 of file qtextobject.h.
Referenced by iterator(), operator!=(), operator=(), and operator==().