Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtGui.QLayout Class Referenceabstract

The QLayout class is the base class of geometry managers. More...

Inheritance diagram for QtGui.QLayout:
Collaboration diagram for QtGui.QLayout:

Public Types

enum  SizeConstraint {
  SetDefaultConstraint = 0, SetFixedSize = 3, SetMaximumSize = 4, SetMinAndMaxSize = 5,
  SetMinimumSize = 2, SetNoConstraint = 1
}
  More...
 

Public Member Functions

 QLayout ()
 
 
 QLayout (QWidget parent)
 
 
override void CreateProxy ()
 
new bool Activate ()
 
 
abstract void AddItem (IQLayoutItem arg1)
 
 
new void AddWidget (QWidget w)
 
 
new QRect ContentsRect ()
 
 
abstract int Count ()
 
 
virtual Qt.Orientation ExpandingDirections ()
 
 
new void GetContentsMargins (ref int left, ref int top, ref int right, ref int bottom)
 
 
virtual int IndexOf (QWidget arg1)
 
 
virtual void Invalidate ()
 
 
virtual bool IsEmpty ()
 
 
new bool IsEnabled ()
 
 
abstract IQLayoutItem ItemAt (int index)
 
 
virtual QLayout Layout ()
 
 
virtual QSize MaximumSize ()
 
 
virtual QSize MinimumSize ()
 
 
new QWidget ParentWidget ()
 
 
new void RemoveItem (IQLayoutItem arg1)
 
 
new void RemoveWidget (QWidget w)
 
 
new bool SetAlignment (QWidget w, Qt.AlignmentFlag alignment)
 
 
new bool SetAlignment (QLayout l, Qt.AlignmentFlag alignment)
 
 
new void SetContentsMargins (int left, int top, int right, int bottom)
 
 
new void SetEnabled (bool arg1)
 
 
abstract IQLayoutItem TakeAt (int index)
 
 
new int TotalHeightForWidth (int w)
 
new QSize TotalMaximumSize ()
 
new QSize TotalMinimumSize ()
 
new QSize TotalSizeHint ()
 
new void Update ()
 
 
new void Dispose ()
 
new QSizePolicy.ControlType ControlTypes ()
 
virtual bool HasHeightForWidth ()
 
virtual int HeightForWidth (int arg1)
 
virtual int MinimumHeightForWidth (int arg1)
 
abstract QSize SizeHint ()
 
virtual QSpacerItem SpacerItem ()
 
virtual QWidget Widget ()
 
- Public Member Functions inherited from QtCore.QObject
 QObject (QObject parent=null)
 
 
new bool BlockSignals (bool b)
 
 
new
System.Collections.Generic.List
< QObject
Children ()
 
 
new bool Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
 
 
new void DeleteLater ()
 
 
new bool Disconnect (QObject receiver, string member=null)
 
 
new bool Disconnect (string signal=null, QObject receiver=null, string member=null)
 
 
new void DumpObjectInfo ()
 
 
new void DumpObjectTree ()
 
 
new
System.Collections.Generic.List
< QByteArray
DynamicPropertyNames ()
 
 
virtual bool OnEvent (QEvent arg1)
 
 
virtual bool EventFilter (QObject arg1, QEvent arg2)
 
 
new bool Inherits (string classname)
 
 
new void InstallEventFilter (QObject arg1)
 
 
new bool IsWidgetType ()
 
 
new void KillTimer (int id)
 
 
new object Property (string name)
 
 
new void RemoveEventFilter (QObject arg1)
 
 
new bool SetProperty (string name, object value)
 
 
new void SetUserData (uint id, QObjectUserData data)
 
new bool SignalsBlocked ()
 
 
new int StartTimer (int interval)
 
 
new QObjectUserData UserData (uint id)
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.Qt
delegate QTextStream FuncQTextStreamQTextStream (QTextStream qTextStream)
 
