Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 112b0974ad288f6cd55bf971ee6026a9 > files > 2057

libqt3-devel-3.0.2-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/src/widgets/qwidgetstack.cpp:63 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QWidgetStack Class</title>
<style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
 <a href="index.html">
<font color="#004faf">Home</font></a>
 | <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
 | <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QWidgetStack Class Reference</h1>

<p>The QWidgetStack class provides a stack of widgets of which only the
top widget is user-visible.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qwidgetstack-h.html">qwidgetstack.h</a>&gt;</tt>
<p>Inherits <a href="qframe.html">QFrame</a>.
<p><a href="qwidgetstack-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class=fn><a href="#QWidgetStack"><b>QWidgetStack</b></a> ( QWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</div></li>
<li><div class=fn><a href="#~QWidgetStack"><b>~QWidgetStack</b></a> ()</div></li>
<li><div class=fn>int <a href="#addWidget"><b>addWidget</b></a> ( QWidget&nbsp;*&nbsp;w, int&nbsp;id = -1 )</div></li>
<li><div class=fn>void <a href="#removeWidget"><b>removeWidget</b></a> ( QWidget&nbsp;*&nbsp;w )</div></li>
<li><div class=fn>QWidget * <a href="#widget"><b>widget</b></a> ( int&nbsp;id ) const</div></li>
<li><div class=fn>int <a href="#id"><b>id</b></a> ( QWidget&nbsp;*&nbsp;widget ) const</div></li>
<li><div class=fn>QWidget * <a href="#visibleWidget"><b>visibleWidget</b></a> () const</div></li>
</ul>
<h2>Public Slots</h2>
<ul>
<li><div class=fn>void <a href="#raiseWidget"><b>raiseWidget</b></a> ( int&nbsp;id )</div></li>
<li><div class=fn>void <a href="#raiseWidget-2"><b>raiseWidget</b></a> ( QWidget&nbsp;*&nbsp;w )</div></li>
</ul>
<h2>Signals</h2>
<ul>
<li><div class=fn>void <a href="#aboutToShow"><b>aboutToShow</b></a> ( int )</div></li>
<li><div class=fn>void <a href="#aboutToShow-2"><b>aboutToShow</b></a> ( QWidget * )</div></li>
</ul>
<h2>Protected Members</h2>
<ul>
<li><div class=fn>virtual void <a href="#setChildGeometries"><b>setChildGeometries</b></a> ()</div></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
 
<p> The QWidgetStack class provides a stack of widgets of which only the
top widget is user-visible.
<p> 

<p> The application programmer can move any widget to the top of the
stack at any time using <a href="#raiseWidget">raiseWidget</a>(), and add or remove widgets
using <a href="#addWidget">addWidget</a>() and <a href="#removeWidget">removeWidget</a>().
<p> <a href="#visibleWidget">visibleWidget</a>() is the <em>get</em> equivalent of raiseWidget(); it
returns a pointer to the widget that is currently at the top of the
stack.
<p> QWidgetStack also provides the ability to manipulate widgets through
application-specified integer ids. You can also translate from
widget pointers to ids using <a href="#id">id</a>() and from ids to widget pointers
using <a href="#widget">widget</a>().  These numeric ids are unique (per QWidgetStack,
not globally), but QWidgetStack does not attach any
additional meaning to them.
<p> The default widget stack is frameless, but you can use the usual
<a href="qframe.html">QFrame</a> functions (such as <a href="qframe.html#setFrameStyle">setFrameStyle</a>()) to add a frame.
<p> QWidgetStack provides a signal, <a href="#aboutToShow">aboutToShow</a>(), which is
emitted just before a managed widget is shown.
<p> <p>See also <a href="qtabdialog.html">QTabDialog</a>, <a href="qtabbar.html">QTabBar</a>, <a href="qframe.html">QFrame</a> and <a href="organizers.html">Organizers</a>.

