1QDockArea(3qt)                                                  QDockArea(3qt)
2
3
4

NAME

6       QDockArea - Manages and lays out QDockWindows
7

SYNOPSIS

9       #include <qdockarea.h>
10
11       Inherits QWidget.
12
13   Public Members
14       enum HandlePosition { Normal, Reverse }
15       QDockArea ( Orientation o, HandlePosition h = Normal, QWidget * parent
16           = 0, const char * name = 0 )
17       ~QDockArea ()
18       void moveDockWindow ( QDockWindow * w, const QPoint & p, const QRect &
19           r, bool swap )
20       void removeDockWindow ( QDockWindow * w, bool makeFloating, bool swap,
21           bool fixNewLines = TRUE )
22       void moveDockWindow ( QDockWindow * w, int index = -1 )
23       bool hasDockWindow ( QDockWindow * w, int * index = 0 )
24       Orientation orientation () const
25       HandlePosition handlePosition () const
26       bool isEmpty () const
27       int count () const
28       QPtrList<QDockWindow> dockWindowList () const
29       bool isDockWindowAccepted ( QDockWindow * dw )
30       void setAcceptDockWindow ( QDockWindow * dw, bool accept )
31
32   Public Slots
33       void lineUp ( bool keepNewLines )
34
35   Properties
36       int count - the number of dock windows in the dock area  (read only)
37       bool empty - whether the dock area is empty  (read only)
38       HandlePosition handlePosition - where the dock window splitter handle
39           is placed in the dock area  (read only)
40       Orientation orientation - the dock area's orientation  (read only)
41
43       QTextStream & operator<< ( QTextStream & ts, const QDockArea & dockArea
44           )
45       QTextStream & operator>> ( QTextStream & ts, QDockArea & dockArea )
46

DESCRIPTION

48       The QDockArea class manages and lays out QDockWindows.
49
50       A QDockArea is a container which manages a list of QDockWindows which
51       it lays out within its area. In cooperation with the QDockWindows it is
52       responsible for the docking and undocking of QDockWindows and moving
53       them inside the dock area. QDockAreas also handle the wrapping of
54       QDockWindows to fill the available space as compactly as possible.
55       QDockAreas can contain QToolBars since QToolBar is a QDockWindow
56       subclass.
57
58       QMainWindow contains four QDockAreas which you can use for your
59       QToolBars and QDockWindows, so in most situations you do not need to
60       use the QDockArea class directly. Although QMainWindow contains support
61       for its own dock areas it isn't convenient for adding new QDockAreas.
62       If you need to create your own dock areas we suggest that you create a
63       subclass of QWidget and add your QDockAreas to your subclass.
64
65       <center>
66                                   [Image Omitted]
67
68       </center>
69
70       Lines. QDockArea uses the concept of lines. A line is a horizontal
71       region which may contain dock windows side-by-side. A dock area may
72       have room for more than one line. When dock windows are docked into a
73       dock area they are usually added at the right hand side of the top-most
74       line that has room (unless manually placed by the user). When users
75       move dock windows they may leave empty lines or gaps in non-empty
76       lines. Dock windows can be lined up to minimize wasted space using the
77       lineUp() function.
78
79       The QDockArea class maintains a position list of all its child dock
80       windows. Dock windows are added to a dock area from position 0 onwards.
81       Dock windows are laid out sequentially in position order from left to
82       right, and in the case of multiple lines of dock windows, from top to
83       bottom. If a dock window is floated it still retains its position since
84       this is where the window will return if the user double clicks its
85       caption. A dock window's position can be determined with
86       hasDockWindow(). The position can be changed with moveDockWindow().
87
88       To dock or undock a dock window use QDockWindow::dock() and
89       QDockWindow::undock() respectively. If you want to control which dock
90       windows can dock in a dock area use setAcceptDockWindow(). To see if a
91       dock area contains a particular dock window use hasDockWindow(); to see
92       how many dock windows a dock area contains use count().
93
94       The streaming operators can write the positions of the dock windows in
95       the dock area to a QTextStream. The positions can be read back later to
96       restore the saved positions.
97
98       Save the positions to a QTextStream:
99
100           ts << *myDockArea;
101
102       Restore the positions from a QTextStream:
103
104           ts >> *myDockArea;
105
106       See also Main Window and Related Classes.
107
108   Member Type Documentation

QDockArea::HandlePosition

110       A dock window has two kinds of handles, the dock window handle used for
111       dragging the dock window, and the splitter handle used to resize the
112       dock window in relation to other dock windows using a splitter. (The
113       splitter handle is only visible for docked windows.)
114
115       This enum specifies where the dock window splitter handle is placed in
116       the dock area.
117
118       QDockArea::Normal - The splitter handles of dock windows are placed at
119       the right or bottom.
120
121       QDockArea::Reverse - The splitter handles of dock windows are placed at
122       the left or top.
123

MEMBER FUNCTION DOCUMENTATION

QDockArea::QDockArea ( Orientation o, HandlePosition h = Normal, QWidget *

126       parent = 0, const char * name = 0 )
127       Constructs a QDockArea with orientation o, HandlePosition h, parent
128       parent and called name.
129

QDockArea::~QDockArea ()