delegate string FuncStringQByteArray (QByteArray qByteArray)
 
delegate QByteArray FuncQByteArrayString (string @string)
 
delegate void ActionQtMsgTypeString (QtMsgType qtMsgType, string @string)
 
delegate QObject FuncQObject ()
 
- Public Member Functions inherited from QtGui.IQLayoutItem
new QSizePolicy.ControlType ControlTypes ()
 
Qt.Orientation ExpandingDirections ()
 
bool HasHeightForWidth ()
 
int HeightForWidth (int arg1)
 
void Invalidate ()
 
bool IsEmpty ()
 
QLayout Layout ()
 
QSize MaximumSize ()
 
int MinimumHeightForWidth (int arg1)
 
QSize MinimumSize ()
 
QSize SizeHint ()
 
QSpacerItem SpacerItem ()
 
QWidget Widget ()
 

Static Public Member Functions

static QSize ClosestAcceptableSize (QWidget w, QSize s)
 
 
static string Tr (string s, string c=null)
 
static string Tr (string s, string c, int n)
 
static string TrUtf8 (string s, string c=null)
 
static string TrUtf8 (string s, string c, int n)
 
- Static Public Member Functions inherited from QtCore.QObject
static bool Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
 
 
static bool Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType arg5=Qt.ConnectionType.AutoConnection)
 
 
static bool Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member)
 
 
static bool Disconnect (QObject sender, string signal, QObject receiver, string member)
 
 
static uint RegisterUserData ()
 
static string Tr (string s, string c=null)
 
 
static string Tr (string s, string c, int n)
 
 
static string TrUtf8 (string s, string c=null)
 
 
static string TrUtf8 (string s, string c, int n)
 
 
- Static Public Member Functions inherited from QtCore.Qt
static QDataStream Write (QDataStream s, object p)
 
static QDataStream Write (QDataStream arg1, QSizeF arg2)
 
