iterator Class
(QTextFrame::iterator)The iterator class provides an iterator for reading the contents of a QTextFrame. More...
Header: | #include <iterator> |
qmake: | QT += gui |
Public Functions
iterator() | |
iterator(const iterator &other) | |
iterator(iterator &&other) | |
bool | atEnd() const |
QTextBlock | currentBlock() const |
QTextFrame * | currentFrame() const |
QTextFrame * | parentFrame() const |
bool | operator!=(const iterator &o) const |
iterator & | operator++() |
iterator | operator++(int) |
iterator & | operator--() |
iterator | operator--(int) |
iterator & | operator=(const iterator &other) |
iterator & | operator=(iterator &&other) |
bool | operator==(const iterator &o) const |
Detailed Description
The iterator class provides an iterator for reading the contents of a QTextFrame.
A frame consists of an arbitrary sequence of QTextBlocks and child QTextFrames. 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.
Member Function Documentation
iterator::iterator()
Constructs an invalid iterator.
iterator::iterator(const iterator &other)
Copy constructor. Constructs a copy of the other iterator.
iterator::iterator(iterator &&other)
Default constructs an instance of iterator.
bool iterator::atEnd() const
QTextBlock iterator::currentBlock() const
Returns the current block the iterator points to. If the iterator points to a child frame, the returned block is invalid.
See also currentFrame().
QTextFrame *iterator::currentFrame() const
Returns the current frame pointed to by the iterator, or 0 if the iterator currently points to a block.
See also currentBlock().
QTextFrame *iterator::parentFrame() const
bool iterator::operator!=(const iterator &o) const
iterator &iterator::operator++()
Moves the iterator to the next frame or block.
See also currentBlock() and currentFrame().
iterator iterator::operator++(int)
iterator &iterator::operator--()
Moves the iterator to the previous frame or block.
See also currentBlock() and currentFrame().
iterator iterator::operator--(int)
iterator &iterator::operator=(const iterator &other)
Assigns other to this iterator and returns a reference to this iterator.
iterator &iterator::operator=(iterator &&other)
Move-assignment operator.