131       Destroys the dock area and all the dock windows docked in the dock
132       area.
133
134       Does not affect any floating dock windows or dock windows in other dock
135       areas, even if they first appeared in this dock area. Floating dock
136       windows are effectively top level windows and are not child windows of
137       the dock area. When a floating dock window is docked (dragged into a
138       dock area) its parent becomes the dock area.
139

int QDockArea::count () const

141       Returns the number of dock windows in the dock area. See the "count"
142       property for details.
143

QPtrList<QDockWindow> QDockArea::dockWindowList () const

145       Returns a list of the dock windows in the dock area.
146

HandlePosition QDockArea::handlePosition () const

148       Returns where the dock window splitter handle is placed in the dock
149       area. See the "handlePosition" property for details.
150

bool QDockArea::hasDockWindow ( QDockWindow * w, int * index = 0 )

152       Returns TRUE if the dock area contains the dock window w; otherwise
153       returns FALSE. If index is not 0 it will be set as follows: if the dock
154       area contains the dock window *index is set to w's index position;
155       otherwise *index is set to -1.
156

bool QDockArea::isDockWindowAccepted ( QDockWindow * dw )

158       Returns TRUE if dock window dw could be docked into the dock area;
159       otherwise returns FALSE.
160
161       See also setAcceptDockWindow().
162

bool QDockArea::isEmpty () const

164       Returns TRUE if the dock area is empty; otherwise returns FALSE. See
165       the "empty" property for details.
166

void QDockArea::lineUp ( bool keepNewLines ) [slot]

168       Lines up the dock windows in this dock area to minimize wasted space.
169       If keepNewLines is TRUE, only space within lines is cleaned up. If
170       keepNewLines is FALSE the number of lines might be changed.
171

void QDockArea::moveDockWindow ( QDockWindow * w, int index = -1 )

173       Moves the QDockWindow w within the dock area. If w is not already
174       docked in this area, w is docked first. If index is -1 or larger than
175       the number of docked widgets, w is appended at the end, otherwise it is
176       inserted at the position index.
177

void QDockArea::moveDockWindow ( QDockWindow * w, const QPoint & p, const

179       QRect & r, bool swap )
180       This is an overloaded member function, provided for convenience. It
181       behaves essentially like the above function.
182
183       Moves the dock window w inside the dock area where p is the new
184       position (in global screen coordinates), r is the suggested rectangle
185       of the dock window and swap specifies whether or not the orientation of
186       the docked widget needs to be changed.
187
188       This function is used internally by QDockWindow. You shouldn't need to
189       call it yourself.
190

Orientation QDockArea::orientation () const

192       Returns the dock area's orientation. See the "orientation" property for
193       details.
194

void QDockArea::removeDockWindow ( QDockWindow * w, bool makeFloating, bool

196       swap, bool fixNewLines = TRUE )
197       Removes the dock window w from the dock area. If makeFloating is TRUE,
198       w gets floated, and if swap is TRUE, the orientation of w gets swapped.
199       If fixNewLines is TRUE (the default) newlines in the area will be
200       fixed.
201
202       You should never need to call this function yourself. Use
203       QDockWindow::dock() and QDockWindow::undock() instead.
204

void QDockArea::setAcceptDockWindow ( QDockWindow * dw, bool accept )

206       If accept is TRUE, dock window dw can be docked in the dock area. If
207       accept is FALSE, dock window dw cannot be docked in the dock area.
208
209       See also isDockWindowAccepted().
210
211   Property Documentation

int count

213       This property holds the number of dock windows in the dock area.
214
215       Get this property's value with count().
216

bool empty

218       This property holds whether the dock area is empty.
219
220       Get this property's value with isEmpty().
221

HandlePosition handlePosition

223       This property holds where the dock window splitter handle is placed in
224       the dock area.
225
226       The default position is Normal.
227
228       Get this property's value with handlePosition().
229

Orientation orientation

231       This property holds the dock area's orientation.
232
233       There is no default value; the orientation is specified in the
234       constructor.
235
236       Get this property's value with orientation().
237

QTextStream & operator<< ( QTextStream & ts, const QDockArea & dockArea )

240       Writes the layout of the dock windows in dock area dockArea to the text
241       stream ts.
242
243       See also operator>>().
244

QTextStream & operator>> ( QTextStream & ts, QDockArea & dockArea )

246       Reads the layout description of the dock windows in dock area dockArea
247       from the text stream ts and restores it. The layout description must
248       have been previously written by the operator<<() function.
249
250       See also operator<<().
251
252

SEE ALSO

254       http://doc.trolltech.com/qdockarea.html
255       http://www.trolltech.com/faq/tech.html
256
258       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
259       license file included in the distribution for a complete license
260       statement.
261

AUTHOR

263       Generated automatically from the source code.
264

BUGS

266       If you find a bug in Qt, please report it as described in
267       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
268       help you. Thank you.
269
270       The definitive Qt documentation is provided in HTML format; it is
271       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
272       web browser. This man page is provided as a convenience for those users
273       who prefer man pages, although this format is not officially supported
274       by Trolltech.
275
276       If you find errors in this manual page, please report them to qt-
277       bugs@trolltech.com.  Please include the name of the manual page
278       (qdockarea.3qt) and the Qt version (3.3.8).
279
280
281
282Trolltech AS                    2 February 2007                 QDockArea(3qt)
Impressum