<class name="QLayoutItem" doc="/**
&lt;p&gt;The &lt;a href=&quot;QLayoutItem.html#QLayoutItem(com.trolltech.qt.core.Qt.Alignment)&quot;&gt;&lt;tt&gt;QLayoutItem&lt;/tt&gt;&lt;/a&gt; class provides an abstract item that a &lt;a href=&quot;QLayout.html&quot;&gt;&lt;tt&gt;QLayout&lt;/tt&gt;&lt;/a&gt; manipulates.&lt;/p&gt;
&lt;p&gt;This is used by custom layouts.&lt;/p&gt;
&lt;p&gt;Pure virtual functions are provided to return information about the layout, including, &lt;a href=&quot;QLayoutItem.html#sizeHint()&quot;&gt;&lt;tt&gt;sizeHint&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QLayoutItem.html#minimumSize()&quot;&gt;&lt;tt&gt;minimumSize&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QLayoutItem.html#maximumSize()&quot;&gt;&lt;tt&gt;maximumSize&lt;/tt&gt;&lt;/a&gt; and expanding().&lt;/p&gt;
&lt;p&gt;The layout's geometry can be set and retrieved with &lt;a href=&quot;QLayoutItem.html#setGeometry(com.trolltech.qt.core.QRect)&quot;&gt;&lt;tt&gt;setGeometry&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QLayoutItem.html#geometry()&quot;&gt;&lt;tt&gt;geometry&lt;/tt&gt;&lt;/a&gt;, and its alignment with &lt;a href=&quot;QLayoutItem.html#setAlignment(com.trolltech.qt.core.Qt.Alignment)&quot;&gt;&lt;tt&gt;setAlignment&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QLayoutItem.html#alignment()&quot;&gt;&lt;tt&gt;alignment&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QLayoutItem.html#isEmpty()&quot;&gt;&lt;tt&gt;isEmpty&lt;/tt&gt;&lt;/a&gt; returns whether the layout item is empty. If the concrete item is a &lt;a href=&quot;QWidget.html&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt;, it can be retrieved using &lt;a href=&quot;QLayoutItem.html#widget()&quot;&gt;&lt;tt&gt;widget&lt;/tt&gt;&lt;/a&gt;. Similarly for &lt;a href=&quot;QLayoutItem.html#layout()&quot;&gt;&lt;tt&gt;layout&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QLayoutItem.html#spacerItem()&quot;&gt;&lt;tt&gt;spacerItem&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Some layouts have width and height interdependencies. These can be expressed using &lt;a href=&quot;QLayoutItem.html#hasHeightForWidth()&quot;&gt;&lt;tt&gt;hasHeightForWidth&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QLayoutItem.html#heightForWidth(int)&quot;&gt;&lt;tt&gt;heightForWidth&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QLayoutItem.html#minimumHeightForWidth(int)&quot;&gt;&lt;tt&gt;minimumHeightForWidth&lt;/tt&gt;&lt;/a&gt;. For more explanation see the &lt;i&gt;Qt Quarterly&lt;/i&gt; article &lt;a href=&quot;http://doc.trolltech.com/qq/qq04-height-for-width.html&quot;&gt;Trading Height for Width&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QLayout.html&quot;&gt;&lt;tt&gt;QLayout&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QLayoutItem(com.trolltech.qt.core.Qt.Alignment alignment)" doc="/**
&lt;p&gt;Constructs a layout item with an &lt;tt&gt;alignment&lt;/tt&gt;. Not all subclasses support alignment.&lt;/p&gt;
 */"/>
    <method name="public QLayoutItem()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QLayoutItem.html#QLayoutItem(com.trolltech.qt.core.Qt.Alignment)&quot;&gt;&lt;tt&gt;QLayoutItem&lt;/tt&gt;&lt;/a&gt;(0). */"/>
    <method name="public final com.trolltech.qt.core.Qt.Alignment alignment()" doc="/**
&lt;p&gt;Returns the alignment of this item.&lt;/p&gt;

