QFormLayout Class Reference

QFormLayout Class Reference

#include <qformlayout.h>

Class Description

Definition at line 55 of file qformlayout.h.

+ Inheritance diagram for QFormLayout:

Public Types

enum  FieldGrowthPolicy { FieldsStayAtSizeHint, ExpandingFieldsGrow, AllNonFixedFieldsGrow }
 
enum  RowWrapPolicy { DontWrapRows, WrapLongRows, WrapAllRows }
 
enum  ItemRole { LabelRole = 0, FieldRole = 1, SpanningRole = 2 }
 
- Public Types inherited from QLayout
enum  SizeConstraint {
  SetDefaultConstraint, SetNoConstraint, SetMinimumSize, SetFixedSize,
  SetMaximumSize, SetMinAndMaxSize
}
 

Public Member Functions

 QFormLayout (QWidget *parent=0)
 
 ~QFormLayout ()
 
void setFieldGrowthPolicy (FieldGrowthPolicy policy)
 
FieldGrowthPolicy fieldGrowthPolicy () const
 
void setRowWrapPolicy (RowWrapPolicy policy)
 
RowWrapPolicy rowWrapPolicy () const
 
void setLabelAlignment (Qt::Alignment alignment)
 
Qt::Alignment labelAlignment () const
 
void setFormAlignment (Qt::Alignment alignment)
 
Qt::Alignment formAlignment () const
 
void setHorizontalSpacing (int spacing)
 
int horizontalSpacing () const
 
void setVerticalSpacing (int spacing)
 
int verticalSpacing () const
 
int spacing () const
 
void setSpacing (int)
 
void addRow (QWidget *label, QWidget *field)
 
void addRow (QWidget *label, QLayout *field)
 
void addRow (const QString &labelText, QWidget *field)
 
void addRow (const QString &labelText, QLayout *field)
 
void addRow (QWidget *widget)
 
void addRow (QLayout *layout)
 
void insertRow (int row, QWidget *label, QWidget *field)
 
void insertRow (int row, QWidget *label, QLayout *field)
 
void insertRow (int row, const QString &labelText, QWidget *field)
 
void insertRow (int row, const QString &labelText, QLayout *field)
 
void insertRow (int row, QWidget *widget)
 
void insertRow (int row, QLayout *layout)
 
void setItem (int row, ItemRole role, QLayoutItem *item)
 
void setWidget (int row, ItemRole role, QWidget *widget)
 
void setLayout (int row, ItemRole role, QLayout *layout)
 
QLayoutItemitemAt (int row, ItemRole role) const
 
void getItemPosition (int index, int *rowPtr, ItemRole *rolePtr) const
 
void getWidgetPosition (QWidget *widget, int *rowPtr, ItemRole *rolePtr) const
 
void getLayoutPosition (QLayout *layout, int *rowPtr, ItemRole *rolePtr) const
 
QWidgetlabelForField (QWidget *field) const
 
QWidgetlabelForField (QLayout *field) const
 
void addItem (QLayoutItem *item)
 
QLayoutItemitemAt (int index) const
 
QLayoutItemtakeAt (int index)
 
void setGeometry (const QRect &rect)
 
QSize minimumSize () const
 
QSize sizeHint () const
 
void invalidate ()
 
bool hasHeightForWidth () const
 
int heightForWidth (int width) const
 
Qt::Orientations expandingDirections () const
 
int count () const
 
int rowCount () const
 
- Public Member Functions inherited from QLayout
 QLayout (QWidget *parent)
 
 QLayout ()
 
 ~QLayout ()
 
int margin () const
 
int spacing () const
 
void setMargin (int)
 
void setSpacing (int)
 
void setContentsMargins (int left, int top, int right, int bottom)
 
void setContentsMargins (const QMargins &margins)
 
void getContentsMargins (int *left, int *top, int *right, int *bottom) const
 
QMargins contentsMargins () const
 
QRect contentsRect () const
 
bool setAlignment (QWidget *w, Qt::Alignment alignment)
 
bool setAlignment (QLayout *l, Qt::Alignment alignment)
 