static QTextStream Write (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Write (QDataStream arg1, QPoint arg2)
 
static QDataStream Write (QDataStream arg1, QLineF arg2)
 
static QDataStream Write (QDataStream arg1, QPointF arg2)
 
static QDataStream Write (QDataStream arg1, QChar arg2)
 
static QDataStream Write (QDataStream arg1, QByteArray arg2)
 
static QDataStream Write (QDataStream arg1, QEasingCurve arg2)
 
static QDataStream Write (QDataStream arg1, QRectF arg2)
 
static QDataStream Write (QDataStream arg1, QDateTime arg2)
 
static QDataStream Write (QDataStream arg1, QUrl arg2)
 
static QDataStream Write (QDataStream arg1, QTime arg2)
 
static QDataStream Write (QDataStream arg1, QLocale arg2)
 
static QDataStream Write (QDataStream arg1, QBitArray arg2)
 
static QDataStream Write (QDataStream arg1, QUuid arg2)
 
static QDataStream Write (QDataStream arg1, QLine arg2)
 
static QDataStream Write (QDataStream arg1, QDate arg2)
 
static QDataStream Write (QDataStream @out, QRegExp regExp)
 
static QDataStream Write (QDataStream arg1, QRect arg2)
 
static QDataStream Write (QDataStream arg1, QSize arg2)
 
static QDataStream Write (QDataStream s, QVariant.Type p)
 
static QDataStream Write (QDataStream arg1, string arg2)
 
static QDataStream Write (QDataStream @out, System.Collections.Generic.List< string > list)
 
static QDataStream Read (QDataStream arg1, QChar arg2)
 
static QDataStream Read (QDataStream arg1, QLocale arg2)
 
static QDataStream Read (QDataStream arg1, QRect arg2)
 
static QDataStream Read (QDataStream arg1, QEasingCurve arg2)
 
static QDataStream Read (QDataStream arg1, QDate arg2)
 
static QDataStream Read (QDataStream arg1, QUrl arg2)
 
static QDataStream Read (QDataStream arg1, QUuid arg2)
 
static QTextStream Read (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Read (QDataStream arg1, QLineF arg2)
 
static QDataStream Read (QDataStream arg1, QRectF arg2)
 
static QDataStream Read (QDataStream arg1, QPointF arg2)
 
static QDataStream Read (QDataStream arg1, QLine arg2)
 
static QDataStream Read (QDataStream arg1, QBitArray arg2)
 
static QDataStream Read (QDataStream arg1, QSize arg2)
 
static QDataStream Read (QDataStream arg1, QDateTime arg2)
 
static QDataStream Read (QDataStream arg1, QTime arg2)
 
static QDataStream Read (QDataStream arg1, QPoint arg2)
 
static QDataStream Read (QDataStream @in, QRegExp regExp)
 
static QDataStream Read (QDataStream s, object p)
 
static QDataStream Read (QDataStream arg1, QByteArray arg2)
 
static QDataStream Read (QDataStream arg1, QSizeF arg2)
 
static QDataStream Read (QDataStream arg1, string arg2)
 
static QDataStream Read (QDataStream s, QVariant.Type p)
 
static QDataStream Read (QDataStream @in, System.Collections.Generic.List< string > list)
 
static double qAcos (double v)
 
static void qAddPostRoutine (System.Action arg1)
 
static string qAppName ()
 
static double qAsin (double v)
 
static double qAtan (double v)
 
static double qAtan2 (double x, double y)
 
static void qBadAlloc ()
 
static int qCeil (double v)
 
static ushort qChecksum (string s, uint len)
 
static QByteArray qCompress (QByteArray data)
 
static QByteArray qCompress (QByteArray data, int compressionLevel=-1)
 
static QByteArray qCompress (Pointer< byte > data, int nbytes)
 
static QByteArray qCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1)
 
static double qCos (double v)
 
static double qExp (double v)
 
static double qFabs (double v)
 
static double qFastCos (double x)
 
static double qFastSin (double x)
 
static string qFlagLocation (string method)
 
static int qFloor (double v)
 
static bool qFuzzyCompare (double p1, double p2)
 
static bool qFuzzyCompare (float p1, float p2)
 
static bool qFuzzyIsNull (double d)
 
static bool qFuzzyIsNull (float f)
 
static uint qHash (QBitArray key)
 
static uint qHash (QChar key)
 
static uint qHash (QStringRef key)
 
static uint qHash (QUrl url)
 
static uint qHash (QPersistentModelIndex index)
 
static uint qHash (QByteArray key)
 
static uint qHash (QModelIndex index)
 
static uint qHash (uint key)
 
static uint qHash (sbyte key)
 
static uint qHash (byte key)
 
static uint qHash (short key)
 
static uint qHash (NativeLong key)
 
static uint qHash (ushort key)
 
static uint qHash (long key)
 
static uint qHash (ulong key)
 
static uint qHash (int key)
 
static uint qHash (string key)
 
static uint qHash (NativeULong key)
 
static double qInf ()
 
static Qt.ActionQtMsgTypeString qInstallMsgHandler (Qt.ActionQtMsgTypeString arg1)
 
static int qIntCast (float f)
 
static int qIntCast (double f)
 
static bool qIsFinite (double d)
 
static bool qIsFinite (float f)
 
static bool qIsInf (float f)
 
static bool qIsInf (double d)
 
static bool qIsNaN (float f)
 
static bool qIsNaN (double d)
 
static bool qIsNull (float f)
 
static bool qIsNull (double d)
 
static double qLn (double v)
 
static double qPow (double x, double y)
 
static double qQNaN ()
 
static void qRegisterStaticPluginInstanceFunction (Qt.FuncQObject function)
 
static void qRemovePostRoutine (System.Action arg1)
 
static int qRound (double d)
 
static long qRound64 (double d)
 
static double qSNaN ()
 
static bool qSharedBuild ()
 
static double qSin (double v)
 
static double qSqrt (double v)
 
static bool qStringComparisonHelper (QStringRef s1, string s2)
 
static double qTan (double v)
 
static QByteArray qUncompress (QByteArray data)
 
static QByteArray qUncompress (Pointer< byte > data, int nbytes)
 
static string qVersion ()
 
static void Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size)
 
