1QWorkspace(3qt)                                                QWorkspace(3qt)
2
3
4

NAME

6       QWorkspace - Workspace window that can contain decorated windows, e.g.
7       for MDI
8

SYNOPSIS

10       #include <qworkspace.h>
11
12       Inherits QWidget.
13
14   Public Members
15       QWorkspace ( QWidget * parent = 0, const char * name = 0 )
16       ~QWorkspace ()
17       enum WindowOrder { CreationOrder, StackingOrder }
18       QWidget * activeWindow () const
19       QWidgetList windowList () const  (obsolete)
20       QWidgetList windowList ( WindowOrder order ) const
21       bool scrollBarsEnabled () const
22       void setScrollBarsEnabled ( bool enable )
23
24   Public Slots
25       void cascade ()
26       void tile ()
27       void closeActiveWindow ()
28       void closeAllWindows ()
29       void activateNextWindow ()
30       void activatePrevWindow ()
31
32   Signals
33       void windowActivated ( QWidget * w )
34
35   Properties
36       bool scrollBarsEnabled - whether the workspace provides scrollbars
37

DESCRIPTION

39       The QWorkspace widget provides a workspace window that can contain
40       decorated windows, e.g. for MDI.
41
42       MDI (multiple document interface) applications typically have one main
43       window with a menu bar and toolbar, and a central widget that is a
44       QWorkspace. The workspace itself contains zero, one or more document
45       windows, each of which is a widget.
46
47       The workspace itself is an ordinary Qt widget. It has a standard
48       constructor that takes a parent widget and an object name. The parent
49       window is usually a QMainWindow, but it need not be.
50
51       Document windows (i.e. MDI windows) are also ordinary Qt widgets which
52       have the workspace as their parent widget. When you call show(),
53       hide(), showMaximized(), setCaption(), etc. on a document window, it is
54       shown, hidden, etc. with a frame, caption, icon and icon text, just as
55       you'd expect. You can provide widget flags which will be used for the
56       layout of the decoration or the behaviour of the widget itself.
57
58       To change or retrieve the geometry of MDI windows you must operate on
59       the MDI widget's parentWidget(). (The parentWidget() provides access to
60       the decorated window in which the MDI window's widget is shown.)
61
62       A document window becomes active when it gets the keyboard focus. You
63       can also activate a window in code using setFocus(). The user can
64       activate a window by moving focus in the usual ways, for example by
65       clicking a window or by pressing Tab. The workspace emits a signal
66       windowActivated() when it detects the activation change, and the
67       function activeWindow() always returns a pointer to the active document
68       window.
69
70       The convenience function windowList() returns a list of all document
71       windows. This is useful to create a popup menu" <u>W</u>indows" on the
72       fly, for example.
73
74       QWorkspace provides two built-in layout strategies for child windows:
75       cascade() and tile(). Both are slots so you can easily connect menu
76       entries to them.
77
78       If you want your users to be able to work with document windows larger
79       than the actual workspace, set the scrollBarsEnabled property to TRUE.
80
81       If the top-level window contains a menu bar and a document window is
82       maximised, QWorkspace moves the document window's minimize, restore and
83       close buttons from the document window's frame to the workspace
84       window's menu bar. It then inserts a window operations menu at the far
85       left of the menu bar.
86
87       See also Main Window and Related Classes and Organizers.
88
89   Member Type Documentation

QWorkspace::WindowOrder

91       Specifies the order in which windows are returned from windowList().
92
93       QWorkspace::CreationOrder - The windows are returned in the order of
94       their creation
95
96       QWorkspace::StackingOrder - The windows are returned in the order of
97       their stacking
98

MEMBER FUNCTION DOCUMENTATION

QWorkspace::QWorkspace ( QWidget * parent = 0, const char * name = 0 )

101       Constructs a workspace with a parent and a name.
102

QWorkspace::~QWorkspace ()

