[190] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/widgets/qdockwindow.cpp:701 -->
|
---|
| 3 | <html>
|
---|
| 4 | <head>
|
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
| 6 | <title>QDockWindow Class</title>
|
---|
| 7 | <style type="text/css"><!--
|
---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
| 9 | a:link { color: #004faf; text-decoration: none }
|
---|
| 10 | a:visited { color: #672967; text-decoration: none }
|
---|
| 11 | body { background: #ffffff; color: black; }
|
---|
| 12 | --></style>
|
---|
| 13 | </head>
|
---|
| 14 | <body>
|
---|
| 15 |
|
---|
| 16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
| 17 | <tr bgcolor="#E5E5E5">
|
---|
| 18 | <td valign=center>
|
---|
| 19 | <a href="index.html">
|
---|
| 20 | <font color="#004faf">Home</font></a>
|
---|
| 21 | | <a href="classes.html">
|
---|
| 22 | <font color="#004faf">All Classes</font></a>
|
---|
| 23 | | <a href="mainclasses.html">
|
---|
| 24 | <font color="#004faf">Main Classes</font></a>
|
---|
| 25 | | <a href="annotated.html">
|
---|
| 26 | <font color="#004faf">Annotated</font></a>
|
---|
| 27 | | <a href="groups.html">
|
---|
| 28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
| 29 | | <a href="functions.html">
|
---|
| 30 | <font color="#004faf">Functions</font></a>
|
---|
| 31 | </td>
|
---|
| 32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QDockWindow Class Reference</h1>
|
---|
| 33 |
|
---|
| 34 | <p>The QDockWindow class provides a widget which can be docked
|
---|
| 35 | inside a QDockArea or floated as a top level window on the
|
---|
| 36 | desktop.
|
---|
| 37 | <a href="#details">More...</a>
|
---|
| 38 | <p><tt>#include <<a href="qdockwindow-h.html">qdockwindow.h</a>></tt>
|
---|
| 39 | <p>Inherits <a href="qframe.html">QFrame</a>.
|
---|
| 40 | <p>Inherited by <a href="qtoolbar.html">QToolBar</a>.
|
---|
| 41 | <p><a href="qdockwindow-members.html">List of all member functions.</a>
|
---|
| 42 | <h2>Public Members</h2>
|
---|
| 43 | <ul>
|
---|
| 44 | <li class=fn>enum <a href="#Place-enum"><b>Place</b></a> { InDock, OutsideDock }</li>
|
---|
| 45 | <li class=fn>enum <a href="#CloseMode-enum"><b>CloseMode</b></a> { Never = 0, Docked = 1, Undocked = 2, Always = Docked | Undocked }</li>
|
---|
| 46 | <li class=fn><a href="#QDockWindow"><b>QDockWindow</b></a> ( Place p = InDock, QWidget * parent = 0, const char * name = 0, WFlags f = 0 )</li>
|
---|
| 47 | <li class=fn><a href="#QDockWindow-2"><b>QDockWindow</b></a> ( QWidget * parent, const char * name = 0, WFlags f = 0 )</li>
|
---|
| 48 | <li class=fn>virtual void <a href="#setWidget"><b>setWidget</b></a> ( QWidget * w )</li>
|
---|
| 49 | <li class=fn>QWidget * <a href="#widget"><b>widget</b></a> () const</li>
|
---|
| 50 | <li class=fn>Place <a href="#place"><b>place</b></a> () const</li>
|
---|
| 51 | <li class=fn>QDockArea * <a href="#area"><b>area</b></a> () const</li>
|
---|
| 52 | <li class=fn>virtual void <a href="#setCloseMode"><b>setCloseMode</b></a> ( int m )</li>
|
---|
| 53 | <li class=fn>bool <a href="#isCloseEnabled"><b>isCloseEnabled</b></a> () const</li>
|
---|
| 54 | <li class=fn>int <a href="#closeMode"><b>closeMode</b></a> () const</li>
|
---|
| 55 | <li class=fn>virtual void <a href="#setResizeEnabled"><b>setResizeEnabled</b></a> ( bool b )</li>
|
---|
| 56 | <li class=fn>virtual void <a href="#setMovingEnabled"><b>setMovingEnabled</b></a> ( bool b )</li>
|
---|
| 57 | <li class=fn>bool <a href="#isResizeEnabled"><b>isResizeEnabled</b></a> () const</li>
|
---|
| 58 | <li class=fn>bool <a href="#isMovingEnabled"><b>isMovingEnabled</b></a> () const</li>
|
---|
| 59 | <li class=fn>virtual void <a href="#setHorizontallyStretchable"><b>setHorizontallyStretchable</b></a> ( bool b )</li>
|
---|
| 60 | <li class=fn>virtual void <a href="#setVerticallyStretchable"><b>setVerticallyStretchable</b></a> ( bool b )</li>
|
---|
| 61 | <li class=fn>bool <a href="#isHorizontallyStretchable"><b>isHorizontallyStretchable</b></a> () const</li>
|
---|
| 62 | <li class=fn>bool <a href="#isVerticallyStretchable"><b>isVerticallyStretchable</b></a> () const</li>
|
---|
| 63 | <li class=fn>void setHorizontalStretchable ( bool b ) <em>(obsolete)</em></li>
|
---|
| 64 | <li class=fn>void setVerticalStretchable ( bool b ) <em>(obsolete)</em></li>
|
---|
| 65 | <li class=fn>bool isHorizontalStretchable () const <em>(obsolete)</em></li>
|
---|
| 66 | <li class=fn>bool isVerticalStretchable () const <em>(obsolete)</em></li>
|
---|
| 67 | <li class=fn>bool <a href="#isStretchable"><b>isStretchable</b></a> () const</li>
|
---|
| 68 | <li class=fn>virtual void <a href="#setOffset"><b>setOffset</b></a> ( int o )</li>
|
---|
| 69 | <li class=fn>int <a href="#offset"><b>offset</b></a> () const</li>
|
---|
| 70 | <li class=fn>virtual void <a href="#setFixedExtentWidth"><b>setFixedExtentWidth</b></a> ( int w )</li>
|
---|
| 71 | <li class=fn>virtual void <a href="#setFixedExtentHeight"><b>setFixedExtentHeight</b></a> ( int h )</li>
|
---|
| 72 | <li class=fn>QSize <a href="#fixedExtent"><b>fixedExtent</b></a> () const</li>
|
---|
| 73 | <li class=fn>virtual void <a href="#setNewLine"><b>setNewLine</b></a> ( bool b )</li>
|
---|
| 74 | <li class=fn>bool <a href="#newLine"><b>newLine</b></a> () const</li>
|
---|
| 75 | <li class=fn>Qt::Orientation <a href="#orientation"><b>orientation</b></a> () const</li>
|
---|
| 76 | <li class=fn>QBoxLayout * <a href="#boxLayout"><b>boxLayout</b></a> ()</li>
|
---|
| 77 | <li class=fn>virtual void <a href="#setOpaqueMoving"><b>setOpaqueMoving</b></a> ( bool b )</li>
|
---|
| 78 | <li class=fn>bool <a href="#opaqueMoving"><b>opaqueMoving</b></a> () const</li>
|
---|
| 79 | </ul>
|
---|
| 80 | <h2>Public Slots</h2>
|
---|
| 81 | <ul>
|
---|
| 82 | <li class=fn>virtual void <a href="#undock"><b>undock</b></a> ()</li>
|
---|
| 83 | <li class=fn>virtual void <a href="#dock"><b>dock</b></a> ()</li>
|
---|
| 84 | <li class=fn>virtual void <a href="#setOrientation"><b>setOrientation</b></a> ( Orientation o )</li>
|
---|
| 85 | </ul>
|
---|
| 86 | <h2>Signals</h2>
|
---|
| 87 | <ul>
|
---|
| 88 | <li class=fn>void <a href="#orientationChanged"><b>orientationChanged</b></a> ( Orientation o )</li>
|
---|
| 89 | <li class=fn>void <a href="#placeChanged"><b>placeChanged</b></a> ( QDockWindow::Place p )</li>
|
---|
| 90 | <li class=fn>void <a href="#visibilityChanged"><b>visibilityChanged</b></a> ( bool visible )</li>
|
---|
| 91 | </ul>
|
---|
| 92 | <h2>Properties</h2>
|
---|
| 93 | <ul>
|
---|
| 94 | <li class=fn>int <a href="#closeMode-prop"><b>closeMode</b></a> - the close mode of a dock window</li>
|
---|
| 95 | <li class=fn>bool <a href="#horizontallyStretchable-prop"><b>horizontallyStretchable</b></a> - whether the dock window is horizontally stretchable</li>
|
---|
| 96 | <li class=fn>bool <a href="#movingEnabled-prop"><b>movingEnabled</b></a> - whether the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window</li>
|
---|
| 97 | <li class=fn>bool <a href="#newLine-prop"><b>newLine</b></a> - whether the dock window prefers to start a new line in the dock area</li>
|
---|
| 98 | <li class=fn>int <a href="#offset-prop"><b>offset</b></a> - the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas)</li>
|
---|
| 99 | <li class=fn>bool <a href="#opaqueMoving-prop"><b>opaqueMoving</b></a> - whether the dock window will be shown normally whilst it is being moved</li>
|
---|
| 100 | <li class=fn>Place <b>place</b> <em>(read only)</em></li>
|
---|
| 101 | <li class=fn>bool <a href="#resizeEnabled-prop"><b>resizeEnabled</b></a> - whether the dock window is resizeable</li>
|
---|
| 102 | <li class=fn>bool <a href="#stretchable-prop"><b>stretchable</b></a> - whether the dock window is stretchable in the current orientation() <em>(read only)</em></li>
|
---|
| 103 | <li class=fn>bool <a href="#verticallyStretchable-prop"><b>verticallyStretchable</b></a> - whether the dock window is vertically stretchable</li>
|
---|
| 104 | </ul>
|
---|
| 105 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
| 106 |
|
---|
| 107 |
|
---|
| 108 | The QDockWindow class provides a widget which can be docked
|
---|
| 109 | inside a <a href="qdockarea.html">QDockArea</a> or floated as a top level window on the
|
---|
| 110 | desktop.
|
---|
| 111 | <p>
|
---|
| 112 |
|
---|
| 113 | <p> This class handles moving, resizing, docking and undocking dock
|
---|
| 114 | windows. <a href="qtoolbar.html">QToolBar</a> is a subclass of QDockWindow so the
|
---|
| 115 | functionality provided for dock windows is available with the same
|
---|
| 116 | API for toolbars.
|
---|
| 117 | <p> <center><img src="qmainwindow-qdockareas.png" alt="QDockWindows in a QDockArea"></center> <blockquote><p align="center"><em> Two QDockWindows (<a href="qtoolbar.html">QToolBar</a>s) in a <a href="qdockarea.html">QDockArea</a>
|
---|
| 118 | </em></p>
|
---|
| 119 | </blockquote><p> <center><img src="qdockwindow.png" alt="A QDockWindow"></center> <blockquote><p align="center"><em> A Floating QDockWindow
|
---|
| 120 | </em></p>
|
---|
| 121 | </blockquote><p> If the user drags the dock window into the dock area the dock
|
---|
| 122 | window will be docked. If the user drags the dock area outside any
|
---|
| 123 | dock areas the dock window will be undocked (floated) and will
|
---|
| 124 | become a top level window. Double clicking a floating dock
|
---|
| 125 | window's titlebar will dock the dock window to the last dock area
|
---|
| 126 | it was docked in. Double clicking a docked dock window's handle
|
---|
| 127 | will undock (float) the dock window.
|
---|
| 128 |
|
---|
| 129 | If the user clicks the close button (which does not appear on
|
---|
| 130 | dock windows by default - see <a href="#closeMode-prop">closeMode</a>) the dock window will
|
---|
| 131 | disappear. You can control whether or not a dock window has a
|
---|
| 132 | close button with <a href="#setCloseMode">setCloseMode</a>().
|
---|
| 133 | <p> <a href="qmainwindow.html">QMainWindow</a> provides four dock areas (top, left, right and bottom)
|
---|
| 134 | which can be used by dock windows. For many applications using the
|
---|
| 135 | dock areas provided by QMainWindow is sufficient. (See the <a href="qdockarea.html">QDockArea</a> documentation if you want to create your own dock
|
---|
| 136 | areas.) In QMainWindow a right-click popup menu (the dock window
|
---|
| 137 | menu) is available which lists dock windows and can be used to
|
---|
| 138 | show or hide them. (The popup menu only lists dock windows that
|
---|
| 139 | have a <a href="qwidget.html#setCaption">caption</a>.)
|
---|
| 140 | <p> When you construct a dock window you <em>must</em> pass it a <a href="qdockarea.html">QDockArea</a>
|
---|
| 141 | or a QMainWindow as its parent if you want it docked. Pass 0 for
|
---|
| 142 | the parent if you want it floated.
|
---|
| 143 | <p> <pre>
|
---|
| 144 | <a href="qtoolbar.html">QToolBar</a> *fileTools = new <a href="qtoolbar.html">QToolBar</a>( this, "File Actions" );
|
---|
| 145 | moveDockWindow( fileTools, Left );
|
---|
| 146 | </pre>
|
---|
| 147 |
|
---|
| 148 | <p> In the example above we create a new <a href="qtoolbar.html">QToolBar</a> in the constructor
|
---|
| 149 | of a <a href="qmainwindow.html">QMainWindow</a> subclass (so that the <em>this</em> pointer points to
|
---|
| 150 | the QMainWindow). By default the toolbar will be added to the <a href="qt.html#Dock-enum">Top</a> dock area, but we've moved it to the <a href="qt.html#Dock-enum">Left</a> dock area.
|
---|
| 151 | <p> A dock window is often used to contain a single widget. In these
|
---|
| 152 | cases the widget can be set by calling <a href="#setWidget">setWidget</a>(). If you're
|
---|
| 153 | constructing a dock window that contains multiple widgets, e.g. a
|
---|
| 154 | toolbar, arrange the widgets within a box layout inside the dock
|
---|
| 155 | window. To do this use the <a href="#boxLayout">boxLayout</a>() function to get a pointer
|
---|
| 156 | to the dock window's box layout, then add widgets to the layout
|
---|
| 157 | using the box layout's <a href="qboxlayout.html#addWidget">QBoxLayout::addWidget</a>() function. The dock
|
---|
| 158 | window will dynamically set the orientation of the layout to be
|
---|
| 159 | vertical or horizontal as necessary, although you can control this
|
---|
| 160 | yourself with <a href="#setOrientation">setOrientation</a>().
|
---|
| 161 | <p> Although a common use of dock windows is for toolbars, they can be
|
---|
| 162 | used with any widgets. (See the <a href="designer-manual.html">Qt
|
---|
| 163 | Designer</a> and <a href="linguist-manual.html">Qt
|
---|
| 164 | Linguist</a> applications, for example.) When using larger
|
---|
| 165 | widgets it may make sense for the dock window to be resizable by
|
---|
| 166 | calling <a href="#setResizeEnabled">setResizeEnabled</a>(). Resizable dock windows are given
|
---|
| 167 | splitter-like handles to allow the user to resize them within
|
---|
| 168 | their dock area. When resizable dock windows are undocked they
|
---|
| 169 | become top level windows and can be resized like any other top
|
---|
| 170 | level windows, e.g. by dragging a corner or edge.
|
---|
| 171 | <p> Dock windows can be docked and undocked using <a href="#dock">dock</a>() and <a href="#undock">undock</a>().
|
---|
| 172 | A dock window's orientation can be set with setOrientation(). You
|
---|
| 173 | can also use <a href="qdockarea.html#moveDockWindow">QDockArea::moveDockWindow</a>(). If you're using a
|
---|
| 174 | <a href="qmainwindow.html">QMainWindow</a>, <a href="qmainwindow.html#moveDockWindow">QMainWindow::moveDockWindow</a>() and
|
---|
| 175 | <a href="qmainwindow.html#removeDockWindow">QMainWindow::removeDockWindow</a>() are available.
|
---|
| 176 | <p> A dock window can have some preferred settings, for example, you
|
---|
| 177 | can set a preferred offset from the left edge (or top edge for
|
---|
| 178 | vertical dock areas) of the dock area using <a href="#setOffset">setOffset</a>(). If you'd
|
---|
| 179 | prefer a dock window to start on a new <a href="qdockarea.html#lines">line</a> when it is docked use <a href="#setNewLine">setNewLine</a>(). The
|
---|
| 180 | <a href="#setFixedExtentWidth">setFixedExtentWidth</a>() and <a href="#setFixedExtentHeight">setFixedExtentHeight</a>() functions can be
|
---|
| 181 | used to define the dock window's preferred size, and the
|
---|
| 182 | <a href="#setHorizontallyStretchable">setHorizontallyStretchable</a>() and <a href="#setVerticallyStretchable">setVerticallyStretchable</a>()
|
---|
| 183 | functions set whether the dock window can be stretched or not.
|
---|
| 184 | Dock windows can be moved by default, but this can be changed with
|
---|
| 185 | <a href="#setMovingEnabled">setMovingEnabled</a>(). When a dock window is moved it is shown as a
|
---|
| 186 | rectangular outline, but it can be shown normally using
|
---|
| 187 | <a href="#setOpaqueMoving">setOpaqueMoving</a>().
|
---|
| 188 | <p> When a dock window's visibility changes, i.e. it is shown or
|
---|
| 189 | hidden, the <a href="#visibilityChanged">visibilityChanged</a>() signal is emitted. When a dock
|
---|
| 190 | window is docked, undocked or moved inside the dock area the
|
---|
| 191 | <a href="#placeChanged">placeChanged</a>() signal is emitted.
|
---|
| 192 | <p>See also <a href="application.html">Main Window and Related Classes</a>.
|
---|
| 193 |
|
---|
| 194 | <hr><h2>Member Type Documentation</h2>
|
---|
| 195 | <h3 class=fn><a name="CloseMode-enum"></a>QDockWindow::CloseMode</h3>
|
---|
| 196 |
|
---|
| 197 | <p> This enum type specifies when (if ever) a dock window has a close
|
---|
| 198 | button.
|
---|
| 199 | <ul>
|
---|
| 200 | <li><tt>QDockWindow::Never</tt> - The dock window never has a close button and cannot
|
---|
| 201 | be closed by the user.
|
---|
| 202 | <li><tt>QDockWindow::Docked</tt> - The dock window has a close button only when
|
---|
| 203 | docked.
|
---|
| 204 | <li><tt>QDockWindow::Undocked</tt> - The dock window has a close button only when
|
---|
| 205 | floating.
|
---|
| 206 | <li><tt>QDockWindow::Always</tt> - The dock window always has a close button.
|
---|
| 207 |
|
---|
| 208 | </ul>
|
---|
| 209 | <h3 class=fn><a name="Place-enum"></a>QDockWindow::Place</h3>
|
---|
| 210 |
|
---|
| 211 | <p> This enum specifies the possible locations for a QDockWindow:
|
---|
| 212 | <ul>
|
---|
| 213 | <li><tt>QDockWindow::InDock</tt> - Inside a <a href="qdockarea.html">QDockArea</a>.
|
---|
| 214 | <li><tt>QDockWindow::OutsideDock</tt> - Floating as a top level window on the desktop.
|
---|
| 215 | </ul>
|
---|
| 216 | <hr><h2>Member Function Documentation</h2>
|
---|
| 217 | <h3 class=fn><a name="QDockWindow"></a>QDockWindow::QDockWindow ( <a href="qdockwindow.html#Place-enum">Place</a> p = InDock, <a href="qwidget.html">QWidget</a> * parent = 0, const char * name = 0, WFlags f = 0 )
|
---|
| 218 | </h3>
|
---|
| 219 | Constructs a QDockWindow with parent <em>parent</em>, called <em>name</em> and
|
---|
| 220 | with widget flags <em>f</em>.
|
---|
| 221 | <p> If <em>p</em> is <a href="#Place-enum">InDock</a>, the dock window is docked into a dock area
|
---|
| 222 | and <em>parent</em> <em>must</em> be a <a href="qdockarea.html">QDockArea</a> or a <a href="qmainwindow.html">QMainWindow</a>. If the <em>parent</em> is a QMainWindow the dock window will be docked in the main
|
---|
| 223 | window's <a href="qt.html#Dock-enum">Top</a> dock area.
|
---|
| 224 | <p> If <em>p</em> is <a href="#Place-enum">OutsideDock</a>, the dock window is created as a floating
|
---|
| 225 | window.
|
---|
| 226 | <p> We recommend creating the dock area <a href="#Place-enum">InDock</a> with a QMainWindow
|
---|
| 227 | as parent then calling <a href="qmainwindow.html#moveDockWindow">QMainWindow::moveDockWindow</a>() to move the
|
---|
| 228 | dock window where you want it.
|
---|
| 229 |
|
---|
| 230 | <h3 class=fn><a name="QDockWindow-2"></a>QDockWindow::QDockWindow ( <a href="qwidget.html">QWidget</a> * parent, const char * name = 0, WFlags f = 0 )
|
---|
| 231 | </h3>
|
---|
| 232 | Constructs a QDockWindow with parent <em>parent</em>, called <em>name</em> and
|
---|
| 233 | with widget flags <em>f</em>.
|
---|
| 234 |
|
---|
| 235 | <h3 class=fn><a href="qdockarea.html">QDockArea</a> * <a name="area"></a>QDockWindow::area () const
|
---|
| 236 | </h3>
|
---|
| 237 |
|
---|
| 238 | <p> Returns the dock area in which this dock window is docked, or 0 if
|
---|
| 239 | the dock window is floating.
|
---|
| 240 |
|
---|
| 241 | <h3 class=fn><a href="qboxlayout.html">QBoxLayout</a> * <a name="boxLayout"></a>QDockWindow::boxLayout ()
|
---|
| 242 | </h3>
|
---|
| 243 | Returns the layout which is used for adding widgets to the dock
|
---|
| 244 | window. The layout's orientation is set automatically to match the
|
---|
| 245 | orientation of the dock window. You can add widgets to the layout
|
---|
| 246 | using the box layout's <a href="qboxlayout.html#addWidget">QBoxLayout::addWidget</a>() function.
|
---|
| 247 | <p> If the dock window only needs to contain a single widget use
|
---|
| 248 | <a href="#setWidget">setWidget</a>() instead.
|
---|
| 249 | <p> <p>See also <a href="#setWidget">setWidget</a>() and <a href="#setOrientation">setOrientation</a>().
|
---|
| 250 |
|
---|
| 251 | <h3 class=fn>int <a name="closeMode"></a>QDockWindow::closeMode () const
|
---|
| 252 | </h3><p>Returns the close mode of a dock window.
|
---|
| 253 | See the <a href="qdockwindow.html#closeMode-prop">"closeMode"</a> property for details.
|
---|
| 254 | <h3 class=fn>void <a name="dock"></a>QDockWindow::dock ()<tt> [virtual slot]</tt>
|
---|
| 255 | </h3>
|
---|
| 256 | Docks the dock window into the last dock area in which it was
|
---|
| 257 | docked.
|
---|
| 258 | <p> If the dock window has no last dock area (e.g. it was created as a
|
---|
| 259 | floating window and has never been docked), or if the last dock
|
---|
| 260 | area it was docked in does not exist (e.g. the dock area has been
|
---|
| 261 | deleted), nothing happens.
|
---|
| 262 | <p> The dock window will dock with the dock area regardless of the return value
|
---|
| 263 | of <a href="qdockarea.html#isDockWindowAccepted">QDockArea::isDockWindowAccepted</a>().
|
---|
| 264 | <p> <p>See also <a href="#undock">undock</a>(), <a href="qdockarea.html#moveDockWindow">QDockArea::moveDockWindow</a>(), <a href="qdockarea.html#removeDockWindow">QDockArea::removeDockWindow</a>(), <a href="qmainwindow.html#moveDockWindow">QMainWindow::moveDockWindow</a>(), <a href="qmainwindow.html#removeDockWindow">QMainWindow::removeDockWindow</a>(), and <a href="qdockarea.html#isDockWindowAccepted">QDockArea::isDockWindowAccepted</a>().
|
---|
| 265 |
|
---|
| 266 | <p>
|
---|
| 267 | <h3 class=fn><a href="qsize.html">QSize</a> <a name="fixedExtent"></a>QDockWindow::fixedExtent () const
|
---|
| 268 | </h3>
|
---|
| 269 | Returns the dock window's preferred size (fixed extent).
|
---|
| 270 | <p> <p>See also <a href="#setFixedExtentWidth">setFixedExtentWidth</a>() and <a href="#setFixedExtentHeight">setFixedExtentHeight</a>().
|
---|
| 271 |
|
---|
| 272 | <h3 class=fn>bool <a name="isCloseEnabled"></a>QDockWindow::isCloseEnabled () const
|
---|
| 273 | </h3>
|
---|
| 274 | Returns TRUE if the dock window has a close button; otherwise
|
---|
| 275 | returns FALSE. The result depends on the dock window's <a href="#Place-enum">Place</a>
|
---|
| 276 | and its <a href="#CloseMode-enum">CloseMode</a>.
|
---|
| 277 | <p> <p>See also <a href="#closeMode-prop">closeMode</a>.
|
---|
| 278 |
|
---|
| 279 | <h3 class=fn>bool <a name="isHorizontalStretchable"></a>QDockWindow::isHorizontalStretchable () const
|
---|
| 280 | </h3>
|
---|
| 281 |
|
---|
| 282 | <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 283 | <p>
|
---|
| 284 | <h3 class=fn>bool <a name="isHorizontallyStretchable"></a>QDockWindow::isHorizontallyStretchable () const
|
---|
| 285 | </h3><p>Returns TRUE if the dock window is horizontally stretchable; otherwise returns FALSE.
|
---|
| 286 | See the <a href="qdockwindow.html#horizontallyStretchable-prop">"horizontallyStretchable"</a> property for details.
|
---|
| 287 | <h3 class=fn>bool <a name="isMovingEnabled"></a>QDockWindow::isMovingEnabled () const
|
---|
| 288 | </h3><p>Returns TRUE if the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window; otherwise returns FALSE.
|
---|
| 289 | See the <a href="qdockwindow.html#movingEnabled-prop">"movingEnabled"</a> property for details.
|
---|
| 290 | <h3 class=fn>bool <a name="isResizeEnabled"></a>QDockWindow::isResizeEnabled () const
|
---|
| 291 | </h3><p>Returns TRUE if the dock window is resizeable; otherwise returns FALSE.
|
---|
| 292 | See the <a href="qdockwindow.html#resizeEnabled-prop">"resizeEnabled"</a> property for details.
|
---|
| 293 | <h3 class=fn>bool <a name="isStretchable"></a>QDockWindow::isStretchable () const
|
---|
| 294 | </h3><p>Returns TRUE if the dock window is stretchable in the current <a href="#orientation">orientation</a>(); otherwise returns FALSE.
|
---|
| 295 | See the <a href="qdockwindow.html#stretchable-prop">"stretchable"</a> property for details.
|
---|
| 296 | <h3 class=fn>bool <a name="isVerticalStretchable"></a>QDockWindow::isVerticalStretchable () const
|
---|
| 297 | </h3>
|
---|
| 298 |
|
---|
| 299 | <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 300 | <p>
|
---|
| 301 | <h3 class=fn>bool <a name="isVerticallyStretchable"></a>QDockWindow::isVerticallyStretchable () const
|
---|
| 302 | </h3><p>Returns TRUE if the dock window is vertically stretchable; otherwise returns FALSE.
|
---|
| 303 | See the <a href="qdockwindow.html#verticallyStretchable-prop">"verticallyStretchable"</a> property for details.
|
---|
| 304 | <h3 class=fn>bool <a name="newLine"></a>QDockWindow::newLine () const
|
---|
| 305 | </h3><p>Returns TRUE if the dock window prefers to start a new line in the dock area; otherwise returns FALSE.
|
---|
| 306 | See the <a href="qdockwindow.html#newLine-prop">"newLine"</a> property for details.
|
---|
| 307 | <h3 class=fn>int <a name="offset"></a>QDockWindow::offset () const
|
---|
| 308 | </h3><p>Returns the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas).
|
---|
| 309 | See the <a href="qdockwindow.html#offset-prop">"offset"</a> property for details.
|
---|
| 310 | <h3 class=fn>bool <a name="opaqueMoving"></a>QDockWindow::opaqueMoving () const
|
---|
| 311 | </h3><p>Returns TRUE if the dock window will be shown normally whilst it is being moved; otherwise returns FALSE.
|
---|
| 312 | See the <a href="qdockwindow.html#opaqueMoving-prop">"opaqueMoving"</a> property for details.
|
---|
| 313 | <h3 class=fn><a href="qt.html#Orientation-enum">Qt::Orientation</a> <a name="orientation"></a>QDockWindow::orientation () const
|
---|
| 314 | </h3>
|
---|
| 315 | Returns the orientation of the dock window.
|
---|
| 316 | <p> <p>See also <a href="#orientationChanged">orientationChanged</a>().
|
---|
| 317 |
|
---|
| 318 | <h3 class=fn>void <a name="orientationChanged"></a>QDockWindow::orientationChanged ( <a href="qt.html#Orientation-enum">Orientation</a> o )<tt> [signal]</tt>
|
---|
| 319 | </h3>
|
---|
| 320 |
|
---|
| 321 | <p> This signal is emitted when the orientation of the dock window is
|
---|
| 322 | changed. The new orientation is <em>o</em>.
|
---|
| 323 |
|
---|
| 324 | <h3 class=fn><a href="qdockwindow.html#Place-enum">Place</a> <a name="place"></a>QDockWindow::place () const
|
---|
| 325 | </h3>
|
---|
| 326 |
|
---|
| 327 | <p> This function returns where the dock window is placed. This is
|
---|
| 328 | either <a href="#Place-enum">InDock</a> or <a href="#Place-enum">OutsideDock</a>.
|
---|
| 329 | <p> <p>See also <a href="qdockarea.html#moveDockWindow">QDockArea::moveDockWindow</a>(), <a href="qdockarea.html#removeDockWindow">QDockArea::removeDockWindow</a>(), <a href="qmainwindow.html#moveDockWindow">QMainWindow::moveDockWindow</a>(), and <a href="qmainwindow.html#removeDockWindow">QMainWindow::removeDockWindow</a>().
|
---|
| 330 |
|
---|
| 331 | <h3 class=fn>void <a name="placeChanged"></a>QDockWindow::placeChanged ( <a href="qdockwindow.html#Place-enum">QDockWindow::Place</a> p )<tt> [signal]</tt>
|
---|
| 332 | </h3>
|
---|
| 333 |
|
---|
| 334 | <p> This signal is emitted when the dock window is docked (<em>p</em> is <a href="#Place-enum">InDock</a>), undocked (<em>p</em> is <a href="#Place-enum">OutsideDock</a>) or moved inside the
|
---|
| 335 | the dock area.
|
---|
| 336 | <p> <p>See also <a href="qdockarea.html#moveDockWindow">QDockArea::moveDockWindow</a>(), <a href="qdockarea.html#removeDockWindow">QDockArea::removeDockWindow</a>(), <a href="qmainwindow.html#moveDockWindow">QMainWindow::moveDockWindow</a>(), and <a href="qmainwindow.html#removeDockWindow">QMainWindow::removeDockWindow</a>().
|
---|
| 337 |
|
---|
| 338 | <h3 class=fn>void <a name="setCloseMode"></a>QDockWindow::setCloseMode ( int m )<tt> [virtual]</tt>
|
---|
| 339 | </h3><p>Sets the close mode of a dock window to <em>m</em>.
|
---|
| 340 | See the <a href="qdockwindow.html#closeMode-prop">"closeMode"</a> property for details.
|
---|
| 341 | <h3 class=fn>void <a name="setFixedExtentHeight"></a>QDockWindow::setFixedExtentHeight ( int h )<tt> [virtual]</tt>
|
---|
| 342 | </h3>
|
---|
| 343 | Sets the dock window's preferred height for its fixed extent
|
---|
| 344 | (size) to <em>h</em>.
|
---|
| 345 | <p> <p>See also <a href="#setFixedExtentWidth">setFixedExtentWidth</a>().
|
---|
| 346 |
|
---|
| 347 | <h3 class=fn>void <a name="setFixedExtentWidth"></a>QDockWindow::setFixedExtentWidth ( int w )<tt> [virtual]</tt>
|
---|
| 348 | </h3>
|
---|
| 349 | Sets the dock window's preferred width for its fixed extent (size)
|
---|
| 350 | to <em>w</em>.
|
---|
| 351 | <p> <p>See also <a href="#setFixedExtentHeight">setFixedExtentHeight</a>().
|
---|
| 352 |
|
---|
| 353 | <h3 class=fn>void <a name="setHorizontalStretchable"></a>QDockWindow::setHorizontalStretchable ( bool b )
|
---|
| 354 | </h3>
|
---|
| 355 |
|
---|
| 356 | <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 357 | <p>
|
---|
| 358 | <h3 class=fn>void <a name="setHorizontallyStretchable"></a>QDockWindow::setHorizontallyStretchable ( bool b )<tt> [virtual]</tt>
|
---|
| 359 | </h3><p>Sets whether the dock window is horizontally stretchable to <em>b</em>.
|
---|
| 360 | See the <a href="qdockwindow.html#horizontallyStretchable-prop">"horizontallyStretchable"</a> property for details.
|
---|
| 361 | <h3 class=fn>void <a name="setMovingEnabled"></a>QDockWindow::setMovingEnabled ( bool b )<tt> [virtual]</tt>
|
---|
| 362 | </h3><p>Sets whether the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window to <em>b</em>.
|
---|
| 363 | See the <a href="qdockwindow.html#movingEnabled-prop">"movingEnabled"</a> property for details.
|
---|
| 364 | <h3 class=fn>void <a name="setNewLine"></a>QDockWindow::setNewLine ( bool b )<tt> [virtual]</tt>
|
---|
| 365 | </h3><p>Sets whether the dock window prefers to start a new line in the dock area to <em>b</em>.
|
---|
| 366 | See the <a href="qdockwindow.html#newLine-prop">"newLine"</a> property for details.
|
---|
| 367 | <h3 class=fn>void <a name="setOffset"></a>QDockWindow::setOffset ( int o )<tt> [virtual]</tt>
|
---|
| 368 | </h3><p>Sets the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas) to <em>o</em>.
|
---|
| 369 | See the <a href="qdockwindow.html#offset-prop">"offset"</a> property for details.
|
---|
| 370 | <h3 class=fn>void <a name="setOpaqueMoving"></a>QDockWindow::setOpaqueMoving ( bool b )<tt> [virtual]</tt>
|
---|
| 371 | </h3><p>Sets whether the dock window will be shown normally whilst it is being moved to <em>b</em>.
|
---|
| 372 | See the <a href="qdockwindow.html#opaqueMoving-prop">"opaqueMoving"</a> property for details.
|
---|
| 373 | <h3 class=fn>void <a name="setOrientation"></a>QDockWindow::setOrientation ( <a href="qt.html#Orientation-enum">Orientation</a> o )<tt> [virtual slot]</tt>
|
---|
| 374 | </h3>
|
---|
| 375 | Sets the orientation of the dock window to <em>o</em>. The orientation
|
---|
| 376 | is propagated to the layout <a href="#boxLayout">boxLayout</a>().
|
---|
| 377 | <p> <b>Warning:</b> All undocked QToolBars will always have a horizontal orientation.
|
---|
| 378 |
|
---|
| 379 | <h3 class=fn>void <a name="setResizeEnabled"></a>QDockWindow::setResizeEnabled ( bool b )<tt> [virtual]</tt>
|
---|
| 380 | </h3><p>Sets whether the dock window is resizeable to <em>b</em>.
|
---|
| 381 | See the <a href="qdockwindow.html#resizeEnabled-prop">"resizeEnabled"</a> property for details.
|
---|
| 382 | <h3 class=fn>void <a name="setVerticalStretchable"></a>QDockWindow::setVerticalStretchable ( bool b )
|
---|
| 383 | </h3>
|
---|
| 384 |
|
---|
| 385 | <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 386 | <p>
|
---|
| 387 | <h3 class=fn>void <a name="setVerticallyStretchable"></a>QDockWindow::setVerticallyStretchable ( bool b )<tt> [virtual]</tt>
|
---|
| 388 | </h3><p>Sets whether the dock window is vertically stretchable to <em>b</em>.
|
---|
| 389 | See the <a href="qdockwindow.html#verticallyStretchable-prop">"verticallyStretchable"</a> property for details.
|
---|
| 390 | <h3 class=fn>void <a name="setWidget"></a>QDockWindow::setWidget ( <a href="qwidget.html">QWidget</a> * w )<tt> [virtual]</tt>
|
---|
| 391 | </h3>
|
---|
| 392 | Sets the dock window's main widget to <em>w</em>.
|
---|
| 393 | <p> <p>See also <a href="#boxLayout">boxLayout</a>().
|
---|
| 394 |
|
---|
| 395 | <h3 class=fn>void <a name="undock"></a>QDockWindow::undock ()<tt> [virtual slot]</tt>
|
---|
| 396 | </h3>
|
---|
| 397 |
|
---|
| 398 | <p> Undocks the QDockWindow from its current dock area if it is
|
---|
| 399 | docked; otherwise does nothing.
|
---|
| 400 | <p> <p>See also <a href="#dock">dock</a>(), <a href="qdockarea.html#moveDockWindow">QDockArea::moveDockWindow</a>(), <a href="qdockarea.html#removeDockWindow">QDockArea::removeDockWindow</a>(), <a href="qmainwindow.html#moveDockWindow">QMainWindow::moveDockWindow</a>(), and <a href="qmainwindow.html#removeDockWindow">QMainWindow::removeDockWindow</a>().
|
---|
| 401 |
|
---|
| 402 | <h3 class=fn>void <a name="visibilityChanged"></a>QDockWindow::visibilityChanged ( bool visible )<tt> [signal]</tt>
|
---|
| 403 | </h3>
|
---|
| 404 |
|
---|
| 405 | <p> This signal is emitted when the visibility of the dock window
|
---|
| 406 | relatively to its dock area is changed. If <em>visible</em> is TRUE, the
|
---|
| 407 | QDockWindow is now visible to the dock area, otherwise it has been
|
---|
| 408 | hidden.
|
---|
| 409 | <p> A dock window can be hidden if it has a close button which the
|
---|
| 410 | user has clicked. In the case of a <a href="qmainwindow.html">QMainWindow</a> a dock window can
|
---|
| 411 | have its visibility changed (hidden or shown) by clicking its name
|
---|
| 412 | in the dock window menu that lists the QMainWindow's dock windows.
|
---|
| 413 |
|
---|
| 414 | <h3 class=fn><a href="qwidget.html">QWidget</a> * <a name="widget"></a>QDockWindow::widget () const
|
---|
| 415 | </h3>
|
---|
| 416 | Returns the dock window's main widget.
|
---|
| 417 | <p> <p>See also <a href="#setWidget">setWidget</a>().
|
---|
| 418 |
|
---|
| 419 | <hr><h2>Property Documentation</h2>
|
---|
| 420 | <h3 class=fn>int <a name="closeMode-prop"></a>closeMode</h3>
|
---|
| 421 | <p>This property holds the close mode of a dock window.
|
---|
| 422 | <p>Defines when (if ever) the dock window has a close button. The
|
---|
| 423 | choices are <a href="#CloseMode-enum">Never</a>, <a href="#CloseMode-enum">Docked</a> (i.e. only when docked), <a href="#CloseMode-enum">Undocked</a> (only when undocked, i.e. floated) or <a href="#CloseMode-enum">Always</a>.
|
---|
| 424 | <p> The default is <a href="#CloseMode-enum">Never</a>.
|
---|
| 425 |
|
---|
| 426 | <p>Set this property's value with <a href="#setCloseMode">setCloseMode</a>() and get this property's value with <a href="#closeMode">closeMode</a>().
|
---|
| 427 | <h3 class=fn>bool <a name="horizontallyStretchable-prop"></a>horizontallyStretchable</h3>
|
---|
| 428 | <p>This property holds whether the dock window is horizontally stretchable.
|
---|
| 429 | <p>A dock window is horizontally stretchable if you call
|
---|
| 430 | <a href="#setHorizontallyStretchable">setHorizontallyStretchable</a>(TRUE) or <a href="#setResizeEnabled">setResizeEnabled</a>(TRUE).
|
---|
| 431 | <p> <p>See also <a href="#resizeEnabled-prop">resizeEnabled</a>.
|
---|
| 432 |
|
---|
| 433 | <p>Bugs and limitations:
|
---|
| 434 | <ul>
|
---|
| 435 | <li> Strecthability is broken. You must call setResizeEnabled(TRUE) to get
|
---|
| 436 | proper behavior and even then QDockWindow does not limit stretchablilty.
|
---|
| 437 | </ul>
|
---|
| 438 | <p>Set this property's value with <a href="#setHorizontallyStretchable">setHorizontallyStretchable</a>() and get this property's value with <a href="#isHorizontallyStretchable">isHorizontallyStretchable</a>().
|
---|
| 439 | <h3 class=fn>bool <a name="movingEnabled-prop"></a>movingEnabled</h3>
|
---|
| 440 | <p>This property holds whether the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window.
|
---|
| 441 | <p>This property is TRUE by default.
|
---|
| 442 |
|
---|
| 443 | <p>Set this property's value with <a href="#setMovingEnabled">setMovingEnabled</a>() and get this property's value with <a href="#isMovingEnabled">isMovingEnabled</a>().
|
---|
| 444 | <h3 class=fn>bool <a name="newLine-prop"></a>newLine</h3>
|
---|
| 445 | <p>This property holds whether the dock window prefers to start a new line in the dock area.
|
---|
| 446 | <p>The default is FALSE, i.e. the dock window doesn't require a new
|
---|
| 447 | line in the dock area.
|
---|
| 448 |
|
---|
| 449 | <p>Set this property's value with <a href="#setNewLine">setNewLine</a>() and get this property's value with <a href="#newLine">newLine</a>().
|
---|
| 450 | <h3 class=fn>int <a name="offset-prop"></a>offset</h3>
|
---|
| 451 | <p>This property holds the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas).
|
---|
| 452 | <p>The default is 0.
|
---|
| 453 |
|
---|
| 454 | <p>Set this property's value with <a href="#setOffset">setOffset</a>() and get this property's value with <a href="#offset">offset</a>().
|
---|
| 455 | <h3 class=fn>bool <a name="opaqueMoving-prop"></a>opaqueMoving</h3>
|
---|
| 456 | <p>This property holds whether the dock window will be shown normally whilst it is being moved.
|
---|
| 457 | <p>If this property is FALSE, (the default), the dock window will be
|
---|
| 458 | represented by an outline rectangle whilst it is being moved.
|
---|
| 459 | <p> <b>Warning:</b> Currently opaque moving has some problems and we do not
|
---|
| 460 | recommend using it at this time. We expect to fix these problems
|
---|
| 461 | in a future release.
|
---|
| 462 |
|
---|
| 463 | <p>Set this property's value with <a href="#setOpaqueMoving">setOpaqueMoving</a>() and get this property's value with <a href="#opaqueMoving">opaqueMoving</a>().
|
---|
| 464 | <h3 class=fn>bool <a name="resizeEnabled-prop"></a>resizeEnabled</h3>
|
---|
| 465 | <p>This property holds whether the dock window is resizeable.
|
---|
| 466 | <p>A resizeable dock window can be resized using splitter-like
|
---|
| 467 | handles inside a dock area and like every other top level window
|
---|
| 468 | when floating.
|
---|
| 469 | <p> A dock window is both horizontally and vertically stretchable if
|
---|
| 470 | you call <a href="#setResizeEnabled">setResizeEnabled</a>(TRUE).
|
---|
| 471 | <p> This property is FALSE by default.
|
---|
| 472 | <p> <p>See also <a href="#verticallyStretchable-prop">verticallyStretchable</a> and <a href="#horizontallyStretchable-prop">horizontallyStretchable</a>.
|
---|
| 473 |
|
---|
| 474 | <p>Set this property's value with <a href="#setResizeEnabled">setResizeEnabled</a>() and get this property's value with <a href="#isResizeEnabled">isResizeEnabled</a>().
|
---|
| 475 | <h3 class=fn>bool <a name="stretchable-prop"></a>stretchable</h3>
|
---|
| 476 | <p>This property holds whether the dock window is stretchable in the current <a href="#orientation">orientation</a>().
|
---|
| 477 | <p>This property can be set using <a href="#setHorizontallyStretchable">setHorizontallyStretchable</a>() and
|
---|
| 478 | <a href="#setVerticallyStretchable">setVerticallyStretchable</a>(), or with <a href="#setResizeEnabled">setResizeEnabled</a>().
|
---|
| 479 | <p> <p>See also <a href="#resizeEnabled-prop">resizeEnabled</a>.
|
---|
| 480 |
|
---|
| 481 | <p>Bugs and limitations:
|
---|
| 482 | <ul>
|
---|
| 483 | <li> Strecthability is broken. You must call setResizeEnabled(TRUE) to get
|
---|
| 484 | proper behavior and even then QDockWindow does not limit stretchablilty.
|
---|
| 485 | </ul>
|
---|
| 486 | <p>Get this property's value with <a href="#isStretchable">isStretchable</a>().
|
---|
| 487 | <h3 class=fn>bool <a name="verticallyStretchable-prop"></a>verticallyStretchable</h3>
|
---|
| 488 | <p>This property holds whether the dock window is vertically stretchable.
|
---|
| 489 | <p>A dock window is vertically stretchable if you call
|
---|
| 490 | <a href="#setVerticallyStretchable">setVerticallyStretchable</a>(TRUE) or <a href="#setResizeEnabled">setResizeEnabled</a>(TRUE).
|
---|
| 491 | <p> <p>See also <a href="#resizeEnabled-prop">resizeEnabled</a>.
|
---|
| 492 |
|
---|
| 493 | <p>Bugs and limitations:
|
---|
| 494 | <ul>
|
---|
| 495 | <li> Strecthability is broken. You must call setResizeEnabled(TRUE) to get
|
---|
| 496 | proper behavior and even then QDockWindow does not limit stretchablilty.
|
---|
| 497 | </ul>
|
---|
| 498 | <p>Set this property's value with <a href="#setVerticallyStretchable">setVerticallyStretchable</a>() and get this property's value with <a href="#isVerticallyStretchable">isVerticallyStretchable</a>().
|
---|
| 499 | <!-- eof -->
|
---|
| 500 | <hr><p>
|
---|
| 501 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
| 502 | Copyright © 1995-2007
|
---|
| 503 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
| 504 | <table width=100% cellspacing=0 border=0><tr>
|
---|
| 505 | <td>Copyright © 2007
|
---|
| 506 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
| 507 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
| 508 | </table></div></address></body>
|
---|
| 509 | </html>
|
---|