static QByteArray Qgetenv (string varName)
 
static bool Qputenv (string varName, QByteArray value)
 
static int Qrand ()
 
static void Qsrand (uint seed)
 
static int Qstrcmp (QByteArray str1, QByteArray str2)
 
static int Qstrcmp (QByteArray str1, string str2)
 
static int Qstrcmp (string str1, QByteArray str2)
 
static int Qstrcmp (string str1, string str2)
 
static Pointer< sbyte > Qstrcpy (Pointer< sbyte > dst, string src)
 
static Pointer< sbyte > Qstrdup (string arg1)
 
static int Qstricmp (string arg1, string arg2)
 
static uint Qstrlen (string str)
 
static int Qstrncmp (string str1, string str2, uint len)
 
static Pointer< sbyte > Qstrncpy (Pointer< sbyte > dst, string src, uint len)
 
static int Qstrnicmp (string arg1, string arg2, uint len)
 
static uint Qstrnlen (string str, uint maxlen)
 
static string QtTrId (string id, int n=-1)
 

Protected Member Functions

 QLayout (System.Type dummy)
 
new void AddChildLayout (QLayout l)
 
 
new void AddChildWidget (QWidget w)
 
 
new QRect AlignmentRect (QRect arg1)
 
 
override void OnChildEvent (QChildEvent e)
 
 
new void OnWidgetEvent (QEvent arg1)
 
- Protected Member Functions inherited from QtCore.QObject
 QObject (System.Type dummy)
 
virtual void ConnectNotify (string signal)
 
 
virtual void OnCustomEvent (QEvent arg1)
 
 
new void OnDestroyed (QObject arg1=null)
 
 
virtual void DisconnectNotify (string signal)
 
 
new int Receivers (string signal)
 
 
new QObject Sender ()
 
 
new int SenderSignalIndex ()
 
 
virtual void OnTimerEvent (QTimerEvent arg1)
 
 

Properties

virtual EventHandler
< QEventArgs< QEvent > > 
WidgetEvent
 
new Qt.AlignmentFlag Alignment [get, set]
 
 
new QMargins ContentsMargins [get, set]
 
 
virtual QRect Geometry [get, set]
 
 
new QWidget MenuBar [get, set]
 
 
new int Margin [get, set]
 
 
new int Spacing [get, set]
 
 
new SizeConstraint sizeConstraint [get, set]
 
 
static new QMetaObject StaticMetaObject [get]
 
new Qt.AlignmentFlag Align [get, set]
 
new IQLayoutSignals Emit [get]
 
- Properties inherited from QtCore.QObject
virtual EventHandler
< QEventArgs< QChildEvent > > 
ChildEvent
 
 
virtual EventHandler
< QEventArgs< QEvent > > 
CustomEvent
 
 
virtual EventHandler
< QEventArgs< QEvent > > 
Event
 
 
virtual EventHandler
< QEventArgs< QTimerEvent > > 
TimerEvent
 
 
Slot< QObjectDestroyedQObject
 
Slot Destroyed
 
 
new QObject Parent [get, set]
 
 
virtual System.IntPtr SmokeObject [get, set]
 
new string ObjectName [get, set]
 
 
static new QMetaObject StaticMetaObject [get]
 
 
static new QMetaObject StaticQtMetaObject [get]
 
new IQObjectSignals Emit [get]
 
- Properties inherited from QtGui.IQLayoutItem
Qt.AlignmentFlag Alignment [get, set]
 
QRect Geometry [get, set]
 

Additional Inherited Members

