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

# QGLayoutIterator Class Reference

The QGLayoutIterator class is an abstract base class of internal layout iterators. More...

`#include <qlayout.h>`

List of all member functions.

## Public Members

- virtual ~QGLayoutIterator ()
- virtual QLayoutItem * next ()
- virtual QLayoutItem * current ()
- virtual QLayoutItem * takeCurrent ()

## Detailed Description

The QGLayoutIterator class is an abstract base class of internal layout iterators.

(This class is not OpenGL related, it just happens to start with the letters QGL...)

Subclass this class to create a custom layout. The functions that must be implemented are next(), current(), and takeCurrent().

The QGLayoutIterator implements the functionality of QLayoutIterator. Each subclass of QLayout needs a QGLayoutIterator subclass.

See also Widget Appearance and Style and Layout Management.

## Member Function Documentation

### QGLayoutIterator::~QGLayoutIterator ()`[virtual]`

Destroys the iterator

### QLayoutItem * QGLayoutIterator::current ()`[virtual]`

Implemented in subclasses to return the current item, or 0 if there is no current item.

Examples: customlayout/border.cpp, customlayout/card.cpp and customlayout/flow.cpp.

### QLayoutItem * QGLayoutIterator::next ()`[virtual]`

Implemented in subclasses to move the iterator to the next item and return that item, or 0 if there is no next item.

Examples: customlayout/border.cpp, customlayout/card.cpp and customlayout/flow.cpp.

### QLayoutItem * QGLayoutIterator::takeCurrent ()`[virtual]`

Implemented in subclasses to remove the current item from the layout without deleting it, move the iterator to the next item and return the removed item, or 0 if no item was removed.

Examples: customlayout/border.cpp, customlayout/card.cpp and customlayout/flow.cpp.

This file is part of the Qt toolkit, copyright © 1995-2001 Trolltech, all rights reserved.