Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

qglayoutiterator(3qt) [centos man page]

QGLayoutIterator(3qt)													     QGLayoutIterator(3qt)

NAME
QGLayoutIterator - Abstract base class of internal layout iterators SYNOPSIS
#include <qlayout.h> Public Members virtual ~QGLayoutIterator () virtual QLayoutItem * next () = 0 virtual QLayoutItem * current () = 0 virtual QLayoutItem * takeCurrent () = 0 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 () [pure virtual] Implemented in subclasses to return the current item, or 0 if there is no current item. Examples: QLayoutItem * QGLayoutIterator::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: QLayoutItem * QGLayoutIterator::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: SEE ALSO
http://doc.trolltech.com/qglayoutiterator.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qglayoutiterator.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QGLayoutIterator(3qt)

Check Out this Related Man Page

QLayoutIterator(3qt)													      QLayoutIterator(3qt)

NAME
QLayoutIterator - Iterators over QLayoutItem SYNOPSIS
#include <qlayout.h> Public Members QLayoutIterator ( QGLayoutIterator * gi ) QLayoutIterator ( const QLayoutIterator & i ) ~QLayoutIterator () QLayoutIterator & operator= ( const QLayoutIterator & i ) QLayoutItem * operator++ () QLayoutItem * current () QLayoutItem * takeCurrent () void deleteCurrent () DESCRIPTION
The QLayoutIterator class provides iterators over QLayoutItem. Use QLayoutItem::iterator() to create an iterator over a layout. QLayoutIterator uses explicit sharing with a reference count. If an iterator is copied and one of the copies is modified, both iterators will be modified. A QLayoutIterator is not protected against changes in its layout. If the layout is modified or deleted the iterator will become invalid. It is not possible to test for validity. It is safe to delete an invalid layout; any other access may lead to an illegal memory reference and the abnormal termination of the program. Calling takeCurrent() or deleteCurrent() leaves the iterator in a valid state, but may invalidate any other iterators that access the same layout. The following code will draw a rectangle for each layout item in the layout structure of the widget. static void paintLayout( QPainter *p, QLayoutItem *lay ) { QLayoutIterator it = lay->iterator(); QLayoutItem *child; while ( (child = it.current()) != 0 ) { paintLayout( p, child ); it.next(); } p->drawRect( lay->geometry() ); } void ExampleWidget::paintEvent( QPaintEvent * ) { QPainter p( this ); if ( layout() ) paintLayout( &p, layout() ); } All the functionality of QLayoutIterator is implemented by subclasses of QGLayoutIterator. QLayoutIterator itself is not designed to be subclassed. See also Widget Appearance and Style and Layout Management. MEMBER FUNCTION DOCUMENTATION
QLayoutIterator::QLayoutIterator ( QGLayoutIterator * gi ) Constructs an iterator based on gi. The constructed iterator takes ownership of gi and will delete it. This constructor is provided for layout implementors. Application programmers should use QLayoutItem::iterator() to create an iterator over a layout. QLayoutIterator::QLayoutIterator ( const QLayoutIterator & i ) Creates a shallow copy of i, i.e. if the copy is modified, then the original will also be modified. QLayoutIterator::~QLayoutIterator () Destroys the iterator. QLayoutItem * QLayoutIterator::current () Returns the current item, or 0 if there is no current item. void QLayoutIterator::deleteCurrent () Removes and deletes the current child item from the layout and moves the iterator to the next item. This iterator will still be valid, but any other iterator over the same layout may become invalid. QLayoutItem * QLayoutIterator::operator++ () Moves the iterator to the next child item and returns that item, or 0 if there is no such item. QLayoutIterator &; QLayoutIterator::operator= ( const QLayoutIterator & i ) Assigns i to this iterator and returns a reference to this iterator. QLayoutItem * QLayoutIterator::takeCurrent () Removes the current child item from the layout without deleting it, and moves the iterator to the next item. Returns the removed item, or 0 if there was no item to be removed. This iterator will still be valid, but any other iterator over the same layout may become invalid. SEE ALSO
http://doc.trolltech.com/qlayoutiterator.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qlayoutiterator.3qt) and the Qt version (3.1.1). Trolltech AS 9 December 2002 QLayoutIterator(3qt)
Man Page