The QWidgetStack class provides a stack of widgets, where the user can see only the top widget. More...
#include <qwidgetstack.h>
Inherits QFrame.
This is often used e.g. in tab and wizard dialogs.
The application programmer can move any widget to the top of the stack at any time using the slot raiseWidget(), and add or remove widgets using addWidget() and removeWidget().
visibleWidget() is the get equivalent of raiseWidget(); it returns a pointer ot the widget that is currently on the top of the stack.
QWidgetStack also provides the ability to manipulate widgets through application-specfied integer IDs, and to translate from widget pointers to IDs using id() and from IDs to widget pointers using widget(). These numeric IDs have and unique (per QWidgetStack, not globally) and cannot be -1, but apart from that QWidgetStack does not attach any meaning to them.
The default widget stack is frame-less and propagates its font and palette to all its children, but you can use the usual QFrame functions (like setFrameStyle()) to add a frame, and use setFontPropagation() and setPalettePropagation() to change the propagation style.
Finally, QWidgetStack provides a signal, aboutToShow(), which is emitted just before a managed widget is shown.
See also: QTabDialog, QTabBar and QFrame.
Constructs an empty widget stack.
Destroys the object and frees any allocated resources.
[signal]
This signal is emitted just before a managed widget is shown. The argument is a pointer to the widget.
[signal]
This signal is emitted just before a managed widget is shown, if that managed widget has a non-zero ID. The argument is the numeric ID of the widget.
Adds w to this stack of widgets, with id id.
If w is not a child of this,
QWidgetStack moves it using
recreate().
[virtual]
Reimplemented for internal reasons; the API is not affected.
Reimplemented from QObject.
[virtual protected]
Reimpelemented in order to set the children's geometries appropriately.
Reimplemented from QFrame.
Returns the ID of the widget. If widget is 0 or is not being managed by this widget stack, this function returns -1.
See also: widget() and addWidget().
[slot]
Raises w to the top of the widget stack.
[slot]
Raises id to the top of the widget stack.
See also: visibleWidget().
Removes w from this stack of widgets. Does not delete w. If w is the currently visible widget, no other widget is substituted.
See also: visibleWidget() and raiseWidget().
[protected]
Fix up the children's geometries.
[virtual]
Reimplemented in order to set the children's geometries appropriately.
Reimplemented from QWidget.
Returns a pointer to the currently visible widget (the one on the top of the stack), of 0 if nothing is currently being shown.
See also: aboutToShow(), id() and raiseWidget().
Returns a pointer to the widget with ID id. If this widget stack does not manage a widget with ID id, this function return 0.
See also: id() and addWidget().
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit, copyright © 1995-98 Troll Tech, all rights reserved.
It was generated from the following files:
Copyright © 1998 Troll Tech | Trademarks | Qt version 1.42
|