@see &lt;a href=&quot;QLayoutItem.html#setAlignment(com.trolltech.qt.core.Qt.Alignment)&quot;&gt;&lt;tt&gt;setAlignment&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QSizePolicy.ControlTypes controlTypes()" doc="/**
&lt;p&gt;Returns the control type(s) for the layout item. For a &lt;a href=&quot;QWidgetItem.html&quot;&gt;&lt;tt&gt;QWidgetItem&lt;/tt&gt;&lt;/a&gt;, the control type comes from the widget's size policy; for a &lt;a href=&quot;QLayoutItem.html#QLayoutItem(com.trolltech.qt.core.Qt.Alignment)&quot;&gt;&lt;tt&gt;QLayoutItem&lt;/tt&gt;&lt;/a&gt;, the control types is derived from the layout's contents.&lt;/p&gt;

@see &lt;tt&gt;QSizePolicy::controlType&lt;/tt&gt; */"/>
    <method name="public final void setAlignment(com.trolltech.qt.core.Qt.Alignment a)" doc="/**
&lt;p&gt;Sets the alignment of this item to &lt;tt&gt;a&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; Item alignment is only supported by &lt;a href=&quot;QLayoutItem.html#QLayoutItem(com.trolltech.qt.core.Qt.Alignment)&quot;&gt;&lt;tt&gt;QLayoutItem&lt;/tt&gt;&lt;/a&gt; subclasses where it would have a visual effect. Except for &lt;a href=&quot;QSpacerItem.html&quot;&gt;&lt;tt&gt;QSpacerItem&lt;/tt&gt;&lt;/a&gt;, which provides blank space for layouts, all public Qt classes that inherit &lt;a href=&quot;QLayoutItem.html#QLayoutItem(com.trolltech.qt.core.Qt.Alignment)&quot;&gt;&lt;tt&gt;QLayoutItem&lt;/tt&gt;&lt;/a&gt; support item alignment.&lt;/p&gt;

@see &lt;a href=&quot;QLayoutItem.html#alignment()&quot;&gt;&lt;tt&gt;alignment&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public abstract com.trolltech.qt.core.Qt.Orientations expandingDirections()" doc="/**
&lt;p&gt;Returns whether this layout item can make use of more space than &lt;a href=&quot;QLayoutItem.html#sizeHint()&quot;&gt;&lt;tt&gt;sizeHint&lt;/tt&gt;&lt;/a&gt;. 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.&lt;/p&gt;
 */"/>
    <method name="public abstract com.trolltech.qt.core.QRect geometry()" doc="/**
&lt;p&gt;Returns the rectangle covered by this layout item.&lt;/p&gt;

@see &lt;a href=&quot;QLayoutItem.html#setGeometry(com.trolltech.qt.core.QRect)&quot;&gt;&lt;tt&gt;setGeometry&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean hasHeightForWidth()" doc="/**
&lt;p&gt;Returns true if this layout's preferred height depends on its width; otherwise returns false. The default implementation returns false.&lt;/p&gt;
&lt;p&gt;Reimplement this function in layout managers that support height for width.&lt;/p&gt;

@see &lt;a href=&quot;QLayoutItem.html#heightForWidth(int)&quot;&gt;&lt;tt&gt;heightForWidth&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QWidget::heightForWidth&lt;/tt&gt; */"/>
    <method name="public int heightForWidth(int arg__1)" doc="/**
&lt;p&gt;Returns the preferred height for this layout item, given the width &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The default implementation returns -1, indicating that the preferred height is independent of the width of the item. Using the function &lt;a href=&quot;QLayoutItem.html#hasHeightForWidth()&quot;&gt;&lt;tt&gt;hasHeightForWidth&lt;/tt&gt;&lt;/a&gt; will typically be much faster than calling this function and testing for -1.&lt;/p&gt;
&lt;p&gt;Reimplement this function in layout managers that support height for width. A typical implementation will look like this:&lt;/p&gt;
&lt;pre&gt;    int MyLayout::heightForWidth(int w) const
    {
        if (cache_dirty || cached_width != w) {
            &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; not all C++ compilers support &amp;quot;mutable&amp;quot;
            MyLayout *that = (MyLayout*)this;
            int h = calculateHeightForWidth(w);
            that-&amp;gt;cached_hfw = h;
            return h;
        }
        return cached_hfw;
    }&lt;/pre&gt;
