1
/***************************************************************************
2
* Copyright (C) 2005 by Adam Treat *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
***************************************************************************/
20
class FormLayoutIterator : public QGLayoutIterator
23
FormLayoutIterator( QPtrList<QLayoutItem> *l )
24
: idx( 0 ), m_itemList( l )
27
QLayoutItem *current()
29
return idx < int( m_itemList->count() ) ? m_itemList->at( idx ) : 0;
38
QLayoutItem *takeCurrent()
40
return m_itemList->take( idx );
45
QPtrList<QLayoutItem> *m_itemList;
48
class FormLayout : public QLayout
52
FormLayout( QWidget *parent, int margin = 0, int spacing = -1 );
53
FormLayout( QLayout *parent, int spacing );
54
FormLayout( int spacing );
57
virtual void addItem( QLayoutItem *item );
58
virtual QSizePolicy::ExpandData expanding() const;
59
virtual bool hasHeightForWidth() const;
60
virtual int heightForWidth( int ) const;
61
virtual QSize minimumSize() const;
62
virtual QSize sizeHint() const;
63
virtual QLayoutIterator iterator();
64
virtual bool isEmpty() const;
67
void slotCalculateItemSize();
70
virtual void setGeometry( const QRect &rect );
73
int doLayout( const QRect &rect, bool testOnly ) const;
75
QPtrList<QLayoutItem> m_itemList;