Q3WidgetStack Class Reference
|
Q3WidgetStack ( QWidget * parent, const char * name = 0, Qt::WindowFlags f = 0 ) | |
~Q3WidgetStack () | |
int | addWidget ( QWidget * w, int id = -1 ) |
int | id ( QWidget * widget ) const |
void | removeWidget ( QWidget * w ) |
QWidget * | visibleWidget () const |
QWidget * | widget ( int id ) const |
virtual QSize | minimumSizeHint () const |
virtual void | setVisible ( bool visible ) |
virtual QSize | sizeHint () const |
void | raiseWidget ( int id ) |
void | raiseWidget ( QWidget * w ) |
void | aboutToShow ( int id ) |
void | aboutToShow ( QWidget * widget ) |
virtual void | setChildGeometries () |
virtual void | childEvent ( QChildEvent * e ) |
virtual bool | event ( QEvent * e ) |
virtual void | frameChanged () |
virtual void | resizeEvent ( QResizeEvent * e ) |
The Q3WidgetStack class provides a stack of widgets of which only the top widget is user-visible.
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(). It is not sufficient to pass the widget stack as parent to a widget which should be inserted into the widgetstack.
visibleWidget() is the get equivalent of raiseWidget(); it returns a pointer to the widget that is currently at the top of the stack.
Q3WidgetStack 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 Q3WidgetStack, not globally), but Q3WidgetStack does not attach any additional meaning to them.
The default widget stack is frameless, but you can use the usual Q3Frame functions (such as setFrameStyle()) to add a frame.
Q3WidgetStack provides a signal, aboutToShow(), which is emitted just before a managed widget is shown.
See also Q3TabDialog, QTabWidget, QTabBar, and Q3Frame.
Constructs an empty widget stack.
The parent, name and f arguments are passed to the Q3Frame constructor.
Удаляет объект и освобождает все выделенные ему ресурсы.
This signal is emitted just before a managed widget is shown if that managed widget has an ID != -1. The id parameter 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 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.
Adds widget w to this stack of widgets, with ID id.
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 you pass an id that is already used, then a unique negative integer will be generated to prevent two widgets having the same id.
If w already exists in the stack the widget will be removed first.
If w is not a child of this Q3WidgetStack moves it using reparent().
Переопределено из QObject::childEvent().
Переопределено от QObject::event().
Reimplemented from Q3Frame::frameChanged().
Returns the ID of the widget. Returns -1 if widget is 0 or is not being managed by this widget stack.
See also widget() and addWidget().
Переопределено от QWidget::minimumSizeHint().
Raises the widget with ID id to the top of the widget stack.
See also visibleWidget().
Это перегруженная функция.
Raises widget w to the top of the widget stack.
Removes widget 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().
Переопределено от QWidget::resizeEvent().
Fixes up the children's geometries.
Переопределено из QWidget::setVisible().
Переопределено от QWidget::sizeHint().
Returns the currently visible widget (the one at the top of the stack), or 0 if nothing is currently being shown.
See also aboutToShow(), id(), and raiseWidget().
Returns the widget with ID id. Returns 0 if this widget stack does not manage a widget with ID id.
See also id() and addWidget().
Авторские права © 2010 Nokia Corporation и/или её дочерние компании | Торговые марки | Qt 4.6.4 |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |