.BI "bool \fBscrollBarsEnabled\fR - whether the workspace provides scrollbars"
.br
.in -1c
.SH DESCRIPTION
The QWorkspace widget provides a workspace window that can contain decorated windows, e.g. for MDI.
.PP
MDI (multiple document interface) applications typically have one main window with a menu bar and toolbar, and a central widget that is a QWorkspace. The workspace itself contains zero, one or more document windows, each of which is a widget.
The workspace itself is an ordinary TQt widget. It has a standard constructor that takes a parent widget and an object name. The parent window is usually a QMainWindow, but it need not be.
Document windows (i.e. MDI windows) are also ordinary TQt widgets which have the workspace as their parent widget. When you call show(), hide(), showMaximized(), setCaption(), etc. on a document window, it is shown, hidden, etc. with a frame, caption, icon and icon text, just as you'd expect. You can provide widget flags which will be used for the layout of the decoration or the behaviour of the widget itself.
To change or retrieve the geometry of MDI windows you must operate on the MDI widget's parentWidget(). (The parentWidget() provides access to the decorated window in which the MDI window's widget is shown.)
.PP
A document window becomes active when it gets the keyboard focus. You can also activate a window in code using setFocus(). The user can activate a window by moving focus in the usual ways, for example by clicking a window or by pressing Tab. The workspace emits a signal windowActivated() when it detects the activation change, and the function activeWindow() always returns a pointer to the active document window.
.PP
The convenience function windowList() returns a list of all document windows. This is useful to create a popup menu" <u>W</u>indows" on the fly, for example.
.PP
QWorkspace provides two built-in layout strategies for child windows: cascade() and tile(). Both are slots so you can easily connect menu entries to them.
.PP
If you want your users to be able to work with document windows larger than the actual workspace, set the scrollBarsEnabled property to TRUE.
.PP
If the top-level window contains a menu bar and a document window is maximised, QWorkspace moves the document window's minimize, restore and close buttons from the document window's frame to the workspace window's menu bar. It then inserts a window operations menu at the far left of the menu bar.
.PP
See also Main Window and Related Classes and Organizers.
.SS "Member Type Documentation"
.SH "QWorkspace::WindowOrder"
Specifies the order in which windows are returned from windowList().
.TP
\fCQWorkspace::CreationOrder\fR - The windows are returned in the order of their creation
.TP
\fCQWorkspace::StackingOrder\fR - The windows are returned in the order of their stacking
This signal is emitted when the window widget \fIw\fR becomes active. Note that \fIw\fR can be null, and that more than one signal may be emitted for a single activation event.
.PP
See also activeWindow() and windowList().
.SH "QWidgetList QWorkspace::windowList ( WindowOrder order ) const"
Returns a list of all windows. If \fIorder\fR is CreationOrder (the default) the windows are listed in the order in which they had been inserted into the workspace. If \fIorder\fR is StackingOrder the windows are listed in their stacking order, with the topmost window being the last window in the list.
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
.SS "Property Documentation"
.SH "bool scrollBarsEnabled"
This property holds whether the workspace provides scrollbars.
.PP
If this property is set to TRUE, it is possible to resize child windows over the right or the bottom edge out of the visible area of the workspace. The workspace shows scrollbars to make it possible for the user to access those windows. If this property is set to FALSE (the default), resizing windows out of the visible area of the workspace is not permitted.
.PP
Set this property's value with setScrollBarsEnabled() and get this property's value with scrollBarsEnabled().