void setSizeConstraint (SizeConstraint)
 
SizeConstraint sizeConstraint () const
 
void setMenuBar (QWidget *w)
 
QWidgetmenuBar () const
 
QWidgetparentWidget () const
 
void invalidate ()
 
QRect geometry () const
 
bool activate ()
 
void update ()
 
void addWidget (QWidget *w)
 
void removeWidget (QWidget *w)
 
void removeItem (QLayoutItem *)
 
Qt::Orientations expandingDirections () const
 
QSize minimumSize () const
 
QSize maximumSize () const
 
virtual int indexOf (QWidget *) const
 
bool isEmpty () const
 
int totalHeightForWidth (int w) const
 
QSize totalMinimumSize () const
 
QSize totalMaximumSize () const
 
QSize totalSizeHint () const
 
QLayoutlayout ()
 
void setEnabled (bool)
 
bool isEnabled () const
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=0)
 
virtual ~QObject ()
 
virtual bool event (QEvent *)
 
virtual bool eventFilter (QObject *, QEvent *)
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool b)
 
QThreadthread () const
 
void moveToThread (QThread *thread)
 
int startTimer (int interval)
 
void killTimer (int id)
 
template<typename T >
findChild (const QString &aName=QString()) const
 
template<typename T >
QList< T > findChildren (const QString &aName=QString()) const
 
template<typename T >
QList< T > findChildren (const QRegExp &re) const
 
const QObjectListchildren () const
 
void setParent (QObject *)
 
void installEventFilter (QObject *)
 
void removeEventFilter (QObject *)
 
bool connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 
bool disconnect (const QObject *receiver, const char *member=0)
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
void setUserData (uint id, QObjectUserData *data)
 
QObjectUserDatauserData (uint id) const
 
QObjectparent () const
 
bool inherits (const char *classname) const
 
- Public Member Functions inherited from QLayoutItem
 QLayoutItem (Qt::Alignment alignment=0)
 
virtual ~QLayoutItem ()
 
virtual int minimumHeightForWidth (int) const
 
virtual QWidgetwidget ()
 
virtual QSpacerItemspacerItem ()
 
Qt::Alignment alignment () const
 
void setAlignment (Qt::Alignment a)
 
QSizePolicy::ControlTypes controlTypes () const
 

Properties

FieldGrowthPolicy fieldGrowthPolicy
 
RowWrapPolicy rowWrapPolicy
 
Qt::Alignment labelAlignment
 
Qt::Alignment formAlignment
 
int horizontalSpacing
 
int verticalSpacing
 
- Properties inherited from QLayout
int margin
 
int spacing
 
SizeConstraint sizeConstraint
 
- Properties inherited from QObject
QString objectName
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 
- Signals inherited from QObject
void destroyed (QObject *=0)
 
- Static Public Member Functions inherited from QLayout
static QSize closestAcceptableSize (const QWidget *w, const QSize &s)
 
- Static Public Member Functions inherited from QObject
static bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static uint registerUserData ()
 
- Protected Member Functions inherited from QLayout
void widgetEvent (QEvent *)
 
void childEvent (QChildEvent *e)
 
void addChildLayout (QLayout *l)
 
void addChildWidget (QWidget *w)
 
bool adoptLayout (QLayout *layout)
 
QRect alignmentRect (const QRect &) const
 
 QLayout (QLayoutPrivate &d, QLayout *, QWidget *)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
virtual void timerEvent (QTimerEvent *)
 
virtual void customEvent (QEvent *)
 
virtual void connectNotify (const char *signal)
 
virtual void disconnectNotify (const char *signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=0)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Protected Attributes inherited from QLayoutItem
Qt::Alignment align
 
- Static Protected Attributes inherited from QObject
static const QMetaObject staticQtMetaObject
 

Member Enumeration Documentation

Enumerator
FieldsStayAtSizeHint 
ExpandingFieldsGrow 
AllNonFixedFieldsGrow 

Definition at line 68 of file qformlayout.h.