&lt;p&gt;Caching is strongly recommended; without it layout will take exponential time.&lt;/p&gt;

@see &lt;a href=&quot;QLayoutItem.html#hasHeightForWidth()&quot;&gt;&lt;tt&gt;hasHeightForWidth&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public void invalidate()" doc="/**
&lt;p&gt;Invalidates any cached information in this layout item.&lt;/p&gt;
 */"/>
    <method name="public abstract boolean isEmpty()" doc="/**
&lt;p&gt;Implemented in subclasses to return whether this item is empty, i.e&amp;#x2e; whether it contains any widgets.&lt;/p&gt;
 */"/>
    <method name="public com.trolltech.qt.gui.QLayout layout()" doc="/**
&lt;p&gt;If this item is a &lt;a href=&quot;QLayout.html&quot;&gt;&lt;tt&gt;QLayout&lt;/tt&gt;&lt;/a&gt;, it is returned as a &lt;a href=&quot;QLayout.html&quot;&gt;&lt;tt&gt;QLayout&lt;/tt&gt;&lt;/a&gt;; otherwise 0 is returned. This function provides type-safe casting.&lt;/p&gt;
 */"/>
    <method name="public abstract com.trolltech.qt.core.QSize maximumSize()" doc="/**
&lt;p&gt;Implemented in subclasses to return the maximum size of this item.&lt;/p&gt;
 */"/>
    <method name="public int minimumHeightForWidth(int arg__1)" doc="/**
&lt;p&gt;Returns the minimum height this widget needs for the given width, &lt;tt&gt;arg__1&lt;/tt&gt;. The default implementation simply returns &lt;a href=&quot;QLayoutItem.html#heightForWidth(int)&quot;&gt;&lt;tt&gt;heightForWidth&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;arg__1&lt;/tt&gt;).&lt;/p&gt;
 */"/>
    <method name="public abstract com.trolltech.qt.core.QSize minimumSize()" doc="/**
&lt;p&gt;Implemented in subclasses to return the minimum size of this item.&lt;/p&gt;
 */"/>
    <method name="public abstract void setGeometry(com.trolltech.qt.core.QRect arg__1)" doc="/**
&lt;p&gt;Implemented in subclasses to set this item's geometry to &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QLayoutItem.html#geometry()&quot;&gt;&lt;tt&gt;geometry&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public abstract com.trolltech.qt.core.QSize sizeHint()" doc="/**
&lt;p&gt;Implemented in subclasses to return the preferred size of this item.&lt;/p&gt;
 */"/>
    <method name="public com.trolltech.qt.gui.QSpacerItem spacerItem()" doc="/**
&lt;p&gt;If this item is a &lt;a href=&quot;QSpacerItem.html&quot;&gt;&lt;tt&gt;QSpacerItem&lt;/tt&gt;&lt;/a&gt;, it is returned as a &lt;a href=&quot;QSpacerItem.html&quot;&gt;&lt;tt&gt;QSpacerItem&lt;/tt&gt;&lt;/a&gt;; otherwise 0 is returned. This function provides type-safe casting.&lt;/p&gt;
 */"/>
    <method name="public com.trolltech.qt.gui.QWidget widget()" doc="/**
&lt;p&gt;If this item is a &lt;a href=&quot;QWidget.html&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt;, it is returned as a &lt;a href=&quot;QWidget.html&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt;; otherwise 0 is returned. This function provides type-safe casting.&lt;/p&gt;
 */"/>
    <method name="protected final com.trolltech.qt.core.Qt.Alignment align()"/>
    <method name="protected final void setAlign(com.trolltech.qt.core.Qt.Alignment align)"/>
</class>