- Protected Attributes inherited from QtCore.QObject
object Q_EMIT = null
 
SmokeInvocation interceptor
 
readonly List< QEventHandler > eventFilters = new List<QEventHandler>()
 

Detailed Description

The QLayout class is the base class of geometry managers.

This is an abstract base class inherited by the concrete classes QBoxLayout, QGridLayout, QFormLayout, and QStackedLayout.

For users of QLayout subclasses or of QMainWindow there is seldom any need to use the basic functions provided by QLayout, such as setSizeConstraint() or setMenuBar(). See Layout Management for more information.

To make your own layout manager, implement the functions addItem(), sizeHint(), setGeometry(), itemAt() and takeAt(). You should also implement minimumSize() to ensure your layout isn't resized to zero size if there is too little space. To support children whose heights depend on their widths, implement hasHeightForWidth() and heightForWidth(). See the Border Layout and Flow Layout examples for more information about implementing custom layout managers.

Geometry management stops when the layout manager is deleted.

See also QLayoutItem, Layout Management, Basic Layouts Example, Border Layout Example, and Flow Layout Example.

Member Enumeration Documentation

The possible values are:

See also setSizeConstraint().

Enumerator:
SetDefaultConstraint 

The main widget's minimum size is set to minimumSize(), unless the widget already has a minimum size.

SetFixedSize 

The main widget's size is set to sizeHint(); it cannot be resized at all.

SetMaximumSize 

The main widget's maximum size is set to maximumSize(); it cannot be larger.

SetMinAndMaxSize 

The main widget's minimum size is set to minimumSize() and its maximum size is set to maximumSize().

SetMinimumSize 

The main widget's minimum size is set to minimumSize(); it cannot be smaller.

SetNoConstraint 

The widget is not constrained.

Constructor & Destructor Documentation

QtGui.QLayout.QLayout ( System.Type  dummy)
protected
QtGui.QLayout.QLayout ( )

Constructs a new child QLayout.

This layout has to be inserted into another layout before geometry management will work.

QtGui.QLayout.QLayout ( QWidget  parent)

Constructs a new top-level QLayout, with parent parent. parent may not be 0.

There can be only one top-level layout for a widget. It is returned by QWidget::layout().

Member Function Documentation

new bool QtGui.QLayout.Activate ( )

Redoes the layout for parentWidget() if necessary.

You should generally not need to call this because it is automatically called at the most appropriate times. It returns true if the layout was redone.

See also update() and QWidget::updateGeometry().

new void QtGui.QLayout.AddChildLayout ( QLayout  l)
protected

This function is called from addLayout() or insertLayout() functions in subclasses to add layout l as a sub-layout.

The only scenario in which you need to call it directly is if you implement a custom layout that supports nested layouts.

See also QBoxLayout::addLayout(), QBoxLayout::insertLayout(), and QGridLayout::addLayout().

new void QtGui.QLayout.AddChildWidget ( QWidget  w)
protected

This function is called from addWidget() functions in subclasses to add w as a managed widget of a layout.

If w is already managed by a layout, this function will give a warning and remove w from that layout. This function must therefore be called before adding w to the layout's data structure.

abstract void QtGui.QLayout.AddItem ( IQLayoutItem  arg1)
pure virtual

Implemented in subclasses to add an item. How it is added is specific to each subclass.

This function is not usually called in application code. To add a widget to a layout, use the addWidget() function; to add a child layout, use the addLayout() function provided by the relevant QLayout subclass.

Note: The ownership of item is transferred to the layout, and it's the layout's responsibility to delete it.

See also addWidget(), QBoxLayout::addLayout(), and QGridLayout::addLayout().

Implemented in QtGui.QStackedLayout, QtGui.QGridLayout, QtGui.QFormLayout, and QtGui.QBoxLayout.

new void QtGui.QLayout.AddWidget ( QWidget  w)