Enumerator
DontWrapRows 
WrapLongRows 
WrapAllRows 

Definition at line 74 of file qformlayout.h.

enum ItemRole
Enumerator
LabelRole 
FieldRole 
SpanningRole 

Definition at line 80 of file qformlayout.h.

Constructor & Destructor Documentation

QFormLayout ( QWidget parent = 0)
explicit

Member Function Documentation

void setFieldGrowthPolicy ( FieldGrowthPolicy  policy)
FieldGrowthPolicy fieldGrowthPolicy ( ) const
void setRowWrapPolicy ( RowWrapPolicy  policy)
RowWrapPolicy rowWrapPolicy ( ) const
void setLabelAlignment ( Qt::Alignment  alignment)
Qt::Alignment labelAlignment ( ) const
void setFormAlignment ( Qt::Alignment  alignment)
Qt::Alignment formAlignment ( ) const
void setHorizontalSpacing ( int  spacing)
int horizontalSpacing ( ) const
void setVerticalSpacing ( int  spacing)
int verticalSpacing ( ) const
int spacing ( ) const
void setSpacing ( int  )
void addRow ( QWidget label,
QWidget field 
)
void addRow ( QWidget label,
QLayout field 
)
void addRow ( const QString labelText,
QWidget field 
)
void addRow ( const QString labelText,
QLayout field 
)
void addRow ( QWidget widget)
void addRow ( QLayout layout)
void insertRow ( int  row,
QWidget label,
QWidget field 
)
void insertRow ( int  row,
QWidget label,
QLayout field 
)
void insertRow ( int  row,
const QString labelText,
QWidget field 
)
void insertRow ( int  row,
const QString labelText,
QLayout field 
)
void insertRow ( int  row,
QWidget widget 
)
void insertRow ( int  row,
QLayout layout 
)
void setItem ( int  row,
ItemRole  role,
QLayoutItem item 
)
void setWidget ( int  row,
ItemRole  role,
QWidget widget 
)
void setLayout ( int  row,
ItemRole  role,
QLayout layout 
)
QLayoutItem* itemAt ( int  row,
ItemRole  role 
) const
void getItemPosition ( int  index,
int rowPtr,
ItemRole rolePtr 
) const
void getWidgetPosition ( QWidget widget,
int rowPtr,
ItemRole rolePtr 
) const
void getLayoutPosition ( QLayout layout,
int rowPtr,
ItemRole rolePtr 
) const
QWidget* labelForField ( QWidget field) const
QWidget* labelForField ( QLayout field) const
void addItem ( QLayoutItem item)
virtual

Implements QLayout.

QLayoutItem* itemAt ( int  index) const
virtual

Implements QLayout.

QLayoutItem* takeAt ( int  index)
virtual

Implements QLayout.

void setGeometry ( const QRect rect)
virtual

Reimplemented from QLayout.

QSize minimumSize ( ) const
virtual

Implements QLayoutItem.

QSize sizeHint ( ) const
virtual

Implements QLayoutItem.

void invalidate ( )
virtual

Reimplemented from QLayoutItem.

bool hasHeightForWidth ( ) const
virtual

Reimplemented from QLayoutItem.

int heightForWidth ( int  width) const
virtual

Reimplemented from QLayoutItem.

Qt::Orientations expandingDirections ( ) const
virtual

Implements QLayoutItem.

int count ( ) const
virtual

Implements QLayout.

int rowCount ( ) const

Property Documentation

FieldGrowthPolicy fieldGrowthPolicy
readwrite

Definition at line 60 of file qformlayout.h.

RowWrapPolicy rowWrapPolicy
readwrite

Definition at line 61 of file qformlayout.h.

Qt::Alignment labelAlignment
readwrite

Definition at line 62 of file qformlayout.h.

Qt::Alignment formAlignment
readwrite

Definition at line 63 of file qformlayout.h.

int horizontalSpacing
readwrite

Definition at line 64 of file qformlayout.h.

int verticalSpacing
readwrite

Definition at line 65 of file qformlayout.h.


The documentation for this class was generated from the following file: