Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# QTextFrame::iterator Class Reference

The QTextFrame::iterator class provides an iterator for reading the contents of a QTextFrame. More...

    #include <iterator>

- List of all members, including inherited members

### Public Functions

- iterator ()
- iterator ( const iterator & other )
- bool atEnd () const
- QTextBlock currentBlock () const
- QTextFrame * currentFrame () const
- QTextFrame * parentFrame () const
- bool operator!= ( const iterator & other ) const
- iterator operator++ ()
- iterator operator++ ( int )
- iterator operator-- ()
- iterator operator-- ( int )
- bool operator== ( const iterator & other ) const

## Detailed Description

The QTextFrame::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.

### bool iterator::atEnd () const

Returns true if the current item is the last item in the text frame.

### 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 the iterator points to or 0 if the iterator currently points to a block.

See also currentBlock().

### QTextFrame * iterator::parentFrame () const

Returns the parent frame of the current frame.

See also currentFrame() and QTextFrame::parentFrame().

### bool iterator::operator!= ( const iterator & other ) const

Retuns true if this iterator is different from the other iterator; otherwise returns false.

### iterator iterator::operator++ ()

Moves the iterator to the next frame or block.

See also currentBlock() and currentFrame().

### iterator iterator::operator++ ( int )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

The postfix ++ operator (`i++`) advances the iterator to the next item in the text frame and returns an iterator to the old text frame.

### iterator iterator::operator-- ()

Moves the iterator to the previous frame or block.

See also currentBlock() and currentFrame().

### iterator iterator::operator-- ( int )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

The postfix -- operator (`i--`) makes the preceding text frame current and returns an iterator to the old text frame.

### bool iterator::operator== ( const iterator & other ) const

Retuns true if this iterator is the same as the other iterator; otherwise returns false.