Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |
The QWidgetStack class provides a stack of widgets of which only the top widget is user-visible. More...
#include <qwidgetstack.h>
Inherits QFrame.
The application programmer can move any widget to the top of the stack at any time using raiseWidget(), and add or remove widgets using addWidget() and removeWidget().
visibleWidget() is the get equivalent of raiseWidget(); it returns a pointer to the widget that is currently at the top of the stack.
QWidgetStack also provides the ability to manipulate widgets through application-specified integer ids. You can also translate from widget pointers to ids using id() and from ids to widget pointers using widget(). These numeric ids are unique (per QWidgetStack, not globally), but QWidgetStack does not attach any additional meaning to them.
The default widget stack is frameless, but you can use the usual QFrame functions (such as setFrameStyle()) to add a frame.
QWidgetStack provides a signal, aboutToShow(), which is emitted just before a managed widget is shown.
See also QTabDialog, QTabBar, QFrame, and Organizers.
The parent and name arguments are passed to the QFrame constructor.
The parent, name and f arguments are passed to the QFrame constructor.
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.
If you call visibleWidget() in a slot connected to aboutToShow(), the widget it returns is the one that is currently visible, not the one that is about to be shown.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
This signal is emitted just before a managed widget is shown. The argument is a pointer to the widget.
If you call visibleWidget() in a slot connected to aboutToShow(), the widget returned is the one that is currently visible, not the one that is about to be shown.
If you pass an id >= 0 this id is used. If you pass an id 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. Returns the id or -1 on failure (e.g. \w is 0).
If w is not a child of this QWidgetStack moves it using reparent().
Example: xform/xform.cpp.
See also widget() and addWidget().
See also visibleWidget().
Example: xform/xform.cpp.
Raises widget w to the top of the widget stack.
See also visibleWidget() and raiseWidget().
See also aboutToShow(), id(), and raiseWidget().
See also id() and addWidget().
This file is part of the Qt toolkit. Copyright © 1995-2003 Trolltech. All Rights Reserved.
Copyright © 2003 Trolltech | Trademarks | Qt version 3.1.2
|