Adds widget w to this layout in a manner specific to the layout. This function uses addItem().

new QRect QtGui.QLayout.AlignmentRect ( QRect  arg1)
protected

Returns the rectangle that should be covered when the geometry of this layout is set to r, provided that this layout supports setAlignment().

The result is derived from sizeHint() and expanding(). It is never larger than r.

static QSize QtGui.QLayout.ClosestAcceptableSize ( QWidget  w,
QSize  s 
)
static

Returns a size that satisfies all size constraints on widget, including heightForWidth() and that is as close as possible to size.

new QRect QtGui.QLayout.ContentsRect ( )

Returns the layout's geometry() rectangle, but taking into account the contents margins.

This function was introduced in Qt 4.3.

See also setContentsMargins() and getContentsMargins().

new QSizePolicy.ControlType QtGui.QLayout.ControlTypes ( )
abstract int QtGui.QLayout.Count ( )
pure virtual

Must be implemented in subclasses to return the number of items in the layout.

See also itemAt().

Implemented in QtGui.QStackedLayout, QtGui.QGridLayout, QtGui.QFormLayout, and QtGui.QBoxLayout.

override void QtGui.QLayout.CreateProxy ( )
virtual

Reimplemented from QtCore.QObject.

Reimplemented in QtGui.QVBoxLayout, and QtGui.QStackedLayout.

new void QtGui.QLayout.Dispose ( )
virtual Qt.Orientation QtGui.QLayout.ExpandingDirections ( )
virtual

Reimplemented from QLayoutItem::expandingDirections().

Returns whether this layout can make use of more space than sizeHint(). A value of Qt::Vertical or Qt::Horizontal means that it wants to grow in only one dimension, whereas Qt::Vertical | Qt::Horizontal means that it wants to grow in both dimensions.

The default implementation returns Qt::Horizontal | Qt::Vertical. Subclasses reimplement it to return a meaningful value based on their child widgets's size policies.

See also sizeHint().

Reimplemented in QtGui.QGridLayout, QtGui.QFormLayout, and QtGui.QBoxLayout.

new void QtGui.QLayout.GetContentsMargins ( ref int  left,
ref int  top,
ref int  right,
ref int  bottom 
)

Extracts the left, top, right, and bottom margins used around the layout, and assigns them to *left, *top, *right, and *bottom (unless they are null pointers).

By default, QLayout uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions.

This function was introduced in Qt 4.3.

See also setContentsMargins(), QStyle::pixelMetric(), PM_LayoutLeftMargin, PM_LayoutTopMargin, PM_LayoutRightMargin, and PM_LayoutBottomMargin.

virtual bool QtGui.QLayout.HasHeightForWidth ( )
virtual
virtual int QtGui.QLayout.HeightForWidth ( int  arg1)
virtual
virtual int QtGui.QLayout.IndexOf ( QWidget  arg1)
virtual

Searches for widget widget in this layout (not including child layouts).

Returns the index of widget, or -1 if widget is not found.

The default implementation iterates over all items using itemAt()

virtual void QtGui.QLayout.Invalidate ( )
virtual

Reimplemented from QLayoutItem::invalidate().

Reimplemented in QtGui.QGridLayout, QtGui.QFormLayout, and QtGui.QBoxLayout.

virtual bool QtGui.QLayout.IsEmpty ( )
virtual

Reimplemented from QLayoutItem::isEmpty().

new bool QtGui.QLayout.IsEnabled ( )

Returns true if the layout is enabled; otherwise returns false.

See also setEnabled().

abstract IQLayoutItem QtGui.QLayout.ItemAt ( int  index)
pure virtual

Must be implemented in subclasses to return the layout item at index. If there is no such item, the function must return 0. Items are numbered consecutively from 0. If an item is deleted, other items will be renumbered.

This function can be used to iterate over a layout. The following code will draw a rectangle for each layout item in the layout structure of the widget.