<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QWidgetStack"></a>QWidgetStack::QWidgetStack ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>  Constructs an empty widget stack with parent <em>parent</em> and called
<em>name</em>.

<h3 class=fn><a name="~QWidgetStack"></a>QWidgetStack::~QWidgetStack ()
</h3> Destroys the object and frees any allocated resources. 
<h3 class=fn>void <a name="aboutToShow"></a>QWidgetStack::aboutToShow ( int )<tt> [signal]</tt>
</h3> 
<p> This signal is emitted just before a managed widget is shown if
that managed widget has an id != -1. The argument is the numeric
id of the widget.

<h3 class=fn>void <a name="aboutToShow-2"></a>QWidgetStack::aboutToShow ( <a href="qwidget.html">QWidget</a>&nbsp;* )<tt> [signal]</tt>
</h3> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> This signal is emitted just before a managed widget is shown.  The
argument is a pointer to the widget.

<h3 class=fn>int <a name="addWidget"></a>QWidgetStack::addWidget ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w, int&nbsp;id = -1 )
</h3>  Adds widget <em>w</em> to this stack of widgets, with id <em>id</em>.
<p> If you pass an id &gt;= 0 this id is used. If you pass an <em>id</em> of -1
(the default), the widgets will be numbered automatically. If you
pass -2 a unique negative integer will be generated. No widget has
an id of -1.
<p> If <em>w</em> is not a child of this QWidgetStack moves it using
<a href="qwidget.html#reparent">reparent</a>().

<p>Example: <a href="xform-example.html#x132">xform/xform.cpp</a>.
<h3 class=fn>int <a name="id"></a>QWidgetStack::id ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget ) const
</h3>  Returns the id of the <em>widget</em>.  If <em>widget</em> is 0 or is not
being managed by this widget stack, this function returns -1.
<p> <p>See also <a href="#widget">widget</a>() and <a href="#addWidget">addWidget</a>().

<h3 class=fn>void <a name="raiseWidget"></a>QWidgetStack::raiseWidget ( int&nbsp;id )<tt> [slot]</tt>
</h3>  Raises the widget with id, <em>id</em>, to the top of the widget stack.
<p> <p>See also <a href="#visibleWidget">visibleWidget</a>().

<p>Example: <a href="xform-example.html#x133">xform/xform.cpp</a>.
<h3 class=fn>void <a name="raiseWidget-2"></a>QWidgetStack::raiseWidget ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w )<tt> [slot]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Raises widget <em>w</em> to the top of the widget stack.

<h3 class=fn>void <a name="removeWidget"></a>QWidgetStack::removeWidget ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w )
</h3>  Removes widget <em>w</em> from this stack of widgets.  Does not delete <em>w</em>. If <em>w</em> is the currently visible widget, no other widget is
substituted. pareent
<p>See also <a href="#visibleWidget">visibleWidget</a>() and <a href="#raiseWidget">raiseWidget</a>().

<h3 class=fn>void <a name="setChildGeometries"></a>QWidgetStack::setChildGeometries ()<tt> [virtual protected]</tt>
</h3>  Fixes up the children's geometries. 
<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="visibleWidget"></a>QWidgetStack::visibleWidget () const
</h3> Returns a pointer to the currently visible widget (the one at the
top of the stack), or 0 if nothing is currently being shown.
<p> <p>See also <a href="#aboutToShow">aboutToShow</a>(), <a href="#id">id</a>() and <a href="#raiseWidget">raiseWidget</a>().

<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="widget"></a>QWidgetStack::widget ( int&nbsp;id ) const
</h3>  Returns a pointer to the widget with id <em>id</em>.  If this widget
stack does not manage a widget with id <em>id</em>, this function returns
0.
<p> <p>See also <a href="#id">id</a>() and <a href="#addWidget">addWidget</a>().

<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2001
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2001 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.0.2</div>
</table></div></address></body>
</html>