TQGLayoutIterator Class

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

# TQGLayoutIterator Class Reference

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

`#include <tqlayout.h>`

List of all member functions.

## Public Members

- virtual ~TQGLayoutIterator ()
- virtual TQLayoutItem * next () = 0
- virtual TQLayoutItem * current () = 0
- virtual TQLayoutItem * takeCurrent () = 0

## Detailed Description

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

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

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

The TQGLayoutIterator implements the functionality of TQLayoutIterator. Each subclass of TQLayout needs a TQGLayoutIterator subclass.

See also Widget Appearance and Style and Layout Management.

## Member Function Documentation

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

Destroys the iterator

### TQLayoutItem * TQGLayoutIterator::current ()`[pure 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.

### TQLayoutItem * TQGLayoutIterator::next ()`[pure 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.

### TQLayoutItem * TQGLayoutIterator::takeCurrent ()`[pure virtual]`

Implemented in subclasses. The function must 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 TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.