104       Destroys the workspace and frees any allocated resources.
105

void QWorkspace::activateNextWindow () [slot]

107       Activates the next window in the child window chain.
108
109       See also activatePrevWindow().
110

void QWorkspace::activatePrevWindow () [slot]

112       Activates the previous window in the child window chain.
113
114       See also activateNextWindow().
115

QWidget * QWorkspace::activeWindow () const

117       Returns the active window, or 0 if no window is active.
118
119       Example: mdi/application.cpp.
120

void QWorkspace::cascade () [slot]

122       Arranges all the child windows in a cascade pattern.
123
124       See also tile().
125
126       Example: mdi/application.cpp.
127

void QWorkspace::closeActiveWindow () [slot]

129       Closes the child window that is currently active.
130
131       See also closeAllWindows().
132

void QWorkspace::closeAllWindows () [slot]

134       Closes all child windows.
135
136       The windows are closed in random order. The operation stops if a window
137       does not accept the close event.
138
139       See also closeActiveWindow().
140

bool QWorkspace::scrollBarsEnabled () const

142       Returns TRUE if the workspace provides scrollbars; otherwise returns
143       FALSE. See the "scrollBarsEnabled" property for details.
144

void QWorkspace::setScrollBarsEnabled ( bool enable )

146       Sets whether the workspace provides scrollbars to enable. See the
147       "scrollBarsEnabled" property for details.
148

void QWorkspace::tile () [slot]

150       Arranges all child windows in a tile pattern.
151
152       See also cascade().
153
154       Example: mdi/application.cpp.
155

void QWorkspace::windowActivated ( QWidget * w ) [signal]

157       This signal is emitted when the window widget w becomes active. Note
158       that w can be null, and that more than one signal may be emitted for a
159       single activation event.
160
161       See also activeWindow() and windowList().
162

QWidgetList QWorkspace::windowList ( WindowOrder order ) const

164       Returns a list of all windows. If order is CreationOrder (the default)
165       the windows are listed in the order in which they had been inserted
166       into the workspace. If order is StackingOrder the windows are listed in
167       their stacking order, with the topmost window being the last window in
168       the list.
169
170       QWidgetList is the same as QPtrList<QWidget>.
171
172       See also QPtrList.
173
174       Example: mdi/application.cpp.
175

QWidgetList QWorkspace::windowList () const

177       This function is obsolete. It is provided to keep old source working.
178       We strongly advise against using it in new code.
179
180       This is an overloaded member function, provided for convenience. It
181       behaves essentially like the above function.
182
183   Property Documentation

bool scrollBarsEnabled

185       This property holds whether the workspace provides scrollbars.
186
187       If this property is set to TRUE, it is possible to resize child windows
188       over the right or the bottom edge out of the visible area of the
189       workspace. The workspace shows scrollbars to make it possible for the
190       user to access those windows. If this property is set to FALSE (the
191       default), resizing windows out of the visible area of the workspace is
192       not permitted.
193
194       Set this property's value with setScrollBarsEnabled() and get this
195       property's value with scrollBarsEnabled().
196
197

SEE ALSO

199       http://doc.trolltech.com/qworkspace.html
200       http://www.trolltech.com/faq/tech.html
201
203       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
204       license file included in the distribution for a complete license
205       statement.
206

AUTHOR

208       Generated automatically from the source code.
209

BUGS

211       If you find a bug in Qt, please report it as described in
212       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
213       help you. Thank you.
214
215       The definitive Qt documentation is provided in HTML format; it is
216       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
217       web browser. This man page is provided as a convenience for those users
218       who prefer man pages, although this format is not officially supported
219       by Trolltech.
220
221       If you find errors in this manual page, please report them to qt-
222       bugs@trolltech.com.  Please include the name of the manual page
223       (qworkspace.3qt) and the Qt version (3.3.8).
224
225
226
227Trolltech AS                    2 February 2007                QWorkspace(3qt)
Impressum