static void paintLayout(QPainter *painter, QLayoutItem *item)

{

QLayout *layout = item->layout();

if (layout) {

for (int i = 0; i < layout->count(); ++i)

paintLayout(painter, layout->itemAt(i));

}

painter->drawRect(item->geometry());

}

void MyWidget::paintEvent(QPaintEvent *)

{

QPainter painter(this);

if (layout())

paintLayout(&painter, layout());

}

See also count() and takeAt().

Implemented in QtGui.QStackedLayout, QtGui.QGridLayout, QtGui.QFormLayout, and QtGui.QBoxLayout.

virtual QLayout QtGui.QLayout.Layout ( )
virtual

Reimplemented from QLayoutItem::layout().

virtual QSize QtGui.QLayout.MaximumSize ( )
virtual

Reimplemented from QLayoutItem::maximumSize().

Returns the maximum size of this layout. This is the largest size that the layout can have while still respecting the specifications.

The returned value doesn't include the space required by QWidget::setContentsMargins() or menuBar().

The default implementation allows unlimited resizing.

Reimplemented in QtGui.QGridLayout, and QtGui.QBoxLayout.

virtual int QtGui.QLayout.MinimumHeightForWidth ( int  arg1)
virtual

Reimplemented in QtGui.QGridLayout, and QtGui.QBoxLayout.

virtual QSize QtGui.QLayout.MinimumSize ( )
virtual

Reimplemented from QLayoutItem::minimumSize().

Returns the minimum size of this layout. This is the smallest size that the layout can have while still respecting the specifications.

The returned value doesn't include the space required by QWidget::setContentsMargins() or menuBar().

The default implementation allows unlimited resizing.

Reimplemented in QtGui.QStackedLayout, QtGui.QGridLayout, QtGui.QFormLayout, and QtGui.QBoxLayout.

override void QtGui.QLayout.OnChildEvent ( QChildEvent  e)
protectedvirtual

Reimplemented from QObject::childEvent().

Reimplemented from QtCore.QObject.

new void QtGui.QLayout.OnWidgetEvent ( QEvent  arg1)
protected
new QWidget QtGui.QLayout.ParentWidget ( )

Returns the parent widget of this layout, or 0 if this layout is not installed on any widget.

If the layout is a sub-layout, this function returns the parent widget of the parent layout.

See also parent().

new void QtGui.QLayout.RemoveItem ( IQLayoutItem  arg1)

Removes the layout item item from the layout. It is the caller's responsibility to delete the item.

Notice that item can be a layout (since QLayout inherits QLayoutItem).

See also removeWidget() and addItem().

new void QtGui.QLayout.RemoveWidget ( QWidget  w)

Removes the widget widget from the layout. After this call, it is the caller's responsibility to give the widget a reasonable geometry or to put the widget back into a layout.

Note: The ownership of widget remains the same as when it was added.

See also removeItem(), QWidget::setGeometry(), and addWidget().

new bool QtGui.QLayout.SetAlignment ( QWidget  w,
Qt.AlignmentFlag  alignment 
)

Sets the alignment for widget w to alignment and returns true if w is found in this layout (not including child layouts); otherwise returns false.

new bool QtGui.QLayout.SetAlignment ( QLayout  l,
Qt.AlignmentFlag  alignment 
)

Sets the alignment for widget w to alignment and returns true if w is found in this layout (not including child layouts); otherwise returns false.

new void QtGui.QLayout.SetContentsMargins ( int  left,
int  top,
int  right,
int  bottom 
)

Sets the left, top, right, and bottom margins to use around the layout.

By default, QLayout uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions.

This function was introduced in Qt 4.3.

See also contentsMargins(), getContentsMargins(), QStyle::pixelMetric(), PM_LayoutLeftMargin, PM_LayoutTopMargin, PM_LayoutRightMargin, and PM_LayoutBottomMargin.

new void QtGui.QLayout.SetEnabled ( bool  arg1)

