Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 5187

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdockwidget.cpp -->
  <title>Qt 4.8: QDockWidget Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QDockWidget</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#appearance">Appearance</a></li>
</ul>
</div>
<h1 class="title">QDockWidget Class Reference</h1>
<!-- $$$QDockWidget-brief -->
<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>
<!-- @@@QDockWidget -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QDockWidget&gt;</span></pre><p><b>Inherits: </b><a href="qwidget.html">QWidget</a>.</p>
<ul>
<li><a href="qdockwidget-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFeature</a></b> { DockWidgetClosable, DockWidgetMovable, DockWidgetFloatable, DockWidgetVerticalTitleBar, AllDockWidgetFeatures, NoDockWidgetFeatures }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFeatures</a></b></td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qdockwidget.html#allowedAreas-prop">allowedAreas</a></b> : Qt::DockWidgetAreas</li>
<li class="fn"><b><a href="qdockwidget.html#features-prop">features</a></b> : DockWidgetFeatures</li>
<li class="fn"><b><a href="qdockwidget.html#floating-prop">floating</a></b> : bool</li>
<li class="fn"><b><a href="qdockwidget.html#windowTitle-prop">windowTitle</a></b> : QString</li>
</ul>
<ul>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#dtor.QDockWidget">~QDockWidget</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::DockWidgetAreas </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#allowedAreas-prop">allowedAreas</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> DockWidgetFeatures </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#features-prop">features</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#isAreaAllowed">isAreaAllowed</a></b> ( Qt::DockWidgetArea <i>area</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#floating-prop">isFloating</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#allowedAreas-prop">setAllowedAreas</a></b> ( Qt::DockWidgetAreas <i>areas</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#features-prop">setFeatures</a></b> ( DockWidgetFeatures <i>features</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#floating-prop">setFloating</a></b> ( bool <i>floating</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#setTitleBarWidget">setTitleBarWidget</a></b> ( QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#setWidget">setWidget</a></b> ( QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#titleBarWidget">titleBarWidget</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction * </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#toggleViewAction">toggleViewAction</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#widget">widget</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#allowedAreasChanged">allowedAreasChanged</a></b> ( Qt::DockWidgetAreas <i>allowedAreas</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#dockLocationChanged">dockLocationChanged</a></b> ( Qt::DockWidgetArea <i>area</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#featuresChanged">featuresChanged</a></b> ( QDockWidget::DockWidgetFeatures <i>features</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#topLevelChanged">topLevelChanged</a></b> ( bool <i>topLevel</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#visibilityChanged">visibilityChanged</a></b> ( bool <i>visible</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#initStyleOption">initStyleOption</a></b> ( QStyleOptionDockWidget * <i>option</i> ) const</td></tr>
</table>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#changeEvent">changeEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#closeEvent">closeEvent</a></b> ( QCloseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>event</i> )</td></tr>
</table>
<ul>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QDockWidget-description -->
<div class="descr">
<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 class="centerAlign"><img src="images/mainwindow-docks.png" alt="" /></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>
</div>
<p><b>See also </b><a href="qmainwindow.html">QMainWindow</a> and <a href="mainwindows-dockwidgets.html">Dock Widgets Example</a>.</p>
<!-- @@@QDockWidget -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$DockWidgetFeature$$$DockWidgetClosable$$$DockWidgetMovable$$$DockWidgetFloatable$$$DockWidgetVerticalTitleBar$$$DockWidgetFeatureMask$$$AllDockWidgetFeatures$$$NoDockWidgetFeatures$$$Reserved -->
<h3 class="flags"><a name="DockWidgetFeature-enum"></a>enum QDockWidget::<span class="name">DockWidgetFeature</span><br/>flags QDockWidget::<span class="name">DockWidgetFeatures</span></h3>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QDockWidget::DockWidgetClosable</tt></td><td class="topAlign"><tt>0x01</tt></td><td class="topAlign">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 class="topAlign"><tt>QDockWidget::DockWidgetMovable</tt></td><td class="topAlign"><tt>0x02</tt></td><td class="topAlign">The dock widget can be moved between docks by the user.</td></tr>
<tr><td class="topAlign"><tt>QDockWidget::DockWidgetFloatable</tt></td><td class="topAlign"><tt>0x04</tt></td><td class="topAlign">The dock widget can be detached from the main window, and floated as an independent window.</td></tr>
<tr><td class="topAlign"><tt>QDockWidget::DockWidgetVerticalTitleBar</tt></td><td class="topAlign"><tt>0x08</tt></td><td class="topAlign">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 class="topAlign"><tt>QDockWidget::AllDockWidgetFeatures</tt></td><td class="topAlign"><tt>DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable</tt></td><td class="topAlign">(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 class="topAlign"><tt>QDockWidget::NoDockWidgetFeatures</tt></td><td class="topAlign"><tt>0x00</tt></td><td class="topAlign">The dock widget cannot be closed, moved, or floated.</td></tr>
</table>
<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>
<!-- @@@DockWidgetFeature -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$allowedAreas-prop$$$allowedAreas$$$setAllowedAreasQt::DockWidgetAreas$$$allowedAreasChangedQt::DockWidgetAreas -->
<h3 class="fn"><a name="allowedAreas-prop"></a><span class="name">allowedAreas</span> : <span class="type"><a href="qt.html#DockWidgetArea-enum">Qt::DockWidgetAreas</a></span></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">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::DockWidgetAreas </td><td class="memItemRight bottomAlign"><span class="name"><b>allowedAreas</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAllowedAreas</b></span> ( Qt::DockWidgetAreas <i>areas</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qdockwidget.html#allowedAreasChanged">allowedAreasChanged</a></b></span> ( Qt::DockWidgetAreas <i>allowedAreas</i> )</td></tr>
</table>
<p><b>See also </b><a href="qt.html#DockWidgetArea-enum">Qt::DockWidgetArea</a>.</p>
<!-- @@@allowedAreas -->
<!-- $$$features-prop$$$features$$$setFeaturesDockWidgetFeatures$$$featuresChangedQDockWidget::DockWidgetFeatures -->
<h3 class="fn"><a name="features-prop"></a><span class="name">features</span> : <span class="type"><a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFeatures</a></span></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">
<tr><td class="memItemLeft topAlign rightAlign"> DockWidgetFeatures </td><td class="memItemRight bottomAlign"><span class="name"><b>features</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFeatures</b></span> ( DockWidgetFeatures <i>features</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qdockwidget.html#featuresChanged">featuresChanged</a></b></span> ( QDockWidget::DockWidgetFeatures <i>features</i> )</td></tr>
</table>
<p><b>See also </b><a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFeature</a>.</p>
<!-- @@@features -->
<!-- $$$floating-prop$$$isFloating$$$setFloatingbool -->
<h3 class="fn"><a name="floating-prop"></a><span class="name">floating</span> : <span class="type">bool</span></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">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isFloating</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFloating</b></span> ( bool <i>floating</i> )</td></tr>
</table>
<p><b>See also </b><a href="qwidget.html#isWindow">isWindow</a>().</p>
<!-- @@@floating -->
<!-- $$$windowTitle-prop$$$windowTitle$$$setWindowTitleconstQString& -->
<h3 class="fn"><a name="windowTitle-prop"></a><span class="name">windowTitle</span> : <span class="type"><a href="qstring.html">QString</a></span></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">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qwidget.html#windowTitle-prop">windowTitle</a></b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qwidget.html#windowTitle-prop">setWindowTitle</a></b></span> ( const QString &amp; )</td></tr>
</table>
<!-- @@@windowTitle -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QDockWidget[overload1]$$$QDockWidgetconstQString&QWidget*Qt::WindowFlags -->
<h3 class="fn"><a name="QDockWidget"></a>QDockWidget::<span class="name">QDockWidget</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>title</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0, <span class="type"><a href="qt.html#WindowType-enum">Qt::WindowFlags</a></span> <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><b>See also </b><a href="qwidget.html#windowTitle-prop">setWindowTitle</a>().</p>
<!-- @@@QDockWidget -->
<!-- $$$QDockWidget$$$QDockWidgetQWidget*Qt::WindowFlags -->
<h3 class="fn"><a name="QDockWidget-2"></a>QDockWidget::<span class="name">QDockWidget</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0, <span class="type"><a href="qt.html#WindowType-enum">Qt::WindowFlags</a></span> <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>
<!-- @@@QDockWidget -->
<!-- $$$~QDockWidget[overload1]$$$~QDockWidget -->
<h3 class="fn"><a name="dtor.QDockWidget"></a>QDockWidget::<span class="name">~QDockWidget</span> ()</h3>
<p>Destroys the dock widget.</p>
<!-- @@@~QDockWidget -->
<!-- $$$allowedAreasChanged[overload1]$$$allowedAreasChangedQt::DockWidgetAreas -->
<h3 class="fn"><a name="allowedAreasChanged"></a><span class="type">void</span> QDockWidget::<span class="name">allowedAreasChanged</span> ( <span class="type"><a href="qt.html#DockWidgetArea-enum">Qt::DockWidgetAreas</a></span> <i>allowedAreas</i> )<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>
<!-- @@@allowedAreasChanged -->
<!-- $$$changeEvent[overload1]$$$changeEventQEvent* -->
<h3 class="fn"><a name="changeEvent"></a><span class="type">void</span> QDockWidget::<span class="name">changeEvent</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<!-- @@@changeEvent -->
<!-- $$$closeEvent[overload1]$$$closeEventQCloseEvent* -->
<h3 class="fn"><a name="closeEvent"></a><span class="type">void</span> QDockWidget::<span class="name">closeEvent</span> ( <span class="type"><a href="qcloseevent.html">QCloseEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#closeEvent">QWidget::closeEvent</a>().</p>
<!-- @@@closeEvent -->
<!-- $$$dockLocationChanged[overload1]$$$dockLocationChangedQt::DockWidgetArea -->
<h3 class="fn"><a name="dockLocationChanged"></a><span class="type">void</span> QDockWidget::<span class="name">dockLocationChanged</span> ( <span class="type"><a href="qt.html#DockWidgetArea-enum">Qt::DockWidgetArea</a></span> <i>area</i> )<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>
<!-- @@@dockLocationChanged -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QDockWidget::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$featuresChanged[overload1]$$$featuresChangedQDockWidget::DockWidgetFeatures -->
<h3 class="fn"><a name="featuresChanged"></a><span class="type">void</span> QDockWidget::<span class="name">featuresChanged</span> ( <span class="type"><a href="qdockwidget.html#DockWidgetFeature-enum">QDockWidget::DockWidgetFeatures</a></span> <i>features</i> )<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>
<!-- @@@featuresChanged -->
<!-- $$$initStyleOption[overload1]$$$initStyleOptionQStyleOptionDockWidget* -->
<h3 class="fn"><a name="initStyleOption"></a><span class="type">void</span> QDockWidget::<span class="name">initStyleOption</span> ( <span class="type"><a href="qstyleoptiondockwidget.html">QStyleOptionDockWidget</a></span> * <i>option</i> ) const<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><b>See also </b><a href="qstyleoption.html#initFrom">QStyleOption::initFrom</a>().</p>
<!-- @@@initStyleOption -->
<!-- $$$isAreaAllowed[overload1]$$$isAreaAllowedQt::DockWidgetArea -->
<h3 class="fn"><a name="isAreaAllowed"></a><span class="type">bool</span> QDockWidget::<span class="name">isAreaAllowed</span> ( <span class="type"><a href="qt.html#DockWidgetArea-enum">Qt::DockWidgetArea</a></span> <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>
<!-- @@@isAreaAllowed -->
<!-- $$$paintEvent[overload1]$$$paintEventQPaintEvent* -->
<h3 class="fn"><a name="paintEvent"></a><span class="type">void</span> QDockWidget::<span class="name">paintEvent</span> ( <span class="type"><a href="qpaintevent.html">QPaintEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<!-- @@@paintEvent -->
<!-- $$$setTitleBarWidget[overload1]$$$setTitleBarWidgetQWidget* -->
<h3 class="fn"><a name="setTitleBarWidget"></a><span class="type">void</span> QDockWidget::<span class="name">setTitleBarWidget</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> )</h3>
<p>Sets an arbitrary <i>widget</i> as the dock widget's title bar. If <i>widget</i> is 0, any custom title bar widget previously set on the dock widget is removed, but not deleted, and the default title bar will be used instead.</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 class="cpp"> <span class="type"><a href="qdockwidget.html">QDockWidget</a></span> <span class="operator">*</span>dockWidget <span class="operator">=</span> qobject_cast<span class="operator">&lt;</span><span class="type"><a href="qdockwidget.html">QDockWidget</a></span><span class="operator">*</span><span class="operator">&gt;</span>(parentWidget());
 <span class="keyword">if</span> (dockWidget<span class="operator">-</span><span class="operator">&gt;</span>features() <span class="operator">&amp;</span> <span class="type"><a href="qdockwidget.html">QDockWidget</a></span><span class="operator">::</span>DockWidgetVerticalTitleBar) {
     <span class="comment">// I need to be vertical</span>
 } <span class="keyword">else</span> {
     <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>
<li>It is not possible to remove a title bar from a dock widget. However, a similar effect can be achieved by setting a default constructed <a href="qwidget.html">QWidget</a> as the title bar widget.</li>
</ul>
<p>Using <a href="qobject.html#qobject_cast">qobject_cast</a>() 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><b>See also </b><a href="qdockwidget.html#titleBarWidget">titleBarWidget</a>() and <a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetVerticalTitleBar</a>.</p>
<!-- @@@setTitleBarWidget -->
<!-- $$$setWidget[overload1]$$$setWidgetQWidget* -->
<h3 class="fn"><a name="setWidget"></a><span class="type">void</span> QDockWidget::<span class="name">setWidget</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <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><b>See also </b><a href="qdockwidget.html#widget">widget</a>().</p>
<!-- @@@setWidget -->
<!-- $$$titleBarWidget[overload1]$$$titleBarWidget -->
<h3 class="fn"><a name="titleBarWidget"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * QDockWidget::<span class="name">titleBarWidget</span> () 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><b>See also </b><a href="qdockwidget.html#setTitleBarWidget">setTitleBarWidget</a>().</p>
<!-- @@@titleBarWidget -->
<!-- $$$toggleViewAction[overload1]$$$toggleViewAction -->
<h3 class="fn"><a name="toggleViewAction"></a><span class="type"><a href="qaction.html">QAction</a></span> * QDockWidget::<span class="name">toggleViewAction</span> () 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><b>See also </b><a href="qaction.html#text-prop">QAction::text</a> and <a href="qwidget.html#windowTitle-prop">QWidget::windowTitle</a>.</p>
<!-- @@@toggleViewAction -->
<!-- $$$topLevelChanged[overload1]$$$topLevelChangedbool -->
<h3 class="fn"><a name="topLevelChanged"></a><span class="type">void</span> QDockWidget::<span class="name">topLevelChanged</span> ( <span class="type">bool</span> <i>topLevel</i> )<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><b>See also </b><a href="qwidget.html#isWindow">isWindow</a>().</p>
<!-- @@@topLevelChanged -->
<!-- $$$visibilityChanged[overload1]$$$visibilityChangedbool -->
<h3 class="fn"><a name="visibilityChanged"></a><span class="type">void</span> QDockWidget::<span class="name">visibilityChanged</span> ( <span class="type">bool</span> <i>visible</i> )<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>
<!-- @@@visibilityChanged -->
<!-- $$$widget[overload1]$$$widget -->
<h3 class="fn"><a name="widget"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * QDockWidget::<span class="name">widget</span> () const</h3>
<p>Returns the widget for the dock widget. This function returns zero if the widget has not been set.</p>
<p><b>See also </b><a href="qdockwidget.html#setWidget">setWidget</a>().</p>
<!-- @@@widget -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>