<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>TQDockWindow Class Reference</h1>
<p>The TQDockWindow class provides a widget which can be docked
inside a TQDockArea or floated as a top level window on the
<liclass=fn>int <ahref="#closeMode-prop"><b>closeMode</b></a> - the close mode of a dock window</li>
<liclass=fn>bool <ahref="#horizontallyStretchable-prop"><b>horizontallyStretchable</b></a> - whether the dock window is horizontally stretchable</li>
<liclass=fn>bool <ahref="#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>
<liclass=fn>bool <ahref="#newLine-prop"><b>newLine</b></a> - whether the dock window prefers to start a new line in the dock area</li>
<liclass=fn>int <ahref="#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>
<liclass=fn>bool <ahref="#opaqueMoving-prop"><b>opaqueMoving</b></a> - whether the dock window will be shown normally whilst it is being moved</li>
<liclass=fn>bool <ahref="#resizeEnabled-prop"><b>resizeEnabled</b></a> - whether the dock window is resizeable</li>
<liclass=fn>bool <ahref="#stretchable-prop"><b>stretchable</b></a> - whether the dock window is stretchable in the current orientation() <em>(read only)</em></li>
<liclass=fn>bool <ahref="#verticallyStretchable-prop"><b>verticallyStretchable</b></a> - whether the dock window is vertically stretchable</li>
The TQDockWindow class provides a widget which can be docked
inside a <ahref="qdockarea.html">TQDockArea</a> or floated as a top level window on the
desktop.
<p>
<p> This class handles moving, resizing, docking and undocking dock
windows. <ahref="qtoolbar.html">TQToolBar</a> is a subclass of TQDockWindow so the
functionality provided for dock windows is available with the same
API for toolbars.
<p><center><imgsrc="qmainwindow-qdockareas.png"alt="TQDockWindows in a TQDockArea"></center><blockquote><palign="center"><em> Two TQDockWindows (<ahref="qtoolbar.html">TQToolBar</a>s) in a <ahref="qdockarea.html">TQDockArea</a>
</em></p>
</blockquote><p><center><imgsrc="qdockwindow.png"alt="A TQDockWindow"></center><blockquote><palign="center"><em> A Floating TQDockWindow
</em></p>
</blockquote><p> If the user drags the dock window into the dock area the dock
window will be docked. If the user drags the dock area outside any
dock areas the dock window will be undocked (floated) and will
become a top level window. Double clicking a floating dock
window's titlebar will dock the dock window to the last dock area
it was docked in. Double clicking a docked dock window's handle
will undock (float) the dock window.
If the user clicks the close button (which does not appear on
dock windows by default - see <ahref="#closeMode-prop">closeMode</a>) the dock window will
disappear. You can control whether or not a dock window has a
close button with <ahref="#setCloseMode">setCloseMode</a>().
<p><ahref="qmainwindow.html">TQMainWindow</a> provides four dock areas (top, left, right and bottom)
which can be used by dock windows. For many applications using the
dock areas provided by TQMainWindow is sufficient. (See the <ahref="qdockarea.html">TQDockArea</a> documentation if you want to create your own dock
areas.) In TQMainWindow a right-click popup menu (the dock window
menu) is available which lists dock windows and can be used to
show or hide them. (The popup menu only lists dock windows that
have a <ahref="qwidget.html#setCaption">caption</a>.)
<p> When you construct a dock window you <em>must</em> pass it a <ahref="qdockarea.html">TQDockArea</a>
or a TQMainWindow as its parent if you want it docked. Pass 0 for
the parent if you want it floated.
<p><pre>
<ahref="qtoolbar.html">TQToolBar</a> *fileTools = new <ahref="qtoolbar.html">TQToolBar</a>( this, "File Actions" );
moveDockWindow( fileTools, Left );
</pre>
<p> In the example above we create a new <ahref="qtoolbar.html">TQToolBar</a> in the constructor
of a <ahref="qmainwindow.html">TQMainWindow</a> subclass (so that the <em>this</em> pointer points to
the TQMainWindow). By default the toolbar will be added to the <ahref="qt.html#Dock-enum">Top</a> dock area, but we've moved it to the <ahref="qt.html#Dock-enum">Left</a> dock area.
<p> A dock window is often used to contain a single widget. In these
cases the widget can be set by calling <ahref="#setWidget">setWidget</a>(). If you're
constructing a dock window that contains multiple widgets, e.g. a
toolbar, arrange the widgets within a box layout inside the dock
window. To do this use the <ahref="#boxLayout">boxLayout</a>() function to get a pointer
to the dock window's box layout, then add widgets to the layout
using the box layout's <ahref="qboxlayout.html#addWidget">TQBoxLayout::addWidget</a>() function. The dock
window will dynamically set the orientation of the layout to be
vertical or horizontal as necessary, although you can control this
yourself with <ahref="#setOrientation">setOrientation</a>().
<p> Although a common use of dock windows is for toolbars, they can be
used with any widgets. (See the <ahref="designer-manual.html">TQt
Designer</a> and <ahref="linguist-manual.html">TQt
Linguist</a> applications, for example.) When using larger
widgets it may make sense for the dock window to be resizable by
calling <ahref="#setResizeEnabled">setResizeEnabled</a>(). Resizable dock windows are given
splitter-like handles to allow the user to resize them within
their dock area. When resizable dock windows are undocked they
become top level windows and can be resized like any other top
level windows, e.g. by dragging a corner or edge.
<p> Dock windows can be docked and undocked using <ahref="#dock">dock</a>() and <ahref="#undock">undock</a>().
A dock window's orientation can be set with setOrientation(). You
can also use <ahref="qdockarea.html#moveDockWindow">TQDockArea::moveDockWindow</a>(). If you're using a
<ahref="qmainwindow.html">TQMainWindow</a>, <ahref="qmainwindow.html#moveDockWindow">TQMainWindow::moveDockWindow</a>() and
<ahref="qmainwindow.html#removeDockWindow">TQMainWindow::removeDockWindow</a>() are available.
<p> A dock window can have some preferred settings, for example, you
can set a preferred offset from the left edge (or top edge for
vertical dock areas) of the dock area using <ahref="#setOffset">setOffset</a>(). If you'd
prefer a dock window to start on a new <ahref="qdockarea.html#lines">line</a> when it is docked use <ahref="#setNewLine">setNewLine</a>(). The
<ahref="#setFixedExtentWidth">setFixedExtentWidth</a>() and <ahref="#setFixedExtentHeight">setFixedExtentHeight</a>() functions can be
used to define the dock window's preferred size, and the
<ahref="#setHorizontallyStretchable">setHorizontallyStretchable</a>() and <ahref="#setVerticallyStretchable">setVerticallyStretchable</a>()
functions set whether the dock window can be stretched or not.
Dock windows can be moved by default, but this can be changed with
<ahref="#setMovingEnabled">setMovingEnabled</a>(). When a dock window is moved it is shown as a
rectangular outline, but it can be shown normally using
<ahref="#setOpaqueMoving">setOpaqueMoving</a>().
<p> When a dock window's visibility changes, i.e. it is shown or
hidden, the <ahref="#visibilityChanged">visibilityChanged</a>() signal is emitted. When a dock
window is docked, undocked or moved inside the dock area the
<ahref="#placeChanged">placeChanged</a>() signal is emitted.
<p>See also <ahref="application.html">Main Window and Related Classes</a>.
Constructs a TQDockWindow with parent <em>parent</em>, called <em>name</em> and
with widget flags <em>f</em>.
<p> If <em>p</em> is <ahref="#Place-enum">InDock</a>, the dock window is docked into a dock area
and <em>parent</em><em>must</em> be a <ahref="qdockarea.html">TQDockArea</a> or a <ahref="qmainwindow.html">TQMainWindow</a>. If the <em>parent</em> is a TQMainWindow the dock window will be docked in the main
window's <ahref="qt.html#Dock-enum">Top</a> dock area.
<p> If <em>p</em> is <ahref="#Place-enum">OutsideDock</a>, the dock window is created as a floating
window.
<p> We recommend creating the dock area <ahref="#Place-enum">InDock</a> with a TQMainWindow
as parent then calling <ahref="qmainwindow.html#moveDockWindow">TQMainWindow::moveDockWindow</a>() to move the
Docks the dock window into the last dock area in which it was
docked.
<p> If the dock window has no last dock area (e.g. it was created as a
floating window and has never been docked), or if the last dock
area it was docked in does not exist (e.g. the dock area has been
deleted), nothing happens.
<p> The dock window will dock with the dock area regardless of the return value
of <ahref="qdockarea.html#isDockWindowAccepted">TQDockArea::isDockWindowAccepted</a>().
<p><p>See also <ahref="#undock">undock</a>(), <ahref="qdockarea.html#moveDockWindow">TQDockArea::moveDockWindow</a>(), <ahref="qdockarea.html#removeDockWindow">TQDockArea::removeDockWindow</a>(), <ahref="qmainwindow.html#moveDockWindow">TQMainWindow::moveDockWindow</a>(), <ahref="qmainwindow.html#removeDockWindow">TQMainWindow::removeDockWindow</a>(), and <ahref="qdockarea.html#isDockWindowAccepted">TQDockArea::isDockWindowAccepted</a>().
</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.
See the <ahref="qdockwindow.html#movingEnabled-prop">"movingEnabled"</a> property for details.
<p> This function returns where the dock window is placed. This is
either <ahref="#Place-enum">InDock</a> or <ahref="#Place-enum">OutsideDock</a>.
<p><p>See also <ahref="qdockarea.html#moveDockWindow">TQDockArea::moveDockWindow</a>(), <ahref="qdockarea.html#removeDockWindow">TQDockArea::removeDockWindow</a>(), <ahref="qmainwindow.html#moveDockWindow">TQMainWindow::moveDockWindow</a>(), and <ahref="qmainwindow.html#removeDockWindow">TQMainWindow::removeDockWindow</a>().
<p> This signal is emitted when the dock window is docked (<em>p</em> is <ahref="#Place-enum">InDock</a>), undocked (<em>p</em> is <ahref="#Place-enum">OutsideDock</a>) or moved inside the
the dock area.
<p><p>See also <ahref="qdockarea.html#moveDockWindow">TQDockArea::moveDockWindow</a>(), <ahref="qdockarea.html#removeDockWindow">TQDockArea::removeDockWindow</a>(), <ahref="qmainwindow.html#moveDockWindow">TQMainWindow::moveDockWindow</a>(), and <ahref="qmainwindow.html#removeDockWindow">TQMainWindow::removeDockWindow</a>().
</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>.
See the <ahref="qdockwindow.html#movingEnabled-prop">"movingEnabled"</a> property for details.
<p> Undocks the TQDockWindow from its current dock area if it is
docked; otherwise does nothing.
<p><p>See also <ahref="#dock">dock</a>(), <ahref="qdockarea.html#moveDockWindow">TQDockArea::moveDockWindow</a>(), <ahref="qdockarea.html#removeDockWindow">TQDockArea::removeDockWindow</a>(), <ahref="qmainwindow.html#moveDockWindow">TQMainWindow::moveDockWindow</a>(), and <ahref="qmainwindow.html#removeDockWindow">TQMainWindow::removeDockWindow</a>().
<p>This property holds the close mode of a dock window.
<p>Defines when (if ever) the dock window has a close button. The
choices are <ahref="#CloseMode-enum">Never</a>, <ahref="#CloseMode-enum">Docked</a> (i.e. only when docked), <ahref="#CloseMode-enum">Undocked</a> (only when undocked, i.e. floated) or <ahref="#CloseMode-enum">Always</a>.
<p> The default is <ahref="#CloseMode-enum">Never</a>.
<p>Set this property's value with <ahref="#setCloseMode">setCloseMode</a>() and get this property's value with <ahref="#closeMode">closeMode</a>().
<p>This property holds whether the dock window is horizontally stretchable.
<p>A dock window is horizontally stretchable if you call
<ahref="#setHorizontallyStretchable">setHorizontallyStretchable</a>(TRUE) or <ahref="#setResizeEnabled">setResizeEnabled</a>(TRUE).
<p><p>See also <ahref="#resizeEnabled-prop">resizeEnabled</a>.
<p>Bugs and limitations:
<ul>
<li> Strecthability is broken. You must call setResizeEnabled(TRUE) to get
proper behavior and even then TQDockWindow does not limit stretchablilty.
</ul>
<p>Set this property's value with <ahref="#setHorizontallyStretchable">setHorizontallyStretchable</a>() and get this property's value with <ahref="#isHorizontallyStretchable">isHorizontallyStretchable</a>().
<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.
<p>This property is TRUE by default.
<p>Set this property's value with <ahref="#setMovingEnabled">setMovingEnabled</a>() and get this property's value with <ahref="#isMovingEnabled">isMovingEnabled</a>().
<p>This property holds whether the dock window will be shown normally whilst it is being moved.
<p>If this property is FALSE, (the default), the dock window will be
represented by an outline rectangle whilst it is being moved.
<p><b>Warning:</b> Currently opaque moving has some problems and we do not
recommend using it at this time. We expect to fix these problems
in a future release.
<p>Set this property's value with <ahref="#setOpaqueMoving">setOpaqueMoving</a>() and get this property's value with <ahref="#opaqueMoving">opaqueMoving</a>().
<p>This property holds whether the dock window is resizeable.
<p>A resizeable dock window can be resized using splitter-like
handles inside a dock area and like every other top level window
when floating.
<p> A dock window is both horizontally and vertically stretchable if
you call <ahref="#setResizeEnabled">setResizeEnabled</a>(TRUE).
<p> This property is FALSE by default.
<p><p>See also <ahref="#verticallyStretchable-prop">verticallyStretchable</a> and <ahref="#horizontallyStretchable-prop">horizontallyStretchable</a>.
<p>Set this property's value with <ahref="#setResizeEnabled">setResizeEnabled</a>() and get this property's value with <ahref="#isResizeEnabled">isResizeEnabled</a>().
<p>This property holds whether the dock window is vertically stretchable.
<p>A dock window is vertically stretchable if you call
<ahref="#setVerticallyStretchable">setVerticallyStretchable</a>(TRUE) or <ahref="#setResizeEnabled">setResizeEnabled</a>(TRUE).
<p><p>See also <ahref="#resizeEnabled-prop">resizeEnabled</a>.
<p>Bugs and limitations:
<ul>
<li> Strecthability is broken. You must call setResizeEnabled(TRUE) to get
proper behavior and even then TQDockWindow does not limit stretchablilty.
</ul>
<p>Set this property's value with <ahref="#setVerticallyStretchable">setVerticallyStretchable</a>() and get this property's value with <ahref="#isVerticallyStretchable">isVerticallyStretchable</a>().
<!-- eof -->
<hr><p>
This file is part of the <ahref="index.html">TQt toolkit</a>.