<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_09) on Tue Aug 07 17:01:36 CEST 2007 --> <TITLE> QLayoutItemInterface </TITLE> <META NAME="keywords" CONTENT="com.trolltech.qt.gui.QLayoutItemInterface interface"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="QLayoutItemInterface"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../com/trolltech/qt/gui/QLayoutItem.html" title="class in com.trolltech.qt.gui"><B>PREV CLASS</B></A> <A HREF="../../../../com/trolltech/qt/gui/QLCDNumber.html" title="class in com.trolltech.qt.gui"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?com/trolltech/qt/gui/QLayoutItemInterface.html" target="_top"><B>FRAMES</B></A> <A HREF="QLayoutItemInterface.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.trolltech.qt.gui</FONT> <BR> Interface QLayoutItemInterface</H2> <DL> <DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></DD> </DL> <DL> <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../com/trolltech/qt/gui/QBoxLayout.html" title="class in com.trolltech.qt.gui">QBoxLayout</A>, <A HREF="../../../../com/trolltech/qt/gui/QGridLayout.html" title="class in com.trolltech.qt.gui">QGridLayout</A>, <A HREF="../../../../com/trolltech/qt/gui/QHBoxLayout.html" title="class in com.trolltech.qt.gui">QHBoxLayout</A>, <A HREF="../../../../com/trolltech/qt/gui/QLayout.html" title="class in com.trolltech.qt.gui">QLayout</A>, <A HREF="../../../../com/trolltech/qt/gui/QLayoutItem.html" title="class in com.trolltech.qt.gui">QLayoutItem</A>, <A HREF="../../../../com/trolltech/qt/gui/QSpacerItem.html" title="class in com.trolltech.qt.gui">QSpacerItem</A>, <A HREF="../../../../com/trolltech/qt/gui/QStackedLayout.html" title="class in com.trolltech.qt.gui">QStackedLayout</A>, <A HREF="../../../../com/trolltech/qt/gui/QVBoxLayout.html" title="class in com.trolltech.qt.gui">QVBoxLayout</A>, <A HREF="../../../../com/trolltech/qt/gui/QWidgetItem.html" title="class in com.trolltech.qt.gui">QWidgetItem</A></DD> </DL> <HR> <DL> <DT><PRE>public interface <B>QLayoutItemInterface</B><DT>extends <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></DL> </PRE> <P> <p>The <a href="QLayoutItem.html"><tt>QLayoutItem</tt></a> class provides an abstract item that a <a href="QLayout.html"><tt>QLayout</tt></a> manipulates.</p> <p>This is used by custom layouts.</p> <p>Pure virtual functions are provided to return information about the layout, including, <a href="QLayoutItemInterface.html#sizeHint()"><tt>sizeHint</tt></a>, <a href="QLayoutItemInterface.html#minimumSize()"><tt>minimumSize</tt></a>, <a href="QLayoutItemInterface.html#maximumSize()"><tt>maximumSize</tt></a> and expanding().</p> <p>The layout's geometry can be set and retrieved with <a href="QLayoutItemInterface.html#setGeometry(com.trolltech.qt.core.QRect)"><tt>setGeometry</tt></a> and <a href="QLayoutItemInterface.html#geometry()"><tt>geometry</tt></a>, and its alignment with <a href="QLayoutItemInterface.html#setAlignment(com.trolltech.qt.core.Qt.Alignment)"><tt>setAlignment</tt></a> and <a href="QLayoutItemInterface.html#alignment()"><tt>alignment</tt></a>.</p> <p><a href="QLayoutItemInterface.html#isEmpty()"><tt>isEmpty</tt></a> returns whether the layout item is empty. If the concrete item is a <a href="QWidget.html"><tt>QWidget</tt></a>, it can be retrieved using <a href="QLayoutItemInterface.html#widget()"><tt>widget</tt></a>. Similarly for <a href="QLayoutItemInterface.html#layout()"><tt>layout</tt></a> and <a href="QLayoutItemInterface.html#spacerItem()"><tt>spacerItem</tt></a>.</p> <p>Some layouts have width and height interdependencies. These can be expressed using <a href="QLayoutItemInterface.html#hasHeightForWidth()"><tt>hasHeightForWidth</tt></a>, <a href="QLayoutItemInterface.html#heightForWidth(int)"><tt>heightForWidth</tt></a>, and <a href="QLayoutItemInterface.html#minimumHeightForWidth(int)"><tt>minimumHeightForWidth</tt></a>. For more explanation see the <i>Qt Quarterly</i> article <a href="http://doc.trolltech.com/qq/qq04-height-for-width.html">Trading Height for Width</tt></a>.</p> <P> <P> <DL> <DT><B>See Also:</B><DD><a href="QLayout.html"><tt>QLayout</tt></a></DL> <HR> <P> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/core/Qt.Alignment.html" title="class in com.trolltech.qt.core">Qt.Alignment</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#alignment()">alignment</A></B>()</CODE> <BR> Returns the alignment of this item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/gui/QSizePolicy.ControlTypes.html" title="class in com.trolltech.qt.gui">QSizePolicy.ControlTypes</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#controlTypes()">controlTypes</A></B>()</CODE> <BR> Returns the control type(s) for the layout item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/core/Qt.Orientations.html" title="class in com.trolltech.qt.core">Qt.Orientations</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#expandingDirections()">expandingDirections</A></B>()</CODE> <BR> Returns whether this layout item can make use of more space than <a href="QLayoutItemInterface.html#sizeHint()"><tt>sizeHint</tt></a>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/core/QRect.html" title="class in com.trolltech.qt.core">QRect</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#geometry()">geometry</A></B>()</CODE> <BR> Returns the rectangle covered by this layout item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#hasHeightForWidth()">hasHeightForWidth</A></B>()</CODE> <BR> Returns true if this layout's preferred height depends on its width; otherwise returns false.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#heightForWidth(int)">heightForWidth</A></B>(int arg__1)</CODE> <BR> Returns the preferred height for this layout item, given the width <tt>arg__1</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#invalidate()">invalidate</A></B>()</CODE> <BR> Invalidates any cached information in this layout item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#isEmpty()">isEmpty</A></B>()</CODE> <BR> Implemented in subclasses to return whether this item is empty, i.e. whether it contains any widgets.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/gui/QLayout.html" title="class in com.trolltech.qt.gui">QLayout</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#layout()">layout</A></B>()</CODE> <BR> If this item is a <a href="QLayout.html"><tt>QLayout</tt></a>, it is returned as a <a href="QLayout.html"><tt>QLayout</tt></a>; otherwise 0 is returned.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/core/QSize.html" title="class in com.trolltech.qt.core">QSize</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#maximumSize()">maximumSize</A></B>()</CODE> <BR> Implemented in subclasses to return the maximum size of this item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#minimumHeightForWidth(int)">minimumHeightForWidth</A></B>(int arg__1)</CODE> <BR> Returns the minimum height this widget needs for the given width, <tt>arg__1</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/core/QSize.html" title="class in com.trolltech.qt.core">QSize</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#minimumSize()">minimumSize</A></B>()</CODE> <BR> Implemented in subclasses to return the minimum size of this item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#setAlignment(com.trolltech.qt.core.Qt.Alignment)">setAlignment</A></B>(<A HREF="../../../../com/trolltech/qt/core/Qt.Alignment.html" title="class in com.trolltech.qt.core">Qt.Alignment</A> a)</CODE> <BR> Sets the alignment of this item to <tt>a</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#setGeometry(com.trolltech.qt.core.QRect)">setGeometry</A></B>(<A HREF="../../../../com/trolltech/qt/core/QRect.html" title="class in com.trolltech.qt.core">QRect</A> arg__1)</CODE> <BR> Implemented in subclasses to set this item's geometry to <tt>arg__1</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/core/QSize.html" title="class in com.trolltech.qt.core">QSize</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#sizeHint()">sizeHint</A></B>()</CODE> <BR> Implemented in subclasses to return the preferred size of this item.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/gui/QSpacerItem.html" title="class in com.trolltech.qt.gui">QSpacerItem</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#spacerItem()">spacerItem</A></B>()</CODE> <BR> If this item is a <a href="QSpacerItem.html"><tt>QSpacerItem</tt></a>, it is returned as a <a href="QSpacerItem.html"><tt>QSpacerItem</tt></a>; otherwise 0 is returned.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/gui/QWidget.html" title="class in com.trolltech.qt.gui">QWidget</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QLayoutItemInterface.html#widget()">widget</A></B>()</CODE> <BR> If this item is a <a href="QWidget.html"><tt>QWidget</tt></a>, it is returned as a <a href="QWidget.html"><tt>QWidget</tt></a>; otherwise 0 is returned.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiInterface"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from interface com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#disableGarbageCollection()">disableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativeId()">nativeId</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativePointer()">nativePointer</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#reenableGarbageCollection()">reenableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#setJavaOwnership()">setJavaOwnership</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="alignment()"><!-- --></A><H3> alignment</H3> <PRE> <A HREF="../../../../com/trolltech/qt/core/Qt.Alignment.html" title="class in com.trolltech.qt.core">Qt.Alignment</A> <B>alignment</B>()</PRE> <DL> <DD><p>Returns the alignment of this item.</p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>See Also:</B><DD><a href="QLayoutItemInterface.html#setAlignment(com.trolltech.qt.core.Qt.Alignment)"><tt>setAlignment</tt></a></DL> </DD> </DL> <HR> <A NAME="controlTypes()"><!-- --></A><H3> controlTypes</H3> <PRE> <A HREF="../../../../com/trolltech/qt/gui/QSizePolicy.ControlTypes.html" title="class in com.trolltech.qt.gui">QSizePolicy.ControlTypes</A> <B>controlTypes</B>()</PRE> <DL> <DD><p>Returns the control type(s) for the layout item. For a <a href="QWidgetItem.html"><tt>QWidgetItem</tt></a>, the control type comes from the widget's size policy; for a <a href="QLayoutItem.html"><tt>QLayoutItem</tt></a>, the control types is derived from the layout's contents.</p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>See Also:</B><DD><tt>QSizePolicy::controlType</tt></DL> </DD> </DL> <HR> <A NAME="setAlignment(com.trolltech.qt.core.Qt.Alignment)"><!-- --></A><H3> setAlignment</H3> <PRE> void <B>setAlignment</B>(<A HREF="../../../../com/trolltech/qt/core/Qt.Alignment.html" title="class in com.trolltech.qt.core">Qt.Alignment</A> a)</PRE> <DL> <DD><p>Sets the alignment of this item to <tt>a</tt>.</p> <p><b>Note:</b> Item alignment is only supported by <a href="QLayoutItem.html"><tt>QLayoutItem</tt></a> subclasses where it would have a visual effect. Except for <a href="QSpacerItem.html"><tt>QSpacerItem</tt></a>, which provides blank space for layouts, all public Qt classes that inherit <a href="QLayoutItem.html"><tt>QLayoutItem</tt></a> support item alignment.</p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>See Also:</B><DD><a href="QLayoutItemInterface.html#alignment()"><tt>alignment</tt></a></DL> </DD> </DL> <HR> <A NAME="expandingDirections()"><!-- --></A><H3> expandingDirections</H3> <PRE> <A HREF="../../../../com/trolltech/qt/core/Qt.Orientations.html" title="class in com.trolltech.qt.core">Qt.Orientations</A> <B>expandingDirections</B>()</PRE> <DL> <DD><p>Returns whether this layout item can make use of more space than <a href="QLayoutItemInterface.html#sizeHint()"><tt>sizeHint</tt></a>. 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.</p> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="geometry()"><!-- --></A><H3> geometry</H3> <PRE> <A HREF="../../../../com/trolltech/qt/core/QRect.html" title="class in com.trolltech.qt.core">QRect</A> <B>geometry</B>()</PRE> <DL> <DD><p>Returns the rectangle covered by this layout item.</p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>See Also:</B><DD><a href="QLayoutItemInterface.html#setGeometry(com.trolltech.qt.core.QRect)"><tt>setGeometry</tt></a></DL> </DD> </DL> <HR> <A NAME="hasHeightForWidth()"><!-- --></A><H3> hasHeightForWidth</H3> <PRE> boolean <B>hasHeightForWidth</B>()</PRE> <DL> <DD><p>Returns true if this layout's preferred height depends on its width; otherwise returns false. The default implementation returns false.</p> <p>Reimplement this function in layout managers that support height for width.</p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>See Also:</B><DD><a href="QLayoutItemInterface.html#heightForWidth(int)"><tt>heightForWidth</tt></a>, <tt>QWidget::heightForWidth</tt></DL> </DD> </DL> <HR> <A NAME="heightForWidth(int)"><!-- --></A><H3> heightForWidth</H3> <PRE> int <B>heightForWidth</B>(int arg__1)</PRE> <DL> <DD><p>Returns the preferred height for this layout item, given the width <tt>arg__1</tt>.</p> <p>The default implementation returns -1, indicating that the preferred height is independent of the width of the item. Using the function <a href="QLayoutItemInterface.html#hasHeightForWidth()"><tt>hasHeightForWidth</tt></a> will typically be much faster than calling this function and testing for -1.</p> <p>Reimplement this function in layout managers that support height for width. A typical implementation will look like this:</p> <pre> int MyLayout::heightForWidth(int w) const { if (cache_dirty || cached_width != w) { <span class="comment">// not all C++ compilers support "mutable"</span> MyLayout *that = (MyLayout*)this; int h = calculateHeightForWidth(w); that->cached_hfw = h; return h; } return cached_hfw; }</pre> <p>Caching is strongly recommended; without it layout will take exponential time.</p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>See Also:</B><DD><a href="QLayoutItemInterface.html#hasHeightForWidth()"><tt>hasHeightForWidth</tt></a></DL> </DD> </DL> <HR> <A NAME="invalidate()"><!-- --></A><H3> invalidate</H3> <PRE> void <B>invalidate</B>()</PRE> <DL> <DD><p>Invalidates any cached information in this layout item.</p> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="isEmpty()"><!-- --></A><H3> isEmpty</H3> <PRE> boolean <B>isEmpty</B>()</PRE> <DL> <DD><p>Implemented in subclasses to return whether this item is empty, i.e. whether it contains any widgets.</p> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="layout()"><!-- --></A><H3> layout</H3> <PRE> <A HREF="../../../../com/trolltech/qt/gui/QLayout.html" title="class in com.trolltech.qt.gui">QLayout</A> <B>layout</B>()</PRE> <DL> <DD><p>If this item is a <a href="QLayout.html"><tt>QLayout</tt></a>, it is returned as a <a href="QLayout.html"><tt>QLayout</tt></a>; otherwise 0 is returned. This function provides type-safe casting.</p> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="maximumSize()"><!-- --></A><H3> maximumSize</H3> <PRE> <A HREF="../../../../com/trolltech/qt/core/QSize.html" title="class in com.trolltech.qt.core">QSize</A> <B>maximumSize</B>()</PRE> <DL> <DD><p>Implemented in subclasses to return the maximum size of this item.</p> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="minimumHeightForWidth(int)"><!-- --></A><H3> minimumHeightForWidth</H3> <PRE> int <B>minimumHeightForWidth</B>(int arg__1)</PRE> <DL> <DD><p>Returns the minimum height this widget needs for the given width, <tt>arg__1</tt>. The default implementation simply returns <a href="QLayoutItemInterface.html#heightForWidth(int)"><tt>heightForWidth</tt></a>(<tt>arg__1</tt>).</p> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="minimumSize()"><!-- --></A><H3> minimumSize</H3> <PRE> <A HREF="../../../../com/trolltech/qt/core/QSize.html" title="class in com.trolltech.qt.core">QSize</A> <B>minimumSize</B>()</PRE> <DL> <DD><p>Implemented in subclasses to return the minimum size of this item.</p> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="setGeometry(com.trolltech.qt.core.QRect)"><!-- --></A><H3> setGeometry</H3> <PRE> void <B>setGeometry</B>(<A HREF="../../../../com/trolltech/qt/core/QRect.html" title="class in com.trolltech.qt.core">QRect</A> arg__1)</PRE> <DL> <DD><p>Implemented in subclasses to set this item's geometry to <tt>arg__1</tt>.</p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>See Also:</B><DD><a href="QLayoutItemInterface.html#geometry()"><tt>geometry</tt></a></DL> </DD> </DL> <HR> <A NAME="sizeHint()"><!-- --></A><H3> sizeHint</H3> <PRE> <A HREF="../../../../com/trolltech/qt/core/QSize.html" title="class in com.trolltech.qt.core">QSize</A> <B>sizeHint</B>()</PRE> <DL> <DD><p>Implemented in subclasses to return the preferred size of this item.</p> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="spacerItem()"><!-- --></A><H3> spacerItem</H3> <PRE> <A HREF="../../../../com/trolltech/qt/gui/QSpacerItem.html" title="class in com.trolltech.qt.gui">QSpacerItem</A> <B>spacerItem</B>()</PRE> <DL> <DD><p>If this item is a <a href="QSpacerItem.html"><tt>QSpacerItem</tt></a>, it is returned as a <a href="QSpacerItem.html"><tt>QSpacerItem</tt></a>; otherwise 0 is returned. This function provides type-safe casting.</p> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="widget()"><!-- --></A><H3> widget</H3> <PRE> <A HREF="../../../../com/trolltech/qt/gui/QWidget.html" title="class in com.trolltech.qt.gui">QWidget</A> <B>widget</B>()</PRE> <DL> <DD><p>If this item is a <a href="QWidget.html"><tt>QWidget</tt></a>, it is returned as a <a href="QWidget.html"><tt>QWidget</tt></a>; otherwise 0 is returned. This function provides type-safe casting.</p> <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../com/trolltech/qt/gui/QLayoutItem.html" title="class in com.trolltech.qt.gui"><B>PREV CLASS</B></A> <A HREF="../../../../com/trolltech/qt/gui/QLCDNumber.html" title="class in com.trolltech.qt.gui"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?com/trolltech/qt/gui/QLayoutItemInterface.html" target="_top"><B>FRAMES</B></A> <A HREF="QLayoutItemInterface.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>