Enables this layout if enable is true, otherwise disables it.

An enabled layout adjusts dynamically to changes; a disabled layout acts as if it did not exist.

By default all layouts are enabled.

See also isEnabled().

virtual QSpacerItem QtGui.QLayout.SpacerItem ( )
virtual
abstract IQLayoutItem QtGui.QLayout.TakeAt ( int  index)
pure virtual

Must be implemented in subclasses to remove the layout item at index from the layout, and return the item. If there is no such item, the function must do nothing and return 0. Items are numbered consecutively from 0. If an item is removed, other items will be renumbered.

The following code fragment shows a safe way to remove all items from a layout:

QLayoutItem *child;

while ((child = layout->takeAt(0)) != 0) {

...

delete child;

}

See also itemAt() and count().

Implemented in QtGui.QStackedLayout, QtGui.QGridLayout, QtGui.QFormLayout, and QtGui.QBoxLayout.

new int QtGui.QLayout.TotalHeightForWidth ( int  w)
new QSize QtGui.QLayout.TotalMaximumSize ( )
new QSize QtGui.QLayout.TotalMinimumSize ( )
new QSize QtGui.QLayout.TotalSizeHint ( )
static string QtGui.QLayout.Tr ( string  s,
string  c = null 
)
static
static string QtGui.QLayout.Tr ( string  s,
string  c,
int  n 
)
static
static string QtGui.QLayout.TrUtf8 ( string  s,
string  c = null 
)
static
static string QtGui.QLayout.TrUtf8 ( string  s,
string  c,
int  n 
)
static
new void QtGui.QLayout.Update ( )

Updates the layout for parentWidget().

You should generally not need to call this because it is automatically called at the most appropriate times.

See also activate() and invalidate().

virtual QWidget QtGui.QLayout.Widget ( )
virtual

Property Documentation

new Qt.AlignmentFlag QtGui.QLayout.Align
getsetprotected
new Qt.AlignmentFlag QtGui.QLayout.Alignment
getset

Sets the alignment for widget w to alignment and returns true if w is found in this layout (not including child layouts); otherwise returns false.

new QMargins QtGui.QLayout.ContentsMargins
getset

Returns the margins used around the layout.

By default, QLayout uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions.

This function was introduced in Qt 4.6.

Sets the margins to use around the layout.

By default, QLayout uses the values provided by the style. On most platforms, the margin is 11 pixels in all directions.

This function was introduced in Qt 4.6.

new IQLayoutSignals QtGui.QLayout.Emit
getprotected
virtual QRect QtGui.QLayout.Geometry
getset

Reimplemented from QLayoutItem::geometry().

Reimplemented from QLayoutItem::setGeometry().

new int QtGui.QLayout.Margin
getset

This property holds the width of the outside border of the layout.

Use setContentsMargins() and getContentsMargins() instead.

new QWidget QtGui.QLayout.MenuBar
getset

Returns the menu bar set for this layout, or 0 if no menu bar is set.

Tells the geometry manager to place the menu bar widget at the top of parentWidget(), outside QWidget::contentsMargins(). All child widgets are placed below the bottom edge of the menu bar.

new SizeConstraint QtGui.QLayout.sizeConstraint
getset

This property holds the resize mode of the layout.

The default mode is SetDefaultConstraint.

new int QtGui.QLayout.Spacing
getset

This property holds the spacing between widgets inside the layout.

If no value is explicitly set, the layout's spacing is inherited from the parent layout, or from the style settings for the parent widget.

For QGridLayout and QFormLayout, it is possible to set different horizontal and vertical spacings using setHorizontalSpacing() and setVerticalSpacing(). In that case, spacing() returns -1.

new QMetaObject QtGui.QLayout.StaticMetaObject
staticget
virtual EventHandler<QEventArgs<QEvent> > QtGui.QLayout.WidgetEvent
addremove