Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 3963

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qdockwidget.cpp -->
<head>
  <title>Qt 4.6: QDockWidget Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//QDockWidget"></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">QDockWidget Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
</h1>
<p>The QDockWidget class provides a widget that can be docked inside a <a href="qmainwindow.html">QMainWindow</a> or floated as a top-level window on the desktop. <a href="#details">More...</a></p>
<pre> #include &lt;QDockWidget&gt;</pre><p>Inherits <a href="qwidget.html">QWidget</a>.</p>
<ul>
<li><a href="qdockwidget-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFeature</a></b> { DockWidgetClosable, DockWidgetMovable, DockWidgetFloatable, DockWidgetVerticalTitleBar, AllDockWidgetFeatures, NoDockWidgetFeatures }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">flags </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFeatures</a></b></td></tr>
</table>
<hr />
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li><div class="fn"><b><a href="qdockwidget.html#allowedAreas-prop">allowedAreas</a></b> : Qt::DockWidgetAreas</div></li>
<li><div class="fn"><b><a href="qdockwidget.html#features-prop">features</a></b> : DockWidgetFeatures</div></li>
<li><div class="fn"><b><a href="qdockwidget.html#floating-prop">floating</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qdockwidget.html#windowTitle-prop">windowTitle</a></b> : QString</div></li>
</ul>
<ul>
<li><div bar="2" class="fn"></div>58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#QDockWidget">QDockWidget</a></b> ( const QString &amp; <i>title</i>, QWidget * <i>parent</i> = 0, Qt::WindowFlags <i>flags</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#QDockWidget-2">QDockWidget</a></b> ( QWidget * <i>parent</i> = 0, Qt::WindowFlags <i>flags</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#dtor.QDockWidget">~QDockWidget</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::DockWidgetAreas </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#allowedAreas-prop">allowedAreas</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">DockWidgetFeatures </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#features-prop">features</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#isAreaAllowed">isAreaAllowed</a></b> ( Qt::DockWidgetArea <i>area</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#floating-prop">isFloating</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#allowedAreas-prop">setAllowedAreas</a></b> ( Qt::DockWidgetAreas <i>areas</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#features-prop">setFeatures</a></b> ( DockWidgetFeatures <i>features</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#floating-prop">setFloating</a></b> ( bool <i>floating</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#setTitleBarWidget">setTitleBarWidget</a></b> ( QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#setWidget">setWidget</a></b> ( QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#titleBarWidget">titleBarWidget</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAction * </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#toggleViewAction">toggleViewAction</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#widget">widget</a></b> () const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>217 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<hr />
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#allowedAreasChanged">allowedAreasChanged</a></b> ( Qt::DockWidgetAreas <i>allowedAreas</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#dockLocationChanged">dockLocationChanged</a></b> ( Qt::DockWidgetArea <i>area</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#featuresChanged">featuresChanged</a></b> ( QDockWidget::DockWidgetFeatures <i>features</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#topLevelChanged">topLevelChanged</a></b> ( bool <i>topLevel</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#visibilityChanged">visibilityChanged</a></b> ( bool <i>visible</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<hr />
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#initStyleOption">initStyleOption</a></b> ( QStyleOptionDockWidget * <i>option</i> ) const</td></tr>
</table>
<hr />
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#changeEvent">changeEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#closeEvent">closeEvent</a></b> ( QCloseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>event</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li><div class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li><div class="fn"></div>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"></div>1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QDockWidget class provides a widget that can be docked inside a <a href="qmainwindow.html">QMainWindow</a> or floated as a top-level window on the desktop.</p>
<p>QDockWidget provides the concept of dock widgets, also know as tool palettes or utility windows. Dock windows are secondary windows placed in the <i>dock widget area</i> around the <a href="qmainwindow.html#centralWidget">central widget</a> in a <a href="qmainwindow.html">QMainWindow</a>.</p>
<p align="center"><img src="images/mainwindow-docks.png" /></p><p>Dock windows can be moved inside their current area, moved into new areas and floated (e.g&#x2e;, undocked) by the end-user. The QDockWidget API allows the programmer to restrict the dock widgets ability to move, float and close, as well as the areas in which they can be placed.</p>
<a name="appearance"></a>
<h3>Appearance</h3>
<p>A QDockWidget consists of a title bar and the content area. The title bar displays the dock widgets <a href="qwidget.html#windowTitle-prop">window title</a>, a <i>float</i> button and a <i>close</i> button. Depending on the state of the QDockWidget, the <i>float</i> and <i>close</i> buttons may be either disabled or not shown at all.</p>
<p>The visual appearance of the title bar and buttons is dependent on the <a href="qstyle.html">style</a> in use.</p>
<p>A QDockWidget acts as a wrapper for its child widget, set with <a href="qdockwidget.html#setWidget">setWidget</a>(). Custom size hints, minimum and maximum sizes and size policies should be implemented in the child widget. QDockWidget will respect them, adjusting its own constraints to include the frame and title. Size constraints should not be set on the QDockWidget itself, because they change depending on whether it is docked; a docked QDockWidget has no frame and a smaller title bar.</p>
<p>See also <a href="qmainwindow.html">QMainWindow</a> and <a href="mainwindows-dockwidgets.html">Dock Widgets Example</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<a name="//apple_ref/cpp/tag/QDockWidget/DockWidgetFeature"></a>
<a name="//apple_ref/cpp/econst/QDockWidget/DockWidgetClosable"></a>
<a name="//apple_ref/cpp/econst/QDockWidget/DockWidgetMovable"></a>
<a name="//apple_ref/cpp/econst/QDockWidget/DockWidgetFloatable"></a>
<a name="//apple_ref/cpp/econst/QDockWidget/DockWidgetVerticalTitleBar"></a>
<a name="//apple_ref/cpp/econst/QDockWidget/AllDockWidgetFeatures"></a>
<a name="//apple_ref/cpp/econst/QDockWidget/NoDockWidgetFeatures"></a>
<a name="//apple_ref/cpp/econst/QDockWidget/DockWidgetFeatureMask"></a>
<a name="//apple_ref/cpp/econst/QDockWidget/Reserved"></a>
<a name="//apple_ref/cpp/tdef/QDockWidget/DockWidgetFeatures"></a>
<h3 class="flags"><a name="DockWidgetFeature-enum"></a>enum QDockWidget::DockWidgetFeature<br />flags QDockWidget::DockWidgetFeatures</h3>
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QDockWidget::DockWidgetClosable</tt></td><td align="center" valign="top"><tt>0x01</tt></td><td valign="top">The dock widget can be closed. On some systems the dock widget always has a close button when it's floating (for example on MacOS 10.5).</td></tr>
<tr><td valign="top"><tt>QDockWidget::DockWidgetMovable</tt></td><td align="center" valign="top"><tt>0x02</tt></td><td valign="top">The dock widget can be moved between docks by the user.</td></tr>
<tr><td valign="top"><tt>QDockWidget::DockWidgetFloatable</tt></td><td align="center" valign="top"><tt>0x04</tt></td><td valign="top">The dock widget can be detached from the main window, and floated as an independent window.</td></tr>
<tr><td valign="top"><tt>QDockWidget::DockWidgetVerticalTitleBar</tt></td><td align="center" valign="top"><tt>0x08</tt></td><td valign="top">The dock widget displays a vertical title bar on its left side. This can be used to increase the amount of vertical space in a <a href="qmainwindow.html">QMainWindow</a>.</td></tr>
<tr><td valign="top"><tt>QDockWidget::AllDockWidgetFeatures</tt></td><td align="center" valign="top"><tt>DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable</tt></td><td valign="top">(Deprecated) The dock widget can be closed, moved, and floated. Since new features might be added in future releases, the look and behavior of dock widgets might change if you use this flag. Please specify individual flags instead.</td></tr>
<tr><td valign="top"><tt>QDockWidget::NoDockWidgetFeatures</tt></td><td align="center" valign="top"><tt>0x00</tt></td><td valign="top">The dock widget cannot be closed, moved, or floated.</td></tr>
</table></p>
<p>The DockWidgetFeatures type is a typedef for <a href="qflags.html">QFlags</a>&lt;DockWidgetFeature&gt;. It stores an OR combination of DockWidgetFeature values.</p>
<hr />
<h2>Property Documentation</h2>
<a name="//apple_ref/cpp/instm/QDockWidget/allowedAreas"></a>
<a name="//apple_ref/cpp/instm/QDockWidget/setAllowedAreas"></a>
<a name="//apple_ref/cpp/instm/QDockWidget/allowedAreasChanged"></a>
<h3 class="fn"><a name="allowedAreas-prop"></a>allowedAreas : <a href="qt.html#DockWidgetArea-enum">Qt::DockWidgetAreas</a></h3>
<p>This property holds areas where the dock widget may be placed.</p>
<p>The default is <a href="qt.html#DockWidgetArea-enum">Qt::AllDockWidgetAreas</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Qt::DockWidgetAreas </td><td class="memItemRight" valign="bottom"><b>allowedAreas</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setAllowedAreas</b> ( Qt::DockWidgetAreas <i>areas</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#allowedAreasChanged">allowedAreasChanged</a></b> ( Qt::DockWidgetAreas <i>allowedAreas</i> )</td></tr>
</table>
<p>See also <a href="qt.html#DockWidgetArea-enum">Qt::DockWidgetArea</a>.</p>
<a name="//apple_ref/cpp/instm/QDockWidget/features"></a>
<a name="//apple_ref/cpp/instm/QDockWidget/setFeatures"></a>
<a name="//apple_ref/cpp/instm/QDockWidget/featuresChanged"></a>
<h3 class="fn"><a name="features-prop"></a>features : <a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFeatures</a></h3>
<p>This property holds whether the dock widget is movable, closable, and floatable.</p>
<p>By default, this property is set to a combination of <a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetClosable</a>, <a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetMovable</a> and <a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFloatable</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">DockWidgetFeatures </td><td class="memItemRight" valign="bottom"><b>features</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFeatures</b> ( DockWidgetFeatures <i>features</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdockwidget.html#featuresChanged">featuresChanged</a></b> ( QDockWidget::DockWidgetFeatures <i>features</i> )</td></tr>
</table>
<p>See also <a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFeature</a>.</p>
<a name="//apple_ref/cpp/instm/QDockWidget/isFloating"></a>
<a name="//apple_ref/cpp/instm/QDockWidget/setFloating"></a>
<h3 class="fn"><a name="floating-prop"></a>floating : bool</h3>
<p>This property holds whether the dock widget is floating.</p>
<p>A floating dock widget is presented to the user as an independent window &quot;on top&quot; of its parent <a href="qmainwindow.html">QMainWindow</a>, instead of being docked in the <a href="qmainwindow.html">QMainWindow</a>.</p>
<p>By default, this property is true.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isFloating</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFloating</b> ( bool <i>floating</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#isWindow">isWindow</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/windowTitle"></a>
<a name="//apple_ref/cpp/instm/QWidget/setWindowTitle"></a>
<h3 class="fn"><a name="windowTitle-prop"></a>windowTitle : <a href="qstring.html">QString</a></h3>
<p>This property holds the dock widget title (caption).</p>
<p>By default, this property contains an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowTitle-prop">windowTitle</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowTitle-prop">setWindowTitle</a></b> ( const QString &amp; )</td></tr>
</table>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/QDockWidget/QDockWidget"></a>
<h3 class="fn"><a name="QDockWidget"></a>QDockWidget::QDockWidget ( const <a href="qstring.html">QString</a> &amp; <i>title</i>, <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0, <a href="qt.html#WindowType-enum">Qt::WindowFlags</a> <i>flags</i> = 0 )</h3>
<p>Constructs a <a href="qdockwidget.html">QDockWidget</a> with parent <i>parent</i> and window flags <i>flags</i>. The dock widget will be placed in the left dock widget area.</p>
<p>The window title is set to <i>title</i>. This title is used when the <a href="qdockwidget.html">QDockWidget</a> is docked and undocked. It is also used in the context menu provided by <a href="qmainwindow.html">QMainWindow</a>.</p>
<p>See also <a href="qwidget.html#windowTitle-prop">setWindowTitle</a>().</p>
<h3 class="fn"><a name="QDockWidget-2"></a>QDockWidget::QDockWidget ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0, <a href="qt.html#WindowType-enum">Qt::WindowFlags</a> <i>flags</i> = 0 )</h3>
<p>Constructs a <a href="qdockwidget.html">QDockWidget</a> with parent <i>parent</i> and window flags <i>flags</i>. The dock widget will be placed in the left dock widget area.</p>
<a name="//apple_ref/cpp/instm/QDockWidget/~QDockWidget"></a>
<h3 class="fn"><a name="dtor.QDockWidget"></a>QDockWidget::~QDockWidget ()</h3>
<p>Destroys the dock widget.</p>
<a name="//apple_ref/cpp/instm/QDockWidget/allowedAreasChanged"></a>
<h3 class="fn"><a name="allowedAreasChanged"></a>void QDockWidget::allowedAreasChanged ( <a href="qt.html#DockWidgetArea-enum">Qt::DockWidgetAreas</a> <i>allowedAreas</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the <a href="qdockwidget.html#allowedAreas-prop">allowedAreas</a> property changes. The <i>allowedAreas</i> parameter gives the new value of the property.</p>
<a name="//apple_ref/cpp/instm/QDockWidget/changeEvent"></a>
<h3 class="fn"><a name="changeEvent"></a>void QDockWidget::changeEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QDockWidget/closeEvent"></a>
<h3 class="fn"><a name="closeEvent"></a>void QDockWidget::closeEvent ( <a href="qcloseevent.html">QCloseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#closeEvent">QWidget::closeEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QDockWidget/dockLocationChanged"></a>
<h3 class="fn"><a name="dockLocationChanged"></a>void QDockWidget::dockLocationChanged ( <a href="qt.html#DockWidgetArea-enum">Qt::DockWidgetArea</a> <i>area</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the dock widget is moved to another dock <i>area</i>, or is moved to a different location in its current dock area. This happens when the dock widget is moved programmatically or is dragged to a new location by the user.</p>
<p>This function was introduced in Qt 4.3.</p>
<a name="//apple_ref/cpp/instm/QDockWidget/event"></a>
<h3 class="fn"><a name="event"></a>bool QDockWidget::event ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<a name="//apple_ref/cpp/instm/QDockWidget/featuresChanged"></a>
<h3 class="fn"><a name="featuresChanged"></a>void QDockWidget::featuresChanged ( <a href="qdockwidget.html#DockWidgetFeature-enum">QDockWidget::DockWidgetFeatures</a> <i>features</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the <a href="qdockwidget.html#features-prop">features</a> property changes. The <i>features</i> parameter gives the new value of the property.</p>
<a name="//apple_ref/cpp/instm/QDockWidget/initStyleOption"></a>
<h3 class="fn"><a name="initStyleOption"></a>void QDockWidget::initStyleOption ( <a href="qstyleoptiondockwidget.html">QStyleOptionDockWidget</a> * <i>option</i> ) const&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Initialize <i>option</i> with the values from this <a href="qdockwidget.html">QDockWidget</a>. This method is useful for subclasses when they need a <a href="qstyleoptiondockwidget.html">QStyleOptionDockWidget</a>, but don't want to fill in all the information themselves.</p>
<p>See also <a href="qstyleoption.html#initFrom">QStyleOption::initFrom</a>().</p>
<a name="//apple_ref/cpp/instm/QDockWidget/isAreaAllowed"></a>
<h3 class="fn"><a name="isAreaAllowed"></a>bool QDockWidget::isAreaAllowed ( <a href="qt.html#DockWidgetArea-enum">Qt::DockWidgetArea</a> <i>area</i> ) const</h3>
<p>Returns true if this dock widget can be placed in the given <i>area</i>; otherwise returns false.</p>
<a name="//apple_ref/cpp/instm/QDockWidget/paintEvent"></a>
<h3 class="fn"><a name="paintEvent"></a>void QDockWidget::paintEvent ( <a href="qpaintevent.html">QPaintEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QDockWidget/setTitleBarWidget"></a>
<h3 class="fn"><a name="setTitleBarWidget"></a>void QDockWidget::setTitleBarWidget ( <a href="qwidget.html">QWidget</a> * <i>widget</i> )</h3>
<p>Sets an arbitrary <i>widget</i> as the dock widget's title bar. If <i>widget</i> is 0, the title bar widget is removed, but not deleted.</p>
<p>If a title bar widget is set, <a href="qdockwidget.html">QDockWidget</a> will not use native window decorations when it is floated.</p>
<p>Here are some tips for implementing custom title bars:</p>
<ul>
<li>Mouse events that are not explicitly handled by the title bar widget must be ignored by calling <a href="qevent.html#ignore">QMouseEvent::ignore</a>(). These events then propagate to the <a href="qdockwidget.html">QDockWidget</a> parent, which handles them in the usual manner, moving when the title bar is dragged, docking and undocking when it is double-clicked, etc.</li>
<li>When <a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetVerticalTitleBar</a> is set on <a href="qdockwidget.html">QDockWidget</a>, the title bar widget is repositioned accordingly. In <a href="qwidget.html#resizeEvent">resizeEvent</a>(), the title bar should check what orientation it should assume:<pre> QDockWidget *dockWidget = qobject_cast&lt;QDockWidget*&gt;(parentWidget());
 if (dockWidget-&gt;features() &amp; QDockWidget::DockWidgetVerticalTitleBar) {
     <span class="comment">// I need to be vertical</span>
 } else {
     <span class="comment">// I need to be horizontal</span>
 }</pre>
</li>
<li>The title bar widget must have a valid <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>() and <a href="qwidget.html#minimumSizeHint-prop">QWidget::minimumSizeHint</a>(). These functions should take into account the current orientation of the title bar.</li>
</ul>
<p>Using qobject_cast as shown above, the title bar widget has full access to its parent <a href="qdockwidget.html">QDockWidget</a>. Hence it can perform such operations as docking and hiding in response to user actions.</p>
<p>This function was introduced in Qt 4.3.</p>
<p>See also <a href="qdockwidget.html#titleBarWidget">titleBarWidget</a>() and <a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetVerticalTitleBar</a>.</p>
<a name="//apple_ref/cpp/instm/QDockWidget/setWidget"></a>
<h3 class="fn"><a name="setWidget"></a>void QDockWidget::setWidget ( <a href="qwidget.html">QWidget</a> * <i>widget</i> )</h3>
<p>Sets the widget for the dock widget to <i>widget</i>.</p>
<p>If the dock widget is visible when <i>widget</i> is added, you must <a href="qwidget.html#show">show()</a> it explicitly.</p>
<p>Note that you must add the layout of the <i>widget</i> before you call this function; if not, the <i>widget</i> will not be visible.</p>
<p>See also <a href="qdockwidget.html#widget">widget</a>().</p>
<a name="//apple_ref/cpp/instm/QDockWidget/titleBarWidget"></a>
<h3 class="fn"><a name="titleBarWidget"></a><a href="qwidget.html">QWidget</a> * QDockWidget::titleBarWidget () const</h3>
<p>Returns the custom title bar widget set on the <a href="qdockwidget.html">QDockWidget</a>, or 0 if no custom title bar has been set.</p>
<p>This function was introduced in Qt 4.3.</p>
<p>See also <a href="qdockwidget.html#setTitleBarWidget">setTitleBarWidget</a>().</p>
<a name="//apple_ref/cpp/instm/QDockWidget/toggleViewAction"></a>
<h3 class="fn"><a name="toggleViewAction"></a><a href="qaction.html">QAction</a> * QDockWidget::toggleViewAction () const</h3>
<p>Returns a checkable action that can be used to show or close this dock widget.</p>
<p>The action's text is set to the dock widget's window title.</p>
<p>See also <a href="qaction.html#text-prop">QAction::text</a> and <a href="qwidget.html#windowTitle-prop">QWidget::windowTitle</a>.</p>
<a name="//apple_ref/cpp/instm/QDockWidget/topLevelChanged"></a>
<h3 class="fn"><a name="topLevelChanged"></a>void QDockWidget::topLevelChanged ( bool <i>topLevel</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the <a href="qdockwidget.html#floating-prop">floating</a> property changes. The <i>topLevel</i> parameter is true if the dock widget is now floating; otherwise it is false.</p>
<p>See also <a href="qwidget.html#isWindow">isWindow</a>().</p>
<a name="//apple_ref/cpp/instm/QDockWidget/visibilityChanged"></a>
<h3 class="fn"><a name="visibilityChanged"></a>void QDockWidget::visibilityChanged ( bool <i>visible</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the dock widget becomes <i>visible</i> (or invisible). This happens when the widget is hidden or shown, as well as when it is docked in a tabbed dock area and its tab becomes selected or unselected.</p>
<p>This function was introduced in Qt 4.3.</p>
<a name="//apple_ref/cpp/instm/QDockWidget/widget"></a>
<h3 class="fn"><a name="widget"></a><a href="qwidget.html">QWidget</a> * QDockWidget::widget () const</h3>
<p>Returns the widget for the dock widget. This function returns zero if the widget has not been set.</p>
<p>See also <a href="qdockwidget.html#setWidget">setWidget</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>