Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 1f9eb832ba1e4b88d9a5c2b384813bb4 > files > 3813

kdelibs3-apidocs-3.5.10-31.fc15.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">

<head>
  <title>kdeui: kdockwidget.cpp Source File (kdeui)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <meta http-equiv="Content-Style-Type" content="text/css" />

  <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org"  r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org"  r (n 0 s 0 v 0 l 0))' />

  <meta name="trademark" content="KDE e.V." />
  <meta name="description" content="K Desktop Environment Homepage, KDE.org" />
  <meta name="MSSmartTagsPreventParsing" content="true" />
  <meta name="robots" content="all" />

  <link rel="shortcut icon" href="../../favicon.ico" />

<link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" />



</head>

<body>

<div id="nav_header_top" align="right">
  <a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a>

  <a href="../.."><img id="nav_header_logo" alt="Home" align="left" src="../../kde_gear_64.png" border="0" /></a>
  <span class="doNotDisplay">::</span>

  <div id="nav_header_title" align="left">KDE API Reference</div>


</div>

<div id="nav_header_bottom" align="right">
  <span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span>
  <div id="nav_header_bottom_right" style="text-align: left;">
/ <a href="../..">API Reference</a>
 / <a href=".">kdeui</a>
  </div>
</div>


<table id="main" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
      <td valign="top" class="menuheader" height="0"></td>

  <td id="contentcolumn" valign="top" rowspan="2" >
    <div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;">
    <a name="content"></a>


<!-- Generated by Doxygen 1.7.4 -->
<div class="header">
  <div class="headertitle">
<div class="title">kdockwidget.cpp</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00002"></a>00002 <span class="comment">/* This file is part of the KDE libraries</span>
<a name="l00003"></a>00003 <span class="comment">   Copyright (C) 2000 Max Judin &lt;novaprint@mtu-net.ru&gt;</span>
<a name="l00004"></a>00004 <span class="comment">   Copyright (C) 2002,2003 Joseph Wenninger &lt;jowenn@kde.org&gt;</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">   This library is free software; you can redistribute it and/or</span>
<a name="l00007"></a>00007 <span class="comment">   modify it under the terms of the GNU Library General Public</span>
<a name="l00008"></a>00008 <span class="comment">   License version 2 as published by the Free Software Foundation.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">   This library is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">   but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00013"></a>00013 <span class="comment">   Library General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">   You should have received a copy of the GNU Library General Public License</span>
<a name="l00016"></a>00016 <span class="comment">   along with this library; see the file COPYING.LIB.  If not, write to</span>
<a name="l00017"></a>00017 <span class="comment">   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,</span>
<a name="l00018"></a>00018 <span class="comment">   Boston, MA 02110-1301, USA.</span>
<a name="l00019"></a>00019 <span class="comment">*/</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;kdockwidget.h&quot;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;kdockwidget_private.h&quot;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;kdockwidget_p.h&quot;</span>
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;qapplication.h&gt;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;qlayout.h&gt;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;qpainter.h&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;qobjectlist.h&gt;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;qstrlist.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;qcursor.h&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;qwidgetlist.h&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;qtabwidget.h&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;qtooltip.h&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;qstyle.h&gt;</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="preprocessor">#ifndef NO_KDE2</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#include &lt;kconfig.h&gt;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;kglobal.h&gt;</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/klocale_8h.html">klocale.h</a>&gt;</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include &lt;ktoolbar.h&gt;</span>
<a name="l00040"></a>00040 <span class="preprocessor">#include &lt;kpopupmenu.h&gt;</span>
<a name="l00041"></a>00041 <span class="preprocessor">#include &lt;kwin.h&gt;</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include &lt;kdebug.h&gt;</span>
<a name="l00043"></a>00043 <span class="preprocessor">#include &lt;kglobalsettings.h&gt;</span>
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="preprocessor">#include &quot;config.h&quot;</span>
<a name="l00046"></a>00046 <span class="preprocessor">#ifdef Q_WS_X11</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#include &lt;X11/X.h&gt;</span>
<a name="l00048"></a>00048 <span class="preprocessor">#include &lt;X11/Xlib.h&gt;</span>
<a name="l00049"></a>00049 <span class="preprocessor">#endif</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span>
<a name="l00051"></a>00051 <span class="preprocessor">#else</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#include &lt;qtoolbar.h&gt;</span>
<a name="l00053"></a>00053 <span class="preprocessor">#include &lt;qpopupmenu.h&gt;</span>
<a name="l00054"></a>00054 <span class="preprocessor">#endif</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span>
<a name="l00056"></a>00056 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00057"></a>00057 
<a name="l00058"></a>00058 <span class="preprocessor">#undef BORDERLESS_WINDOWS</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span>
<a name="l00060"></a>00060 <span class="preprocessor">#define DOCK_CONFIG_VERSION &quot;0.0.5&quot;</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span>
<a name="l00062"></a>00062 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> dockback_xpm[]={
<a name="l00063"></a>00063 <span class="stringliteral">&quot;6 6 2 1&quot;</span>,
<a name="l00064"></a>00064 <span class="stringliteral">&quot;# c black&quot;</span>,
<a name="l00065"></a>00065 <span class="stringliteral">&quot;. c None&quot;</span>,
<a name="l00066"></a>00066 <span class="stringliteral">&quot;......&quot;</span>,
<a name="l00067"></a>00067 <span class="stringliteral">&quot;.#....&quot;</span>,
<a name="l00068"></a>00068 <span class="stringliteral">&quot;..#..#&quot;</span>,
<a name="l00069"></a>00069 <span class="stringliteral">&quot;...#.#&quot;</span>,
<a name="l00070"></a>00070 <span class="stringliteral">&quot;....##&quot;</span>,
<a name="l00071"></a>00071 <span class="stringliteral">&quot;..####&quot;</span>};
<a name="l00072"></a>00072 
<a name="l00073"></a>00073 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> todesktop_xpm[]={
<a name="l00074"></a>00074 <span class="stringliteral">&quot;5 5 2 1&quot;</span>,
<a name="l00075"></a>00075 <span class="stringliteral">&quot;# c black&quot;</span>,
<a name="l00076"></a>00076 <span class="stringliteral">&quot;. c None&quot;</span>,
<a name="l00077"></a>00077 <span class="stringliteral">&quot;####.&quot;</span>,
<a name="l00078"></a>00078 <span class="stringliteral">&quot;##...&quot;</span>,
<a name="l00079"></a>00079 <span class="stringliteral">&quot;#.#..&quot;</span>,
<a name="l00080"></a>00080 <span class="stringliteral">&quot;#..#.&quot;</span>,
<a name="l00081"></a>00081 <span class="stringliteral">&quot;....#&quot;</span>};
<a name="l00082"></a>00082 
<a name="l00083"></a>00083 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> not_close_xpm[]={
<a name="l00084"></a>00084 <span class="stringliteral">&quot;5 5 2 1&quot;</span>,
<a name="l00085"></a>00085 <span class="stringliteral">&quot;# c black&quot;</span>,
<a name="l00086"></a>00086 <span class="stringliteral">&quot;. c None&quot;</span>,
<a name="l00087"></a>00087 <span class="stringliteral">&quot;#####&quot;</span>,
<a name="l00088"></a>00088 <span class="stringliteral">&quot;#...#&quot;</span>,
<a name="l00089"></a>00089 <span class="stringliteral">&quot;#...#&quot;</span>,
<a name="l00090"></a>00090 <span class="stringliteral">&quot;#...#&quot;</span>,
<a name="l00091"></a>00091 <span class="stringliteral">&quot;#####&quot;</span>};
<a name="l00092"></a>00092 
<a name="l00102"></a><a class="code" href="classKDockMainWindow.html#ad842dd9450833ed80e7aa4e3d1373258">00102</a> <a class="code" href="classKDockMainWindow.html#ad842dd9450833ed80e7aa4e3d1373258" title="Constructs a dockmainwindow.">KDockMainWindow::KDockMainWindow</a>( <a class="codeRef" href="qwidget.html">QWidget</a>* parent, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, WFlags f)
<a name="l00103"></a>00103 :<a class="code" href="classKMainWindow.html" title="KDE top level main window">KMainWindow</a>( parent, name, f )
<a name="l00104"></a>00104 {
<a name="l00105"></a>00105   <a class="codeRef" href="qstring.html">QString</a> new_name = <a class="codeRef" href="qstring.html">QString</a>(name) + <a class="codeRef" href="qstring.html">QString</a>(<span class="stringliteral">&quot;_DockManager&quot;</span>);
<a name="l00106"></a>00106   <a class="code" href="classKDockMainWindow.html#aa38e3b0766cce3438a6dbadb62ba504f" title="A pointer to the manager for the dock process.">dockManager</a> = <span class="keyword">new</span> <a class="code" href="classKDockManager.html" title="The manager that knows all dockwidgets and handles the dock process (and member of the dockwidget cla...">KDockManager</a>( <span class="keyword">this</span>, new_name.<a class="codeRef" href="qstring.html#latin1">latin1</a>() );
<a name="l00107"></a>00107   <a class="code" href="classKDockMainWindow.html#aad270902ce1bd7eab89dbbd7441b55e1" title="A pointer to the main dockwidget (where one can manualDock() to.">mainDockWidget</a> = 0L;
<a name="l00108"></a>00108 }
<a name="l00109"></a>00109 
<a name="l00110"></a><a class="code" href="classKDockMainWindow.html#a78578f335e9e0a67e35f4f6ea9c516ce">00110</a> <a class="code" href="classKDockMainWindow.html#a78578f335e9e0a67e35f4f6ea9c516ce" title="Destructs a dockmainwindow.">KDockMainWindow::~KDockMainWindow</a>()
<a name="l00111"></a>00111 {
<a name="l00112"></a>00112     <span class="keyword">delete</span> <a class="code" href="classKDockMainWindow.html#aa38e3b0766cce3438a6dbadb62ba504f" title="A pointer to the manager for the dock process.">dockManager</a>;
<a name="l00113"></a>00113 }
<a name="l00114"></a>00114 
<a name="l00115"></a><a class="code" href="classKDockMainWindow.html#a666d451aaf8c58cb86c5cbfe7f63feaa">00115</a> <span class="keywordtype">void</span> <a class="code" href="classKDockMainWindow.html#a666d451aaf8c58cb86c5cbfe7f63feaa" title="Sets a new main dockwidget.">KDockMainWindow::setMainDockWidget</a>( <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* mdw )
<a name="l00116"></a>00116 {
<a name="l00117"></a>00117   <span class="keywordflow">if</span> ( <a class="code" href="classKDockMainWindow.html#aad270902ce1bd7eab89dbbd7441b55e1" title="A pointer to the main dockwidget (where one can manualDock() to.">mainDockWidget</a> == mdw ) <span class="keywordflow">return</span>;
<a name="l00118"></a>00118   <a class="code" href="classKDockMainWindow.html#aad270902ce1bd7eab89dbbd7441b55e1" title="A pointer to the main dockwidget (where one can manualDock() to.">mainDockWidget</a> = mdw;
<a name="l00119"></a>00119   <a class="code" href="classKDockMainWindow.html#aa38e3b0766cce3438a6dbadb62ba504f" title="A pointer to the manager for the dock process.">dockManager</a>-&gt;<a class="code" href="classKDockManager.html#aedd43390c4580bae98a81648edf51548">setMainDockWidget2</a>(mdw);
<a name="l00120"></a>00120 }
<a name="l00121"></a>00121 
<a name="l00122"></a><a class="code" href="classKDockMainWindow.html#aa3ca7e83f6d5826c96ea3ff7d7976520">00122</a> <span class="keywordtype">void</span> <a class="code" href="classKDockMainWindow.html#aa3ca7e83f6d5826c96ea3ff7d7976520" title="This method calls the base class method.">KDockMainWindow::setView</a>( <a class="codeRef" href="qwidget.html">QWidget</a> *view )
<a name="l00123"></a>00123 {
<a name="l00124"></a>00124   <span class="keywordflow">if</span> ( view-&gt;isA(<span class="stringliteral">&quot;KDockWidget&quot;</span>) ){
<a name="l00125"></a>00125     <span class="keywordflow">if</span> ( view-&gt;parent() != this ) ((<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)view)-&gt;applyToWidget( <span class="keyword">this</span> );
<a name="l00126"></a>00126   }
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 <span class="preprocessor">#ifndef NO_KDE2</span>
<a name="l00129"></a>00129 <span class="preprocessor"></span>  <a class="codeRef" href="qmainwindow.html#setCentralWidget">KMainWindow::setCentralWidget</a>(view);
<a name="l00130"></a>00130 <span class="preprocessor">#else</span>
<a name="l00131"></a>00131 <span class="preprocessor"></span>  <a class="codeRef" href="qmainwindow.html#setCentralWidget">QMainWindow::setCentralWidget</a>(view);
<a name="l00132"></a>00132 <span class="preprocessor">#endif</span>
<a name="l00133"></a>00133 <span class="preprocessor"></span>}
<a name="l00134"></a>00134 
<a name="l00135"></a><a class="code" href="classKDockMainWindow.html#a66f76e253ac31af09a8e69dbc289ecee">00135</a> <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* <a class="code" href="classKDockMainWindow.html#a66f76e253ac31af09a8e69dbc289ecee" title="This is one of the most important methods! The KDockMainWindow creates a new dockwidget object here t...">KDockMainWindow::createDockWidget</a>( <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>&amp; name, <span class="keyword">const</span> <a class="codeRef" href="qpixmap.html">QPixmap</a> &amp;pixmap, <a class="codeRef" href="qwidget.html">QWidget</a>* parent, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>&amp; strCaption, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>&amp; strTabPageLabel)
<a name="l00136"></a>00136 {
<a name="l00137"></a>00137   <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>( <a class="code" href="classKDockMainWindow.html#aa38e3b0766cce3438a6dbadb62ba504f" title="A pointer to the manager for the dock process.">dockManager</a>, name.<a class="codeRef" href="qstring.html#latin1">latin1</a>(), pixmap, parent, strCaption, strTabPageLabel );
<a name="l00138"></a>00138 }
<a name="l00139"></a>00139 
<a name="l00140"></a><a class="code" href="classKDockMainWindow.html#ae94a6ed016474fb7911a027fba321b73">00140</a> <span class="keywordtype">void</span> <a class="code" href="classKDockMainWindow.html#ae94a6ed016474fb7911a027fba321b73" title="This method shows the given dockwidget.">KDockMainWindow::makeDockVisible</a>( <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* dock )
<a name="l00141"></a>00141 {
<a name="l00142"></a>00142   <span class="keywordflow">if</span> ( dock )
<a name="l00143"></a>00143     dock-&gt;<a class="code" href="classKDockWidget.html#a1156e8c4d79e454cac3d51b50babd87e" title="Normally it simply shows the dockwidget.">makeDockVisible</a>();
<a name="l00144"></a>00144 }
<a name="l00145"></a>00145 
<a name="l00146"></a><a class="code" href="classKDockMainWindow.html#a511b5bd7de33ae4300ff85ce7f021f6e">00146</a> <span class="keywordtype">void</span> <a class="code" href="classKDockMainWindow.html#a511b5bd7de33ae4300ff85ce7f021f6e" title="This method hides the given dockwidget.">KDockMainWindow::makeDockInvisible</a>( <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* dock )
<a name="l00147"></a>00147 {
<a name="l00148"></a>00148   <span class="keywordflow">if</span> ( dock )
<a name="l00149"></a>00149     dock-&gt;<a class="code" href="classKDockWidget.html#a2fa098fe2ac988870e7c86b1006e114c" title="Undocks this.">undock</a>();
<a name="l00150"></a>00150 }
<a name="l00151"></a>00151 
<a name="l00152"></a><a class="code" href="classKDockMainWindow.html#a3e028a78b51ca32237cb26e852598cd7">00152</a> <span class="keywordtype">void</span> <a class="code" href="classKDockMainWindow.html#a3e028a78b51ca32237cb26e852598cd7" title="This is an overloaded member function, provided for convenience.">KDockMainWindow::makeWidgetDockVisible</a>( <a class="codeRef" href="qwidget.html">QWidget</a>* widget )
<a name="l00153"></a>00153 {
<a name="l00154"></a>00154   <a class="code" href="classKDockMainWindow.html#ae94a6ed016474fb7911a027fba321b73" title="This method shows the given dockwidget.">makeDockVisible</a>( <a class="code" href="classKDockMainWindow.html#aa38e3b0766cce3438a6dbadb62ba504f" title="A pointer to the manager for the dock process.">dockManager</a>-&gt;<a class="code" href="classKDockManager.html#abec245144446fa950cc40cb2e7e4b975" title="This method finds out what a widgets&#39; dockwidget is.">findWidgetParentDock</a>(widget) );
<a name="l00155"></a>00155 }
<a name="l00156"></a>00156 
<a name="l00157"></a><a class="code" href="classKDockMainWindow.html#a7443a92f74acf09ad1cf72be3088f199">00157</a> <span class="keywordtype">void</span> <a class="code" href="classKDockMainWindow.html#a7443a92f74acf09ad1cf72be3088f199" title="Saves the current dock window layout into a DOM tree below the given element.">KDockMainWindow::writeDockConfig</a>(<a class="codeRef" href="qdomelement.html">QDomElement</a> &amp;base)
<a name="l00158"></a>00158 {
<a name="l00159"></a>00159   <a class="code" href="classKDockMainWindow.html#aa38e3b0766cce3438a6dbadb62ba504f" title="A pointer to the manager for the dock process.">dockManager</a>-&gt;<a class="code" href="classKDockManager.html#a0b4fadda32ca4eecc3d69be5bd3924cf" title="Saves the current state of the dockmanager and of all controlled widgets.">writeConfig</a>(base);
<a name="l00160"></a>00160 }
<a name="l00161"></a>00161 
<a name="l00162"></a><a class="code" href="classKDockMainWindow.html#af9e2a4073cf74eaea5c0f0dca9975229">00162</a> <span class="keywordtype">void</span> <a class="code" href="classKDockMainWindow.html#af9e2a4073cf74eaea5c0f0dca9975229" title="Reads the current dock window layout from a DOM tree below the given element.">KDockMainWindow::readDockConfig</a>(<a class="codeRef" href="qdomelement.html">QDomElement</a> &amp;base)
<a name="l00163"></a>00163 {
<a name="l00164"></a>00164   <a class="code" href="classKDockMainWindow.html#aa38e3b0766cce3438a6dbadb62ba504f" title="A pointer to the manager for the dock process.">dockManager</a>-&gt;<a class="code" href="classKDockManager.html#ada938c7b90c71d8da7ed578db51c1a4f" title="Like writeConfig but reads the whole stuff in.">readConfig</a>(base);
<a name="l00165"></a>00165 }
<a name="l00166"></a>00166 
<a name="l00167"></a>00167 <span class="preprocessor">#ifndef NO_KDE2</span>
<a name="l00168"></a><a class="code" href="classKDockMainWindow.html#a74fb2b8c81de9d487fa7c728458b853e">00168</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="classKDockMainWindow.html#a7443a92f74acf09ad1cf72be3088f199" title="Saves the current dock window layout into a DOM tree below the given element.">KDockMainWindow::writeDockConfig</a>( <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfig.html">KConfig</a>* c, <a class="codeRef" href="qstring.html">QString</a> group )
<a name="l00169"></a>00169 {
<a name="l00170"></a>00170   <a class="code" href="classKDockMainWindow.html#aa38e3b0766cce3438a6dbadb62ba504f" title="A pointer to the manager for the dock process.">dockManager</a>-&gt;<a class="code" href="classKDockManager.html#a0b4fadda32ca4eecc3d69be5bd3924cf" title="Saves the current state of the dockmanager and of all controlled widgets.">writeConfig</a>( c, group );
<a name="l00171"></a>00171 }
<a name="l00172"></a>00172 
<a name="l00173"></a><a class="code" href="classKDockMainWindow.html#a437d5b0a80fc39b84d27c098849951c6">00173</a> <span class="keywordtype">void</span> <a class="code" href="classKDockMainWindow.html#af9e2a4073cf74eaea5c0f0dca9975229" title="Reads the current dock window layout from a DOM tree below the given element.">KDockMainWindow::readDockConfig</a>( <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfig.html">KConfig</a>* c, <a class="codeRef" href="qstring.html">QString</a> group )
<a name="l00174"></a>00174 {
<a name="l00175"></a>00175   <a class="code" href="classKDockMainWindow.html#aa38e3b0766cce3438a6dbadb62ba504f" title="A pointer to the manager for the dock process.">dockManager</a>-&gt;<a class="code" href="classKDockManager.html#ada938c7b90c71d8da7ed578db51c1a4f" title="Like writeConfig but reads the whole stuff in.">readConfig</a>( c, group );
<a name="l00176"></a>00176 }
<a name="l00177"></a>00177 <span class="preprocessor">#endif</span>
<a name="l00178"></a>00178 <span class="preprocessor"></span>
<a name="l00179"></a><a class="code" href="classKDockMainWindow.html#aa569d60801a272c28fb6a9114cae5c08">00179</a> <span class="keywordtype">void</span> <a class="code" href="classKDockMainWindow.html#aa569d60801a272c28fb6a9114cae5c08" title="Called whenever one of the dockwidgets of this has been undocked.">KDockMainWindow::slotDockWidgetUndocked</a>()
<a name="l00180"></a>00180 {
<a name="l00181"></a>00181   <a class="codeRef" href="qobject.html">QObject</a>* pSender = (<a class="codeRef" href="qobject.html">QObject</a>*) sender();
<a name="l00182"></a>00182   <span class="keywordflow">if</span> (!pSender-&gt;<a class="codeRef" href="qobject.html#inherits">inherits</a>(<span class="stringliteral">&quot;KDockWidget&quot;</span>)) <span class="keywordflow">return</span>;
<a name="l00183"></a>00183   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* pDW = (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*) pSender;
<a name="l00184"></a>00184   emit <a class="code" href="classKDockMainWindow.html#ab9c3235b718017ebcf245ede49a461a1" title="Signals a certain dockwidget is undocked now.">dockWidgetHasUndocked</a>( pDW);
<a name="l00185"></a>00185 }
<a name="l00186"></a>00186 
<a name="l00187"></a>00187 <span class="comment">/*************************************************************************/</span>
<a name="l00188"></a><a class="code" href="classKDockWidgetAbstractHeaderDrag.html#adb39c4c55a2ba128b25f08c1aacb144f">00188</a> <a class="code" href="classKDockWidgetAbstractHeaderDrag.html#adb39c4c55a2ba128b25f08c1aacb144f" title="Constructs this.">KDockWidgetAbstractHeaderDrag::KDockWidgetAbstractHeaderDrag</a>( <a class="code" href="classKDockWidgetAbstractHeader.html" title="An abstract base clase for all dockwidget headers (and member of the dockwidget class set)...">KDockWidgetAbstractHeader</a>* parent, <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* dock, <span class="keyword">const</span> <span class="keywordtype">char</span>* name )
<a name="l00189"></a>00189 :<a class="codeRef" href="qframe.html">QFrame</a>( parent, name )
<a name="l00190"></a>00190 {
<a name="l00191"></a>00191   dw = dock;
<a name="l00192"></a>00192   installEventFilter( dock-&gt;<a class="code" href="classKDockWidget.html#a6ccee01af3dbaa7764bce2566ecf912d">dockManager</a>() );
<a name="l00193"></a>00193 }
<a name="l00194"></a>00194 <span class="comment">/*************************************************************************/</span>
<a name="l00195"></a><a class="code" href="classKDockWidgetHeaderDrag.html#add82e6c857462415c7bbe38dec3829e0">00195</a> <a class="code" href="classKDockWidgetHeaderDrag.html#add82e6c857462415c7bbe38dec3829e0" title="Constructs this.">KDockWidgetHeaderDrag::KDockWidgetHeaderDrag</a>( <a class="code" href="classKDockWidgetAbstractHeader.html" title="An abstract base clase for all dockwidget headers (and member of the dockwidget class set)...">KDockWidgetAbstractHeader</a>* parent, <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* dock, <span class="keyword">const</span> <span class="keywordtype">char</span>* name )
<a name="l00196"></a>00196 :<a class="code" href="classKDockWidgetAbstractHeaderDrag.html" title="An abstract class for all dockwidget drag-panels of a dockwidgets (and member of the dockwidget class...">KDockWidgetAbstractHeaderDrag</a>( parent, dock, name )
<a name="l00197"></a>00197 {
<a name="l00198"></a>00198 }
<a name="l00199"></a>00199 
<a name="l00200"></a><a class="code" href="classKDockWidgetHeaderDrag.html#af2f178c1684cdd19bfd2f1d3391ac599">00200</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidgetHeaderDrag.html#af2f178c1684cdd19bfd2f1d3391ac599" title="Draws the drag panel (a double line)">KDockWidgetHeaderDrag::paintEvent</a>( <a class="codeRef" href="qpaintevent.html">QPaintEvent</a>* )
<a name="l00201"></a>00201 {
<a name="l00202"></a>00202   <a class="codeRef" href="qpainter.html">QPainter</a> paint;
<a name="l00203"></a>00203 
<a name="l00204"></a>00204   paint.<a class="codeRef" href="qpainter.html#begin">begin</a>( <span class="keyword">this</span> );
<a name="l00205"></a>00205 
<a name="l00206"></a>00206   style().drawPrimitive (QStyle::PE_DockWindowHandle, &amp;paint, <a class="codeRef" href="qrect.html">QRect</a>(0,0,width(), height()), colorGroup());
<a name="l00207"></a>00207 
<a name="l00208"></a>00208   paint.<a class="codeRef" href="qpainter.html#end">end</a>();
<a name="l00209"></a>00209 }
<a name="l00210"></a>00210 <span class="comment">/*************************************************************************/</span>
<a name="l00211"></a><a class="code" href="classKDockWidgetAbstractHeader.html#ac84bc24abdfe232ed0fd7e1c7030d58a">00211</a> <a class="code" href="classKDockWidgetAbstractHeader.html#ac84bc24abdfe232ed0fd7e1c7030d58a" title="Constructs this.">KDockWidgetAbstractHeader::KDockWidgetAbstractHeader</a>( <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* name )
<a name="l00212"></a>00212 :<a class="codeRef" href="qframe.html">QFrame</a>( parent, name )
<a name="l00213"></a>00213 {
<a name="l00214"></a>00214 }
<a name="l00215"></a>00215 <span class="comment">/*************************************************************************/</span>
<a name="l00216"></a><a class="code" href="classKDockWidgetHeader.html#a457471b9198db1eba4825417458f7462">00216</a> <a class="code" href="classKDockWidgetHeader.html#a457471b9198db1eba4825417458f7462" title="Constructs this.">KDockWidgetHeader::KDockWidgetHeader</a>( <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* parent, <span class="keyword">const</span> <span class="keywordtype">char</span>* name )
<a name="l00217"></a>00217 :<a class="code" href="classKDockWidgetAbstractHeader.html" title="An abstract base clase for all dockwidget headers (and member of the dockwidget class set)...">KDockWidgetAbstractHeader</a>( parent, name )
<a name="l00218"></a>00218 {
<a name="l00219"></a>00219 <span class="preprocessor">#ifdef BORDERLESS_WINDOWS</span>
<a name="l00220"></a>00220 <span class="preprocessor"></span>  setCursor(<a class="codeRef" href="qcursor.html">QCursor</a>(ArrowCursor));
<a name="l00221"></a>00221 <span class="preprocessor">#endif</span>
<a name="l00222"></a>00222 <span class="preprocessor"></span>  d = <span class="keyword">new</span> KDockWidgetHeaderPrivate( <span class="keyword">this</span> );
<a name="l00223"></a>00223 
<a name="l00224"></a>00224   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a> = <span class="keyword">new</span> <a class="codeRef" href="qhboxlayout.html">QHBoxLayout</a>( <span class="keyword">this</span> );
<a name="l00225"></a>00225   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;setResizeMode( QLayout::Minimum );
<a name="l00226"></a>00226 
<a name="l00227"></a>00227   <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a> = <span class="keyword">new</span> <a class="code" href="classKDockWidgetHeaderDrag.html" title="This special widget is the panel one can grip with the mouses (and member of the dockwidget class set...">KDockWidgetHeaderDrag</a>( <span class="keyword">this</span>, parent );
<a name="l00228"></a>00228 
<a name="l00229"></a>00229   <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a> = <span class="keyword">new</span> <a class="code" href="classKDockButton__Private.html" title="A mini-button usually placed in the dockpanel.">KDockButton_Private</a>( <span class="keyword">this</span>, <span class="stringliteral">&quot;DockCloseButton&quot;</span> );
<a name="l00230"></a>00230   <a class="codeRef" href="qtooltip.html#add">QToolTip::add</a>( <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>, i18n(<span class="stringliteral">&quot;Close&quot;</span>) );
<a name="l00231"></a>00231   <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#setPixmap">setPixmap</a>( style().stylePixmap (QStyle::SP_TitleBarCloseButton , <span class="keyword">this</span>));
<a name="l00232"></a>00232   <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;setFixedSize(<a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#pixmap">pixmap</a>()-&gt;width(),<a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#pixmap">pixmap</a>()-&gt;height());
<a name="l00233"></a>00233   connect( <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>, SIGNAL(clicked()), parent, SIGNAL(headerCloseButtonClicked()));
<a name="l00234"></a>00234   connect( <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>, SIGNAL(clicked()), parent, SLOT(undock()));
<a name="l00235"></a>00235 
<a name="l00236"></a>00236   <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a> = <span class="keyword">new</span> <a class="code" href="classKDockButton__Private.html" title="A mini-button usually placed in the dockpanel.">KDockButton_Private</a>( <span class="keyword">this</span>, <span class="stringliteral">&quot;DockStayButton&quot;</span> );
<a name="l00237"></a>00237   <a class="codeRef" href="qtooltip.html#add">QToolTip::add</a>( <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>, i18n(<span class="stringliteral">&quot;Freeze the window geometry&quot;</span>, <span class="stringliteral">&quot;Freeze&quot;</span>) );
<a name="l00238"></a>00238   <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#setToggleButton">setToggleButton</a>( <span class="keyword">true</span> );
<a name="l00239"></a>00239   <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#setPixmap">setPixmap</a>( const_cast&lt; const char** &gt;(not_close_xpm) );
<a name="l00240"></a>00240   <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>-&gt;setFixedSize(<a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#pixmap">pixmap</a>()-&gt;width(),<a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#pixmap">pixmap</a>()-&gt;height());
<a name="l00241"></a>00241   connect( <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>, SIGNAL(clicked()), <span class="keyword">this</span>, SLOT(<a class="code" href="classKDockWidgetHeader.html#a8ffda038e8964e0e184fde50460cb8bd" title="Sets dragging the dockwidget off when the stay button is pressed down and vice versa.">slotStayClicked</a>()));
<a name="l00242"></a>00242 
<a name="l00243"></a>00243   <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a> = <span class="keyword">new</span> <a class="code" href="classKDockButton__Private.html" title="A mini-button usually placed in the dockpanel.">KDockButton_Private</a>( <span class="keyword">this</span>, <span class="stringliteral">&quot;DockbackButton&quot;</span> );
<a name="l00244"></a>00244   <a class="codeRef" href="qtooltip.html#add">QToolTip::add</a>( <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a>, i18n(<span class="stringliteral">&quot;Dock this window&quot;</span>, <span class="stringliteral">&quot;Dock&quot;</span>) );
<a name="l00245"></a>00245   <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#setPixmap">setPixmap</a>( const_cast&lt; const char** &gt;(dockback_xpm));
<a name="l00246"></a>00246   <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a>-&gt;setFixedSize(<a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#pixmap">pixmap</a>()-&gt;width(),<a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#pixmap">pixmap</a>()-&gt;height());
<a name="l00247"></a>00247   connect( <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a>, SIGNAL(clicked()), parent, SIGNAL(headerDockbackButtonClicked()));
<a name="l00248"></a>00248   connect( <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a>, SIGNAL(clicked()), parent, SLOT(dockBack()));
<a name="l00249"></a>00249 
<a name="l00250"></a>00250   d-&gt;toDesktopButton = <span class="keyword">new</span> <a class="code" href="classKDockButton__Private.html" title="A mini-button usually placed in the dockpanel.">KDockButton_Private</a>( <span class="keyword">this</span>, <span class="stringliteral">&quot;ToDesktopButton&quot;</span> );
<a name="l00251"></a>00251   <a class="codeRef" href="qtooltip.html#add">QToolTip::add</a>( d-&gt;toDesktopButton, i18n(<span class="stringliteral">&quot;Detach&quot;</span>) );
<a name="l00252"></a>00252   d-&gt;toDesktopButton-&gt;setPixmap( const_cast&lt; const char** &gt;(todesktop_xpm));
<a name="l00253"></a>00253   d-&gt;toDesktopButton-&gt;setFixedSize(<a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#pixmap">pixmap</a>()-&gt;width(),<a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#pixmap">pixmap</a>()-&gt;height());
<a name="l00254"></a>00254   connect( d-&gt;toDesktopButton, SIGNAL(clicked()), parent, SLOT(toDesktop()));
<a name="l00255"></a>00255   <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>-&gt;hide();
<a name="l00256"></a>00256 
<a name="l00257"></a>00257   d-&gt;dummy = <span class="keyword">new</span> <a class="codeRef" href="qwidget.html">QWidget</a>( <span class="keyword">this</span> );
<a name="l00258"></a>00258   d-&gt;dummy-&gt;setFixedSize( 1,<a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#pixmap">pixmap</a>()-&gt;height() );
<a name="l00259"></a>00259 
<a name="l00260"></a>00260 
<a name="l00261"></a>00261   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a> );
<a name="l00262"></a>00262   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a> );
<a name="l00263"></a>00263   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( d-&gt;toDesktopButton );
<a name="l00264"></a>00264   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( d-&gt;dummy);
<a name="l00265"></a>00265   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a> );
<a name="l00266"></a>00266   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a> );
<a name="l00267"></a>00267   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;activate();
<a name="l00268"></a>00268   d-&gt;dummy-&gt;hide();
<a name="l00269"></a>00269   <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a>-&gt;setFixedHeight( <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;minimumSize().height() );
<a name="l00270"></a>00270 }
<a name="l00271"></a>00271 
<a name="l00272"></a><a class="code" href="classKDockWidgetHeader.html#aeb9429a5e7f8665503c6864a23c48bf7">00272</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidgetHeader.html#aeb9429a5e7f8665503c6864a23c48bf7" title="Hides the close button and stay button when switching to toplevel or vice versa shows them...">KDockWidgetHeader::setTopLevel</a>( <span class="keywordtype">bool</span> isTopLevel )
<a name="l00273"></a>00273 {
<a name="l00274"></a>00274   d-&gt;topLevel = isTopLevel;
<a name="l00275"></a>00275   <span class="keywordflow">if</span> ( isTopLevel ){
<a name="l00276"></a>00276     <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* par = (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)parent();
<a name="l00277"></a>00277     <span class="keywordflow">if</span>( par &amp;&amp; par-&gt;<a class="code" href="classKDockWidget.html#ac0e55a4ea8ac435d21473b9cd52c1c1f">isDockBackPossible</a>() )
<a name="l00278"></a>00278         <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a>-&gt;show();
<a name="l00279"></a>00279     <span class="keywordflow">else</span>
<a name="l00280"></a>00280         <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a>-&gt;hide();
<a name="l00281"></a>00281 
<a name="l00282"></a>00282     <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>-&gt;hide();
<a name="l00283"></a>00283     <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;hide();
<a name="l00284"></a>00284     d-&gt;toDesktopButton-&gt;hide();
<a name="l00285"></a>00285     <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a>-&gt;setEnabled( <span class="keyword">true</span> );
<a name="l00286"></a>00286   } <span class="keywordflow">else</span> {
<a name="l00287"></a>00287     <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a>-&gt;hide();
<a name="l00288"></a>00288     <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>-&gt;hide();
<a name="l00289"></a>00289     <span class="keywordflow">if</span> (!d-&gt;forceCloseButtonHidden) <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;show();
<a name="l00290"></a>00290     <span class="keywordflow">if</span>( d-&gt;showToDesktopButton )
<a name="l00291"></a>00291       d-&gt;toDesktopButton-&gt;show();
<a name="l00292"></a>00292   }
<a name="l00293"></a>00293   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;activate();
<a name="l00294"></a>00294 
<a name="l00295"></a>00295    <span class="keywordtype">bool</span> dontShowDummy=<a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a>-&gt;isVisibleTo(<span class="keyword">this</span>) || <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a>-&gt;isVisibleTo(<span class="keyword">this</span>) ||
<a name="l00296"></a>00296         d-&gt;toDesktopButton-&gt;isVisibleTo(<span class="keyword">this</span>) || <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>-&gt;isVisibleTo(<span class="keyword">this</span>) ||
<a name="l00297"></a>00297         <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;isVisibleTo(<span class="keyword">this</span>);
<a name="l00298"></a>00298    <span class="keywordflow">for</span> (<a class="codeRef" href="qptrlistiterator.html">QPtrListIterator&lt;KDockButton_Private&gt;</a> it( d-&gt;btns );it.<a class="codeRef" href="qptrlistiterator.html#current">current</a>();++it) {
<a name="l00299"></a>00299         dontShowDummy=dontShowDummy || (it.current()-&gt;isVisibleTo(<span class="keyword">this</span>));
<a name="l00300"></a>00300    }
<a name="l00301"></a>00301    <span class="keywordflow">if</span> (dontShowDummy) d-&gt;dummy-&gt;hide(); <span class="keywordflow">else</span> d-&gt;dummy-&gt;show();
<a name="l00302"></a>00302 
<a name="l00303"></a>00303   updateGeometry();
<a name="l00304"></a>00304 }
<a name="l00305"></a>00305 
<a name="l00306"></a><a class="code" href="classKDockWidgetHeader.html#a3e3c142ed8203ed7fc3c6a97896c817c">00306</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidgetHeader.html#a3e3c142ed8203ed7fc3c6a97896c817c">KDockWidgetHeader::forceCloseButtonHidden</a>(<span class="keywordtype">bool</span> hidden) {
<a name="l00307"></a>00307   d-&gt;forceCloseButtonHidden=hidden;
<a name="l00308"></a>00308   <span class="keywordflow">if</span> (hidden) <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;hide();
<a name="l00309"></a>00309   <span class="keywordflow">else</span> <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;show();
<a name="l00310"></a>00310 }
<a name="l00311"></a>00311 
<a name="l00312"></a><a class="code" href="classKDockWidgetHeader.html#a103f403cd386b14b6ff762d143f143cd">00312</a> <a class="code" href="classKDockWidgetHeaderDrag.html" title="This special widget is the panel one can grip with the mouses (and member of the dockwidget class set...">KDockWidgetHeaderDrag</a> *<a class="code" href="classKDockWidgetHeader.html#a103f403cd386b14b6ff762d143f143cd" title="Get the drag panel of this header.">KDockWidgetHeader::dragPanel</a>() {
<a name="l00313"></a>00313     <span class="keywordflow">return</span> <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a>;
<a name="l00314"></a>00314 }
<a name="l00315"></a>00315 
<a name="l00316"></a><a class="code" href="classKDockWidgetHeader.html#ae9bbf057dc0f90f52cc28999d162b70c">00316</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidgetHeader.html#ae9bbf057dc0f90f52cc28999d162b70c" title="Sets the drag panel of this header.">KDockWidgetHeader::setDragPanel</a>( <a class="code" href="classKDockWidgetHeaderDrag.html" title="This special widget is the panel one can grip with the mouses (and member of the dockwidget class set...">KDockWidgetHeaderDrag</a>* nd )
<a name="l00317"></a>00317 {
<a name="l00318"></a>00318   <span class="keywordflow">if</span> ( !nd ) <span class="keywordflow">return</span>;
<a name="l00319"></a>00319 
<a name="l00320"></a>00320   <span class="keyword">delete</span> <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>;
<a name="l00321"></a>00321   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a> = <span class="keyword">new</span> <a class="codeRef" href="qhboxlayout.html">QHBoxLayout</a>( <span class="keyword">this</span> );
<a name="l00322"></a>00322   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;setResizeMode( QLayout::Minimum );
<a name="l00323"></a>00323 
<a name="l00324"></a>00324   <span class="keyword">delete</span> <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a>;
<a name="l00325"></a>00325   <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a> = nd;
<a name="l00326"></a>00326   <span class="keywordflow">if</span> (<a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a>-&gt;parentWidget()!=<span class="keyword">this</span>) {
<a name="l00327"></a>00327     <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a>-&gt;reparent(<span class="keyword">this</span>,<a class="codeRef" href="qpoint.html">QPoint</a>(0,0));
<a name="l00328"></a>00328   }
<a name="l00329"></a>00329 
<a name="l00330"></a>00330 
<a name="l00331"></a>00331   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a> );
<a name="l00332"></a>00332   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a> );
<a name="l00333"></a>00333   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( d-&gt;dummy );
<a name="l00334"></a>00334   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( d-&gt;toDesktopButton );
<a name="l00335"></a>00335   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a> );
<a name="l00336"></a>00336   <span class="keywordtype">bool</span> dontShowDummy=<a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a>-&gt;isVisibleTo(<span class="keyword">this</span>) || <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a>-&gt;isVisibleTo(<span class="keyword">this</span>) ||
<a name="l00337"></a>00337     d-&gt;toDesktopButton-&gt;isVisibleTo(<span class="keyword">this</span>) || <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>-&gt;isVisibleTo(<span class="keyword">this</span>) ||
<a name="l00338"></a>00338     <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;isVisibleTo(<span class="keyword">this</span>);
<a name="l00339"></a>00339   <span class="keywordflow">for</span> (<a class="codeRef" href="qptrlistiterator.html">QPtrListIterator&lt;KDockButton_Private&gt;</a> it( d-&gt;btns );it.<a class="codeRef" href="qptrlistiterator.html#current">current</a>();++it) {
<a name="l00340"></a>00340       <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget(it.current());
<a name="l00341"></a>00341     dontShowDummy=dontShowDummy || (it.current()-&gt;isVisibleTo(<span class="keyword">this</span>));
<a name="l00342"></a>00342   }
<a name="l00343"></a>00343   <span class="keywordflow">if</span> (dontShowDummy) d-&gt;dummy-&gt;hide(); <span class="keywordflow">else</span> d-&gt;dummy-&gt;show();
<a name="l00344"></a>00344   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a> );
<a name="l00345"></a>00345   <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;activate();
<a name="l00346"></a>00346   <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;KdockWidgetHeader::setDragPanel:minimum height=&quot;</span>&lt;&lt;<a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;minimumSize().height()&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l00347"></a>00347   <span class="comment">//FIXME somebody left this here, but we don&#39;t know what the hell it&#39;s for.</span>
<a name="l00348"></a>00348   <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a>-&gt;setFixedHeight( <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;height()); <span class="comment">// /*layout-&gt;minimumS*/sizeHint().height() );</span>
<a name="l00349"></a>00349 }
<a name="l00350"></a>00350 
<a name="l00351"></a>00351 <span class="keywordtype">void</span> KDockWidgetHeader::addButton(<a class="code" href="classKDockButton__Private.html" title="A mini-button usually placed in the dockpanel.">KDockButton_Private</a>* btn) {
<a name="l00352"></a>00352     <span class="keywordflow">if</span> (!btn) <span class="keywordflow">return</span>;
<a name="l00353"></a>00353 
<a name="l00354"></a>00354     <span class="keywordflow">if</span> (btn-&gt;parentWidget()!=<span class="keyword">this</span>) {
<a name="l00355"></a>00355         btn-&gt;reparent(<span class="keyword">this</span>,<a class="codeRef" href="qpoint.html">QPoint</a>(0,0));
<a name="l00356"></a>00356     }
<a name="l00357"></a>00357     btn-&gt;setFixedSize(<a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#pixmap">pixmap</a>()-&gt;width(),<a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#pixmap">pixmap</a>()-&gt;height());
<a name="l00358"></a>00358     <span class="keywordflow">if</span> (!d-&gt;btns.containsRef(btn)) d-&gt;btns.append(btn);
<a name="l00359"></a>00359 
<a name="l00360"></a>00360     btn-&gt;show();
<a name="l00361"></a>00361 
<a name="l00362"></a>00362     <span class="keyword">delete</span> <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>;
<a name="l00363"></a>00363     <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a> = <span class="keyword">new</span> <a class="codeRef" href="qhboxlayout.html">QHBoxLayout</a>( <span class="keyword">this</span> );
<a name="l00364"></a>00364     <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;setResizeMode( QLayout::Minimum );
<a name="l00365"></a>00365 
<a name="l00366"></a>00366     <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a> );
<a name="l00367"></a>00367     <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a> );
<a name="l00368"></a>00368     <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( d-&gt;toDesktopButton );
<a name="l00369"></a>00369     <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( d-&gt;dummy);
<a name="l00370"></a>00370     <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a> );
<a name="l00371"></a>00371      <span class="keywordtype">bool</span> dontShowDummy=<a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a>-&gt;isVisibleTo(<span class="keyword">this</span>) || <a class="code" href="classKDockWidgetHeader.html#a7bac7d56089d7f3b18c173f030f265b6" title="a little button for dock back the dockwidget to it&#39;s previous dockwidget">dockbackButton</a>-&gt;isVisibleTo(<span class="keyword">this</span>) ||
<a name="l00372"></a>00372             d-&gt;toDesktopButton-&gt;isVisibleTo(<span class="keyword">this</span>) || <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>-&gt;isVisibleTo(<span class="keyword">this</span>) ||
<a name="l00373"></a>00373             <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;isVisibleTo(<span class="keyword">this</span>);
<a name="l00374"></a>00374      <span class="keywordflow">for</span> (<a class="codeRef" href="qptrlistiterator.html">QPtrListIterator&lt;KDockButton_Private&gt;</a> it( d-&gt;btns );it.<a class="codeRef" href="qptrlistiterator.html#current">current</a>();++it) {
<a name="l00375"></a>00375             <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget(it.current());
<a name="l00376"></a>00376         dontShowDummy=dontShowDummy || (it.current()-&gt;isVisibleTo(<span class="keyword">this</span>));
<a name="l00377"></a>00377     }
<a name="l00378"></a>00378     <span class="keywordflow">if</span> (dontShowDummy) d-&gt;dummy-&gt;hide(); <span class="keywordflow">else</span> d-&gt;dummy-&gt;show();
<a name="l00379"></a>00379     <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;addWidget( <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a> );
<a name="l00380"></a>00380     <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;activate();
<a name="l00381"></a>00381     <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a>-&gt;setFixedHeight( <a class="code" href="classKDockWidgetHeader.html#abc0f156d75a5ac69d8776dd5bba65de3" title="A layout manager for placing the embedded buttons (close and stay)">layout</a>-&gt;minimumSize().height() );
<a name="l00382"></a>00382 }
<a name="l00383"></a>00383 
<a name="l00384"></a>00384 <span class="keywordtype">void</span> KDockWidgetHeader::removeButton(<a class="code" href="classKDockButton__Private.html" title="A mini-button usually placed in the dockpanel.">KDockButton_Private</a>* btn) {
<a name="l00385"></a>00385     <span class="keywordflow">if</span> (btn-&gt;parentWidget()==<span class="keyword">this</span>) {
<a name="l00386"></a>00386         <span class="keywordflow">if</span> (d-&gt;btns.containsRef(btn)) d-&gt;btns.removeRef(btn);
<a name="l00387"></a>00387         <span class="keyword">delete</span> btn;
<a name="l00388"></a>00388     }
<a name="l00389"></a>00389 }
<a name="l00390"></a>00390 
<a name="l00391"></a>00391 
<a name="l00392"></a><a class="code" href="classKDockWidgetHeader.html#a8ffda038e8964e0e184fde50460cb8bd">00392</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidgetHeader.html#a8ffda038e8964e0e184fde50460cb8bd" title="Sets dragging the dockwidget off when the stay button is pressed down and vice versa.">KDockWidgetHeader::slotStayClicked</a>()
<a name="l00393"></a>00393 {
<a name="l00394"></a>00394   setDragEnabled(!<a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#isOn">isOn</a>());
<a name="l00395"></a>00395 }
<a name="l00396"></a>00396 
<a name="l00397"></a>00397 <span class="keywordtype">bool</span> KDockWidgetHeader::dragEnabled()<span class="keyword"> const</span>
<a name="l00398"></a>00398 <span class="keyword"></span>{
<a name="l00399"></a>00399   <span class="keywordflow">return</span> <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a>-&gt;isEnabled();
<a name="l00400"></a>00400 }
<a name="l00401"></a>00401 
<a name="l00402"></a><a class="code" href="classKDockWidgetHeader.html#af51a42ff14160c8829be0cf76a4d1e8c">00402</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidgetHeader.html#af51a42ff14160c8829be0cf76a4d1e8c">KDockWidgetHeader::showUndockButton</a>(<span class="keywordtype">bool</span> show)
<a name="l00403"></a>00403 {
<a name="l00404"></a>00404   <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;KDockWidgetHeader::showUndockButton(&quot;</span>&lt;&lt;show&lt;&lt;<span class="stringliteral">&quot;)&quot;</span>&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l00405"></a>00405   <span class="keywordflow">if</span>( d-&gt;showToDesktopButton == show )
<a name="l00406"></a>00406     <span class="keywordflow">return</span>;
<a name="l00407"></a>00407 
<a name="l00408"></a>00408   d-&gt;showToDesktopButton = show;
<a name="l00409"></a>00409   <span class="keywordflow">if</span>( !show || d-&gt;topLevel )
<a name="l00410"></a>00410     d-&gt;toDesktopButton-&gt;hide( );
<a name="l00411"></a>00411   <span class="keywordflow">else</span>
<a name="l00412"></a>00412     d-&gt;toDesktopButton-&gt;show( );
<a name="l00413"></a>00413 }
<a name="l00414"></a>00414 
<a name="l00415"></a>00415 <span class="keywordtype">void</span> KDockWidgetHeader::setDragEnabled(<span class="keywordtype">bool</span> b)
<a name="l00416"></a>00416 {
<a name="l00417"></a>00417   <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#setOn">setOn</a>(!b);
<a name="l00418"></a>00418   <a class="code" href="classKDockWidgetHeader.html#addbc26579e9911a9a38289396efaa0d7" title="a little button for closing (undocking and hiding) the dockwidget">closeButton</a>-&gt;setEnabled(b);
<a name="l00419"></a>00419   <a class="code" href="classKDockWidgetHeader.html#ace52074d4fa680f6c17060eb1ba3995d" title="the drag panel (double line)">drag</a>-&gt;setEnabled(b);
<a name="l00420"></a>00420 }
<a name="l00421"></a>00421 
<a name="l00422"></a>00422 <span class="preprocessor">#ifndef NO_KDE2</span>
<a name="l00423"></a><a class="code" href="classKDockWidgetHeader.html#a1e2246af36479073afccdfb0e618097e">00423</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="classKDockWidgetHeader.html#a1e2246af36479073afccdfb0e618097e" title="Saves the current button state to a KDE config container object.">KDockWidgetHeader::saveConfig</a>( <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfig.html">KConfig</a>* c )
<a name="l00424"></a>00424 {
<a name="l00425"></a>00425   c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( <a class="codeRef" href="qstring.html">QString</a>(<span class="stringliteral">&quot;%1%2&quot;</span>).arg(parent()-&gt;name()).arg(<span class="stringliteral">&quot;:stayButton&quot;</span>), <a class="code" href="classKDockWidgetHeader.html#a1faf23467d77d7ee073829e7e6f4b073" title="a little button for enabling/disabling dragging the dockwidget with the mouse">stayButton</a>-&gt;<a class="codeRef" href="qpushbutton.html#isOn">isOn</a>() );
<a name="l00426"></a>00426 }
<a name="l00427"></a>00427 
<a name="l00428"></a><a class="code" href="classKDockWidgetHeader.html#a0fb4b0a113e79cf89d323664e4bbdc28">00428</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidgetHeader.html#a0fb4b0a113e79cf89d323664e4bbdc28" title="Loads the current button state from a KDE config container object.">KDockWidgetHeader::loadConfig</a>( <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfig.html">KConfig</a>* c )
<a name="l00429"></a>00429 {
<a name="l00430"></a>00430   setDragEnabled( !c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a515c85fb1b7b3ddab4c6612cdb67bf74">readBoolEntry</a>( <a class="codeRef" href="qstring.html">QString</a>(<span class="stringliteral">&quot;%1%2&quot;</span>).arg(parent()-&gt;name()).arg(<span class="stringliteral">&quot;:stayButton&quot;</span>), <span class="keyword">false</span> ) );
<a name="l00431"></a>00431 }
<a name="l00432"></a>00432 <span class="preprocessor">#endif</span>
<a name="l00433"></a>00433 <span class="preprocessor"></span>
<a name="l00434"></a>00434 <span class="comment">/*************************************************************************/</span>
<a name="l00435"></a>00435 
<a name="l00436"></a>00436 <span class="keyword">class </span>KDockManager::KDockManagerPrivate
<a name="l00437"></a>00437 {
<a name="l00438"></a>00438 <span class="keyword">public</span>:
<a name="l00442"></a>00442   <a class="codeRef" href="qrect.html">QRect</a> dragRect;
<a name="l00443"></a>00443 
<a name="l00447"></a>00447   <a class="codeRef" href="qrect.html">QRect</a> oldDragRect;
<a name="l00448"></a>00448 
<a name="l00452"></a>00452   <span class="keywordtype">bool</span> readyToDrag;
<a name="l00453"></a>00453 
<a name="l00457"></a>00457   <a class="codeRef" href="qpoint.html">QPoint</a> dragOffset;
<a name="l00458"></a>00458 
<a name="l00462"></a>00462   <span class="keywordtype">bool</span> <a class="code" href="classKDockManager.html#a7386e1f2e0800e2d8ebd38e90a17303b" title="Returns true if opaque resizing is enabled, false otherwise.">splitterOpaqueResize</a>;
<a name="l00463"></a>00463   <span class="keywordtype">bool</span> <a class="code" href="classKDockManager.html#a6b4b7942d9dfa715f498b97f975239e5" title="Returns true if the KeepSize is enabled, false otherwise.">splitterKeepSize</a>;
<a name="l00464"></a>00464   <span class="keywordtype">bool</span> <a class="code" href="classKDockManager.html#a381d9de4b66fe4c34b85a9af43a11f88" title="Returns true if the splitter uses the high resolution, false otherwise.">splitterHighResolution</a>;
<a name="l00465"></a>00465 
<a name="l00466"></a>00466   <a class="codeRef" href="qguardedptr.html">QGuardedPtr&lt;KDockWidget&gt;</a> mainDockWidget;
<a name="l00467"></a>00467 
<a name="l00468"></a>00468   <a class="codeRef" href="qobjectlist.html">QObjectList</a> containerDocks;
<a name="l00469"></a>00469 
<a name="l00470"></a>00470   <a class="codeRef" href="qguardedptr.html">QGuardedPtr&lt;KDockWidget&gt;</a> leftContainer;
<a name="l00471"></a>00471   <a class="codeRef" href="qguardedptr.html">QGuardedPtr&lt;KDockWidget&gt;</a> topContainer;
<a name="l00472"></a>00472   <a class="codeRef" href="qguardedptr.html">QGuardedPtr&lt;KDockWidget&gt;</a> rightContainer;
<a name="l00473"></a>00473   <a class="codeRef" href="qguardedptr.html">QGuardedPtr&lt;KDockWidget&gt;</a> bottomContainer;
<a name="l00474"></a>00474   <span class="keywordtype">int</span> m_readDockConfigMode;
<a name="l00475"></a>00475 };
<a name="l00476"></a>00476 
<a name="l00477"></a>00477 
<a name="l00478"></a>00478 <span class="comment">/*************************************************************************/</span>
<a name="l00479"></a><a class="code" href="classKDockWidget.html#a43465c98c4b19b89b28b5f2238a9b173">00479</a> <a class="code" href="classKDockWidget.html#a43465c98c4b19b89b28b5f2238a9b173" title="Construct a dockwidget.">KDockWidget::KDockWidget</a>( <a class="code" href="classKDockManager.html" title="The manager that knows all dockwidgets and handles the dock process (and member of the dockwidget cla...">KDockManager</a>* dockManager, <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> <a class="codeRef" href="qpixmap.html">QPixmap</a> &amp;pixmap, <a class="codeRef" href="qwidget.html">QWidget</a>* parent, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>&amp; strCaption, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>&amp; strTabPageLabel, WFlags f)
<a name="l00480"></a>00480 <span class="preprocessor">#ifdef BORDERLESS_WINDOWS</span>
<a name="l00481"></a>00481 <span class="preprocessor"></span>: <a class="codeRef" href="qwidget.html">QWidget</a>( parent, name, f )<span class="comment">//| WType_Dialog | WStyle_Customize | WStyle_NoBorder )</span>
<a name="l00482"></a>00482 <span class="preprocessor">#else</span>
<a name="l00483"></a>00483 <span class="preprocessor"></span>: <a class="codeRef" href="qwidget.html">QWidget</a>( parent, name, f )
<a name="l00484"></a>00484 <span class="preprocessor">#endif</span>
<a name="l00485"></a>00485 <span class="preprocessor"></span>  ,formerBrotherDockWidget(0L)
<a name="l00486"></a>00486   ,currentDockPos(DockNone)
<a name="l00487"></a>00487   ,formerDockPos(DockNone)
<a name="l00488"></a>00488   ,widget(0L)
<a name="l00489"></a>00489   ,pix(<span class="keyword">new</span> <a class="codeRef" href="qpixmap.html">QPixmap</a>(pixmap))
<a name="l00490"></a>00490   ,prevSideDockPosBeforeDrag(DockNone)
<a name="l00491"></a>00491   ,isGroup(<span class="keyword">false</span>)
<a name="l00492"></a>00492 {
<a name="l00493"></a>00493   d = <span class="keyword">new</span> <a class="code" href="classKDockWidgetPrivate.html" title="resizing enum">KDockWidgetPrivate</a>();  <span class="comment">// create private data</span>
<a name="l00494"></a>00494 
<a name="l00495"></a>00495   d-&gt;_parent = parent;
<a name="l00496"></a>00496 
<a name="l00497"></a>00497   layout = <span class="keyword">new</span> <a class="codeRef" href="qvboxlayout.html">QVBoxLayout</a>( <span class="keyword">this</span> );
<a name="l00498"></a>00498   layout-&gt;setResizeMode( QLayout::Minimum );
<a name="l00499"></a>00499 
<a name="l00500"></a>00500   manager = dockManager;
<a name="l00501"></a>00501   manager-&gt;childDock-&gt;append( <span class="keyword">this</span> );
<a name="l00502"></a>00502   installEventFilter( manager );
<a name="l00503"></a>00503 
<a name="l00504"></a>00504   eDocking = DockFullDocking;
<a name="l00505"></a>00505   sDocking = DockFullSite;
<a name="l00506"></a>00506 
<a name="l00507"></a>00507   header = 0L;
<a name="l00508"></a>00508   setHeader( <span class="keyword">new</span> <a class="code" href="classKDockWidgetHeader.html" title="The header (additional bar) for a KDockWidget s (and member of the dockwidget class set)...">KDockWidgetHeader</a>( <span class="keyword">this</span>, <span class="stringliteral">&quot;AutoCreatedDockHeader&quot;</span> ) );
<a name="l00509"></a>00509 
<a name="l00510"></a>00510   <span class="keywordflow">if</span>( strCaption.<a class="codeRef" href="qstring.html#isNull">isNull</a>() )
<a name="l00511"></a>00511     setCaption( name );
<a name="l00512"></a>00512   <span class="keywordflow">else</span>
<a name="l00513"></a>00513     setCaption( strCaption);
<a name="l00514"></a>00514 
<a name="l00515"></a>00515   <span class="keywordflow">if</span>( strTabPageLabel == <span class="stringliteral">&quot; &quot;</span>)
<a name="l00516"></a>00516     setTabPageLabel( caption());
<a name="l00517"></a>00517   <span class="keywordflow">else</span>
<a name="l00518"></a>00518     setTabPageLabel( strTabPageLabel);
<a name="l00519"></a>00519 
<a name="l00520"></a>00520   isTabGroup = <span class="keyword">false</span>;
<a name="l00521"></a>00521   d-&gt;isContainer =<span class="keyword">false</span>;
<a name="l00522"></a>00522   setIcon( pixmap);
<a name="l00523"></a>00523   widget = 0L;
<a name="l00524"></a>00524 
<a name="l00525"></a>00525   <a class="codeRef" href="qobject.html#connect">QObject::connect</a>(<span class="keyword">this</span>, SIGNAL(hasUndocked()), manager-&gt;main, SLOT(slotDockWidgetUndocked()) );
<a name="l00526"></a>00526   applyToWidget( parent, <a class="codeRef" href="qpoint.html">QPoint</a>(0,0) );
<a name="l00527"></a>00527 }
<a name="l00528"></a>00528 
<a name="l00529"></a><a class="code" href="classKDockWidget.html#a8b2c96ceb733d48307ac5fefc504d30c">00529</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a8b2c96ceb733d48307ac5fefc504d30c" title="Allows changing the pixmap which is used for the caption or dock tabs.">KDockWidget::setPixmap</a>(<span class="keyword">const</span> <a class="codeRef" href="qpixmap.html">QPixmap</a>&amp; pixmap) {
<a name="l00530"></a>00530     <span class="keyword">delete</span> pix;
<a name="l00531"></a>00531     pix=<span class="keyword">new</span> <a class="codeRef" href="qpixmap.html">QPixmap</a>(pixmap);
<a name="l00532"></a>00532     <a class="codeRef" href="qwidget.html#setIcon">setIcon</a>(*pix);
<a name="l00533"></a>00533     <a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a> *dtg=<a class="code" href="classKDockWidget.html#ac8ff680712c0da5e3a004e566b1210d6">parentDockTabGroup</a>();
<a name="l00534"></a>00534     <span class="keywordflow">if</span> (dtg)
<a name="l00535"></a>00535         dtg-&gt;<a class="codeRef" href="qtabwidget.html#changeTab">changeTab</a>(<span class="keyword">this</span>,pixmap,dtg-&gt;<a class="codeRef" href="qtabwidget.html#tabLabel">tabLabel</a>(<span class="keyword">this</span>));
<a name="l00536"></a>00536      <a class="codeRef" href="qwidget.html">QWidget</a> *contWid=<a class="code" href="classKDockWidget.html#a8230b0eeae93c10df095401740dadf9d">parentDockContainer</a>();
<a name="l00537"></a>00537          <span class="keywordflow">if</span> (contWid) {
<a name="l00538"></a>00538             KDockContainer *<a class="codeRef" href="qwidget.html#x">x</a> = <span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(contWid);
<a name="l00539"></a>00539                 <span class="keywordflow">if</span> (x) {
<a name="l00540"></a>00540                         x-&gt;setPixmap(<span class="keyword">this</span>,pixmap);
<a name="l00541"></a>00541                 }
<a name="l00542"></a>00542          }
<a name="l00543"></a>00543 }
<a name="l00544"></a>00544 
<a name="l00545"></a><a class="code" href="classKDockWidget.html#a0c22172a76102bf95e9ed6bc9a7264af">00545</a> <span class="keyword">const</span> <a class="codeRef" href="qpixmap.html">QPixmap</a>&amp; <a class="code" href="classKDockWidget.html#a0c22172a76102bf95e9ed6bc9a7264af" title="Returns the dockwidget&#39;s associated caption/dock tab pixmap.">KDockWidget::pixmap</a>()<span class="keyword"> const </span>{
<a name="l00546"></a>00546     <span class="keywordflow">return</span> *pix;
<a name="l00547"></a>00547 }
<a name="l00548"></a>00548 
<a name="l00549"></a><a class="code" href="classKDockWidget.html#acf55d65ec45a4073b06831e3c7cfbfb4">00549</a> <a class="code" href="classKDockWidget.html#acf55d65ec45a4073b06831e3c7cfbfb4" title="Destructs a dockwidget.">KDockWidget::~KDockWidget</a>()
<a name="l00550"></a>00550 {
<a name="l00551"></a>00551   d-&gt;pendingDtor = <span class="keyword">true</span>;
<a name="l00552"></a>00552   <span class="keywordflow">if</span> ( !manager-&gt;undockProcess ){
<a name="l00553"></a>00553     d-&gt;blockHasUndockedSignal = <span class="keyword">true</span>;
<a name="l00554"></a>00554     <a class="code" href="classKDockWidget.html#a2fa098fe2ac988870e7c86b1006e114c" title="Undocks this.">undock</a>();
<a name="l00555"></a>00555     d-&gt;blockHasUndockedSignal = <span class="keyword">false</span>;
<a name="l00556"></a>00556   }
<a name="l00557"></a>00557 
<a name="l00558"></a>00558   <span class="keywordflow">if</span> (<a class="code" href="classKDockWidget.html#afbbaf10bb6f64c1638663a4ec7840f38">latestKDockContainer</a>()) {
<a name="l00559"></a>00559     KDockContainer *<a class="codeRef" href="qwidget.html#x">x</a> = <span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(<a class="code" href="classKDockWidget.html#afbbaf10bb6f64c1638663a4ec7840f38">latestKDockContainer</a>());
<a name="l00560"></a>00560     <span class="keywordflow">if</span> (x) {
<a name="l00561"></a>00561       x-&gt;removeWidget(<span class="keyword">this</span>);
<a name="l00562"></a>00562     }
<a name="l00563"></a>00563   }
<a name="l00564"></a>00564   emit <a class="code" href="classKDockWidget.html#affc34671059cd324ca23f5db9dc4b00a" title="Emitted when the widget processes a close event.">iMBeingClosed</a>();
<a name="l00565"></a>00565   <span class="keywordflow">if</span> (manager-&gt;d) manager-&gt;d-&gt;containerDocks.remove(<span class="keyword">this</span>);
<a name="l00566"></a>00566   manager-&gt;childDock-&gt;remove( <span class="keyword">this</span> );
<a name="l00567"></a>00567   <span class="keyword">delete</span> pix;
<a name="l00568"></a>00568   <span class="keyword">delete</span> d; <span class="comment">// destroy private data</span>
<a name="l00569"></a>00569   d=0;
<a name="l00570"></a>00570 }
<a name="l00571"></a>00571 
<a name="l00572"></a>00572 <span class="keywordtype">void</span> KDockWidget::paintEvent(<a class="codeRef" href="qpaintevent.html">QPaintEvent</a>* pe)
<a name="l00573"></a>00573 {
<a name="l00574"></a>00574     <a class="codeRef" href="qwidget.html#paintEvent">QWidget::paintEvent</a>(pe);
<a name="l00575"></a>00575         <a class="codeRef" href="qpainter.html">QPainter</a> paint;
<a name="l00576"></a>00576         paint.<a class="codeRef" href="qpainter.html#begin">begin</a>( <span class="keyword">this</span> );
<a name="l00577"></a>00577         <a class="codeRef" href="qwidget.html#style">style</a>().drawPrimitive (QStyle::PE_Panel, &amp;paint, <a class="codeRef" href="qrect.html">QRect</a>(0,0,<a class="codeRef" href="qwidget.html#width">width</a>(), <a class="codeRef" href="qwidget.html#height">height</a>()), <a class="codeRef" href="qwidget.html#colorGroup">colorGroup</a>());
<a name="l00578"></a>00578         paint.<a class="codeRef" href="qpainter.html#end">end</a>();
<a name="l00579"></a>00579 }
<a name="l00580"></a>00580 
<a name="l00581"></a>00581 <span class="keywordtype">void</span> KDockWidget::leaveEvent(<a class="codeRef" href="qevent.html">QEvent</a> *e)
<a name="l00582"></a>00582 {
<a name="l00583"></a>00583     <a class="codeRef" href="qwidget.html#leaveEvent">QWidget::leaveEvent</a>(e);
<a name="l00584"></a>00584 <span class="preprocessor">#ifdef BORDERLESS_WINDOWS</span>
<a name="l00585"></a>00585 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (parent()) <span class="keywordflow">return</span>;
<a name="l00586"></a>00586 <span class="comment">//  setCursor(QCursor(ArrowCursor));</span>
<a name="l00587"></a>00587 <span class="preprocessor">#endif</span>
<a name="l00588"></a>00588 <span class="preprocessor"></span>}
<a name="l00589"></a>00589 
<a name="l00590"></a>00590 <span class="keywordtype">void</span> KDockWidget::mousePressEvent(<a class="codeRef" href="qmouseevent.html">QMouseEvent</a>* mme)
<a name="l00591"></a>00591 {
<a name="l00592"></a>00592 <span class="preprocessor">#ifdef BORDERLESS_WINDOWS</span>
<a name="l00593"></a>00593 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (!parent())
<a name="l00594"></a>00594     {
<a name="l00595"></a>00595         <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;KDockWidget::mousePressEvent&quot;</span>&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l00596"></a>00596 
<a name="l00597"></a>00597         <span class="keywordtype">bool</span> bbottom;
<a name="l00598"></a>00598         <span class="keywordtype">bool</span> bleft;
<a name="l00599"></a>00599         <span class="keywordtype">bool</span> bright;
<a name="l00600"></a>00600         <span class="keywordtype">bool</span> btop;
<a name="l00601"></a>00601         <span class="keywordtype">int</span> styleheight;
<a name="l00602"></a>00602         <a class="codeRef" href="qpoint.html">QPoint</a> mp;
<a name="l00603"></a>00603         mp=mme-&gt;<a class="codeRef" href="qmouseevent.html#pos">pos</a>();
<a name="l00604"></a>00604             styleheight=2*<a class="codeRef" href="qwidget.html#style">style</a>().pixelMetric(QStyle::PM_DefaultFrameWidth,<span class="keyword">this</span>);
<a name="l00605"></a>00605         bbottom=mp.<a class="codeRef" href="qpoint.html#y">y</a>()&gt;=<a class="codeRef" href="qwidget.html#height">height</a>()-styleheight;
<a name="l00606"></a>00606         btop=mp.<a class="codeRef" href="qpoint.html#y">y</a>()&lt;=styleheight;
<a name="l00607"></a>00607         bleft=mp.<a class="codeRef" href="qpoint.html#x">x</a>()&lt;=styleheight;
<a name="l00608"></a>00608         bright=mp.<a class="codeRef" href="qpoint.html#x">x</a>()&gt;=<a class="codeRef" href="qwidget.html#width">width</a>()-styleheight;
<a name="l00609"></a>00609         <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;mousemovevent&quot;</span>&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l00610"></a>00610         d-&gt;resizing=<span class="keyword">true</span>;
<a name="l00611"></a>00611         <span class="keywordflow">if</span> (bright)
<a name="l00612"></a>00612         {
<a name="l00613"></a>00613             <span class="keywordflow">if</span> (btop)
<a name="l00614"></a>00614             {
<a name="l00615"></a>00615                 d-&gt;resizeMode=KDockWidgetPrivate::ResizeTopRight;
<a name="l00616"></a>00616                 d-&gt;resizePos=<a class="codeRef" href="qpoint.html">QPoint</a>(<a class="codeRef" href="qwidget.html#width">width</a>(),0)-mme-&gt;<a class="codeRef" href="qmouseevent.html#pos">pos</a>();
<a name="l00617"></a>00617 
<a name="l00618"></a>00618             }
<a name="l00619"></a>00619             <span class="keywordflow">else</span>
<a name="l00620"></a>00620             {
<a name="l00621"></a>00621                 d-&gt;resizePos=<a class="codeRef" href="qpoint.html">QPoint</a>(<a class="codeRef" href="qwidget.html#width">width</a>(),<a class="codeRef" href="qwidget.html#height">height</a>())-mme-&gt;<a class="codeRef" href="qmouseevent.html#pos">pos</a>();
<a name="l00622"></a>00622                 <span class="keywordflow">if</span> (bbottom) d-&gt;resizeMode=KDockWidgetPrivate::ResizeBottomRight;
<a name="l00623"></a>00623                 <span class="keywordflow">else</span> d-&gt;resizeMode=KDockWidgetPrivate::ResizeRight;
<a name="l00624"></a>00624             }
<a name="l00625"></a>00625         }
<a name="l00626"></a>00626         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bleft)
<a name="l00627"></a>00627         {
<a name="l00628"></a>00628             <span class="keywordflow">if</span> (btop) <a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(SizeFDiagCursor));
<a name="l00629"></a>00629             <span class="keywordflow">else</span>
<a name="l00630"></a>00630             <span class="keywordflow">if</span> (bbottom) <a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(SizeBDiagCursor));
<a name="l00631"></a>00631             <span class="keywordflow">else</span> <a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(SizeHorCursor));
<a name="l00632"></a>00632         }
<a name="l00633"></a>00633         <span class="keywordflow">else</span>
<a name="l00634"></a>00634         <span class="keywordflow">if</span> (bbottom)
<a name="l00635"></a>00635         {
<a name="l00636"></a>00636             d-&gt;resizeMode=KDockWidgetPrivate::ResizeBottom;
<a name="l00637"></a>00637             d-&gt;resizePos=<a class="codeRef" href="qpoint.html">QPoint</a>(0,<a class="codeRef" href="qwidget.html#height">height</a>())-mme-&gt;<a class="codeRef" href="qmouseevent.html#pos">pos</a>();
<a name="l00638"></a>00638         }
<a name="l00639"></a>00639         <span class="keywordflow">else</span>
<a name="l00640"></a>00640         <span class="keywordflow">if</span>  (btop) <a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(SizeVerCursor));
<a name="l00641"></a>00641         <span class="keywordflow">else</span> d-&gt;resizing=<span class="keyword">false</span>;
<a name="l00642"></a>00642 
<a name="l00643"></a>00643         <span class="keywordflow">if</span> (d-&gt;resizing) <a class="codeRef" href="qwidget.html#grabMouse">grabMouse</a>(<a class="codeRef" href="qwidget.html#cursor">cursor</a>());
<a name="l00644"></a>00644 
<a name="l00645"></a>00645     }
<a name="l00646"></a>00646 <span class="preprocessor">#endif</span>
<a name="l00647"></a>00647 <span class="preprocessor"></span>    <a class="codeRef" href="qwidget.html#mousePressEvent">QWidget::mousePressEvent</a>(mme);
<a name="l00648"></a>00648 }
<a name="l00649"></a>00649 
<a name="l00650"></a>00650 <span class="keywordtype">void</span> KDockWidget::mouseReleaseEvent(<a class="codeRef" href="qmouseevent.html">QMouseEvent</a>* ev)
<a name="l00651"></a>00651 {
<a name="l00652"></a>00652 <span class="preprocessor">#ifdef BORDERLESS_WINDOWS</span>
<a name="l00653"></a>00653 <span class="preprocessor"></span>    d-&gt;resizing=<span class="keyword">false</span>;
<a name="l00654"></a>00654     <a class="codeRef" href="qwidget.html#releaseMouse">releaseMouse</a>();
<a name="l00655"></a>00655 <span class="preprocessor">#endif</span>
<a name="l00656"></a>00656 <span class="preprocessor"></span>    <a class="codeRef" href="qwidget.html#mouseReleaseEvent">QWidget::mouseReleaseEvent</a>(ev);
<a name="l00657"></a>00657 }
<a name="l00658"></a>00658 
<a name="l00659"></a>00659 <span class="keywordtype">void</span>  KDockWidget::mouseMoveEvent(<a class="codeRef" href="qmouseevent.html">QMouseEvent</a>* mme)
<a name="l00660"></a>00660 {
<a name="l00661"></a>00661     <a class="codeRef" href="qwidget.html#mouseMoveEvent">QWidget::mouseMoveEvent</a>(mme);
<a name="l00662"></a>00662 <span class="preprocessor">#ifdef BORDERLESS_WINDOWS</span>
<a name="l00663"></a>00663 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (parent()) <span class="keywordflow">return</span>;
<a name="l00664"></a>00664 
<a name="l00665"></a>00665     <span class="keywordflow">if</span> (d-&gt;resizing)
<a name="l00666"></a>00666     {
<a name="l00667"></a>00667         <span class="keywordflow">switch</span> (d-&gt;resizeMode)
<a name="l00668"></a>00668         {
<a name="l00669"></a>00669             <span class="keywordflow">case</span> KDockWidgetPrivate::ResizeRight:
<a name="l00670"></a>00670                 <a class="codeRef" href="qwidget.html#resize">resize</a>(mme-&gt;<a class="codeRef" href="qmouseevent.html#pos">pos</a>().x()+d-&gt;resizePos.<a class="codeRef" href="qpoint.html#x">x</a>(),<a class="codeRef" href="qwidget.html#height">height</a>());
<a name="l00671"></a>00671                 <span class="keywordflow">break</span>;
<a name="l00672"></a>00672             <span class="keywordflow">case</span> KDockWidgetPrivate::ResizeBottomRight:
<a name="l00673"></a>00673                 <a class="codeRef" href="qwidget.html#resize">resize</a>(mme-&gt;<a class="codeRef" href="qmouseevent.html#pos">pos</a>().x()+d-&gt;resizePos.<a class="codeRef" href="qpoint.html#x">x</a>(),mme-&gt;<a class="codeRef" href="qmouseevent.html#pos">pos</a>().y()+d-&gt;resizePos.<a class="codeRef" href="qpoint.html#y">y</a>());
<a name="l00674"></a>00674                 <span class="keywordflow">break</span>;
<a name="l00675"></a>00675             <span class="keywordflow">case</span> KDockWidgetPrivate::ResizeBottom:
<a name="l00676"></a>00676                 <a class="codeRef" href="qwidget.html#resize">resize</a>(<a class="codeRef" href="qwidget.html#width">width</a>(),mme-&gt;<a class="codeRef" href="qmouseevent.html#pos">pos</a>().y()+d-&gt;resizePos.<a class="codeRef" href="qpoint.html#y">y</a>());
<a name="l00677"></a>00677                 <span class="keywordflow">break</span>;
<a name="l00678"></a>00678             <span class="keywordflow">default</span>:
<a name="l00679"></a>00679                 <span class="keywordflow">break</span>;
<a name="l00680"></a>00680         }
<a name="l00681"></a>00681         <span class="keywordflow">return</span>;
<a name="l00682"></a>00682     }
<a name="l00683"></a>00683 
<a name="l00684"></a>00684 
<a name="l00685"></a>00685     <span class="keywordtype">bool</span> bbottom;
<a name="l00686"></a>00686     <span class="keywordtype">bool</span> bleft;
<a name="l00687"></a>00687     <span class="keywordtype">bool</span> bright;
<a name="l00688"></a>00688     <span class="keywordtype">bool</span> btop;
<a name="l00689"></a>00689     <span class="keywordtype">int</span> styleheight;
<a name="l00690"></a>00690     <a class="codeRef" href="qpoint.html">QPoint</a> mp;
<a name="l00691"></a>00691     mp=mme-&gt;<a class="codeRef" href="qmouseevent.html#pos">pos</a>();
<a name="l00692"></a>00692         styleheight=2*<a class="codeRef" href="qwidget.html#style">style</a>().pixelMetric(QStyle::PM_DefaultFrameWidth,<span class="keyword">this</span>);
<a name="l00693"></a>00693     bbottom=mp.<a class="codeRef" href="qpoint.html#y">y</a>()&gt;=<a class="codeRef" href="qwidget.html#height">height</a>()-styleheight;
<a name="l00694"></a>00694     btop=mp.<a class="codeRef" href="qpoint.html#y">y</a>()&lt;=styleheight;
<a name="l00695"></a>00695     bleft=mp.<a class="codeRef" href="qpoint.html#x">x</a>()&lt;=styleheight;
<a name="l00696"></a>00696     bright=mp.<a class="codeRef" href="qpoint.html#x">x</a>()&gt;=<a class="codeRef" href="qwidget.html#width">width</a>()-styleheight;
<a name="l00697"></a>00697     <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;mousemovevent&quot;</span>&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l00698"></a>00698     <span class="keywordflow">if</span> (bright)
<a name="l00699"></a>00699     {
<a name="l00700"></a>00700         <span class="keywordflow">if</span> (btop) <a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(SizeBDiagCursor));
<a name="l00701"></a>00701         <span class="keywordflow">else</span>
<a name="l00702"></a>00702         <span class="keywordflow">if</span> (bbottom) <a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(SizeFDiagCursor));
<a name="l00703"></a>00703         <span class="keywordflow">else</span> <a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(SizeHorCursor));
<a name="l00704"></a>00704     }
<a name="l00705"></a>00705     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bleft)
<a name="l00706"></a>00706     {
<a name="l00707"></a>00707         <span class="keywordflow">if</span> (btop) <a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(SizeFDiagCursor));
<a name="l00708"></a>00708         <span class="keywordflow">else</span>
<a name="l00709"></a>00709         <span class="keywordflow">if</span> (bbottom) <a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(SizeBDiagCursor));
<a name="l00710"></a>00710         <span class="keywordflow">else</span> <a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(SizeHorCursor));
<a name="l00711"></a>00711     }
<a name="l00712"></a>00712     <span class="keywordflow">else</span>
<a name="l00713"></a>00713     <span class="keywordflow">if</span> (bbottom ||  btop) <a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(SizeVerCursor));
<a name="l00714"></a>00714     <span class="keywordflow">else</span> <a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(ArrowCursor));
<a name="l00715"></a>00715 <span class="preprocessor">#endif</span>
<a name="l00716"></a>00716 <span class="preprocessor"></span>}
<a name="l00717"></a>00717 
<a name="l00718"></a><a class="code" href="classKDockWidget.html#ad14b56d359bff1655ee4f720bbccbddb">00718</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#ad14b56d359bff1655ee4f720bbccbddb">KDockWidget::setLatestKDockContainer</a>(<a class="codeRef" href="qwidget.html">QWidget</a>* container)
<a name="l00719"></a>00719 {
<a name="l00720"></a>00720     <span class="keywordflow">if</span> (container)
<a name="l00721"></a>00721     {
<a name="l00722"></a>00722         <span class="keywordflow">if</span> (dynamic_cast&lt;KDockContainer*&gt;(container))
<a name="l00723"></a>00723             d-&gt;container=container;
<a name="l00724"></a>00724         <span class="keywordflow">else</span>
<a name="l00725"></a>00725             d-&gt;container=0;
<a name="l00726"></a>00726     }
<a name="l00727"></a>00727 }
<a name="l00728"></a>00728 
<a name="l00729"></a><a class="code" href="classKDockWidget.html#afbbaf10bb6f64c1638663a4ec7840f38">00729</a> <a class="codeRef" href="qwidget.html">QWidget</a>* <a class="code" href="classKDockWidget.html#afbbaf10bb6f64c1638663a4ec7840f38">KDockWidget::latestKDockContainer</a>()
<a name="l00730"></a>00730 {
<a name="l00731"></a>00731     <span class="keywordflow">if</span> (!(d-&gt;container)) <span class="keywordflow">return</span> 0;
<a name="l00732"></a>00732     <span class="keywordflow">if</span> (dynamic_cast&lt;KDockContainer*&gt;(d-&gt;container.<a class="codeRef" href="qguardedptr.html#operator-T-*">operator</a>-&gt;())) <span class="keywordflow">return</span> d-&gt;container;
<a name="l00733"></a>00733     <span class="keywordflow">return</span> 0;
<a name="l00734"></a>00734 }
<a name="l00735"></a>00735 
<a name="l00736"></a>00736 
<a name="l00737"></a>00737 
<a name="l00738"></a><a class="code" href="classKDockWidget.html#a9b2adf00506a40f508b73ccfccbfeffc">00738</a> <a class="code" href="classKDockWidgetAbstractHeader.html" title="An abstract base clase for all dockwidget headers (and member of the dockwidget class set)...">KDockWidgetAbstractHeader</a> *<a class="code" href="classKDockWidget.html#a9b2adf00506a40f508b73ccfccbfeffc">KDockWidget::getHeader</a>() {
<a name="l00739"></a>00739     <span class="keywordflow">return</span> header;
<a name="l00740"></a>00740 }
<a name="l00741"></a>00741 
<a name="l00742"></a><a class="code" href="classKDockWidget.html#a11a8576e7db90b1a42eaeda446f8306b">00742</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a11a8576e7db90b1a42eaeda446f8306b" title="Sets the header of this dockwidget.">KDockWidget::setHeader</a>( <a class="code" href="classKDockWidgetAbstractHeader.html" title="An abstract base clase for all dockwidget headers (and member of the dockwidget class set)...">KDockWidgetAbstractHeader</a>* h )
<a name="l00743"></a>00743 {
<a name="l00744"></a>00744   <span class="keywordflow">if</span> ( !h ) <span class="keywordflow">return</span>;
<a name="l00745"></a>00745 
<a name="l00746"></a>00746   <span class="keywordflow">if</span> ( header ){
<a name="l00747"></a>00747     <span class="keyword">delete</span> header;
<a name="l00748"></a>00748     <span class="keyword">delete</span> <a class="codeRef" href="qwidget.html#layout">layout</a>;
<a name="l00749"></a>00749     header = h;
<a name="l00750"></a>00750     <a class="codeRef" href="qwidget.html#layout">layout</a> = <span class="keyword">new</span> <a class="codeRef" href="qvboxlayout.html">QVBoxLayout</a>( <span class="keyword">this</span> );
<a name="l00751"></a>00751     <a class="codeRef" href="qwidget.html#layout">layout</a>-&gt;setResizeMode( QLayout::Minimum );
<a name="l00752"></a>00752     <a class="codeRef" href="qwidget.html#layout">layout</a>-&gt;addWidget( header );
<a name="l00753"></a>00753      <a class="code" href="classKDockWidget.html#a6e05e2f662f3f9bc2be966d4efb5c296" title="Sets the embedded widget.">setWidget</a>( widget );
<a name="l00754"></a>00754   } <span class="keywordflow">else</span> {
<a name="l00755"></a>00755     header = h;
<a name="l00756"></a>00756     <a class="codeRef" href="qwidget.html#layout">layout</a>-&gt;addWidget( header );
<a name="l00757"></a>00757   }
<a name="l00758"></a>00758   <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<a class="codeRef" href="qwidget.html#caption">caption</a>()&lt;&lt;<span class="stringliteral">&quot;: KDockWidget::setHeader&quot;</span>&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l00759"></a>00759   <a class="code" href="classKDockWidget.html#a4271785c0e4b8a3f1a6df2011c0fae2e" title="Specify where it is either possible or impossible for this to dock to another dockwidget.">setEnableDocking</a>(eDocking);
<a name="l00760"></a>00760 }
<a name="l00761"></a>00761 
<a name="l00762"></a><a class="code" href="classKDockWidget.html#a4271785c0e4b8a3f1a6df2011c0fae2e">00762</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a4271785c0e4b8a3f1a6df2011c0fae2e" title="Specify where it is either possible or impossible for this to dock to another dockwidget.">KDockWidget::setEnableDocking</a>( <span class="keywordtype">int</span> pos )
<a name="l00763"></a>00763 {
<a name="l00764"></a>00764   eDocking = <a class="codeRef" href="qwidget.html#pos">pos</a>;
<a name="l00765"></a>00765   <span class="keywordflow">if</span>( header ) {
<a name="l00766"></a>00766      <span class="keywordflow">if</span> (header-&gt;inherits( <span class="stringliteral">&quot;KDockWidgetHeader&quot;</span> ) )
<a name="l00767"></a>00767          ( ( <a class="code" href="classKDockWidgetHeader.html" title="The header (additional bar) for a KDockWidget s (and member of the dockwidget class set)...">KDockWidgetHeader</a>* ) header )-&gt;showUndockButton( pos &amp; DockDesktop );
<a name="l00768"></a>00768     <a class="code" href="classKDockWidget.html#a5ef45e3136d313bb26b2fa7f22e7b961" title="Checks some conditions and shows or hides the dockwidget header (drag panel).">updateHeader</a>();
<a name="l00769"></a>00769   }
<a name="l00770"></a>00770 }
<a name="l00771"></a>00771 
<a name="l00772"></a><a class="code" href="classKDockWidget.html#a5ef45e3136d313bb26b2fa7f22e7b961">00772</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a5ef45e3136d313bb26b2fa7f22e7b961" title="Checks some conditions and shows or hides the dockwidget header (drag panel).">KDockWidget::updateHeader</a>()
<a name="l00773"></a>00773 {
<a name="l00774"></a>00774   <span class="keywordflow">if</span> ( parent() ){
<a name="l00775"></a>00775 <span class="preprocessor">#ifdef BORDERLESS_WINDOWS</span>
<a name="l00776"></a>00776 <span class="preprocessor"></span>      <a class="codeRef" href="qwidget.html#layout">layout</a>-&gt;setMargin(0);
<a name="l00777"></a>00777       <a class="codeRef" href="qwidget.html#setMouseTracking">setMouseTracking</a>(<span class="keyword">false</span>);
<a name="l00778"></a>00778       <a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(ArrowCursor));
<a name="l00779"></a>00779 <span class="preprocessor">#endif</span>
<a name="l00780"></a>00780 <span class="preprocessor"></span>
<a name="l00781"></a>00781     <span class="keywordflow">if</span> ( (parent() == manager-&gt;main) || isGroup || (eDocking == KDockWidget::DockNone) ){
<a name="l00782"></a>00782       header-&gt;hide();
<a name="l00783"></a>00783     } <span class="keywordflow">else</span> {
<a name="l00784"></a>00784       header-&gt;<a class="code" href="classKDockWidgetAbstractHeader.html#a3853e99bf1156a4bee5c982cb2bc310a" title="Provides things concerning to switching to toplevel mode.">setTopLevel</a>( <span class="keyword">false</span> );
<a name="l00785"></a>00785       <span class="keywordflow">if</span> (widget &amp;&amp; dynamic_cast&lt;KDockContainer*&gt;(widget))
<a name="l00786"></a>00786         header-&gt;hide();
<a name="l00787"></a>00787       <span class="keywordflow">else</span>
<a name="l00788"></a>00788         header-&gt;show();
<a name="l00789"></a>00789     }
<a name="l00790"></a>00790   } <span class="keywordflow">else</span> {
<a name="l00791"></a>00791     header-&gt;<a class="code" href="classKDockWidgetAbstractHeader.html#a3853e99bf1156a4bee5c982cb2bc310a" title="Provides things concerning to switching to toplevel mode.">setTopLevel</a>( <span class="keyword">true</span> );
<a name="l00792"></a>00792     header-&gt;show();
<a name="l00793"></a>00793 <span class="preprocessor">#ifdef BORDERLESS_WINDOWS</span>
<a name="l00794"></a>00794 <span class="preprocessor"></span>      <a class="codeRef" href="qwidget.html#layout">layout</a>-&gt;setMargin(2*<a class="codeRef" href="qwidget.html#style">style</a>().pixelMetric(QStyle::PM_DefaultFrameWidth,<span class="keyword">this</span>));
<a name="l00795"></a>00795       <a class="codeRef" href="qwidget.html#setMouseTracking">setMouseTracking</a>(<span class="keyword">true</span>);
<a name="l00796"></a>00796 <span class="preprocessor">#endif</span>
<a name="l00797"></a>00797 <span class="preprocessor"></span>  }
<a name="l00798"></a>00798 }
<a name="l00799"></a>00799 
<a name="l00800"></a>00800 <span class="keywordtype">void</span> KDockWidget::applyToWidget( <a class="codeRef" href="qwidget.html">QWidget</a>* s, <span class="keyword">const</span> <a class="codeRef" href="qpoint.html">QPoint</a>&amp; p )
<a name="l00801"></a>00801 {
<a name="l00802"></a>00802   <span class="keywordflow">if</span> ( parent() != s )
<a name="l00803"></a>00803   {
<a name="l00804"></a>00804     <a class="codeRef" href="qwidget.html#hide">hide</a>();
<a name="l00805"></a>00805     <a class="codeRef" href="qwidget.html#reparent">reparent</a>(s, 0, <a class="codeRef" href="qpoint.html">QPoint</a>(0,0), <span class="keyword">false</span>);
<a name="l00806"></a>00806   }
<a name="l00807"></a>00807 
<a name="l00808"></a>00808   <span class="keywordflow">if</span> ( s &amp;&amp; s-&gt;inherits(<span class="stringliteral">&quot;KDockMainWindow&quot;</span>) ){
<a name="l00809"></a>00809     ((<a class="code" href="classKDockMainWindow.html" title="A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwi...">KDockMainWindow</a>*)s)-&gt;setView( <span class="keyword">this</span> );
<a name="l00810"></a>00810   }
<a name="l00811"></a>00811 
<a name="l00812"></a>00812   <span class="keywordflow">if</span> ( manager &amp;&amp; s == manager-&gt;main ){
<a name="l00813"></a>00813       <a class="codeRef" href="qwidget.html#setGeometry">setGeometry</a>( <a class="codeRef" href="qrect.html">QRect</a>(<a class="codeRef" href="qpoint.html">QPoint</a>(0,0), manager-&gt;main-&gt;<a class="codeRef" href="qwidget.html#geometry">geometry</a>().size()) );
<a name="l00814"></a>00814   }
<a name="l00815"></a>00815 
<a name="l00816"></a>00816   <span class="keywordflow">if</span> ( !s )
<a name="l00817"></a>00817   {
<a name="l00818"></a>00818     <a class="codeRef" href="qwidget.html#move">move</a>(p);
<a name="l00819"></a>00819 
<a name="l00820"></a>00820 <span class="preprocessor">#ifndef NO_KDE2</span>
<a name="l00821"></a>00821 <span class="preprocessor"></span><span class="preprocessor">#ifdef Q_WS_X11</span>
<a name="l00822"></a>00822 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (d-&gt;transient &amp;&amp; d-&gt;_parent)
<a name="l00823"></a>00823       XSetTransientForHint( qt_xdisplay(), <a class="codeRef" href="qwidget.html#winId">winId</a>(), d-&gt;_parent-&gt;<a class="codeRef" href="qwidget.html#winId">winId</a>() );
<a name="l00824"></a>00824 
<a name="l00825"></a>00825 <span class="preprocessor">#ifdef BORDERLESS_WINDOWS</span>
<a name="l00826"></a>00826 <span class="preprocessor"></span>    <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKWin.html#ab15084117ff775d5fea7ce99ad1b24be">KWin::setType</a>( <a class="codeRef" href="qwidget.html#winId">winId</a>(), <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classNET.html#a4b3115c0f40e7bc8e38119cc44dd60e0a169c19bad87c970ee27283f2b3378b7e">NET::Override</a>); <span class="comment">//d-&gt;windowType );</span>
<a name="l00827"></a>00827 <span class="comment">//      setWFlags(WStyle_Customize | WStyle_NoBorder | WStyle_Tool);</span>
<a name="l00828"></a>00828 <span class="preprocessor">#else</span>
<a name="l00829"></a>00829 <span class="preprocessor"></span>    <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKWin.html#ab15084117ff775d5fea7ce99ad1b24be">KWin::setType</a>( <a class="codeRef" href="qwidget.html#winId">winId</a>(), d-&gt;windowType );
<a name="l00830"></a>00830 <span class="preprocessor">#endif // BORDERLESS_WINDOW</span>
<a name="l00831"></a>00831 <span class="preprocessor"></span><span class="preprocessor">#endif // Q_WS_X11</span>
<a name="l00832"></a>00832 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00833"></a>00833 <span class="preprocessor"></span>
<a name="l00834"></a>00834   }
<a name="l00835"></a>00835   <a class="code" href="classKDockWidget.html#a5ef45e3136d313bb26b2fa7f22e7b961" title="Checks some conditions and shows or hides the dockwidget header (drag panel).">updateHeader</a>();
<a name="l00836"></a>00836 
<a name="l00837"></a>00837   <a class="codeRef" href="qwidget.html#setIcon">setIcon</a>(*pix);
<a name="l00838"></a>00838 }
<a name="l00839"></a>00839 
<a name="l00840"></a><a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4">00840</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">KDockWidget::show</a>()
<a name="l00841"></a>00841 {
<a name="l00842"></a>00842   <span class="keywordflow">if</span> ( parent() || manager-&gt;main-&gt;<a class="codeRef" href="qwidget.html#isVisible">isVisible</a>() )
<a name="l00843"></a>00843     <span class="keywordflow">if</span> ( !parent() ){
<a name="l00844"></a>00844      emit manager-&gt;<a class="code" href="classKDockManager.html#aa2732226e399b04bb4670a21704dd2d3" title="Signals a dockwidget without parent (toplevel) is shown.">setDockDefaultPos</a>( <span class="keyword">this</span> );
<a name="l00845"></a>00845      emit <a class="code" href="classKDockWidget.html#a35ecf12f13c0735913a95835b2cf4f5c" title="Signals that the dock default position is set.">setDockDefaultPos</a>();
<a name="l00846"></a>00846      <span class="keywordflow">if</span> ( parent() ){
<a name="l00847"></a>00847         <a class="code" href="classKDockWidget.html#a1156e8c4d79e454cac3d51b50babd87e" title="Normally it simply shows the dockwidget.">makeDockVisible</a>();
<a name="l00848"></a>00848       } <span class="keywordflow">else</span> {
<a name="l00849"></a>00849         <a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">QWidget::show</a>();
<a name="l00850"></a>00850       }
<a name="l00851"></a>00851     } <span class="keywordflow">else</span> {
<a name="l00852"></a>00852      <a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">QWidget::show</a>();
<a name="l00853"></a>00853     }
<a name="l00854"></a>00854 }
<a name="l00855"></a>00855 
<a name="l00856"></a>00856 <span class="preprocessor">#ifndef NO_KDE2</span>
<a name="l00857"></a>00857 <span class="preprocessor"></span>
<a name="l00858"></a><a class="code" href="classKDockWidget.html#a908278413fb4855142aecbfedd95f8e4">00858</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a908278413fb4855142aecbfedd95f8e4" title="Sets the type of the dock window.">KDockWidget::setDockWindowType</a> (<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classNET.html#a4b3115c0f40e7bc8e38119cc44dd60e0">NET::WindowType</a> windowType)
<a name="l00859"></a>00859 {
<a name="l00860"></a>00860   d-&gt;windowType = windowType;
<a name="l00861"></a>00861   applyToWidget( <a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>(), <a class="codeRef" href="qpoint.html">QPoint</a>(0,0) );
<a name="l00862"></a>00862 }
<a name="l00863"></a>00863 
<a name="l00864"></a>00864 <span class="preprocessor">#endif</span>
<a name="l00865"></a>00865 <span class="preprocessor"></span>
<a name="l00866"></a>00866 <span class="keywordtype">void</span> KDockWidget::setDockWindowTransient (<a class="codeRef" href="qwidget.html">QWidget</a> *parent, <span class="keywordtype">bool</span> transientEnabled)
<a name="l00867"></a>00867 {
<a name="l00868"></a>00868   d-&gt;_parent = parent;
<a name="l00869"></a>00869   d-&gt;transient = transientEnabled;
<a name="l00870"></a>00870   applyToWidget( <a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>(), <a class="codeRef" href="qpoint.html">QPoint</a>(0,0) );
<a name="l00871"></a>00871 }
<a name="l00872"></a>00872 
<a name="l00873"></a><a class="code" href="classKDockWidget.html#ae5467537d5dba824f002ef35f2a434d3">00873</a> <a class="codeRef" href="qwidget.html">QWidget</a> *<a class="code" href="classKDockWidget.html#ae5467537d5dba824f002ef35f2a434d3" title="Returns the widget this dockwidget is set transient to, otherwise 0.">KDockWidget::transientTo</a>() {
<a name="l00874"></a>00874     <span class="keywordflow">if</span> (d-&gt;transient &amp;&amp; d-&gt;_parent) <span class="keywordflow">return</span> d-&gt;_parent; <span class="keywordflow">else</span> <span class="keywordflow">return</span> 0;
<a name="l00875"></a>00875 }
<a name="l00876"></a>00876 
<a name="l00877"></a><a class="code" href="classKDockWidget.html#acf40d423a754a33eabf8a96ca4895262">00877</a> <span class="keywordtype">bool</span> <a class="code" href="classKDockWidget.html#acf40d423a754a33eabf8a96ca4895262" title="Catches and processes some QWidget events that are interesting for dockwidgets.">KDockWidget::event</a>( <a class="codeRef" href="qevent.html">QEvent</a> *event )
<a name="l00878"></a>00878 {
<a name="l00879"></a>00879   <span class="keywordflow">switch</span> ( event-&gt;<a class="codeRef" href="qevent.html#type">type</a>() )
<a name="l00880"></a>00880   {
<a name="l00881"></a>00881 <span class="preprocessor">    #undef FocusIn</span>
<a name="l00882"></a>00882 <span class="preprocessor"></span>    <span class="keywordflow">case</span> QEvent::FocusIn:
<a name="l00883"></a>00883       <span class="keywordflow">if</span> (widget &amp;&amp; !d-&gt;pendingFocusInEvent) {
<a name="l00884"></a>00884          d-&gt;pendingFocusInEvent = <span class="keyword">true</span>;
<a name="l00885"></a>00885          widget-&gt;<a class="codeRef" href="qwidget.html#setFocus">setFocus</a>();
<a name="l00886"></a>00886       }
<a name="l00887"></a>00887       d-&gt;pendingFocusInEvent = <span class="keyword">false</span>;
<a name="l00888"></a>00888       <span class="keywordflow">break</span>;
<a name="l00889"></a>00889     <span class="keywordflow">case</span> QEvent::ChildRemoved:
<a name="l00890"></a>00890       <span class="keywordflow">if</span> ( widget == ((<a class="codeRef" href="qchildevent.html">QChildEvent</a>*)event)-&gt;child() ) widget = 0L;
<a name="l00891"></a>00891       <span class="keywordflow">break</span>;
<a name="l00892"></a>00892     <span class="keywordflow">case</span> QEvent::Show:
<a name="l00893"></a>00893       <span class="keywordflow">if</span> ( widget ) widget-&gt;<a class="codeRef" href="qwidget.html#show">show</a>();
<a name="l00894"></a>00894       emit manager-&gt;<a class="code" href="classKDockManager.html#ab770e89a8c442bde32d7285ddbd2cfd9" title="Signals changes of the docking state of a dockwidget.">change</a>();
<a name="l00895"></a>00895       <span class="keywordflow">break</span>;
<a name="l00896"></a>00896     <span class="keywordflow">case</span> QEvent::Hide:
<a name="l00897"></a>00897       <span class="keywordflow">if</span> ( widget ) widget-&gt;<a class="codeRef" href="qwidget.html#hide">hide</a>();
<a name="l00898"></a>00898       emit manager-&gt;<a class="code" href="classKDockManager.html#ab770e89a8c442bde32d7285ddbd2cfd9" title="Signals changes of the docking state of a dockwidget.">change</a>();
<a name="l00899"></a>00899       <span class="keywordflow">break</span>;
<a name="l00900"></a>00900     <span class="keywordflow">case</span> QEvent::CaptionChange:
<a name="l00901"></a>00901       <span class="keywordflow">if</span> ( <a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>() ){
<a name="l00902"></a>00902         <span class="keywordflow">if</span> ( parent()-&gt;inherits(<span class="stringliteral">&quot;KDockSplitter&quot;</span>) ){
<a name="l00903"></a>00903           ((<a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*)(parent()))-&gt;updateName();
<a name="l00904"></a>00904         }
<a name="l00905"></a>00905         <span class="keywordflow">if</span> ( <a class="code" href="classKDockWidget.html#ac8ff680712c0da5e3a004e566b1210d6">parentDockTabGroup</a>() ){
<a name="l00906"></a>00906           setDockTabName( <a class="code" href="classKDockWidget.html#ac8ff680712c0da5e3a004e566b1210d6">parentDockTabGroup</a>() );
<a name="l00907"></a>00907           <a class="code" href="classKDockWidget.html#ac8ff680712c0da5e3a004e566b1210d6">parentDockTabGroup</a>()-&gt;<a class="codeRef" href="qtabwidget.html#setTabLabel">setTabLabel</a>( <span class="keyword">this</span>, <a class="code" href="classKDockWidget.html#a67c74dfbbca7ace072bc6c0611e094a6">tabPageLabel</a>() );
<a name="l00908"></a>00908         }
<a name="l00909"></a>00909       }
<a name="l00910"></a>00910       <span class="keywordflow">break</span>;
<a name="l00911"></a>00911     <span class="keywordflow">case</span> QEvent::Close:
<a name="l00912"></a>00912       emit <a class="code" href="classKDockWidget.html#affc34671059cd324ca23f5db9dc4b00a" title="Emitted when the widget processes a close event.">iMBeingClosed</a>();
<a name="l00913"></a>00913       <span class="keywordflow">break</span>;
<a name="l00914"></a>00914     <span class="keywordflow">default</span>:
<a name="l00915"></a>00915       <span class="keywordflow">break</span>;
<a name="l00916"></a>00916   }
<a name="l00917"></a>00917   <span class="keywordflow">return</span> <a class="code" href="classKDockWidget.html#acf40d423a754a33eabf8a96ca4895262" title="Catches and processes some QWidget events that are interesting for dockwidgets.">QWidget::event</a>( event );
<a name="l00918"></a>00918 }
<a name="l00919"></a>00919 
<a name="l00920"></a><a class="code" href="classKDockWidget.html#a6125e14f1a7c9c0c8d3fe9c835cff090">00920</a> <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *<a class="code" href="classKDockWidget.html#a6125e14f1a7c9c0c8d3fe9c835cff090" title="Lookup the nearest dockwidget docked left/right/top/bottom to this one or return 0.">KDockWidget::findNearestDockWidget</a>(<a class="code" href="classKDockWidget.html#aa6d125044bf12191210c8cce5b5c4c62" title="The possible positions where a dockwidget can dock to another dockwidget.">DockPosition</a> pos)
<a name="l00921"></a>00921 {
<a name="l00922"></a>00922     <span class="keywordflow">if</span> (!parent()) <span class="keywordflow">return</span> 0;
<a name="l00923"></a>00923     <span class="keywordflow">if</span> (!parent()-&gt;inherits(<span class="stringliteral">&quot;KDockSplitter&quot;</span>)) <span class="keywordflow">return</span> 0;
<a name="l00924"></a>00924     Orientation orientation=((pos==DockLeft) || (pos==DockRight)) ? Vertical:Horizontal;
<a name="l00925"></a>00925         <span class="keywordflow">if</span> (((<a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*)(parent()))-&gt;orientation()==orientation)
<a name="l00926"></a>00926         {
<a name="l00927"></a>00927             <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *neighbor=
<a name="l00928"></a>00928                 ((pos==DockLeft)||(pos==DockTop))?
<a name="l00929"></a>00929                 static_cast&lt;KDockWidget*&gt;(((<a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*)(parent()))-&gt;getFirst()):
<a name="l00930"></a>00930                 static_cast&lt;KDockWidget*&gt;(((<a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*)(parent()))-&gt;getLast());
<a name="l00931"></a>00931 
<a name="l00932"></a>00932             <span class="keywordflow">if</span> (neighbor==<span class="keyword">this</span>)
<a name="l00933"></a>00933             <span class="keywordflow">return</span> (static_cast&lt;KDockWidget*&gt;(parent()-&gt;parent())-&gt;findNearestDockWidget(pos));
<a name="l00934"></a>00934             <span class="keywordflow">else</span>
<a name="l00935"></a>00935             <span class="keywordflow">if</span> (neighbor-&gt;<a class="code" href="classKDockWidget.html#aa347dafe43d49d61d7a252f4ad9532d4" title="Get the embedded widget.">getWidget</a>() &amp;&amp; (neighbor-&gt;<a class="code" href="classKDockWidget.html#aa347dafe43d49d61d7a252f4ad9532d4" title="Get the embedded widget.">getWidget</a>()-&gt;qt_cast(<span class="stringliteral">&quot;KDockTabGroup&quot;</span>)))
<a name="l00936"></a>00936                 <span class="keywordflow">return</span> (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)(((<a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>*)neighbor-&gt;<a class="code" href="classKDockWidget.html#aa347dafe43d49d61d7a252f4ad9532d4" title="Get the embedded widget.">getWidget</a>())-&gt;page(0));
<a name="l00937"></a>00937             <span class="keywordflow">else</span>
<a name="l00938"></a>00938             <span class="keywordflow">return</span> neighbor;
<a name="l00939"></a>00939         }
<a name="l00940"></a>00940         <span class="keywordflow">else</span>
<a name="l00941"></a>00941         <span class="keywordflow">return</span> (static_cast&lt;KDockWidget*&gt;(parent()-&gt;parent())-&gt;<a class="code" href="classKDockWidget.html#a6125e14f1a7c9c0c8d3fe9c835cff090" title="Lookup the nearest dockwidget docked left/right/top/bottom to this one or return 0.">findNearestDockWidget</a>(pos));
<a name="l00942"></a>00942 
<a name="l00943"></a>00943     <span class="keywordflow">return</span> 0;
<a name="l00944"></a>00944 }
<a name="l00945"></a>00945 
<a name="l00946"></a>00946 
<a name="l00947"></a><a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4">00947</a> <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* <a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4" title="This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...">KDockWidget::manualDock</a>( <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* target, <a class="code" href="classKDockWidget.html#aa6d125044bf12191210c8cce5b5c4c62" title="The possible positions where a dockwidget can dock to another dockwidget.">DockPosition</a> dockPos, <span class="keywordtype">int</span> spliPos, <a class="codeRef" href="qpoint.html">QPoint</a> pos, <span class="keywordtype">bool</span> check, <span class="keywordtype">int</span> tabIndex )
<a name="l00948"></a>00948 {
<a name="l00949"></a>00949   <span class="keywordflow">if</span> (<span class="keyword">this</span> == target)
<a name="l00950"></a>00950     <span class="keywordflow">return</span> 0L;  <span class="comment">// docking to itself not possible</span>
<a name="l00951"></a>00951 
<a name="l00952"></a>00952 <span class="comment">//  kdDebug(282)&lt;&lt;&quot;manualDock called &quot;&lt;&lt;endl;</span>
<a name="l00953"></a>00953   <span class="keywordtype">bool</span> success = <span class="keyword">true</span>; <span class="comment">// tested flag</span>
<a name="l00954"></a>00954 
<a name="l00955"></a>00955   <span class="comment">// Check to make sure that we can dock in to the position wee</span>
<a name="l00956"></a>00956   <span class="comment">// were told to dock in to</span>
<a name="l00957"></a>00957   <span class="keywordflow">if</span> ( !(eDocking &amp; (<span class="keywordtype">int</span>)dockPos) ){
<a name="l00958"></a>00958     success = <span class="keyword">false</span>;
<a name="l00959"></a>00959 <span class="comment">//  kdDebug(282)&lt;&lt;&quot;KDockWidget::manualDock(): success = false (1)&quot;&lt;&lt;endl;</span>
<a name="l00960"></a>00960   }
<a name="l00961"></a>00961 
<a name="l00962"></a>00962   <span class="comment">// fix for apps which use a value &gt; 100%. The splitter position must be between 0..100</span>
<a name="l00963"></a>00963   <span class="comment">// The old behavior on high resolution was 0..10000. So likely the value is &gt;100.</span>
<a name="l00964"></a>00964   <span class="keywordflow">if</span> (spliPos &gt; 100) {
<a name="l00965"></a>00965       spliPos = spliPos / 100;
<a name="l00966"></a>00966       <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282) &lt;&lt; <span class="stringliteral">&quot;KDockWidget::manualDock(): fix splitter position: &quot;</span> &lt;&lt; spliPos &lt;&lt; <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l00967"></a>00967   }
<a name="l00968"></a>00968 
<a name="l00969"></a>00969   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *tmpTarget = 0;
<a name="l00970"></a>00970   <span class="keywordflow">switch</span> (dockPos) {
<a name="l00971"></a>00971     <span class="keywordflow">case</span> DockLeft:
<a name="l00972"></a>00972         tmpTarget=<a class="code" href="classKDockWidget.html#a6ccee01af3dbaa7764bce2566ecf912d">dockManager</a>()-&gt;d-&gt;leftContainer;
<a name="l00973"></a>00973         <span class="keywordflow">break</span>;
<a name="l00974"></a>00974     <span class="keywordflow">case</span> DockRight:
<a name="l00975"></a>00975         tmpTarget=<a class="code" href="classKDockWidget.html#a6ccee01af3dbaa7764bce2566ecf912d">dockManager</a>()-&gt;d-&gt;rightContainer;
<a name="l00976"></a>00976         <span class="keywordflow">break</span>;
<a name="l00977"></a>00977     <span class="keywordflow">case</span> DockBottom:
<a name="l00978"></a>00978         tmpTarget=<a class="code" href="classKDockWidget.html#a6ccee01af3dbaa7764bce2566ecf912d">dockManager</a>()-&gt;d-&gt;bottomContainer;
<a name="l00979"></a>00979         <span class="keywordflow">break</span>;
<a name="l00980"></a>00980     <span class="keywordflow">case</span> DockTop:
<a name="l00981"></a>00981         tmpTarget=<a class="code" href="classKDockWidget.html#a6ccee01af3dbaa7764bce2566ecf912d">dockManager</a>()-&gt;d-&gt;topContainer;
<a name="l00982"></a>00982         <span class="keywordflow">break</span>;
<a name="l00983"></a>00983     <span class="keywordflow">default</span>:
<a name="l00984"></a>00984         tmpTarget = 0;
<a name="l00985"></a>00985   }
<a name="l00986"></a>00986 
<a name="l00987"></a>00987   <span class="comment">//If we&#39;re not the target, and the target is our dock manager&#39;s main window</span>
<a name="l00988"></a>00988   <span class="comment">//dock into the temp target as chosen above</span>
<a name="l00989"></a>00989   <span class="keywordflow">if</span> ( tmpTarget &amp;&amp; target &amp;&amp; <span class="keyword">this</span> != tmpTarget &amp;&amp; target == <a class="code" href="classKDockWidget.html#a6ccee01af3dbaa7764bce2566ecf912d">dockManager</a>()-&gt;d-&gt;mainDockWidget )
<a name="l00990"></a>00990     <span class="keywordflow">return</span> <a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4" title="This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...">manualDock</a>(tmpTarget,DockCenter,spliPos,pos,check,tabIndex);
<a name="l00991"></a>00991 
<a name="l00992"></a>00992   <span class="comment">// check if the target allows us to oock into the requested position</span>
<a name="l00993"></a>00993   <span class="keywordflow">if</span> ( target &amp;&amp; !(target-&gt;sDocking &amp; (<span class="keywordtype">int</span>)dockPos) ){
<a name="l00994"></a>00994     success = <span class="keyword">false</span>;
<a name="l00995"></a>00995 <span class="comment">//  kdDebug(282)&lt;&lt;&quot;KDockWidget::manualDock(): success = false (2)&quot;&lt;&lt;endl;</span>
<a name="l00996"></a>00996   }
<a name="l00997"></a>00997 
<a name="l00998"></a>00998   <span class="comment">/* if we have a parent, and it&#39;s not a KDockSplitter, and we don&#39;t have a parent</span>
<a name="l00999"></a>00999 <span class="comment">   * dock tab group, and our parent isn&#39;t a KDockContainer, and we have no explicit</span>
<a name="l01000"></a>01000 <span class="comment">   * parent dock container...we can&#39;t do much yet */</span>
<a name="l01001"></a>01001   <span class="keywordflow">if</span> ( parent() &amp;&amp; !parent()-&gt;inherits(<span class="stringliteral">&quot;KDockSplitter&quot;</span>) &amp;&amp; !<a class="code" href="classKDockWidget.html#ac8ff680712c0da5e3a004e566b1210d6">parentDockTabGroup</a>() &amp;&amp;
<a name="l01002"></a>01002     !(dynamic_cast&lt;KDockContainer*&gt;(parent())) &amp;&amp; !<a class="code" href="classKDockWidget.html#a8230b0eeae93c10df095401740dadf9d">parentDockContainer</a>()){
<a name="l01003"></a>01003 <span class="comment">//  kdDebug(282)&lt;&lt;&quot;KDockWidget::manualDock(): success = false (3)&quot;&lt;&lt;endl;</span>
<a name="l01004"></a>01004 <span class="comment">//  kdDebug(282)&lt;&lt;parent()-&gt;name()&lt;&lt;endl;</span>
<a name="l01005"></a>01005     success = <span class="keyword">false</span>;
<a name="l01006"></a>01006   }
<a name="l01007"></a>01007 
<a name="l01008"></a>01008   <span class="comment">/* If all of our attempts to dock back so far have failed and we have a target</span>
<a name="l01009"></a>01009 <span class="comment">   * and we&#39;re not being called recursively (i guess that&#39;s what check is for)</span>
<a name="l01010"></a>01010 <span class="comment">   * then attempt to dock back to ourselves. */</span>
<a name="l01011"></a>01011   <span class="keywordflow">if</span> ( !success ){
<a name="l01012"></a>01012     <span class="comment">// try to make another manualDock</span>
<a name="l01013"></a>01013     <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* dock_result = 0L;
<a name="l01014"></a>01014     <span class="keywordflow">if</span> ( target &amp;&amp; !check ){
<a name="l01015"></a>01015       <a class="code" href="classKDockWidget.html#aa6d125044bf12191210c8cce5b5c4c62" title="The possible positions where a dockwidget can dock to another dockwidget.">KDockWidget::DockPosition</a> another__dockPos = KDockWidget::DockNone;
<a name="l01016"></a>01016       <span class="keywordflow">switch</span> ( dockPos ){
<a name="l01017"></a>01017         <span class="keywordflow">case</span> KDockWidget::DockLeft  : another__dockPos = KDockWidget::DockRight ; <span class="keywordflow">break</span>;
<a name="l01018"></a>01018         <span class="keywordflow">case</span> KDockWidget::DockRight : another__dockPos = KDockWidget::DockLeft  ; <span class="keywordflow">break</span>;
<a name="l01019"></a>01019         <span class="keywordflow">case</span> KDockWidget::DockTop   : another__dockPos = KDockWidget::DockBottom; <span class="keywordflow">break</span>;
<a name="l01020"></a>01020         <span class="keywordflow">case</span> KDockWidget::DockBottom: another__dockPos = KDockWidget::DockTop   ; <span class="keywordflow">break</span>;
<a name="l01021"></a>01021         <span class="keywordflow">default</span>: <span class="keywordflow">break</span>;
<a name="l01022"></a>01022       }
<a name="l01023"></a>01023       dock_result = target-&gt;<a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4" title="This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...">manualDock</a>( <span class="keyword">this</span>, another__dockPos, spliPos, pos, <span class="keyword">true</span>, tabIndex );
<a name="l01024"></a>01024     }
<a name="l01025"></a>01025     <span class="keywordflow">return</span> dock_result;
<a name="l01026"></a>01026   }
<a name="l01027"></a>01027   <span class="comment">// end check block</span>
<a name="l01028"></a>01028 
<a name="l01029"></a>01029   d-&gt;blockHasUndockedSignal = <span class="keyword">true</span>;
<a name="l01030"></a>01030   <a class="code" href="classKDockWidget.html#a2fa098fe2ac988870e7c86b1006e114c" title="Undocks this.">undock</a>();
<a name="l01031"></a>01031   d-&gt;blockHasUndockedSignal = <span class="keyword">false</span>;
<a name="l01032"></a>01032 
<a name="l01033"></a>01033   <span class="comment">//we have no docking target, so we&#39;re undocking</span>
<a name="l01034"></a>01034   <span class="keywordflow">if</span> ( !target ){
<a name="l01035"></a>01035     <a class="codeRef" href="qwidget.html#move">move</a>( pos );
<a name="l01036"></a>01036     <a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l01037"></a>01037     emit manager-&gt;<a class="code" href="classKDockManager.html#ab770e89a8c442bde32d7285ddbd2cfd9" title="Signals changes of the docking state of a dockwidget.">change</a>();
<a name="l01038"></a>01038     <span class="keywordflow">return</span> <span class="keyword">this</span>;
<a name="l01039"></a>01039   }
<a name="l01040"></a>01040 
<a name="l01041"></a>01041 <span class="comment">//  kdDebug(282)&lt;&lt;&quot;Looking for  KDockTabGroup&quot;&lt;&lt;endl;</span>
<a name="l01042"></a>01042   <a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>* parentTab = target-&gt;<a class="code" href="classKDockWidget.html#ac8ff680712c0da5e3a004e566b1210d6">parentDockTabGroup</a>();
<a name="l01043"></a>01043   <span class="keywordflow">if</span> ( parentTab ){
<a name="l01044"></a>01044     <span class="comment">// add to existing TabGroup</span>
<a name="l01045"></a>01045     applyToWidget( parentTab );
<a name="l01046"></a>01046     parentTab-&gt;<a class="codeRef" href="qtabwidget.html#insertTab">insertTab</a>( <span class="keyword">this</span>, <a class="codeRef" href="qwidget.html#icon">icon</a>() ? *<a class="codeRef" href="qwidget.html#icon">icon</a>() : <a class="codeRef" href="qpixmap.html">QPixmap</a>(),
<a name="l01047"></a>01047                           <a class="code" href="classKDockWidget.html#a67c74dfbbca7ace072bc6c0611e094a6">tabPageLabel</a>(), tabIndex );
<a name="l01048"></a>01048 
<a name="l01049"></a>01049     <a class="codeRef" href="qwidget.html">QWidget</a> *wantTransient=parentTab-&gt;transientTo();
<a name="l01050"></a>01050     target-&gt;setDockWindowTransient(wantTransient,wantTransient);
<a name="l01051"></a>01051 
<a name="l01052"></a>01052     setDockTabName( parentTab );
<a name="l01053"></a>01053     <span class="keywordflow">if</span>( !<a class="code" href="classKDockWidget.html#a3c674b317b4fff37d6b1d7332adf1da5" title="a string used as tooltip for the tab page header when in dock-centered mode.">toolTipStr</a>.<a class="codeRef" href="qstring.html#isEmpty">isEmpty</a>())
<a name="l01054"></a>01054       parentTab-&gt;<a class="codeRef" href="qtabwidget.html#setTabToolTip">setTabToolTip</a>( <span class="keyword">this</span>, <a class="code" href="classKDockWidget.html#a3c674b317b4fff37d6b1d7332adf1da5" title="a string used as tooltip for the tab page header when in dock-centered mode.">toolTipStr</a>);
<a name="l01055"></a>01055 
<a name="l01056"></a>01056     <a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = KDockWidget::DockCenter;
<a name="l01057"></a>01057     emit manager-&gt;<a class="code" href="classKDockManager.html#ab770e89a8c442bde32d7285ddbd2cfd9" title="Signals changes of the docking state of a dockwidget.">change</a>();
<a name="l01058"></a>01058     <span class="keywordflow">return</span> (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)parentTab-&gt;parent();
<a name="l01059"></a>01059   }
<a name="l01060"></a>01060   <span class="keywordflow">else</span>
<a name="l01061"></a>01061   {
<a name="l01062"></a>01062 <span class="comment">//      kdDebug(282)&lt;&lt;&quot;Looking for  KDockContainer&quot;&lt;&lt;endl;</span>
<a name="l01063"></a>01063     <a class="codeRef" href="qwidget.html">QWidget</a> *contWid=target-&gt;<a class="code" href="classKDockWidget.html#a8230b0eeae93c10df095401740dadf9d">parentDockContainer</a>();
<a name="l01064"></a>01064       <span class="keywordflow">if</span> (!contWid) contWid=target-&gt;widget;
<a name="l01065"></a>01065       <span class="keywordflow">if</span> (contWid)
<a name="l01066"></a>01066       {
<a name="l01067"></a>01067         KDockContainer *cont=<span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(contWid);
<a name="l01068"></a>01068           <span class="keywordflow">if</span> (cont)
<a name="l01069"></a>01069           {
<a name="l01070"></a>01070             <span class="keywordflow">if</span> (<a class="code" href="classKDockWidget.html#afbbaf10bb6f64c1638663a4ec7840f38">latestKDockContainer</a>() &amp;&amp; (<a class="code" href="classKDockWidget.html#afbbaf10bb6f64c1638663a4ec7840f38">latestKDockContainer</a>()!=contWid)) {
<a name="l01071"></a>01071                 KDockContainer* dc = <span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(<a class="code" href="classKDockWidget.html#afbbaf10bb6f64c1638663a4ec7840f38">latestKDockContainer</a>());
<a name="l01072"></a>01072                 <span class="keywordflow">if</span> (dc) {
<a name="l01073"></a>01073                     dc-&gt;removeWidget(<span class="keyword">this</span>);
<a name="l01074"></a>01074                 }
<a name="l01075"></a>01075             }
<a name="l01076"></a>01076 <span class="comment">//          kdDebug(282)&lt;&lt;&quot;KDockContainerFound&quot;&lt;&lt;endl;</span>
<a name="l01077"></a>01077             applyToWidget( contWid );
<a name="l01078"></a>01078             cont-&gt;insertWidget( <span class="keyword">this</span>, <a class="codeRef" href="qwidget.html#icon">icon</a>() ? *<a class="codeRef" href="qwidget.html#icon">icon</a>() : <a class="codeRef" href="qpixmap.html">QPixmap</a>(),
<a name="l01079"></a>01079                         <a class="code" href="classKDockWidget.html#a67c74dfbbca7ace072bc6c0611e094a6">tabPageLabel</a>(), tabIndex );
<a name="l01080"></a>01080             <a class="code" href="classKDockWidget.html#ad14b56d359bff1655ee4f720bbccbddb">setLatestKDockContainer</a>(contWid);
<a name="l01081"></a>01081 <span class="comment">//          setDockTabName( parentTab );</span>
<a name="l01082"></a>01082             <span class="keywordflow">if</span>( !<a class="code" href="classKDockWidget.html#a3c674b317b4fff37d6b1d7332adf1da5" title="a string used as tooltip for the tab page header when in dock-centered mode.">toolTipStr</a>.<a class="codeRef" href="qstring.html#isEmpty">isEmpty</a>())
<a name="l01083"></a>01083             cont-&gt;setToolTip( <span class="keyword">this</span>, <a class="code" href="classKDockWidget.html#a3c674b317b4fff37d6b1d7332adf1da5" title="a string used as tooltip for the tab page header when in dock-centered mode.">toolTipStr</a>);
<a name="l01084"></a>01084 
<a name="l01085"></a>01085             <a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = KDockWidget::DockCenter;
<a name="l01086"></a>01086             emit manager-&gt;<a class="code" href="classKDockManager.html#ab770e89a8c442bde32d7285ddbd2cfd9" title="Signals changes of the docking state of a dockwidget.">change</a>();
<a name="l01087"></a>01087             <span class="keywordflow">return</span> (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)(cont-&gt;parentDockWidget());
<a name="l01088"></a>01088 
<a name="l01089"></a>01089           }
<a name="l01090"></a>01090       }
<a name="l01091"></a>01091   }
<a name="l01092"></a>01092 
<a name="l01093"></a>01093   <span class="comment">// create a new dockwidget that will contain the target and this</span>
<a name="l01094"></a>01094   <a class="codeRef" href="qwidget.html">QWidget</a>* parentDock = target-&gt;<a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>();
<a name="l01095"></a>01095   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* newDock = <span class="keyword">new</span> <a class="code" href="classKDockWidget.html#a43465c98c4b19b89b28b5f2238a9b173" title="Construct a dockwidget.">KDockWidget</a>( manager, <span class="stringliteral">&quot;tempName&quot;</span>, <a class="codeRef" href="qpixmap.html">QPixmap</a>(<span class="stringliteral">&quot;&quot;</span>), parentDock );
<a name="l01096"></a>01096   newDock-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = target-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a>;
<a name="l01097"></a>01097 
<a name="l01098"></a>01098   <span class="keywordflow">if</span> ( dockPos == KDockWidget::DockCenter ){
<a name="l01099"></a>01099     newDock-&gt;isTabGroup = <span class="keyword">true</span>;
<a name="l01100"></a>01100   } <span class="keywordflow">else</span> {
<a name="l01101"></a>01101     newDock-&gt;isGroup = <span class="keyword">true</span>;
<a name="l01102"></a>01102   }
<a name="l01103"></a>01103   newDock-&gt;eDocking = (target-&gt;eDocking &amp; eDocking) &amp; (~(<span class="keywordtype">int</span>)KDockWidget::DockCenter);
<a name="l01104"></a>01104 
<a name="l01105"></a>01105   newDock-&gt;applyToWidget( parentDock );
<a name="l01106"></a>01106 
<a name="l01107"></a>01107   <span class="keywordflow">if</span> ( !parentDock ){
<a name="l01108"></a>01108     <span class="comment">// dock to a toplevel dockwidget means newDock is toplevel now</span>
<a name="l01109"></a>01109     newDock-&gt;<a class="codeRef" href="qwidget.html#move">move</a>( target-&gt;<a class="codeRef" href="qwidget.html#frameGeometry">frameGeometry</a>().topLeft() );
<a name="l01110"></a>01110     newDock-&gt;<a class="codeRef" href="qwidget.html#resize">resize</a>( target-&gt;<a class="codeRef" href="qwidget.html#geometry">geometry</a>().size() );
<a name="l01111"></a>01111     <span class="keywordflow">if</span> ( target-&gt;<a class="codeRef" href="qwidget.html#isVisibleToTLW">isVisibleToTLW</a>() ) newDock-&gt;<a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l01112"></a>01112   }
<a name="l01113"></a>01113 
<a name="l01114"></a>01114   <span class="comment">// redirect the dockback button to the new dockwidget</span>
<a name="l01115"></a>01115   <span class="keywordflow">if</span>( target-&gt;<a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a> ) {
<a name="l01116"></a>01116     newDock-&gt;<a class="code" href="classKDockWidget.html#aa3320a716c7f824f1bad7edb39e62781">setFormerBrotherDockWidget</a>(target-&gt;<a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a>);
<a name="l01117"></a>01117     <span class="keywordflow">if</span>( <a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a> )
<a name="l01118"></a>01118       target-&gt;<a class="code" href="classKDockWidget.html#a17227fcbdee4d2710b11ad992d8bed54" title="Does several things here when it has noticed that the former brother widget (closest neighbor) gets l...">loseFormerBrotherDockWidget</a>();
<a name="l01119"></a>01119     }
<a name="l01120"></a>01120   newDock-&gt;<a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a> = target-&gt;<a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a>;
<a name="l01121"></a>01121 
<a name="l01122"></a>01122 
<a name="l01123"></a>01123  <span class="comment">// HERE SOMETING CREATING CONTAINERS SHOULD BE ADDED !!!!!</span>
<a name="l01124"></a>01124   <span class="keywordflow">if</span> ( dockPos == KDockWidget::DockCenter )
<a name="l01125"></a>01125   {
<a name="l01126"></a>01126     <a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>* tab = <span class="keyword">new</span> <a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>( newDock, <span class="stringliteral">&quot;_dock_tab&quot;</span>);
<a name="l01127"></a>01127     <a class="codeRef" href="qobject.html#connect">QObject::connect</a>(tab, SIGNAL(currentChanged(<a class="codeRef" href="qwidget.html">QWidget</a>*)), d, SLOT(slotFocusEmbeddedWidget(<a class="codeRef" href="qwidget.html">QWidget</a>*)));
<a name="l01128"></a>01128     newDock-&gt;<a class="code" href="classKDockWidget.html#a6e05e2f662f3f9bc2be966d4efb5c296" title="Sets the embedded widget.">setWidget</a>( tab );
<a name="l01129"></a>01129 
<a name="l01130"></a>01130     target-&gt;applyToWidget( tab );
<a name="l01131"></a>01131     applyToWidget( tab );
<a name="l01132"></a>01132 
<a name="l01133"></a>01133 
<a name="l01134"></a>01134     tab-&gt;<a class="codeRef" href="qtabwidget.html#insertTab">insertTab</a>( target, target-&gt;<a class="codeRef" href="qwidget.html#icon">icon</a>() ? *(target-&gt;<a class="codeRef" href="qwidget.html#icon">icon</a>()) : <a class="codeRef" href="qpixmap.html">QPixmap</a>(),
<a name="l01135"></a>01135                     target-&gt;<a class="code" href="classKDockWidget.html#a67c74dfbbca7ace072bc6c0611e094a6">tabPageLabel</a>() );
<a name="l01136"></a>01136 
<a name="l01137"></a>01137 
<a name="l01138"></a>01138 
<a name="l01139"></a>01139     <span class="keywordflow">if</span>( !target-&gt;<a class="code" href="classKDockWidget.html#a436dbefc8e1e6b300fffb6c3196241a5">toolTipString</a>().<a class="codeRef" href="qstring.html#isEmpty">isEmpty</a>())
<a name="l01140"></a>01140      tab-&gt;<a class="codeRef" href="qtabwidget.html#setTabToolTip">setTabToolTip</a>( target, target-&gt;<a class="code" href="classKDockWidget.html#a436dbefc8e1e6b300fffb6c3196241a5">toolTipString</a>());
<a name="l01141"></a>01141 
<a name="l01142"></a>01142     tab-&gt;<a class="codeRef" href="qtabwidget.html#insertTab">insertTab</a>( <span class="keyword">this</span>, <a class="codeRef" href="qwidget.html#icon">icon</a>() ? *<a class="codeRef" href="qwidget.html#icon">icon</a>() : <a class="codeRef" href="qpixmap.html">QPixmap</a>(),
<a name="l01143"></a>01143                     <a class="code" href="classKDockWidget.html#a67c74dfbbca7ace072bc6c0611e094a6">tabPageLabel</a>(), tabIndex );
<a name="l01144"></a>01144 
<a name="l01145"></a>01145     <a class="codeRef" href="qrect.html">QRect</a> geom=newDock-&gt;<a class="codeRef" href="qwidget.html#geometry">geometry</a>();
<a name="l01146"></a>01146     <a class="codeRef" href="qwidget.html">QWidget</a> *wantTransient=tab-&gt;transientTo();
<a name="l01147"></a>01147     newDock-&gt;setDockWindowTransient(wantTransient,wantTransient);
<a name="l01148"></a>01148     newDock-&gt;<a class="codeRef" href="qwidget.html#setGeometry">setGeometry</a>(geom);
<a name="l01149"></a>01149 
<a name="l01150"></a>01150     <span class="keywordflow">if</span>( !<a class="code" href="classKDockWidget.html#a436dbefc8e1e6b300fffb6c3196241a5">toolTipString</a>().isEmpty())
<a name="l01151"></a>01151       tab-&gt;<a class="codeRef" href="qtabwidget.html#setTabToolTip">setTabToolTip</a>( <span class="keyword">this</span>, <a class="code" href="classKDockWidget.html#a436dbefc8e1e6b300fffb6c3196241a5">toolTipString</a>());
<a name="l01152"></a>01152 
<a name="l01153"></a>01153     setDockTabName( tab );
<a name="l01154"></a>01154     tab-&gt;show();
<a name="l01155"></a>01155 
<a name="l01156"></a>01156     <a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = DockCenter;
<a name="l01157"></a>01157     target-&gt;<a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a> = target-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a>;
<a name="l01158"></a>01158     target-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = DockCenter;
<a name="l01159"></a>01159   }
<a name="l01160"></a>01160   <span class="keywordflow">else</span> {
<a name="l01161"></a>01161     <span class="comment">// if to dock not to the center of the target dockwidget,</span>
<a name="l01162"></a>01162     <span class="comment">// dock to newDock</span>
<a name="l01163"></a>01163     <a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>* panner = 0L;
<a name="l01164"></a>01164     <span class="keywordflow">if</span> ( dockPos == KDockWidget::DockTop  || dockPos == KDockWidget::DockBottom ) panner = <span class="keyword">new</span> <a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>( newDock, <span class="stringliteral">&quot;_dock_split_&quot;</span>, Horizontal, spliPos );
<a name="l01165"></a>01165     <span class="keywordflow">if</span> ( dockPos == KDockWidget::DockLeft || dockPos == KDockWidget::DockRight  ) panner = <span class="keyword">new</span> <a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>( newDock, <span class="stringliteral">&quot;_dock_split_&quot;</span>, Vertical , spliPos );
<a name="l01166"></a>01166     newDock-&gt;<a class="code" href="classKDockWidget.html#a6e05e2f662f3f9bc2be966d4efb5c296" title="Sets the embedded widget.">setWidget</a>( panner );
<a name="l01167"></a>01167 
<a name="l01168"></a>01168     panner-&gt;<a class="code" href="classKDockSplitter.html#a6442924cb9b462548965c96c759c5515" title="Set opaque flag.">setOpaqueResize</a>(manager-&gt;<a class="code" href="classKDockManager.html#a7386e1f2e0800e2d8ebd38e90a17303b" title="Returns true if opaque resizing is enabled, false otherwise.">splitterOpaqueResize</a>());
<a name="l01169"></a>01169     panner-&gt;<a class="code" href="classKDockSplitter.html#ad4339961f28f333300f2533d77c71273" title="If b is true, the splitter will keep its size on resize events.">setKeepSize</a>(manager-&gt;<a class="code" href="classKDockManager.html#a6b4b7942d9dfa715f498b97f975239e5" title="Returns true if the KeepSize is enabled, false otherwise.">splitterKeepSize</a>());
<a name="l01170"></a>01170     panner-&gt;<a class="codeRef" href="qwidget.html#setFocusPolicy">setFocusPolicy</a>( NoFocus );
<a name="l01171"></a>01171     target-&gt;applyToWidget( panner );
<a name="l01172"></a>01172     applyToWidget( panner );
<a name="l01173"></a>01173     target-&gt;<a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a> = target-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a>;
<a name="l01174"></a>01174     <span class="keywordflow">if</span> ( dockPos == KDockWidget::DockRight) {
<a name="l01175"></a>01175       panner-&gt;<a class="code" href="classKDockSplitter.html#a677a29710953981d93ba80c67d9510de" title="Initialize the splitter.">activate</a>( target, <span class="keyword">this</span> );
<a name="l01176"></a>01176       <a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = KDockWidget::DockRight;
<a name="l01177"></a>01177       target-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = KDockWidget::DockLeft;
<a name="l01178"></a>01178     }
<a name="l01179"></a>01179     <span class="keywordflow">else</span> <span class="keywordflow">if</span>( dockPos == KDockWidget::DockBottom) {
<a name="l01180"></a>01180       panner-&gt;<a class="code" href="classKDockSplitter.html#a677a29710953981d93ba80c67d9510de" title="Initialize the splitter.">activate</a>( target, <span class="keyword">this</span> );
<a name="l01181"></a>01181       <a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = KDockWidget::DockBottom;
<a name="l01182"></a>01182       target-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = KDockWidget::DockTop;
<a name="l01183"></a>01183     }
<a name="l01184"></a>01184     <span class="keywordflow">else</span> <span class="keywordflow">if</span>( dockPos == KDockWidget::DockTop) {
<a name="l01185"></a>01185       panner-&gt;<a class="code" href="classKDockSplitter.html#a677a29710953981d93ba80c67d9510de" title="Initialize the splitter.">activate</a>( <span class="keyword">this</span>, target );
<a name="l01186"></a>01186       <a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = KDockWidget::DockTop;
<a name="l01187"></a>01187       target-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = KDockWidget::DockBottom;
<a name="l01188"></a>01188     }
<a name="l01189"></a>01189     <span class="keywordflow">else</span> <span class="keywordflow">if</span>( dockPos == KDockWidget::DockLeft) {
<a name="l01190"></a>01190       panner-&gt;<a class="code" href="classKDockSplitter.html#a677a29710953981d93ba80c67d9510de" title="Initialize the splitter.">activate</a>( <span class="keyword">this</span>, target );
<a name="l01191"></a>01191       <a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = KDockWidget::DockLeft;
<a name="l01192"></a>01192       target-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = KDockWidget::DockRight;
<a name="l01193"></a>01193     }
<a name="l01194"></a>01194     target-&gt;<a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l01195"></a>01195     <a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l01196"></a>01196     panner-&gt;<a class="codeRef" href="qwidget.html#show">show</a>();
<a name="l01197"></a>01197   }
<a name="l01198"></a>01198 
<a name="l01199"></a>01199   <span class="keywordflow">if</span> ( parentDock ){
<a name="l01200"></a>01200     <span class="keywordflow">if</span> ( parentDock-&gt;inherits(<span class="stringliteral">&quot;KDockSplitter&quot;</span>) ){
<a name="l01201"></a>01201       <a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>* sp = (<a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*)parentDock;
<a name="l01202"></a>01202       sp-&gt;<a class="code" href="classKDockSplitter.html#a127ab58b63f3e3738cccb6cb4a7f4c53" title="Disables the splitter.">deactivate</a>();
<a name="l01203"></a>01203       <span class="keywordflow">if</span> ( sp-&gt;<a class="code" href="classKDockSplitter.html#a36d16ee04769031be443246c8f8c328d">getFirst</a>() == target )
<a name="l01204"></a>01204         sp-&gt;<a class="code" href="classKDockSplitter.html#a677a29710953981d93ba80c67d9510de" title="Initialize the splitter.">activate</a>( newDock, 0L );
<a name="l01205"></a>01205       <span class="keywordflow">else</span>
<a name="l01206"></a>01206         sp-&gt;<a class="code" href="classKDockSplitter.html#a677a29710953981d93ba80c67d9510de" title="Initialize the splitter.">activate</a>( 0L, newDock );
<a name="l01207"></a>01207     }
<a name="l01208"></a>01208   }
<a name="l01209"></a>01209 
<a name="l01210"></a>01210   newDock-&gt;<a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l01211"></a>01211   emit target-&gt;<a class="code" href="classKDockWidget.html#aef8ef13ea42d8260b9c5e6f24a82d35d" title="Emitted when another dock widget is docking to this.">docking</a>( <span class="keyword">this</span>, dockPos );
<a name="l01212"></a>01212   emit manager-&gt;<a class="code" href="classKDockManager.html#a90c49ec30b92b5822c601b683fa5c1b1" title="Signals a dockwidget is replaced with another one.">replaceDock</a>( target, newDock );
<a name="l01213"></a>01213   emit manager-&gt;<a class="code" href="classKDockManager.html#ab770e89a8c442bde32d7285ddbd2cfd9" title="Signals changes of the docking state of a dockwidget.">change</a>();
<a name="l01214"></a>01214 
<a name="l01215"></a>01215   <span class="keywordflow">return</span> newDock;
<a name="l01216"></a>01216 }
<a name="l01217"></a>01217 
<a name="l01218"></a><a class="code" href="classKDockWidget.html#ac8ff680712c0da5e3a004e566b1210d6">01218</a> <a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>* <a class="code" href="classKDockWidget.html#ac8ff680712c0da5e3a004e566b1210d6">KDockWidget::parentDockTabGroup</a>()<span class="keyword"> const</span>
<a name="l01219"></a>01219 <span class="keyword"></span>{
<a name="l01220"></a>01220   <span class="keywordflow">if</span> ( !parent() ) <span class="keywordflow">return</span> 0L;
<a name="l01221"></a>01221   <a class="codeRef" href="qwidget.html">QWidget</a>* candidate = <a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>()-&gt;parentWidget();
<a name="l01222"></a>01222   <span class="keywordflow">if</span> ( candidate &amp;&amp; candidate-&gt;inherits(<span class="stringliteral">&quot;KDockTabGroup&quot;</span>) ) <span class="keywordflow">return</span> (<a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>*)candidate;
<a name="l01223"></a>01223   <span class="keywordflow">return</span> 0L;
<a name="l01224"></a>01224 }
<a name="l01225"></a>01225 
<a name="l01226"></a><a class="code" href="classKDockWidget.html#a8230b0eeae93c10df095401740dadf9d">01226</a> <a class="codeRef" href="qwidget.html">QWidget</a> *<a class="code" href="classKDockWidget.html#a8230b0eeae93c10df095401740dadf9d">KDockWidget::parentDockContainer</a>()<span class="keyword"> const</span>
<a name="l01227"></a>01227 <span class="keyword"></span>{
<a name="l01228"></a>01228   <span class="keywordflow">if</span> (!parent()) <span class="keywordflow">return</span> 0L;
<a name="l01229"></a>01229   <a class="codeRef" href="qwidget.html">QWidget</a>* candidate = <a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>()-&gt;parentWidget();
<a name="l01230"></a>01230   <span class="keywordflow">if</span> (candidate &amp;&amp; dynamic_cast&lt;KDockContainer*&gt;(candidate)) <span class="keywordflow">return</span> candidate;
<a name="l01231"></a>01231   <span class="keywordflow">return</span> 0L;
<a name="l01232"></a>01232 }
<a name="l01233"></a>01233 
<a name="l01234"></a>01234 
<a name="l01235"></a><a class="code" href="classKDockWidget.html#a31de3302a4f25ada9ef79f3005239ad9">01235</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a31de3302a4f25ada9ef79f3005239ad9" title="subject to changes.">KDockWidget::setForcedFixedWidth</a>(<span class="keywordtype">int</span> w)
<a name="l01236"></a>01236 {
<a name="l01237"></a>01237     d-&gt;forcedWidth=w;
<a name="l01238"></a>01238     <a class="codeRef" href="qwidget.html#setFixedWidth">setFixedWidth</a>(w);
<a name="l01239"></a>01239     <span class="keywordflow">if</span> (!parent()) <span class="keywordflow">return</span>;
<a name="l01240"></a>01240     <span class="keywordflow">if</span> (parent()-&gt;inherits(<span class="stringliteral">&quot;KDockSplitter&quot;</span>))
<a name="l01241"></a>01241         <span class="keyword">static_cast&lt;</span><a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*<span class="keyword">&gt;</span>(parent()-&gt;qt_cast(<span class="stringliteral">&quot;KDockSplitter&quot;</span>))-&gt;<a class="code" href="classKDockWidget.html#a31de3302a4f25ada9ef79f3005239ad9" title="subject to changes.">setForcedFixedWidth</a>(<span class="keyword">this</span>,w);
<a name="l01242"></a>01242 }
<a name="l01243"></a>01243 
<a name="l01244"></a><a class="code" href="classKDockWidget.html#a2e26e0ab08cf3c4a44863318b6c8ecc5">01244</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a2e26e0ab08cf3c4a44863318b6c8ecc5" title="subject to changes.">KDockWidget::setForcedFixedHeight</a>(<span class="keywordtype">int</span> h)
<a name="l01245"></a>01245 {
<a name="l01246"></a>01246     d-&gt;forcedHeight=h;
<a name="l01247"></a>01247     <a class="codeRef" href="qwidget.html#setFixedHeight">setFixedHeight</a>(h);
<a name="l01248"></a>01248     <span class="keywordflow">if</span> (!parent()) <span class="keywordflow">return</span>;
<a name="l01249"></a>01249     <span class="keywordflow">if</span> (parent()-&gt;inherits(<span class="stringliteral">&quot;KDockSplitter&quot;</span>))
<a name="l01250"></a>01250         <span class="keyword">static_cast&lt;</span><a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*<span class="keyword">&gt;</span>(parent()-&gt;qt_cast(<span class="stringliteral">&quot;KDockSplitter&quot;</span>))-&gt;<a class="code" href="classKDockWidget.html#a2e26e0ab08cf3c4a44863318b6c8ecc5" title="subject to changes.">setForcedFixedHeight</a>(<span class="keyword">this</span>,h);
<a name="l01251"></a>01251 }
<a name="l01252"></a>01252 
<a name="l01253"></a><a class="code" href="classKDockWidget.html#af41f8125c04672b2fd0611c9420ceac8">01253</a> <span class="keywordtype">int</span> <a class="code" href="classKDockWidget.html#af41f8125c04672b2fd0611c9420ceac8">KDockWidget::forcedFixedWidth</a>()
<a name="l01254"></a>01254 {
<a name="l01255"></a>01255     <span class="keywordflow">return</span> d-&gt;forcedWidth;
<a name="l01256"></a>01256 }
<a name="l01257"></a>01257 
<a name="l01258"></a><a class="code" href="classKDockWidget.html#a681fd0bd9754ac1908ce75fda3b71819">01258</a> <span class="keywordtype">int</span> <a class="code" href="classKDockWidget.html#a681fd0bd9754ac1908ce75fda3b71819">KDockWidget::forcedFixedHeight</a>()
<a name="l01259"></a>01259 {
<a name="l01260"></a>01260     <span class="keywordflow">return</span> d-&gt;forcedHeight;
<a name="l01261"></a>01261 }
<a name="l01262"></a>01262 
<a name="l01263"></a><a class="code" href="classKDockWidget.html#a56726864262c96655628ef90c940ce87">01263</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a56726864262c96655628ef90c940ce87">KDockWidget::restoreFromForcedFixedSize</a>()
<a name="l01264"></a>01264 {
<a name="l01265"></a>01265     d-&gt;forcedWidth=-1;
<a name="l01266"></a>01266     d-&gt;forcedHeight=-1;
<a name="l01267"></a>01267     <a class="codeRef" href="qwidget.html#setMinimumWidth">setMinimumWidth</a>(0);
<a name="l01268"></a>01268     <a class="codeRef" href="qwidget.html#setMaximumWidth">setMaximumWidth</a>(32000);
<a name="l01269"></a>01269     <a class="codeRef" href="qwidget.html#setMinimumHeight">setMinimumHeight</a>(0);
<a name="l01270"></a>01270     <a class="codeRef" href="qwidget.html#setMaximumHeight">setMaximumHeight</a>(32000);
<a name="l01271"></a>01271     <span class="keywordflow">if</span> (!parent()) <span class="keywordflow">return</span>;
<a name="l01272"></a>01272     <span class="keywordflow">if</span> (parent()-&gt;inherits(<span class="stringliteral">&quot;KDockSplitter&quot;</span>))
<a name="l01273"></a>01273         <span class="keyword">static_cast&lt;</span><a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*<span class="keyword">&gt;</span>(parent()-&gt;qt_cast(<span class="stringliteral">&quot;KDockSplitter&quot;</span>))-&gt;<a class="code" href="classKDockWidget.html#a56726864262c96655628ef90c940ce87">restoreFromForcedFixedSize</a>(<span class="keyword">this</span>);
<a name="l01274"></a>01274 }
<a name="l01275"></a>01275 
<a name="l01276"></a><a class="code" href="classKDockWidget.html#a4f44ad2d993c57d69ac7643d6d1d68f8">01276</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a4f44ad2d993c57d69ac7643d6d1d68f8" title="Docks the widget to the desktop (as a toplevel widget)">KDockWidget::toDesktop</a>()
<a name="l01277"></a>01277 {
<a name="l01278"></a>01278    <a class="codeRef" href="qpoint.html">QPoint</a> p = <a class="codeRef" href="qwidget.html#mapToGlobal">mapToGlobal</a>( <a class="codeRef" href="qpoint.html">QPoint</a>( -30, -30 ) );
<a name="l01279"></a>01279    <span class="keywordflow">if</span>( p.<a class="codeRef" href="qpoint.html#x">x</a>( ) &lt; 0 )
<a name="l01280"></a>01280       p.<a class="codeRef" href="qpoint.html#setX">setX</a>( 0 );
<a name="l01281"></a>01281    <span class="keywordflow">if</span>( p.<a class="codeRef" href="qpoint.html#y">y</a>( ) &lt; 0 )
<a name="l01282"></a>01282       p.<a class="codeRef" href="qpoint.html#setY">setY</a>( 0 );
<a name="l01283"></a>01283    <a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4" title="This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...">manualDock</a>( 0, DockDesktop, 50, p );
<a name="l01284"></a>01284 }
<a name="l01285"></a>01285 
<a name="l01286"></a><a class="code" href="classKDockWidget.html#ae0cd1aba58e8428526d1428d16c5c385">01286</a> <a class="code" href="classKDockWidget.html#aa6d125044bf12191210c8cce5b5c4c62" title="The possible positions where a dockwidget can dock to another dockwidget.">KDockWidget::DockPosition</a> <a class="code" href="classKDockWidget.html#ae0cd1aba58e8428526d1428d16c5c385">KDockWidget::currentDockPosition</a>()<span class="keyword"> const</span>
<a name="l01287"></a>01287 <span class="keyword"></span>{
<a name="l01288"></a>01288     <span class="keywordflow">return</span> <a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a>;
<a name="l01289"></a>01289 }
<a name="l01290"></a>01290 
<a name="l01291"></a><a class="code" href="classKDockWidget.html#a2fa098fe2ac988870e7c86b1006e114c">01291</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a2fa098fe2ac988870e7c86b1006e114c" title="Undocks this.">KDockWidget::undock</a>()
<a name="l01292"></a>01292 {
<a name="l01293"></a>01293 <span class="comment">//  kdDebug(282)&lt;&lt;&quot;KDockWidget::undock()&quot;&lt;&lt;endl;</span>
<a name="l01294"></a>01294 
<a name="l01295"></a>01295   manager-&gt;d-&gt;dragRect = <a class="codeRef" href="qrect.html">QRect</a> ();
<a name="l01296"></a>01296   manager-&gt;drawDragRectangle ();
<a name="l01297"></a>01297 
<a name="l01298"></a>01298   <a class="codeRef" href="qwidget.html">QWidget</a>* parentW = <a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>();
<a name="l01299"></a>01299   <span class="keywordflow">if</span> ( !parentW ){
<a name="l01300"></a>01300     <a class="codeRef" href="qwidget.html#hide">hide</a>();
<a name="l01301"></a>01301     <span class="keywordflow">if</span> (!d-&gt;blockHasUndockedSignal)
<a name="l01302"></a>01302       emit <a class="code" href="classKDockWidget.html#a1613c2c8a90b9e4d8fcfc1c2df3a0d6f" title="Emitted when the widget has undocked.">hasUndocked</a>();
<a name="l01303"></a>01303     <span class="keywordflow">return</span>;
<a name="l01304"></a>01304   }
<a name="l01305"></a>01305 
<a name="l01306"></a>01306   <a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a> = <a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a>;
<a name="l01307"></a>01307   <a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = KDockWidget::DockDesktop;
<a name="l01308"></a>01308 
<a name="l01309"></a>01309   manager-&gt;<a class="codeRef" href="qobject.html#blockSignals">blockSignals</a>(<span class="keyword">true</span>);
<a name="l01310"></a>01310   manager-&gt;undockProcess = <span class="keyword">true</span>;
<a name="l01311"></a>01311 
<a name="l01312"></a>01312   <span class="keywordtype">bool</span> isV = parentW-&gt;<a class="codeRef" href="qwidget.html#isVisibleToTLW">isVisibleToTLW</a>();
<a name="l01313"></a>01313 
<a name="l01314"></a>01314   <span class="comment">//UNDOCK HAS TO BE IMPLEMENTED CORRECTLY :)</span>
<a name="l01315"></a>01315   <a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>* parentTab = <a class="code" href="classKDockWidget.html#ac8ff680712c0da5e3a004e566b1210d6">parentDockTabGroup</a>();
<a name="l01316"></a>01316   <span class="keywordflow">if</span> ( parentTab ){
<a name="l01317"></a>01317     d-&gt;index = parentTab-&gt;<a class="codeRef" href="qtabwidget.html#indexOf">indexOf</a>( <span class="keyword">this</span>); <span class="comment">// memorize the page position in the tab widget</span>
<a name="l01318"></a>01318     parentTab-&gt;<a class="codeRef" href="qtabwidget.html#removePage">removePage</a>( <span class="keyword">this</span> );
<a name="l01319"></a>01319 <span class="comment">/*</span>
<a name="l01320"></a>01320 <span class="comment">    QWidget *wantTransient=parentTab-&gt;transientTo();</span>
<a name="l01321"></a>01321 <span class="comment">    target-&gt;setDockWindowTransient(wantTransient,wantTransient);</span>
<a name="l01322"></a>01322 <span class="comment"> */</span>
<a name="l01323"></a>01323     <a class="code" href="classKDockWidget.html#aa3320a716c7f824f1bad7edb39e62781">setFormerBrotherDockWidget</a>((<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)parentTab-&gt;<a class="codeRef" href="qtabwidget.html#page">page</a>(0));
<a name="l01324"></a>01324     applyToWidget( 0L );
<a name="l01325"></a>01325     <span class="keywordflow">if</span> ( parentTab-&gt;<a class="codeRef" href="qtabwidget.html#count">count</a>() == 1 ){
<a name="l01326"></a>01326 
<a name="l01327"></a>01327       <span class="comment">// last subdock widget in the tab control</span>
<a name="l01328"></a>01328       <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* lastTab = (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)parentTab-&gt;<a class="codeRef" href="qtabwidget.html#page">page</a>(0);
<a name="l01329"></a>01329       parentTab-&gt;<a class="codeRef" href="qtabwidget.html#removePage">removePage</a>( lastTab );
<a name="l01330"></a>01330 <span class="comment">/*      QWidget *wantTransient=parentTab-&gt;transientTo();</span>
<a name="l01331"></a>01331 <span class="comment">      target-&gt;setDockWindowTransient(wantTransient,wantTransient);*/</span>
<a name="l01332"></a>01332 
<a name="l01333"></a>01333       lastTab-&gt;applyToWidget( 0L );
<a name="l01334"></a>01334       lastTab-&gt;<a class="codeRef" href="qwidget.html#move">move</a>( parentTab-&gt;mapToGlobal(parentTab-&gt;frameGeometry().topLeft()) );
<a name="l01335"></a>01335 
<a name="l01336"></a>01336       <span class="comment">// KDockTabGroup always have a parent that is a KDockWidget</span>
<a name="l01337"></a>01337       <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* parentOfTab = (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)parentTab-&gt;parent();
<a name="l01338"></a>01338       <span class="keyword">delete</span> parentTab; <span class="comment">// KDockTabGroup</span>
<a name="l01339"></a>01339 
<a name="l01340"></a>01340       <a class="codeRef" href="qwidget.html">QWidget</a>* parentOfDockWidget = parentOfTab-&gt;<a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>();
<a name="l01341"></a>01341       <span class="keywordflow">if</span> ( !parentOfDockWidget ){
<a name="l01342"></a>01342           <span class="keywordflow">if</span> ( isV ) lastTab-&gt;<a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l01343"></a>01343       } <span class="keywordflow">else</span> {
<a name="l01344"></a>01344         <span class="keywordflow">if</span> ( parentOfDockWidget-&gt;inherits(<span class="stringliteral">&quot;KDockSplitter&quot;</span>) ){
<a name="l01345"></a>01345           <a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>* split = (<a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*)parentOfDockWidget;
<a name="l01346"></a>01346           lastTab-&gt;applyToWidget( split );
<a name="l01347"></a>01347           split-&gt;<a class="code" href="classKDockSplitter.html#a127ab58b63f3e3738cccb6cb4a7f4c53" title="Disables the splitter.">deactivate</a>();
<a name="l01348"></a>01348           <span class="keywordflow">if</span> ( split-&gt;<a class="code" href="classKDockSplitter.html#a36d16ee04769031be443246c8f8c328d">getFirst</a>() == parentOfTab ){
<a name="l01349"></a>01349             split-&gt;<a class="code" href="classKDockSplitter.html#a677a29710953981d93ba80c67d9510de" title="Initialize the splitter.">activate</a>( lastTab );
<a name="l01350"></a>01350             <span class="keywordflow">if</span> ( ((<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)split-&gt;parent())-&gt;splitterOrientation == Vertical )
<a name="l01351"></a>01351               emit ((<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)split-&gt;<a class="code" href="classKDockSplitter.html#a7bd64e2238c3e2e3b4bfb1becb4681b6" title="If w is child0, return child1, otherwise child0.">getAnother</a>(parentOfTab))-&gt;<a class="code" href="classKDockWidget.html#aef8ef13ea42d8260b9c5e6f24a82d35d" title="Emitted when another dock widget is docking to this.">docking</a>( parentOfTab, KDockWidget::DockLeft );
<a name="l01352"></a>01352             <span class="keywordflow">else</span>
<a name="l01353"></a>01353               emit ((<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)split-&gt;<a class="code" href="classKDockSplitter.html#a7bd64e2238c3e2e3b4bfb1becb4681b6" title="If w is child0, return child1, otherwise child0.">getAnother</a>(parentOfTab))-&gt;<a class="code" href="classKDockWidget.html#aef8ef13ea42d8260b9c5e6f24a82d35d" title="Emitted when another dock widget is docking to this.">docking</a>( parentOfTab, KDockWidget::DockTop );
<a name="l01354"></a>01354           } <span class="keywordflow">else</span> {
<a name="l01355"></a>01355             split-&gt;<a class="code" href="classKDockSplitter.html#a677a29710953981d93ba80c67d9510de" title="Initialize the splitter.">activate</a>( 0L, lastTab );
<a name="l01356"></a>01356             <span class="keywordflow">if</span> ( ((<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)split-&gt;parent())-&gt;splitterOrientation == Vertical )
<a name="l01357"></a>01357               emit ((<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)split-&gt;<a class="code" href="classKDockSplitter.html#a7bd64e2238c3e2e3b4bfb1becb4681b6" title="If w is child0, return child1, otherwise child0.">getAnother</a>(parentOfTab))-&gt;<a class="code" href="classKDockWidget.html#aef8ef13ea42d8260b9c5e6f24a82d35d" title="Emitted when another dock widget is docking to this.">docking</a>( parentOfTab, KDockWidget::DockRight );
<a name="l01358"></a>01358             <span class="keywordflow">else</span>
<a name="l01359"></a>01359               emit ((<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)split-&gt;<a class="code" href="classKDockSplitter.html#a7bd64e2238c3e2e3b4bfb1becb4681b6" title="If w is child0, return child1, otherwise child0.">getAnother</a>(parentOfTab))-&gt;<a class="code" href="classKDockWidget.html#aef8ef13ea42d8260b9c5e6f24a82d35d" title="Emitted when another dock widget is docking to this.">docking</a>( parentOfTab, KDockWidget::DockBottom );
<a name="l01360"></a>01360           }
<a name="l01361"></a>01361           split-&gt;<a class="codeRef" href="qwidget.html#show">show</a>();
<a name="l01362"></a>01362         } <span class="keywordflow">else</span> {
<a name="l01363"></a>01363           lastTab-&gt;applyToWidget( parentOfDockWidget );
<a name="l01364"></a>01364         }
<a name="l01365"></a>01365         lastTab-&gt;<a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l01366"></a>01366       }
<a name="l01367"></a>01367       manager-&gt;<a class="codeRef" href="qobject.html#blockSignals">blockSignals</a>(<span class="keyword">false</span>);
<a name="l01368"></a>01368       emit manager-&gt;<a class="code" href="classKDockManager.html#a90c49ec30b92b5822c601b683fa5c1b1" title="Signals a dockwidget is replaced with another one.">replaceDock</a>( parentOfTab, lastTab );
<a name="l01369"></a>01369       lastTab-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = parentOfTab-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a>;
<a name="l01370"></a>01370       emit parentOfTab-&gt;<a class="code" href="classKDockWidget.html#affc34671059cd324ca23f5db9dc4b00a" title="Emitted when the widget processes a close event.">iMBeingClosed</a>();
<a name="l01371"></a>01371       manager-&gt;<a class="codeRef" href="qobject.html#blockSignals">blockSignals</a>(<span class="keyword">true</span>);
<a name="l01372"></a>01372       <span class="keyword">delete</span> parentOfTab;
<a name="l01373"></a>01373 
<a name="l01374"></a>01374     } <span class="keywordflow">else</span> {
<a name="l01375"></a>01375       setDockTabName( parentTab );
<a name="l01376"></a>01376     }
<a name="l01377"></a>01377   } <span class="keywordflow">else</span> {
<a name="l01378"></a>01378  <span class="comment">/*********************************************************************************************/</span>
<a name="l01379"></a>01379   <span class="comment">//QWidget* containerWidget = (QWidget*)parent();</span>
<a name="l01380"></a>01380   <span class="keywordtype">bool</span> undockedFromContainer=<span class="keyword">false</span>;
<a name="l01381"></a>01381   <span class="keywordflow">if</span> (d-&gt;container)
<a name="l01382"></a>01382   {
<a name="l01383"></a>01383 <span class="comment">//    kdDebug(282)&lt;&lt;&quot;undocked from dockcontainer&quot;&lt;&lt;endl;</span>
<a name="l01384"></a>01384       undockedFromContainer=<span class="keyword">true</span>;
<a name="l01385"></a>01385       KDockContainer* dc = <span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(d-&gt;container.<a class="codeRef" href="qguardedptr.html#operator-T-*">operator</a>-&gt;());
<a name="l01386"></a>01386       <span class="keywordflow">if</span> (dc) {
<a name="l01387"></a>01387           dc-&gt;undockWidget(<span class="keyword">this</span>);
<a name="l01388"></a>01388           <a class="code" href="classKDockWidget.html#aa3320a716c7f824f1bad7edb39e62781">setFormerBrotherDockWidget</a>(dc-&gt;parentDockWidget());
<a name="l01389"></a>01389       }
<a name="l01390"></a>01390       applyToWidget( 0L );
<a name="l01391"></a>01391   }
<a name="l01392"></a>01392    <span class="keywordflow">if</span> (!undockedFromContainer) {
<a name="l01393"></a>01393 <span class="comment">/*********************************************************************************************/</span>
<a name="l01394"></a>01394     <span class="keywordflow">if</span> ( parentW-&gt;inherits(<span class="stringliteral">&quot;KDockSplitter&quot;</span>) ){
<a name="l01395"></a>01395       <a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>* parentSplitterOfDockWidget = (<a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*)parentW;
<a name="l01396"></a>01396       d-&gt;splitPosInPercent = parentSplitterOfDockWidget-&gt;<a class="code" href="classKDockSplitter.html#abec832100a2090f72608e7dee2b86479" title="Return the separator position in percent (%), so the range is [0..100].">separatorPosInPercent</a>();
<a name="l01397"></a>01397 
<a name="l01398"></a>01398       <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* secondWidget = (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)parentSplitterOfDockWidget-&gt;<a class="code" href="classKDockSplitter.html#a7bd64e2238c3e2e3b4bfb1becb4681b6" title="If w is child0, return child1, otherwise child0.">getAnother</a>( <span class="keyword">this</span> );
<a name="l01399"></a>01399       <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* group        = (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)parentSplitterOfDockWidget-&gt;<a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>();
<a name="l01400"></a>01400       <a class="code" href="classKDockWidget.html#aa3320a716c7f824f1bad7edb39e62781">setFormerBrotherDockWidget</a>(secondWidget);
<a name="l01401"></a>01401       applyToWidget( 0L );
<a name="l01402"></a>01402       group-&gt;<a class="codeRef" href="qwidget.html#hide">hide</a>();
<a name="l01403"></a>01403 
<a name="l01404"></a>01404       <span class="keywordflow">if</span> ( !group-&gt;<a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>() ){
<a name="l01405"></a>01405         secondWidget-&gt;applyToWidget( 0L, group-&gt;<a class="codeRef" href="qwidget.html#frameGeometry">frameGeometry</a>().topLeft() );
<a name="l01406"></a>01406         secondWidget-&gt;<a class="codeRef" href="qwidget.html#resize">resize</a>( group-&gt;<a class="codeRef" href="qwidget.html#width">width</a>(), group-&gt;<a class="codeRef" href="qwidget.html#height">height</a>() );
<a name="l01407"></a>01407       } <span class="keywordflow">else</span> {
<a name="l01408"></a>01408         <a class="codeRef" href="qwidget.html">QWidget</a>* obj = group-&gt;<a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>();
<a name="l01409"></a>01409         secondWidget-&gt;applyToWidget( obj );
<a name="l01410"></a>01410         <span class="keywordflow">if</span> ( obj-&gt;inherits(<span class="stringliteral">&quot;KDockSplitter&quot;</span>) ){
<a name="l01411"></a>01411           <a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>* parentOfGroup = (<a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*)obj;
<a name="l01412"></a>01412           parentOfGroup-&gt;<a class="code" href="classKDockSplitter.html#a127ab58b63f3e3738cccb6cb4a7f4c53" title="Disables the splitter.">deactivate</a>();
<a name="l01413"></a>01413 
<a name="l01414"></a>01414           <span class="keywordflow">if</span> ( parentOfGroup-&gt;<a class="code" href="classKDockSplitter.html#a36d16ee04769031be443246c8f8c328d">getFirst</a>() == group )
<a name="l01415"></a>01415             parentOfGroup-&gt;<a class="code" href="classKDockSplitter.html#a677a29710953981d93ba80c67d9510de" title="Initialize the splitter.">activate</a>( secondWidget );
<a name="l01416"></a>01416           <span class="keywordflow">else</span>
<a name="l01417"></a>01417             parentOfGroup-&gt;<a class="code" href="classKDockSplitter.html#a677a29710953981d93ba80c67d9510de" title="Initialize the splitter.">activate</a>( 0L, secondWidget );
<a name="l01418"></a>01418         }
<a name="l01419"></a>01419       }
<a name="l01420"></a>01420       secondWidget-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> = group-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a>;
<a name="l01421"></a>01421       secondWidget-&gt;<a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a>  = group-&gt;<a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a>;
<a name="l01422"></a>01422       <span class="keyword">delete</span> parentSplitterOfDockWidget;
<a name="l01423"></a>01423       manager-&gt;<a class="codeRef" href="qobject.html#blockSignals">blockSignals</a>(<span class="keyword">false</span>);
<a name="l01424"></a>01424       emit manager-&gt;<a class="code" href="classKDockManager.html#a90c49ec30b92b5822c601b683fa5c1b1" title="Signals a dockwidget is replaced with another one.">replaceDock</a>( group, secondWidget );
<a name="l01425"></a>01425       emit group-&gt;<a class="code" href="classKDockWidget.html#affc34671059cd324ca23f5db9dc4b00a" title="Emitted when the widget processes a close event.">iMBeingClosed</a>();
<a name="l01426"></a>01426       manager-&gt;<a class="codeRef" href="qobject.html#blockSignals">blockSignals</a>(<span class="keyword">true</span>);
<a name="l01427"></a>01427       <span class="keyword">delete</span> group;
<a name="l01428"></a>01428 
<a name="l01429"></a>01429       <span class="keywordflow">if</span> ( isV ) secondWidget-&gt;<a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l01430"></a>01430     } <span class="keywordflow">else</span> {
<a name="l01431"></a>01431       <span class="keywordflow">if</span> (!d-&gt;pendingDtor) {
<a name="l01432"></a>01432         <span class="comment">// don&#39;t reparent in the dtor of this</span>
<a name="l01433"></a>01433         applyToWidget( 0L );
<a name="l01434"></a>01434       }
<a name="l01435"></a>01435     }
<a name="l01436"></a>01436 <span class="comment">/*********************************************************************************************/</span>
<a name="l01437"></a>01437   }
<a name="l01438"></a>01438   }
<a name="l01439"></a>01439   manager-&gt;<a class="codeRef" href="qobject.html#blockSignals">blockSignals</a>(<span class="keyword">false</span>);
<a name="l01440"></a>01440   <span class="keywordflow">if</span> (!d-&gt;blockHasUndockedSignal)
<a name="l01441"></a>01441     emit manager-&gt;<a class="code" href="classKDockManager.html#ab770e89a8c442bde32d7285ddbd2cfd9" title="Signals changes of the docking state of a dockwidget.">change</a>();
<a name="l01442"></a>01442   manager-&gt;undockProcess = <span class="keyword">false</span>;
<a name="l01443"></a>01443 
<a name="l01444"></a>01444   <span class="keywordflow">if</span> (!d-&gt;blockHasUndockedSignal)
<a name="l01445"></a>01445     emit <a class="code" href="classKDockWidget.html#a1613c2c8a90b9e4d8fcfc1c2df3a0d6f" title="Emitted when the widget has undocked.">hasUndocked</a>();
<a name="l01446"></a>01446 }
<a name="l01447"></a>01447 
<a name="l01448"></a><a class="code" href="classKDockWidget.html#a6e05e2f662f3f9bc2be966d4efb5c296">01448</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a6e05e2f662f3f9bc2be966d4efb5c296" title="Sets the embedded widget.">KDockWidget::setWidget</a>( <a class="codeRef" href="qwidget.html">QWidget</a>* mw )
<a name="l01449"></a>01449 {
<a name="l01450"></a>01450   <span class="keywordflow">if</span> ( !mw ) <span class="keywordflow">return</span>;
<a name="l01451"></a>01451 
<a name="l01452"></a>01452   <span class="keywordflow">if</span> ( mw-&gt;parent() != this ){
<a name="l01453"></a>01453     mw-&gt;<a class="codeRef" href="qwidget.html#reparent">reparent</a>(<span class="keyword">this</span>, 0, <a class="codeRef" href="qpoint.html">QPoint</a>(0,0), <span class="keyword">false</span>);
<a name="l01454"></a>01454   }
<a name="l01455"></a>01455 
<a name="l01456"></a>01456 <span class="preprocessor">#ifdef BORDERLESS_WINDOWS</span>
<a name="l01457"></a>01457 <span class="preprocessor"></span>  <span class="keywordflow">if</span> (!mw-&gt;<a class="codeRef" href="qwidget.html#ownCursor">ownCursor</a>()) mw-&gt;<a class="codeRef" href="qwidget.html#setCursor">setCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(ArrowCursor));
<a name="l01458"></a>01458 <span class="preprocessor">#endif</span>
<a name="l01459"></a>01459 <span class="preprocessor"></span>  widget = mw;
<a name="l01460"></a>01460   <span class="keyword">delete</span> <a class="codeRef" href="qwidget.html#layout">layout</a>;
<a name="l01461"></a>01461 
<a name="l01462"></a>01462   <a class="codeRef" href="qwidget.html#layout">layout</a> = <span class="keyword">new</span> <a class="codeRef" href="qvboxlayout.html">QVBoxLayout</a>( <span class="keyword">this</span> );
<a name="l01463"></a>01463   <a class="codeRef" href="qwidget.html#layout">layout</a>-&gt;setResizeMode( QLayout::Minimum );
<a name="l01464"></a>01464 
<a name="l01465"></a>01465   KDockContainer* dc = <span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(widget);
<a name="l01466"></a>01466   <span class="keywordflow">if</span> (dc)
<a name="l01467"></a>01467   {
<a name="l01468"></a>01468     d-&gt;isContainer=<span class="keyword">true</span>;
<a name="l01469"></a>01469     manager-&gt;d-&gt;containerDocks.append(<span class="keyword">this</span>);
<a name="l01470"></a>01470   }
<a name="l01471"></a>01471   <span class="keywordflow">else</span>
<a name="l01472"></a>01472   {
<a name="l01473"></a>01473     d-&gt;isContainer=<span class="keyword">false</span>;
<a name="l01474"></a>01474   }
<a name="l01475"></a>01475 
<a name="l01476"></a>01476   {
<a name="l01477"></a>01477      header-&gt;show();
<a name="l01478"></a>01478      <a class="codeRef" href="qwidget.html#layout">layout</a>-&gt;addWidget( header );
<a name="l01479"></a>01479      <a class="codeRef" href="qwidget.html#layout">layout</a>-&gt;addWidget( widget,1 );
<a name="l01480"></a>01480   }
<a name="l01481"></a>01481   <a class="code" href="classKDockWidget.html#a5ef45e3136d313bb26b2fa7f22e7b961" title="Checks some conditions and shows or hides the dockwidget header (drag panel).">updateHeader</a>();
<a name="l01482"></a>01482   emit <a class="code" href="classKDockWidget.html#a89e8ada40bf8be3a0fd2b7a5def127ba">widgetSet</a>(mw);
<a name="l01483"></a>01483 }
<a name="l01484"></a>01484 
<a name="l01485"></a>01485 <span class="keywordtype">void</span> KDockWidget::setDockTabName( <a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>* tab )
<a name="l01486"></a>01486 {
<a name="l01487"></a>01487   <a class="codeRef" href="qstring.html">QString</a> listOfName;
<a name="l01488"></a>01488   <a class="codeRef" href="qstring.html">QString</a> listOfCaption;
<a name="l01489"></a>01489   <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0; i &lt; tab-&gt;<a class="codeRef" href="qtabwidget.html#count">count</a>(); ++i ) {
<a name="l01490"></a>01490     <a class="codeRef" href="qwidget.html">QWidget</a> *w = tab-&gt;<a class="codeRef" href="qtabwidget.html#page">page</a>( i );
<a name="l01491"></a>01491     listOfCaption.<a class="codeRef" href="qstring.html#append">append</a>( w-&gt;<a class="codeRef" href="qwidget.html#caption">caption</a>() ).append(<span class="stringliteral">&quot;,&quot;</span>);
<a name="l01492"></a>01492     listOfName.<a class="codeRef" href="qstring.html#append">append</a>( w-&gt;name() ).append(<span class="stringliteral">&quot;,&quot;</span>);
<a name="l01493"></a>01493   }
<a name="l01494"></a>01494   listOfCaption.<a class="codeRef" href="qstring.html#remove">remove</a>( listOfCaption.<a class="codeRef" href="qstring.html#length">length</a>()-1, 1 );
<a name="l01495"></a>01495   listOfName.<a class="codeRef" href="qstring.html#remove">remove</a>( listOfName.<a class="codeRef" href="qstring.html#length">length</a>()-1, 1 );
<a name="l01496"></a>01496 
<a name="l01497"></a>01497   tab-&gt;parentWidget()-&gt;setName( listOfName.<a class="codeRef" href="qstring.html#utf8">utf8</a>() );
<a name="l01498"></a>01498   tab-&gt;parentWidget()-&gt;setCaption( listOfCaption );
<a name="l01499"></a>01499 
<a name="l01500"></a>01500   tab-&gt;parentWidget()-&gt;repaint( <span class="keyword">false</span> ); <span class="comment">// KDockWidget-&gt;repaint</span>
<a name="l01501"></a>01501   <span class="keywordflow">if</span> ( tab-&gt;parentWidget()-&gt;parent() )
<a name="l01502"></a>01502     <span class="keywordflow">if</span> ( tab-&gt;parentWidget()-&gt;parent()-&gt;inherits(<span class="stringliteral">&quot;KDockSplitter&quot;</span>) )
<a name="l01503"></a>01503       ((<a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*)(tab-&gt;parentWidget()-&gt;parent()))-&gt;updateName();
<a name="l01504"></a>01504 }
<a name="l01505"></a>01505 
<a name="l01506"></a><a class="code" href="classKDockWidget.html#a44449dfda656d62a7f54681e228824c5">01506</a> <span class="keywordtype">bool</span> <a class="code" href="classKDockWidget.html#a44449dfda656d62a7f54681e228824c5">KDockWidget::mayBeHide</a>()<span class="keyword"> const</span>
<a name="l01507"></a>01507 <span class="keyword"></span>{
<a name="l01508"></a>01508   <span class="keywordtype">bool</span> f = (parent() != manager-&gt;main);
<a name="l01509"></a>01509   <span class="keywordflow">return</span> ( !isGroup &amp;&amp; !isTabGroup &amp;&amp; f &amp;&amp; <a class="codeRef" href="qwidget.html#isVisible">isVisible</a>() &amp;&amp; ( eDocking != (int)KDockWidget::DockNone ) );
<a name="l01510"></a>01510 }
<a name="l01511"></a>01511 
<a name="l01512"></a><a class="code" href="classKDockWidget.html#af4d11e513934ce9af95020abd4754902">01512</a> <span class="keywordtype">bool</span> <a class="code" href="classKDockWidget.html#af4d11e513934ce9af95020abd4754902">KDockWidget::mayBeShow</a>()<span class="keyword"> const</span>
<a name="l01513"></a>01513 <span class="keyword"></span>{
<a name="l01514"></a>01514   <span class="keywordtype">bool</span> f = (parent() != manager-&gt;main);
<a name="l01515"></a>01515   <span class="keywordflow">return</span> ( !isGroup &amp;&amp; !isTabGroup &amp;&amp; f &amp;&amp; !<a class="codeRef" href="qwidget.html#isVisible">isVisible</a>() );
<a name="l01516"></a>01516 }
<a name="l01517"></a>01517 
<a name="l01518"></a><a class="code" href="classKDockWidget.html#affb0a73d296d0b007ea25db6620cf2da">01518</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#affb0a73d296d0b007ea25db6620cf2da" title="Toggles the visibility state of the dockwidget if it is able to be shown or to be hidden...">KDockWidget::changeHideShowState</a>()
<a name="l01519"></a>01519 {
<a name="l01520"></a>01520   <span class="keywordflow">if</span> ( <a class="code" href="classKDockWidget.html#a44449dfda656d62a7f54681e228824c5">mayBeHide</a>() ){
<a name="l01521"></a>01521     <a class="code" href="classKDockWidget.html#a2fa098fe2ac988870e7c86b1006e114c" title="Undocks this.">undock</a>();
<a name="l01522"></a>01522     <span class="keywordflow">return</span>;
<a name="l01523"></a>01523   }
<a name="l01524"></a>01524 
<a name="l01525"></a>01525   <span class="keywordflow">if</span> ( <a class="code" href="classKDockWidget.html#af4d11e513934ce9af95020abd4754902">mayBeShow</a>() ){
<a name="l01526"></a>01526     <span class="keywordflow">if</span> ( manager-&gt;main-&gt;inherits(<span class="stringliteral">&quot;KDockMainWindow&quot;</span>) ){
<a name="l01527"></a>01527       ((<a class="code" href="classKDockMainWindow.html" title="A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwi...">KDockMainWindow</a>*)manager-&gt;main)-&gt;makeDockVisible(<span class="keyword">this</span>);
<a name="l01528"></a>01528     } <span class="keywordflow">else</span> {
<a name="l01529"></a>01529       <a class="code" href="classKDockWidget.html#a1156e8c4d79e454cac3d51b50babd87e" title="Normally it simply shows the dockwidget.">makeDockVisible</a>();
<a name="l01530"></a>01530     }
<a name="l01531"></a>01531   }
<a name="l01532"></a>01532 }
<a name="l01533"></a>01533 
<a name="l01534"></a><a class="code" href="classKDockWidget.html#a1156e8c4d79e454cac3d51b50babd87e">01534</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a1156e8c4d79e454cac3d51b50babd87e" title="Normally it simply shows the dockwidget.">KDockWidget::makeDockVisible</a>()
<a name="l01535"></a>01535 {
<a name="l01536"></a>01536   <span class="keywordflow">if</span> ( <a class="code" href="classKDockWidget.html#ac8ff680712c0da5e3a004e566b1210d6">parentDockTabGroup</a>() ){
<a name="l01537"></a>01537     <a class="code" href="classKDockWidget.html#ac8ff680712c0da5e3a004e566b1210d6">parentDockTabGroup</a>()-&gt;<a class="codeRef" href="qtabwidget.html#showPage">showPage</a>( <span class="keyword">this</span> );
<a name="l01538"></a>01538   }
<a name="l01539"></a>01539   <span class="keywordflow">if</span> (<a class="code" href="classKDockWidget.html#a8230b0eeae93c10df095401740dadf9d">parentDockContainer</a>()) {
<a name="l01540"></a>01540     <a class="codeRef" href="qwidget.html">QWidget</a> *contWid=<a class="code" href="classKDockWidget.html#a8230b0eeae93c10df095401740dadf9d">parentDockContainer</a>();
<a name="l01541"></a>01541     KDockContainer *<a class="codeRef" href="qwidget.html#x">x</a> = <span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(contWid);
<a name="l01542"></a>01542     <span class="keywordflow">if</span> (x) {
<a name="l01543"></a>01543       x-&gt;showWidget(<span class="keyword">this</span>);
<a name="l01544"></a>01544     }
<a name="l01545"></a>01545   }
<a name="l01546"></a>01546   <span class="keywordflow">if</span> ( <a class="codeRef" href="qwidget.html#isVisible">isVisible</a>() ) <span class="keywordflow">return</span>;
<a name="l01547"></a>01547 
<a name="l01548"></a>01548   <a class="codeRef" href="qwidget.html">QWidget</a>* p = <a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>();
<a name="l01549"></a>01549   <span class="keywordflow">while</span> ( p ){
<a name="l01550"></a>01550     <span class="keywordflow">if</span> ( !p-&gt;<a class="codeRef" href="qwidget.html#isVisible">isVisible</a>() )
<a name="l01551"></a>01551       p-&gt;<a class="codeRef" href="qwidget.html#show">show</a>();
<a name="l01552"></a>01552     p = p-&gt;<a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>();
<a name="l01553"></a>01553   }
<a name="l01554"></a>01554   <span class="keywordflow">if</span>( !parent() ) <span class="comment">// is undocked</span>
<a name="l01555"></a>01555     <a class="code" href="classKDockWidget.html#a08ce97242c87ee57e54676b9809b0821" title="Docks a dockwidget back to the dockwidget that was the neighbor widget before the current dock positi...">dockBack</a>();
<a name="l01556"></a>01556   <a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l01557"></a>01557 }
<a name="l01558"></a>01558 
<a name="l01559"></a><a class="code" href="classKDockWidget.html#aa3320a716c7f824f1bad7edb39e62781">01559</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#aa3320a716c7f824f1bad7edb39e62781">KDockWidget::setFormerBrotherDockWidget</a>(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *dockWidget)
<a name="l01560"></a>01560 {
<a name="l01561"></a>01561   <a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a> = dockWidget;
<a name="l01562"></a>01562   <span class="keywordflow">if</span>( <a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a> )
<a name="l01563"></a>01563     <a class="codeRef" href="qobject.html#connect">QObject::connect</a>( <a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a>, SIGNAL(<a class="code" href="classKDockWidget.html#affc34671059cd324ca23f5db9dc4b00a" title="Emitted when the widget processes a close event.">iMBeingClosed</a>()),
<a name="l01564"></a>01564                       <span class="keyword">this</span>, SLOT(<a class="code" href="classKDockWidget.html#a17227fcbdee4d2710b11ad992d8bed54" title="Does several things here when it has noticed that the former brother widget (closest neighbor) gets l...">loseFormerBrotherDockWidget</a>()) );
<a name="l01565"></a>01565 }
<a name="l01566"></a>01566 
<a name="l01567"></a><a class="code" href="classKDockWidget.html#a17227fcbdee4d2710b11ad992d8bed54">01567</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a17227fcbdee4d2710b11ad992d8bed54" title="Does several things here when it has noticed that the former brother widget (closest neighbor) gets l...">KDockWidget::loseFormerBrotherDockWidget</a>()
<a name="l01568"></a>01568 {
<a name="l01569"></a>01569   <span class="keywordflow">if</span>( <a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a> )
<a name="l01570"></a>01570     <a class="codeRef" href="qobject.html#disconnect">QObject::disconnect</a>( <a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a>, SIGNAL(<a class="code" href="classKDockWidget.html#affc34671059cd324ca23f5db9dc4b00a" title="Emitted when the widget processes a close event.">iMBeingClosed</a>()),
<a name="l01571"></a>01571                          <span class="keyword">this</span>, SLOT(<a class="code" href="classKDockWidget.html#a17227fcbdee4d2710b11ad992d8bed54" title="Does several things here when it has noticed that the former brother widget (closest neighbor) gets l...">loseFormerBrotherDockWidget</a>()) );
<a name="l01572"></a>01572   <a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a> = 0L;
<a name="l01573"></a>01573   <a class="codeRef" href="qwidget.html#repaint-2">repaint</a>();
<a name="l01574"></a>01574 }
<a name="l01575"></a>01575 
<a name="l01576"></a><a class="code" href="classKDockWidget.html#a08ce97242c87ee57e54676b9809b0821">01576</a> <span class="keywordtype">void</span> <a class="code" href="classKDockWidget.html#a08ce97242c87ee57e54676b9809b0821" title="Docks a dockwidget back to the dockwidget that was the neighbor widget before the current dock positi...">KDockWidget::dockBack</a>()
<a name="l01577"></a>01577 {
<a name="l01578"></a>01578   <span class="keywordflow">if</span>( <a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a>) {
<a name="l01579"></a>01579     <span class="comment">// search all children if it tries to dock back to a child</span>
<a name="l01580"></a>01580     <span class="keywordtype">bool</span> found = <span class="keyword">false</span>;
<a name="l01581"></a>01581     <a class="codeRef" href="qobjectlist.html">QObjectList</a>* cl = queryList(<span class="stringliteral">&quot;KDockWidget&quot;</span>);
<a name="l01582"></a>01582     QObjectListIt it( *cl );
<a name="l01583"></a>01583     <a class="codeRef" href="qobject.html">QObject</a> * obj;
<a name="l01584"></a>01584     <span class="keywordflow">while</span> ( !found &amp;&amp; (obj=it.current()) != 0 ) {
<a name="l01585"></a>01585       ++it;
<a name="l01586"></a>01586       <a class="codeRef" href="qwidget.html">QWidget</a>* widg = (<a class="codeRef" href="qwidget.html">QWidget</a>*)obj;
<a name="l01587"></a>01587       <span class="keywordflow">if</span>( widg == <a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a>)
<a name="l01588"></a>01588         found = <span class="keyword">true</span>;
<a name="l01589"></a>01589     }
<a name="l01590"></a>01590     <span class="keyword">delete</span> cl;
<a name="l01591"></a>01591 
<a name="l01592"></a>01592     <span class="keywordflow">if</span>( !found) {
<a name="l01593"></a>01593       <span class="comment">// can dock back to the former brother dockwidget</span>
<a name="l01594"></a>01594       <a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4" title="This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...">manualDock</a>( <a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a>, <a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a>, d-&gt;splitPosInPercent, <a class="codeRef" href="qpoint.html">QPoint</a>(0,0), <span class="keyword">false</span>, d-&gt;index);
<a name="l01595"></a>01595       <a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a> = 0L;
<a name="l01596"></a>01596       <a class="code" href="classKDockWidget.html#a1156e8c4d79e454cac3d51b50babd87e" title="Normally it simply shows the dockwidget.">makeDockVisible</a>();
<a name="l01597"></a>01597       <span class="keywordflow">return</span>;
<a name="l01598"></a>01598     }
<a name="l01599"></a>01599   }
<a name="l01600"></a>01600 
<a name="l01601"></a>01601   <span class="comment">// else dockback to the dockmainwindow (default behavior)</span>
<a name="l01602"></a>01602   <a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4" title="This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...">manualDock</a>( ((<a class="code" href="classKDockMainWindow.html" title="A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwi...">KDockMainWindow</a>*)manager-&gt;main)-&gt;getMainDockWidget(), <a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a>, d-&gt;splitPosInPercent, <a class="codeRef" href="qpoint.html">QPoint</a>(0,0), <span class="keyword">false</span>, d-&gt;index);
<a name="l01603"></a>01603   <a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a> = 0L;
<a name="l01604"></a>01604   <span class="keywordflow">if</span> (parent())
<a name="l01605"></a>01605     <a class="code" href="classKDockWidget.html#a1156e8c4d79e454cac3d51b50babd87e" title="Normally it simply shows the dockwidget.">makeDockVisible</a>();
<a name="l01606"></a>01606 }
<a name="l01607"></a>01607 
<a name="l01608"></a><a class="code" href="classKDockWidget.html#ac0e55a4ea8ac435d21473b9cd52c1c1f">01608</a> <span class="keywordtype">bool</span> <a class="code" href="classKDockWidget.html#ac0e55a4ea8ac435d21473b9cd52c1c1f">KDockWidget::isDockBackPossible</a>()<span class="keyword"> const</span>
<a name="l01609"></a>01609 <span class="keyword"></span>{
<a name="l01610"></a>01610   <span class="keywordflow">if</span>( !(<a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a>) || !(<a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a>-&gt;<a class="code" href="classKDockWidget.html#a262420c532cda23af355f32be8056c1c">dockSite</a>() &amp; <a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a>))
<a name="l01611"></a>01611     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l01612"></a>01612   <span class="keywordflow">else</span>
<a name="l01613"></a>01613     <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l01614"></a>01614 }
<a name="l01615"></a>01615 
<a name="l01616"></a>01616 <span class="comment">/**************************************************************************************/</span>
<a name="l01617"></a>01617 
<a name="l01618"></a>01618 
<a name="l01619"></a><a class="code" href="classKDockManager.html#acce76ee2a7297b83db82e6c26cdf5aba">01619</a> <a class="code" href="classKDockManager.html#acce76ee2a7297b83db82e6c26cdf5aba" title="Constructs a dockmanager.">KDockManager::KDockManager</a>( <a class="codeRef" href="qwidget.html">QWidget</a>* mainWindow , <span class="keyword">const</span> <span class="keywordtype">char</span>* name )
<a name="l01620"></a>01620 :<a class="codeRef" href="qobject.html">QObject</a>( mainWindow, name )
<a name="l01621"></a>01621   ,main(mainWindow)
<a name="l01622"></a>01622   ,currentDragWidget(0L)
<a name="l01623"></a>01623   ,currentMoveWidget(0L)
<a name="l01624"></a>01624   ,childDockWidgetList(0L)
<a name="l01625"></a>01625   ,autoCreateDock(0L)
<a name="l01626"></a>01626   ,storeW(0)
<a name="l01627"></a>01627   ,storeH(0)
<a name="l01628"></a>01628   ,dragging(false)
<a name="l01629"></a>01629   ,undockProcess(false)
<a name="l01630"></a>01630   ,dropCancel(true)
<a name="l01631"></a>01631 {
<a name="l01632"></a>01632   d = <span class="keyword">new</span> KDockManagerPrivate;
<a name="l01633"></a>01633 
<a name="l01634"></a>01634   d-&gt;readyToDrag = <span class="keyword">false</span>;
<a name="l01635"></a>01635   d-&gt;mainDockWidget=0;
<a name="l01636"></a>01636 
<a name="l01637"></a>01637 <span class="preprocessor">#ifndef NO_KDE2</span>
<a name="l01638"></a>01638 <span class="preprocessor"></span>  d-&gt;splitterOpaqueResize = <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKGlobalSettings.html#a74e37e9f03934dd897a983a25e593cd5">KGlobalSettings::opaqueResize</a>();
<a name="l01639"></a>01639 <span class="preprocessor">#else</span>
<a name="l01640"></a>01640 <span class="preprocessor"></span>  d-&gt;splitterOpaqueResize = <span class="keyword">false</span>;
<a name="l01641"></a>01641 <span class="preprocessor">#endif</span>
<a name="l01642"></a>01642 <span class="preprocessor"></span>
<a name="l01643"></a>01643   d-&gt;splitterKeepSize = <span class="keyword">false</span>;
<a name="l01644"></a>01644   d-&gt;splitterHighResolution = <span class="keyword">false</span>;
<a name="l01645"></a>01645   d-&gt;m_readDockConfigMode = WrapExistingWidgetsOnly; <span class="comment">// default as before</span>
<a name="l01646"></a>01646 
<a name="l01647"></a>01647   main-&gt;installEventFilter( <span class="keyword">this</span> );
<a name="l01648"></a>01648 
<a name="l01649"></a>01649   undockProcess = <span class="keyword">false</span>;
<a name="l01650"></a>01650 
<a name="l01651"></a>01651   menuData = <span class="keyword">new</span> <a class="codeRef" href="qptrlist.html">QPtrList&lt;MenuDockData&gt;</a>;
<a name="l01652"></a>01652   menuData-&gt;<a class="codeRef" href="qptrlist.html#setAutoDelete">setAutoDelete</a>( <span class="keyword">true</span> );
<a name="l01653"></a>01653   menuData-&gt;<a class="codeRef" href="qptrlist.html#setAutoDelete">setAutoDelete</a>( <span class="keyword">true</span> );
<a name="l01654"></a>01654 
<a name="l01655"></a>01655 <span class="preprocessor">#ifndef NO_KDE2</span>
<a name="l01656"></a>01656 <span class="preprocessor"></span>  menu = <span class="keyword">new</span> <a class="code" href="classKPopupMenu.html" title="A menu with title items.">KPopupMenu</a>();
<a name="l01657"></a>01657 <span class="preprocessor">#else</span>
<a name="l01658"></a>01658 <span class="preprocessor"></span>  menu = <span class="keyword">new</span> <a class="codeRef" href="qpopupmenu.html">QPopupMenu</a>();
<a name="l01659"></a>01659 <span class="preprocessor">#endif</span>
<a name="l01660"></a>01660 <span class="preprocessor"></span>
<a name="l01661"></a>01661   <a class="codeRef" href="qobject.html#connect">connect</a>( menu, SIGNAL(aboutToShow()), SLOT(slotMenuPopup()) );
<a name="l01662"></a>01662   <a class="codeRef" href="qobject.html#connect">connect</a>( menu, SIGNAL(activated(<span class="keywordtype">int</span>)), SLOT(slotMenuActivated(<span class="keywordtype">int</span>)) );
<a name="l01663"></a>01663 
<a name="l01664"></a>01664   childDock = <span class="keyword">new</span> <a class="codeRef" href="qobjectlist.html">QObjectList</a>();
<a name="l01665"></a>01665   childDock-&gt;setAutoDelete( <span class="keyword">false</span> );
<a name="l01666"></a>01666 }
<a name="l01667"></a>01667 
<a name="l01668"></a>01668 
<a name="l01669"></a><a class="code" href="classKDockManager.html#aedd43390c4580bae98a81648edf51548">01669</a> <span class="keywordtype">void</span> <a class="code" href="classKDockManager.html#aedd43390c4580bae98a81648edf51548">KDockManager::setMainDockWidget2</a>(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *w)
<a name="l01670"></a>01670 {
<a name="l01671"></a>01671   d-&gt;mainDockWidget=w;
<a name="l01672"></a>01672 }
<a name="l01673"></a>01673 
<a name="l01674"></a><a class="code" href="classKDockManager.html#a3ea51118bfce28430ba68f937f2ba764">01674</a> <a class="code" href="classKDockManager.html#a3ea51118bfce28430ba68f937f2ba764" title="Destructs a dockmanager.">KDockManager::~KDockManager</a>()
<a name="l01675"></a>01675 {
<a name="l01676"></a>01676   <span class="keyword">delete</span> menuData;
<a name="l01677"></a>01677   <span class="keyword">delete</span> menu;
<a name="l01678"></a>01678 
<a name="l01679"></a>01679   QObjectListIt it( *childDock );
<a name="l01680"></a>01680   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> * obj;
<a name="l01681"></a>01681 
<a name="l01682"></a>01682   <span class="keywordflow">while</span> ( (obj=(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)it.current()) ) {
<a name="l01683"></a>01683     <span class="keyword">delete</span> obj;
<a name="l01684"></a>01684   }
<a name="l01685"></a>01685   <span class="keyword">delete</span> childDock;
<a name="l01686"></a>01686   <span class="keyword">delete</span> d;
<a name="l01687"></a>01687   d=0;
<a name="l01688"></a>01688 }
<a name="l01689"></a>01689 
<a name="l01690"></a><a class="code" href="classKDockManager.html#abc8aa589c0a6823d8254fb2446a2d98e">01690</a> <span class="keywordtype">void</span> <a class="code" href="classKDockManager.html#abc8aa589c0a6823d8254fb2446a2d98e" title="Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are pare...">KDockManager::activate</a>()
<a name="l01691"></a>01691 {
<a name="l01692"></a>01692   QObjectListIt it( *childDock );
<a name="l01693"></a>01693   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> * obj;
<a name="l01694"></a>01694 
<a name="l01695"></a>01695   <span class="keywordflow">while</span> ( (obj=(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)it.current()) ) {
<a name="l01696"></a>01696     ++it;
<a name="l01697"></a>01697     <span class="keywordflow">if</span> ( obj-&gt;widget ) obj-&gt;widget-&gt;<a class="codeRef" href="qwidget.html#show">show</a>();
<a name="l01698"></a>01698     <span class="keywordflow">if</span> ( !obj-&gt;<a class="code" href="classKDockWidget.html#ac8ff680712c0da5e3a004e566b1210d6">parentDockTabGroup</a>() ){
<a name="l01699"></a>01699         obj-&gt;<a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l01700"></a>01700     }
<a name="l01701"></a>01701   }
<a name="l01702"></a>01702   <span class="keywordflow">if</span> ( !main-&gt;inherits(<span class="stringliteral">&quot;QDialog&quot;</span>) ) main-&gt;<a class="codeRef" href="qwidget.html#show">show</a>();
<a name="l01703"></a>01703 }
<a name="l01704"></a>01704 
<a name="l01705"></a><a class="code" href="classKDockManager.html#a75b25fe3e41998f2cbb80f917f5e1fa6">01705</a> <span class="keywordtype">bool</span> <a class="code" href="classKDockManager.html#a75b25fe3e41998f2cbb80f917f5e1fa6" title="It&#39;s more or less a method that catches several events which are interesting for the dockmanager...">KDockManager::eventFilter</a>( <a class="codeRef" href="qobject.html">QObject</a> *obj, <a class="codeRef" href="qevent.html">QEvent</a> *event )
<a name="l01706"></a>01706 {
<a name="l01707"></a>01707 
<a name="l01708"></a>01708   <span class="keywordflow">if</span> ( obj-&gt;<a class="codeRef" href="qobject.html#inherits">inherits</a>(<span class="stringliteral">&quot;KDockWidgetAbstractHeaderDrag&quot;</span>) ){
<a name="l01709"></a>01709     <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* pDockWdgAtCursor = 0L;
<a name="l01710"></a>01710     <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* curdw = ((<a class="code" href="classKDockWidgetAbstractHeaderDrag.html" title="An abstract class for all dockwidget drag-panels of a dockwidgets (and member of the dockwidget class...">KDockWidgetAbstractHeaderDrag</a>*)obj)-&gt;dockWidget();
<a name="l01711"></a>01711     <span class="keywordflow">switch</span> ( event-&gt;<a class="codeRef" href="qevent.html#type">type</a>() ){
<a name="l01712"></a>01712       <span class="keywordflow">case</span> QEvent::MouseButtonDblClick:
<a name="l01713"></a>01713         <span class="keywordflow">if</span> (curdw-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> == KDockWidget::DockDesktop)  curdw-&gt;<a class="code" href="classKDockWidget.html#a08ce97242c87ee57e54676b9809b0821" title="Docks a dockwidget back to the dockwidget that was the neighbor widget before the current dock positi...">dockBack</a>();
<a name="l01714"></a>01714         <span class="keywordflow">else</span>
<a name="l01715"></a>01715     {
<a name="l01716"></a>01716         curdw-&gt;<a class="code" href="classKDockWidget.html#a4f44ad2d993c57d69ac7643d6d1d68f8" title="Docks the widget to the desktop (as a toplevel widget)">toDesktop</a>();
<a name="l01717"></a>01717         <span class="comment">// curdw-&gt;manualDock (0, KDockWidget::DockDesktop);</span>
<a name="l01718"></a>01718     }
<a name="l01719"></a>01719         <span class="keywordflow">break</span>;
<a name="l01720"></a>01720 
<a name="l01721"></a>01721       <span class="keywordflow">case</span> QEvent::MouseButtonPress:
<a name="l01722"></a>01722         <span class="keywordflow">if</span> ( ((<a class="codeRef" href="qmouseevent.html">QMouseEvent</a>*)event)-&gt;button() == LeftButton ){
<a name="l01723"></a>01723           <span class="keywordflow">if</span> ( curdw-&gt;eDocking != (<span class="keywordtype">int</span>)KDockWidget::DockNone ){
<a name="l01724"></a>01724             dropCancel = <span class="keyword">true</span>;
<a name="l01725"></a>01725             curdw-&gt;<a class="codeRef" href="qwidget.html#setFocus">setFocus</a>();
<a name="l01726"></a>01726             qApp-&gt;processOneEvent();
<a name="l01727"></a>01727 
<a name="l01728"></a>01728             currentDragWidget = curdw;
<a name="l01729"></a>01729             currentMoveWidget = 0L;
<a name="l01730"></a>01730             childDockWidgetList = <span class="keyword">new</span> QWidgetList();
<a name="l01731"></a>01731             childDockWidgetList-&gt;append( curdw );
<a name="l01732"></a>01732             findChildDockWidget( curdw, childDockWidgetList );
<a name="l01733"></a>01733 
<a name="l01734"></a>01734             <span class="comment">//d-&gt;oldDragRect = QRect(); should fix rectangle not erased problem</span>
<a name="l01735"></a>01735             d-&gt;dragRect = <a class="codeRef" href="qrect.html">QRect</a>(curdw-&gt;<a class="codeRef" href="qwidget.html#geometry">geometry</a>());
<a name="l01736"></a>01736             <a class="codeRef" href="qpoint.html">QPoint</a> p = curdw-&gt;<a class="codeRef" href="qwidget.html#mapToGlobal">mapToGlobal</a>(<a class="codeRef" href="qpoint.html">QPoint</a>(0,0));
<a name="l01737"></a>01737             d-&gt;dragRect.moveTopLeft(p);
<a name="l01738"></a>01738             drawDragRectangle();
<a name="l01739"></a>01739             d-&gt;readyToDrag = <span class="keyword">true</span>;
<a name="l01740"></a>01740 
<a name="l01741"></a>01741             d-&gt;dragOffset = <a class="codeRef" href="qcursor.html#pos">QCursor::pos</a>()-currentDragWidget-&gt;<a class="codeRef" href="qwidget.html#mapToGlobal">mapToGlobal</a>(<a class="codeRef" href="qpoint.html">QPoint</a>(0,0));
<a name="l01742"></a>01742           }
<a name="l01743"></a>01743 
<a name="l01744"></a>01744         }
<a name="l01745"></a>01745         <span class="keywordflow">break</span>;
<a name="l01746"></a>01746       <span class="keywordflow">case</span> QEvent::MouseButtonRelease:
<a name="l01747"></a>01747         <span class="keywordflow">if</span> ( ((<a class="codeRef" href="qmouseevent.html">QMouseEvent</a>*)event)-&gt;button() == LeftButton ){
<a name="l01748"></a>01748           <span class="keywordflow">if</span> ( dragging ){
<a name="l01749"></a>01749             <span class="keywordflow">if</span> ( !dropCancel )
<a name="l01750"></a>01750               drop();
<a name="l01751"></a>01751             <span class="keywordflow">else</span>
<a name="l01752"></a>01752               cancelDrop();
<a name="l01753"></a>01753           }
<a name="l01754"></a>01754           <span class="keywordflow">if</span> (d-&gt;readyToDrag) {
<a name="l01755"></a>01755               d-&gt;readyToDrag = <span class="keyword">false</span>;
<a name="l01756"></a>01756               <span class="comment">//d-&gt;oldDragRect = QRect(); should fix rectangle not erased problem</span>
<a name="l01757"></a>01757               d-&gt;dragRect = <a class="codeRef" href="qrect.html">QRect</a>(curdw-&gt;<a class="codeRef" href="qwidget.html#geometry">geometry</a>());
<a name="l01758"></a>01758               <a class="codeRef" href="qpoint.html">QPoint</a> p = curdw-&gt;<a class="codeRef" href="qwidget.html#mapToGlobal">mapToGlobal</a>(<a class="codeRef" href="qpoint.html">QPoint</a>(0,0));
<a name="l01759"></a>01759               d-&gt;dragRect.moveTopLeft(p);
<a name="l01760"></a>01760               drawDragRectangle();
<a name="l01761"></a>01761               currentDragWidget = 0L;
<a name="l01762"></a>01762               <span class="keyword">delete</span> childDockWidgetList;
<a name="l01763"></a>01763               childDockWidgetList = 0L;
<a name="l01764"></a>01764           }
<a name="l01765"></a>01765           dragging = <span class="keyword">false</span>;
<a name="l01766"></a>01766           dropCancel = <span class="keyword">true</span>;
<a name="l01767"></a>01767         }
<a name="l01768"></a>01768         <span class="keywordflow">break</span>;
<a name="l01769"></a>01769       <span class="keywordflow">case</span> QEvent::MouseMove:
<a name="l01770"></a>01770         <span class="keywordflow">if</span> ( dragging ) {
<a name="l01771"></a>01771 
<a name="l01772"></a>01772 <span class="preprocessor">#ifdef BORDERLESS_WINDOWS</span>
<a name="l01773"></a>01773 <span class="preprocessor"></span><span class="comment">//BEGIN TEST</span>
<a name="l01774"></a>01774       <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *oldMoveWidget;
<a name="l01775"></a>01775       <span class="keywordflow">if</span> (!curdw-&gt;parent())
<a name="l01776"></a>01776       {
<a name="l01777"></a>01777         curdw-&gt;<a class="codeRef" href="qwidget.html#move">move</a>(<a class="codeRef" href="qcursor.html#pos">QCursor::pos</a>()-d-&gt;dragOffset);
<a name="l01778"></a>01778             pDockWdgAtCursor = findDockWidgetAt( <a class="codeRef" href="qcursor.html#pos">QCursor::pos</a>()-<a class="codeRef" href="qpoint.html">QPoint</a>(0,d-&gt;dragOffset.y()+3) );
<a name="l01779"></a>01779                 oldMoveWidget = currentMoveWidget;
<a name="l01780"></a>01780       }
<a name="l01781"></a>01781       <span class="keywordflow">else</span>
<a name="l01782"></a>01782       {
<a name="l01783"></a>01783             pDockWdgAtCursor = findDockWidgetAt( <a class="codeRef" href="qcursor.html#pos">QCursor::pos</a>() );
<a name="l01784"></a>01784                 oldMoveWidget = currentMoveWidget;
<a name="l01785"></a>01785       }
<a name="l01786"></a>01786 <span class="comment">//END TEST</span>
<a name="l01787"></a>01787 <span class="preprocessor">#else</span>
<a name="l01788"></a>01788 <span class="preprocessor"></span>      pDockWdgAtCursor = findDockWidgetAt( <a class="codeRef" href="qcursor.html#pos">QCursor::pos</a>() );
<a name="l01789"></a>01789           <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* oldMoveWidget = currentMoveWidget;
<a name="l01790"></a>01790 <span class="preprocessor">#endif</span>
<a name="l01791"></a>01791 <span class="preprocessor"></span>
<a name="l01792"></a>01792       <span class="keywordflow">if</span> ( currentMoveWidget  &amp;&amp; pDockWdgAtCursor == currentMoveWidget ) { <span class="comment">//move</span>
<a name="l01793"></a>01793             dragMove( currentMoveWidget, currentMoveWidget-&gt;<a class="codeRef" href="qwidget.html#mapFromGlobal">mapFromGlobal</a>( <a class="codeRef" href="qcursor.html#pos">QCursor::pos</a>() ) );
<a name="l01794"></a>01794             <span class="keywordflow">break</span>;
<a name="l01795"></a>01795           } <span class="keywordflow">else</span> {
<a name="l01796"></a>01796             <span class="keywordflow">if</span> (dropCancel &amp;&amp; curdw) {
<a name="l01797"></a>01797               d-&gt;dragRect = <a class="codeRef" href="qrect.html">QRect</a>(curdw-&gt;<a class="codeRef" href="qwidget.html#geometry">geometry</a>());
<a name="l01798"></a>01798               <a class="codeRef" href="qpoint.html">QPoint</a> p = curdw-&gt;<a class="codeRef" href="qwidget.html#mapToGlobal">mapToGlobal</a>(<a class="codeRef" href="qpoint.html">QPoint</a>(0,0));
<a name="l01799"></a>01799               d-&gt;dragRect.moveTopLeft(p);
<a name="l01800"></a>01800             }<span class="keywordflow">else</span>
<a name="l01801"></a>01801               d-&gt;dragRect = <a class="codeRef" href="qrect.html">QRect</a>();
<a name="l01802"></a>01802 
<a name="l01803"></a>01803             drawDragRectangle();
<a name="l01804"></a>01804           }
<a name="l01805"></a>01805 
<a name="l01806"></a>01806           <span class="keywordflow">if</span> ( !pDockWdgAtCursor &amp;&amp; !(curdw-&gt;eDocking &amp; (<span class="keywordtype">int</span>)KDockWidget::DockDesktop) ){
<a name="l01807"></a>01807               <span class="comment">// just moving at the desktop</span>
<a name="l01808"></a>01808               currentMoveWidget = pDockWdgAtCursor;
<a name="l01809"></a>01809               curPos = KDockWidget::DockDesktop;
<a name="l01810"></a>01810           } <span class="keywordflow">else</span> {
<a name="l01811"></a>01811             <span class="keywordflow">if</span> ( oldMoveWidget &amp;&amp; pDockWdgAtCursor != currentMoveWidget ) { <span class="comment">//leave</span>
<a name="l01812"></a>01812               currentMoveWidget = pDockWdgAtCursor;
<a name="l01813"></a>01813               curPos = KDockWidget::DockDesktop;
<a name="l01814"></a>01814             }
<a name="l01815"></a>01815           }
<a name="l01816"></a>01816 
<a name="l01817"></a>01817           <span class="keywordflow">if</span> ( oldMoveWidget != pDockWdgAtCursor &amp;&amp; pDockWdgAtCursor ) { <span class="comment">//enter pDockWdgAtCursor</span>
<a name="l01818"></a>01818             currentMoveWidget = pDockWdgAtCursor;
<a name="l01819"></a>01819             curPos = KDockWidget::DockDesktop;
<a name="l01820"></a>01820           }
<a name="l01821"></a>01821         } <span class="keywordflow">else</span> {
<a name="l01822"></a>01822           <span class="keywordflow">if</span> (d-&gt;readyToDrag) {
<a name="l01823"></a>01823             d-&gt;readyToDrag = <span class="keyword">false</span>;
<a name="l01824"></a>01824           }
<a name="l01825"></a>01825           <span class="keywordflow">if</span> ( (((<a class="codeRef" href="qmouseevent.html">QMouseEvent</a>*)event)-&gt;state() == LeftButton) &amp;&amp;
<a name="l01826"></a>01826                (curdw-&gt;eDocking != (<span class="keywordtype">int</span>)KDockWidget::DockNone) ) {
<a name="l01827"></a>01827             startDrag( curdw);
<a name="l01828"></a>01828           }
<a name="l01829"></a>01829         }
<a name="l01830"></a>01830     <span class="keywordflow">break</span>;
<a name="l01831"></a>01831       <span class="keywordflow">default</span>:
<a name="l01832"></a>01832         <span class="keywordflow">break</span>;
<a name="l01833"></a>01833     }
<a name="l01834"></a>01834   }
<a name="l01835"></a>01835   <span class="keywordflow">return</span> <a class="code" href="classKDockManager.html#a75b25fe3e41998f2cbb80f917f5e1fa6" title="It&#39;s more or less a method that catches several events which are interesting for the dockmanager...">QObject::eventFilter</a>( obj, event );
<a name="l01836"></a>01836 }
<a name="l01837"></a>01837 
<a name="l01838"></a>01838 <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* KDockManager::findDockWidgetAt( <span class="keyword">const</span> <a class="codeRef" href="qpoint.html">QPoint</a>&amp; pos )
<a name="l01839"></a>01839 {
<a name="l01840"></a>01840   dropCancel = <span class="keyword">true</span>;
<a name="l01841"></a>01841 
<a name="l01842"></a>01842   <span class="keywordflow">if</span> (!currentDragWidget)
<a name="l01843"></a>01843     <span class="keywordflow">return</span> 0L; <span class="comment">// pointer access safety</span>
<a name="l01844"></a>01844 
<a name="l01845"></a>01845   <span class="keywordflow">if</span> (currentDragWidget-&gt;eDocking == (<span class="keywordtype">int</span>)KDockWidget::DockNone ) <span class="keywordflow">return</span> 0L;
<a name="l01846"></a>01846 
<a name="l01847"></a>01847   <a class="codeRef" href="qwidget.html">QWidget</a>* p = <a class="codeRef" href="qapplication.html#widgetAt">QApplication::widgetAt</a>( pos );
<a name="l01848"></a>01848   <span class="keywordflow">if</span> ( !p ) {
<a name="l01849"></a>01849     dropCancel = <span class="keyword">false</span>;
<a name="l01850"></a>01850     <span class="keywordflow">return</span> 0L;
<a name="l01851"></a>01851   }
<a name="l01852"></a>01852 <span class="preprocessor">#if defined(_OS_WIN32_) || defined(Q_OS_WIN32)</span>
<a name="l01853"></a>01853 <span class="preprocessor"></span>  p = p-&gt;<a class="codeRef" href="qwidget.html#topLevelWidget">topLevelWidget</a>();
<a name="l01854"></a>01854 <span class="preprocessor">#endif</span>
<a name="l01855"></a>01855 <span class="preprocessor"></span>  <a class="codeRef" href="qwidget.html">QWidget</a>* w = 0L;
<a name="l01856"></a>01856   findChildDockWidget( w, p, p-&gt;<a class="codeRef" href="qwidget.html#mapFromGlobal">mapFromGlobal</a>(pos) );
<a name="l01857"></a>01857   <span class="keywordflow">if</span> ( !w ){
<a name="l01858"></a>01858     <span class="keywordflow">if</span> ( !p-&gt;inherits(<span class="stringliteral">&quot;KDockWidget&quot;</span>) ) {
<a name="l01859"></a>01859       <span class="keywordflow">return</span> 0L;
<a name="l01860"></a>01860     }
<a name="l01861"></a>01861     w = p;
<a name="l01862"></a>01862   }
<a name="l01863"></a>01863   <span class="keywordflow">if</span> ( qt_find_obj_child( w, <span class="stringliteral">&quot;KDockSplitter&quot;</span>, <span class="stringliteral">&quot;_dock_split_&quot;</span> ) ) <span class="keywordflow">return</span> 0L;
<a name="l01864"></a>01864   <span class="keywordflow">if</span> ( qt_find_obj_child( w, <span class="stringliteral">&quot;KDockTabGroup&quot;</span>, <span class="stringliteral">&quot;_dock_tab&quot;</span> ) ) <span class="keywordflow">return</span> 0L;
<a name="l01865"></a>01865   <span class="keywordflow">if</span> (dynamic_cast&lt;KDockContainer*&gt;(w)) <span class="keywordflow">return</span> 0L;
<a name="l01866"></a>01866 
<a name="l01867"></a>01867   <span class="keywordflow">if</span> (!childDockWidgetList) <span class="keywordflow">return</span> 0L;
<a name="l01868"></a>01868   <span class="keywordflow">if</span> ( childDockWidgetList-&gt;find(w) != -1 ) <span class="keywordflow">return</span> 0L;
<a name="l01869"></a>01869   <span class="keywordflow">if</span> ( currentDragWidget-&gt;isGroup &amp;&amp; ((<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)w)-&gt;parentDockTabGroup() ) <span class="keywordflow">return</span> 0L;
<a name="l01870"></a>01870 
<a name="l01871"></a>01871   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* www = (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)w;
<a name="l01872"></a>01872   <span class="keywordflow">if</span> ( www-&gt;sDocking == (<span class="keywordtype">int</span>)KDockWidget::DockNone ) <span class="keywordflow">return</span> 0L;
<a name="l01873"></a>01873   <span class="keywordflow">if</span>( !www-&gt;widget )
<a name="l01874"></a>01874     <span class="keywordflow">return</span> 0L;
<a name="l01875"></a>01875 
<a name="l01876"></a>01876   <a class="code" href="classKDockWidget.html#aa6d125044bf12191210c8cce5b5c4c62" title="The possible positions where a dockwidget can dock to another dockwidget.">KDockWidget::DockPosition</a> curPos = KDockWidget::DockDesktop;
<a name="l01877"></a>01877   <a class="codeRef" href="qpoint.html">QPoint</a> cpos  = www-&gt;<a class="codeRef" href="qwidget.html#mapFromGlobal">mapFromGlobal</a>( pos );
<a name="l01878"></a>01878 
<a name="l01879"></a>01879   <span class="keywordtype">int</span> ww = www-&gt;widget-&gt;<a class="codeRef" href="qwidget.html#width">width</a>() / 3;
<a name="l01880"></a>01880   <span class="keywordtype">int</span> hh = www-&gt;widget-&gt;<a class="codeRef" href="qwidget.html#height">height</a>() / 3;
<a name="l01881"></a>01881 
<a name="l01882"></a>01882   <span class="keywordflow">if</span> ( cpos.<a class="codeRef" href="qpoint.html#y">y</a>() &lt;= hh ){
<a name="l01883"></a>01883     curPos = KDockWidget::DockTop;
<a name="l01884"></a>01884   } <span class="keywordflow">else</span>
<a name="l01885"></a>01885     <span class="keywordflow">if</span> ( cpos.<a class="codeRef" href="qpoint.html#y">y</a>() &gt;= 2*hh ){
<a name="l01886"></a>01886       curPos = KDockWidget::DockBottom;
<a name="l01887"></a>01887     } <span class="keywordflow">else</span>
<a name="l01888"></a>01888       <span class="keywordflow">if</span> ( cpos.<a class="codeRef" href="qpoint.html#x">x</a>() &lt;= ww ){
<a name="l01889"></a>01889         curPos = KDockWidget::DockLeft;
<a name="l01890"></a>01890       } <span class="keywordflow">else</span>
<a name="l01891"></a>01891         <span class="keywordflow">if</span> ( cpos.<a class="codeRef" href="qpoint.html#x">x</a>() &gt;= 2*ww ){
<a name="l01892"></a>01892           curPos = KDockWidget::DockRight;
<a name="l01893"></a>01893         } <span class="keywordflow">else</span>
<a name="l01894"></a>01894             curPos = KDockWidget::DockCenter;
<a name="l01895"></a>01895 
<a name="l01896"></a>01896   <span class="keywordflow">if</span> ( !(www-&gt;sDocking &amp; (<span class="keywordtype">int</span>)curPos) ) <span class="keywordflow">return</span> 0L;
<a name="l01897"></a>01897   <span class="keywordflow">if</span> ( !(currentDragWidget-&gt;eDocking &amp; (<span class="keywordtype">int</span>)curPos) ) <span class="keywordflow">return</span> 0L;
<a name="l01898"></a>01898   <span class="keywordflow">if</span> ( www-&gt;manager != <span class="keyword">this</span> ) <span class="keywordflow">return</span> 0L;
<a name="l01899"></a>01899 
<a name="l01900"></a>01900   dropCancel = <span class="keyword">false</span>;
<a name="l01901"></a>01901   <span class="keywordflow">return</span> www;
<a name="l01902"></a>01902 }
<a name="l01903"></a>01903 
<a name="l01904"></a>01904 <span class="keywordtype">void</span> KDockManager::findChildDockWidget( <a class="codeRef" href="qwidget.html">QWidget</a>*&amp; ww, <span class="keyword">const</span> <a class="codeRef" href="qwidget.html">QWidget</a>* p, <span class="keyword">const</span> <a class="codeRef" href="qpoint.html">QPoint</a>&amp; pos )
<a name="l01905"></a>01905 {
<a name="l01906"></a>01906   <span class="keywordflow">if</span> ( p-&gt;children() ) {
<a name="l01907"></a>01907     <a class="codeRef" href="qwidget.html">QWidget</a> *w;
<a name="l01908"></a>01908     QObjectListIt it( *p-&gt;children() );
<a name="l01909"></a>01909     it.toLast();
<a name="l01910"></a>01910     <span class="keywordflow">while</span> ( it.current() ) {
<a name="l01911"></a>01911       <span class="keywordflow">if</span> ( it.current()-&gt;isWidgetType() ) {
<a name="l01912"></a>01912         w = (<a class="codeRef" href="qwidget.html">QWidget</a>*)it.current();
<a name="l01913"></a>01913         <span class="keywordflow">if</span> ( w-&gt;<a class="codeRef" href="qwidget.html#isVisible">isVisible</a>() &amp;&amp; w-&gt;<a class="codeRef" href="qwidget.html#geometry">geometry</a>().contains(pos) ) {
<a name="l01914"></a>01914           <span class="keywordflow">if</span> ( w-&gt;inherits(<span class="stringliteral">&quot;KDockWidget&quot;</span>) ) ww = w;
<a name="l01915"></a>01915           findChildDockWidget( ww, w, w-&gt;<a class="codeRef" href="qwidget.html#mapFromParent">mapFromParent</a>(pos) );
<a name="l01916"></a>01916           <span class="keywordflow">return</span>;
<a name="l01917"></a>01917         }
<a name="l01918"></a>01918       }
<a name="l01919"></a>01919       --it;
<a name="l01920"></a>01920     }
<a name="l01921"></a>01921   }
<a name="l01922"></a>01922   <span class="keywordflow">return</span>;
<a name="l01923"></a>01923 }
<a name="l01924"></a>01924 
<a name="l01925"></a>01925 <span class="keywordtype">void</span> KDockManager::findChildDockWidget( <span class="keyword">const</span> <a class="codeRef" href="qwidget.html">QWidget</a>* p, QWidgetList*&amp; list )
<a name="l01926"></a>01926 {
<a name="l01927"></a>01927   <span class="keywordflow">if</span> ( p-&gt;children() ) {
<a name="l01928"></a>01928     <a class="codeRef" href="qwidget.html">QWidget</a> *w;
<a name="l01929"></a>01929     QObjectListIt it( *p-&gt;children() );
<a name="l01930"></a>01930     it.toLast();
<a name="l01931"></a>01931     <span class="keywordflow">while</span> ( it.current() ) {
<a name="l01932"></a>01932       <span class="keywordflow">if</span> ( it.current()-&gt;isWidgetType() ) {
<a name="l01933"></a>01933         w = (<a class="codeRef" href="qwidget.html">QWidget</a>*)it.current();
<a name="l01934"></a>01934         <span class="keywordflow">if</span> ( w-&gt;<a class="codeRef" href="qwidget.html#isVisible">isVisible</a>() ) {
<a name="l01935"></a>01935           <span class="keywordflow">if</span> ( w-&gt;inherits(<span class="stringliteral">&quot;KDockWidget&quot;</span>) ) list-&gt;append( w );
<a name="l01936"></a>01936           findChildDockWidget( w, list );
<a name="l01937"></a>01937         }
<a name="l01938"></a>01938       }
<a name="l01939"></a>01939       --it;
<a name="l01940"></a>01940     }
<a name="l01941"></a>01941   }
<a name="l01942"></a>01942   <span class="keywordflow">return</span>;
<a name="l01943"></a>01943 }
<a name="l01944"></a>01944 
<a name="l01945"></a>01945 <span class="keywordtype">void</span> KDockManager::startDrag( <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* w )
<a name="l01946"></a>01946 {
<a name="l01947"></a>01947   <span class="keywordflow">if</span>(( w-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> == KDockWidget::DockLeft) || ( w-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> == KDockWidget::DockRight)
<a name="l01948"></a>01948    || ( w-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> == KDockWidget::DockTop) || ( w-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a> == KDockWidget::DockBottom)) {
<a name="l01949"></a>01949     w-&gt;prevSideDockPosBeforeDrag = w-&gt;<a class="code" href="classKDockWidget.html#a17f7eec90b91fd1646f934f38b653eef" title="the current dock position.">currentDockPos</a>;
<a name="l01950"></a>01950 
<a name="l01951"></a>01951     <span class="keywordflow">if</span> ( w-&gt;<a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>()-&gt;inherits(<span class="stringliteral">&quot;KDockSplitter&quot;</span>) ){
<a name="l01952"></a>01952       <a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>* parentSplitterOfDockWidget = (<a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*)(w-&gt;<a class="codeRef" href="qwidget.html#parentWidget">parentWidget</a>());
<a name="l01953"></a>01953       w-&gt;d-&gt;splitPosInPercent = parentSplitterOfDockWidget-&gt;<a class="code" href="classKDockSplitter.html#abec832100a2090f72608e7dee2b86479" title="Return the separator position in percent (%), so the range is [0..100].">separatorPosInPercent</a>();
<a name="l01954"></a>01954     }
<a name="l01955"></a>01955   }
<a name="l01956"></a>01956 
<a name="l01957"></a>01957   curPos = KDockWidget::DockDesktop;
<a name="l01958"></a>01958   dragging = <span class="keyword">true</span>;
<a name="l01959"></a>01959 
<a name="l01960"></a>01960   <a class="codeRef" href="qapplication.html#setOverrideCursor">QApplication::setOverrideCursor</a>(<a class="codeRef" href="qcursor.html">QCursor</a>(sizeAllCursor));
<a name="l01961"></a>01961 }
<a name="l01962"></a>01962 
<a name="l01963"></a>01963 <span class="keywordtype">void</span> KDockManager::dragMove( <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* dw, <a class="codeRef" href="qpoint.html">QPoint</a> pos )
<a name="l01964"></a>01964 {
<a name="l01965"></a>01965   <a class="codeRef" href="qpoint.html">QPoint</a> p = dw-&gt;<a class="codeRef" href="qwidget.html#mapToGlobal">mapToGlobal</a>( dw-&gt;widget-&gt;<a class="codeRef" href="qwidget.html#pos">pos</a>() );
<a name="l01966"></a>01966   <a class="code" href="classKDockWidget.html#aa6d125044bf12191210c8cce5b5c4c62" title="The possible positions where a dockwidget can dock to another dockwidget.">KDockWidget::DockPosition</a> oldPos = curPos;
<a name="l01967"></a>01967 
<a name="l01968"></a>01968   <a class="codeRef" href="qsize.html">QSize</a> r = dw-&gt;widget-&gt;<a class="codeRef" href="qwidget.html#size">size</a>();
<a name="l01969"></a>01969   <span class="keywordflow">if</span> ( dw-&gt;<a class="code" href="classKDockWidget.html#ac8ff680712c0da5e3a004e566b1210d6">parentDockTabGroup</a>() ){
<a name="l01970"></a>01970     curPos = KDockWidget::DockCenter;
<a name="l01971"></a>01971     <span class="keywordflow">if</span> ( oldPos != curPos ) {
<a name="l01972"></a>01972       d-&gt;dragRect.setRect( p.<a class="codeRef" href="qpoint.html#x">x</a>()+2, p.<a class="codeRef" href="qpoint.html#y">y</a>()+2, r.<a class="codeRef" href="qsize.html#width">width</a>()-4, r.<a class="codeRef" href="qsize.html#height">height</a>()-4 );
<a name="l01973"></a>01973     }
<a name="l01974"></a>01974     <span class="keywordflow">return</span>;
<a name="l01975"></a>01975   }
<a name="l01976"></a>01976 
<a name="l01977"></a>01977   <span class="keywordtype">int</span> w = r.<a class="codeRef" href="qsize.html#width">width</a>() / 3;
<a name="l01978"></a>01978   <span class="keywordtype">int</span> h = r.<a class="codeRef" href="qsize.html#height">height</a>() / 3;
<a name="l01979"></a>01979 
<a name="l01980"></a>01980   <span class="keywordflow">if</span> ( pos.<a class="codeRef" href="qpoint.html#y">y</a>() &lt;= h ){
<a name="l01981"></a>01981     curPos = KDockWidget::DockTop;
<a name="l01982"></a>01982     w = r.<a class="codeRef" href="qsize.html#width">width</a>();
<a name="l01983"></a>01983   } <span class="keywordflow">else</span>
<a name="l01984"></a>01984     <span class="keywordflow">if</span> ( pos.<a class="codeRef" href="qpoint.html#y">y</a>() &gt;= 2*h ){
<a name="l01985"></a>01985       curPos = KDockWidget::DockBottom;
<a name="l01986"></a>01986       p.<a class="codeRef" href="qpoint.html#setY">setY</a>( p.<a class="codeRef" href="qpoint.html#y">y</a>() + 2*h );
<a name="l01987"></a>01987       w = r.<a class="codeRef" href="qsize.html#width">width</a>();
<a name="l01988"></a>01988     } <span class="keywordflow">else</span>
<a name="l01989"></a>01989       <span class="keywordflow">if</span> ( pos.<a class="codeRef" href="qpoint.html#x">x</a>() &lt;= w ){
<a name="l01990"></a>01990         curPos = KDockWidget::DockLeft;
<a name="l01991"></a>01991         h = r.<a class="codeRef" href="qsize.html#height">height</a>();
<a name="l01992"></a>01992       } <span class="keywordflow">else</span>
<a name="l01993"></a>01993         <span class="keywordflow">if</span> ( pos.<a class="codeRef" href="qpoint.html#x">x</a>() &gt;= 2*w ){
<a name="l01994"></a>01994           curPos = KDockWidget::DockRight;
<a name="l01995"></a>01995           p.<a class="codeRef" href="qpoint.html#setX">setX</a>( p.<a class="codeRef" href="qpoint.html#x">x</a>() + 2*w );
<a name="l01996"></a>01996           h = r.<a class="codeRef" href="qsize.html#height">height</a>();
<a name="l01997"></a>01997         } <span class="keywordflow">else</span>
<a name="l01998"></a>01998           {
<a name="l01999"></a>01999             curPos = KDockWidget::DockCenter;
<a name="l02000"></a>02000             p.<a class="codeRef" href="qpoint.html#setX">setX</a>( p.<a class="codeRef" href="qpoint.html#x">x</a>() + w );
<a name="l02001"></a>02001             p.<a class="codeRef" href="qpoint.html#setY">setY</a>( p.<a class="codeRef" href="qpoint.html#y">y</a>() + h );
<a name="l02002"></a>02002           }
<a name="l02003"></a>02003 
<a name="l02004"></a>02004   <span class="keywordflow">if</span> ( oldPos != curPos ) {
<a name="l02005"></a>02005     d-&gt;dragRect.setRect( p.<a class="codeRef" href="qpoint.html#x">x</a>(), p.<a class="codeRef" href="qpoint.html#y">y</a>(), w, h );
<a name="l02006"></a>02006     drawDragRectangle();
<a name="l02007"></a>02007   }
<a name="l02008"></a>02008 }
<a name="l02009"></a>02009 
<a name="l02010"></a>02010 
<a name="l02011"></a>02011 <span class="keywordtype">void</span> KDockManager::cancelDrop()
<a name="l02012"></a>02012 {
<a name="l02013"></a>02013   <a class="codeRef" href="qapplication.html#restoreOverrideCursor">QApplication::restoreOverrideCursor</a>();
<a name="l02014"></a>02014 
<a name="l02015"></a>02015   <span class="keyword">delete</span> childDockWidgetList;
<a name="l02016"></a>02016   childDockWidgetList = 0L;
<a name="l02017"></a>02017 
<a name="l02018"></a>02018   d-&gt;dragRect = <a class="codeRef" href="qrect.html">QRect</a>();  <span class="comment">// cancel drawing</span>
<a name="l02019"></a>02019   drawDragRectangle();    <span class="comment">// only the old rect will be deleted</span>
<a name="l02020"></a>02020 }
<a name="l02021"></a>02021 
<a name="l02022"></a>02022 
<a name="l02023"></a>02023 <span class="keywordtype">void</span> KDockManager::drop()
<a name="l02024"></a>02024 {
<a name="l02025"></a>02025   d-&gt;dragRect = <a class="codeRef" href="qrect.html">QRect</a>();  <span class="comment">// cancel drawing</span>
<a name="l02026"></a>02026   drawDragRectangle();    <span class="comment">// only the old rect will be deleted</span>
<a name="l02027"></a>02027 
<a name="l02028"></a>02028   <a class="codeRef" href="qapplication.html#restoreOverrideCursor">QApplication::restoreOverrideCursor</a>();
<a name="l02029"></a>02029 
<a name="l02030"></a>02030   <span class="keyword">delete</span> childDockWidgetList;
<a name="l02031"></a>02031   childDockWidgetList = 0L;
<a name="l02032"></a>02032 
<a name="l02033"></a>02033   <span class="keywordflow">if</span> ( dropCancel ) <span class="keywordflow">return</span>;
<a name="l02034"></a>02034   <span class="keywordflow">if</span> ( !currentMoveWidget &amp;&amp; (!(currentDragWidget-&gt;eDocking &amp; (<span class="keywordtype">int</span>)KDockWidget::DockDesktop)) ) {
<a name="l02035"></a>02035     d-&gt;dragRect = <a class="codeRef" href="qrect.html">QRect</a>();  <span class="comment">// cancel drawing</span>
<a name="l02036"></a>02036     drawDragRectangle();    <span class="comment">// only the old rect will be deleted</span>
<a name="l02037"></a>02037     <span class="keywordflow">return</span>;
<a name="l02038"></a>02038   }
<a name="l02039"></a>02039   <span class="keywordflow">if</span> ( !currentMoveWidget &amp;&amp; !currentDragWidget-&gt;parent() ) {
<a name="l02040"></a>02040     currentDragWidget-&gt;<a class="codeRef" href="qwidget.html#move">move</a>( <a class="codeRef" href="qcursor.html#pos">QCursor::pos</a>() - d-&gt;dragOffset );
<a name="l02041"></a>02041   }
<a name="l02042"></a>02042   <span class="keywordflow">else</span> {
<a name="l02043"></a>02043     <span class="comment">// curPos is the current target DockPosition.</span>
<a name="l02044"></a>02044     <span class="comment">// currentDragWidget-&gt;prevSideDockPosBeforeDrag is where the dockwidget comes from.</span>
<a name="l02045"></a>02045     <span class="comment">// currentDragWidget-&gt;formerDockPos is the position *before* the dockwidget was in</span>
<a name="l02046"></a>02046     <span class="comment">// position currentDragWidget-&gt;prevSideDockPosBeforeDrag.</span>
<a name="l02047"></a>02047     <span class="keywordtype">int</span> splitPos = currentDragWidget-&gt;d-&gt;splitPosInPercent;
<a name="l02048"></a>02048     <a class="code" href="classKDockWidget.html#aa6d125044bf12191210c8cce5b5c4c62" title="The possible positions where a dockwidget can dock to another dockwidget.">KDockWidget::DockPosition</a> previousPosition = currentDragWidget-&gt;prevSideDockPosBeforeDrag;
<a name="l02049"></a>02049 
<a name="l02050"></a>02050 <span class="comment">//    kdDebug() &lt;&lt; splitPos &lt;&lt; endl;</span>
<a name="l02051"></a>02051 <span class="comment">//    kdDebug() &lt;&lt; &quot;curPos: &quot; &lt;&lt; curPos &lt;&lt; endl;</span>
<a name="l02052"></a>02052 <span class="comment">//    kdDebug() &lt;&lt; &quot;formerDockPos: &quot; &lt;&lt; currentDragWidget-&gt;formerDockPos&lt;&lt; endl;</span>
<a name="l02053"></a>02053 <span class="comment">//    kdDebug() &lt;&lt; &quot;prevSideDockPosBeforeDrag: &quot; &lt;&lt; currentDragWidget-&gt;prevSideDockPosBeforeDrag&lt;&lt; endl;</span>
<a name="l02054"></a>02054 
<a name="l02055"></a>02055     <span class="comment">// Now we *need* to &quot;invert&quot; the procentual value, if the dockwidget moves from top/left</span>
<a name="l02056"></a>02056     <span class="comment">// to bottom/right or vice versa. This keeps the dockwidget&#39;s size on its new position.</span>
<a name="l02057"></a>02057     <span class="comment">// A special case is, when the dock position was DockNone, then we have to look for the</span>
<a name="l02058"></a>02058     <span class="comment">// formerDockPos to get things right.</span>
<a name="l02059"></a>02059     <span class="keywordflow">if</span>( (curPos != previousPosition)
<a name="l02060"></a>02060        &amp;&amp; (curPos != KDockWidget::DockCenter) &amp;&amp; (curPos != KDockWidget::DockDesktop)) {
<a name="l02061"></a>02061 
<a name="l02062"></a>02062       <span class="keywordflow">if</span> (previousPosition == KDockWidget::DockNone)
<a name="l02063"></a>02063         previousPosition = currentDragWidget-&gt;<a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a>;
<a name="l02064"></a>02064 
<a name="l02065"></a>02065       <span class="keywordflow">switch</span>( previousPosition ) {
<a name="l02066"></a>02066       <span class="keywordflow">case</span> KDockWidget::DockLeft:
<a name="l02067"></a>02067         <span class="keywordflow">if</span>(curPos != KDockWidget::DockTop &amp;&amp; curPos != KDockWidget::DockLeft)
<a name="l02068"></a>02068           splitPos = 100 - splitPos;
<a name="l02069"></a>02069         <span class="keywordflow">break</span>;
<a name="l02070"></a>02070 
<a name="l02071"></a>02071       <span class="keywordflow">case</span> KDockWidget::DockRight:
<a name="l02072"></a>02072         <span class="keywordflow">if</span>(curPos != KDockWidget::DockBottom &amp;&amp; curPos != KDockWidget::DockRight)
<a name="l02073"></a>02073           splitPos = 100 - splitPos;
<a name="l02074"></a>02074         <span class="keywordflow">break</span>;
<a name="l02075"></a>02075 
<a name="l02076"></a>02076       <span class="keywordflow">case</span> KDockWidget::DockTop:
<a name="l02077"></a>02077         <span class="keywordflow">if</span>(curPos != KDockWidget::DockLeft &amp;&amp; curPos != KDockWidget::DockTop )
<a name="l02078"></a>02078           splitPos = 100 - splitPos;
<a name="l02079"></a>02079         <span class="keywordflow">break</span>;
<a name="l02080"></a>02080 
<a name="l02081"></a>02081       <span class="keywordflow">case</span> KDockWidget::DockBottom:
<a name="l02082"></a>02082         <span class="keywordflow">if</span>(curPos != KDockWidget::DockRight &amp;&amp; curPos != KDockWidget::DockBottom )
<a name="l02083"></a>02083           splitPos = 100 - splitPos;
<a name="l02084"></a>02084         <span class="keywordflow">break</span>;
<a name="l02085"></a>02085 
<a name="l02086"></a>02086       <span class="keywordflow">default</span>: <span class="keywordflow">break</span>;
<a name="l02087"></a>02087       }
<a name="l02088"></a>02088     }
<a name="l02089"></a>02089     <span class="comment">// set new prevSideDockPosBeforeDrag</span>
<a name="l02090"></a>02090     currentDragWidget-&gt;prevSideDockPosBeforeDrag = curPos;
<a name="l02091"></a>02091     currentDragWidget-&gt;<a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4" title="This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...">manualDock</a>( currentMoveWidget, curPos , splitPos, <a class="codeRef" href="qcursor.html#pos">QCursor::pos</a>() - d-&gt;dragOffset );
<a name="l02092"></a>02092     currentDragWidget-&gt;<a class="code" href="classKDockWidget.html#a1156e8c4d79e454cac3d51b50babd87e" title="Normally it simply shows the dockwidget.">makeDockVisible</a>();
<a name="l02093"></a>02093   }
<a name="l02094"></a>02094 }
<a name="l02095"></a>02095 
<a name="l02096"></a>02096 
<a name="l02097"></a>02097 <span class="keyword">static</span> <a class="codeRef" href="qdomelement.html">QDomElement</a> createStringEntry(<a class="codeRef" href="qdomdocument.html">QDomDocument</a> &amp;doc, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;tagName, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;str)
<a name="l02098"></a>02098 {
<a name="l02099"></a>02099     <a class="codeRef" href="qdomelement.html">QDomElement</a> el = doc.<a class="codeRef" href="qdomdocument.html#createElement">createElement</a>(tagName);
<a name="l02100"></a>02100 
<a name="l02101"></a>02101     el.appendChild(doc.<a class="codeRef" href="qdomdocument.html#createTextNode">createTextNode</a>(str));
<a name="l02102"></a>02102     <span class="keywordflow">return</span> el;
<a name="l02103"></a>02103 }
<a name="l02104"></a>02104 
<a name="l02105"></a>02105 
<a name="l02106"></a>02106 <span class="keyword">static</span> <a class="codeRef" href="qdomelement.html">QDomElement</a> createBoolEntry(<a class="codeRef" href="qdomdocument.html">QDomDocument</a> &amp;doc, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;tagName, <span class="keywordtype">bool</span> b)
<a name="l02107"></a>02107 {
<a name="l02108"></a>02108     <span class="keywordflow">return</span> createStringEntry(doc, tagName, <a class="codeRef" href="qstring.html#fromLatin1">QString::fromLatin1</a>(b? <span class="stringliteral">&quot;true&quot;</span> : <span class="stringliteral">&quot;false&quot;</span>));
<a name="l02109"></a>02109 }
<a name="l02110"></a>02110 
<a name="l02111"></a>02111 
<a name="l02112"></a>02112 <span class="keyword">static</span> <a class="codeRef" href="qdomelement.html">QDomElement</a> createNumberEntry(<a class="codeRef" href="qdomdocument.html">QDomDocument</a> &amp;doc, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;tagName, <span class="keywordtype">int</span> n)
<a name="l02113"></a>02113 {
<a name="l02114"></a>02114     <span class="keywordflow">return</span> createStringEntry(doc, tagName, <a class="codeRef" href="qstring.html#number">QString::number</a>(n));
<a name="l02115"></a>02115 }
<a name="l02116"></a>02116 
<a name="l02117"></a>02117 
<a name="l02118"></a>02118 <span class="keyword">static</span> <a class="codeRef" href="qdomelement.html">QDomElement</a> createRectEntry(<a class="codeRef" href="qdomdocument.html">QDomDocument</a> &amp;doc, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;tagName, <span class="keyword">const</span> <a class="codeRef" href="qrect.html">QRect</a> &amp;rect)
<a name="l02119"></a>02119 {
<a name="l02120"></a>02120     <a class="codeRef" href="qdomelement.html">QDomElement</a> el = doc.<a class="codeRef" href="qdomdocument.html#createElement">createElement</a>(tagName);
<a name="l02121"></a>02121 
<a name="l02122"></a>02122     <a class="codeRef" href="qdomelement.html">QDomElement</a> xel = doc.<a class="codeRef" href="qdomdocument.html#createElement">createElement</a>(<span class="stringliteral">&quot;x&quot;</span>);
<a name="l02123"></a>02123     xel.appendChild(doc.<a class="codeRef" href="qdomdocument.html#createTextNode">createTextNode</a>(<a class="codeRef" href="qstring.html#number">QString::number</a>(rect.<a class="codeRef" href="qrect.html#x">x</a>())));
<a name="l02124"></a>02124     el.appendChild(xel);
<a name="l02125"></a>02125     <a class="codeRef" href="qdomelement.html">QDomElement</a> yel = doc.<a class="codeRef" href="qdomdocument.html#createElement">createElement</a>(<span class="stringliteral">&quot;y&quot;</span>);
<a name="l02126"></a>02126     yel.appendChild(doc.<a class="codeRef" href="qdomdocument.html#createTextNode">createTextNode</a>(<a class="codeRef" href="qstring.html#number">QString::number</a>(rect.<a class="codeRef" href="qrect.html#y">y</a>())));
<a name="l02127"></a>02127     el.appendChild(yel);
<a name="l02128"></a>02128     <a class="codeRef" href="qdomelement.html">QDomElement</a> wel = doc.<a class="codeRef" href="qdomdocument.html#createElement">createElement</a>(<span class="stringliteral">&quot;width&quot;</span>);
<a name="l02129"></a>02129     wel.appendChild(doc.<a class="codeRef" href="qdomdocument.html#createTextNode">createTextNode</a>(<a class="codeRef" href="qstring.html#number">QString::number</a>(rect.<a class="codeRef" href="qrect.html#width">width</a>())));
<a name="l02130"></a>02130     el.appendChild(wel);
<a name="l02131"></a>02131     <a class="codeRef" href="qdomelement.html">QDomElement</a> hel = doc.<a class="codeRef" href="qdomdocument.html#createElement">createElement</a>(<span class="stringliteral">&quot;height&quot;</span>);
<a name="l02132"></a>02132     hel.appendChild(doc.<a class="codeRef" href="qdomdocument.html#createTextNode">createTextNode</a>(<a class="codeRef" href="qstring.html#number">QString::number</a>(rect.<a class="codeRef" href="qrect.html#height">height</a>())));
<a name="l02133"></a>02133     el.appendChild(hel);
<a name="l02134"></a>02134 
<a name="l02135"></a>02135     <span class="keywordflow">return</span> el;
<a name="l02136"></a>02136 }
<a name="l02137"></a>02137 
<a name="l02138"></a>02138 
<a name="l02139"></a>02139 <span class="keyword">static</span> <a class="codeRef" href="qdomelement.html">QDomElement</a> createListEntry(<a class="codeRef" href="qdomdocument.html">QDomDocument</a> &amp;doc, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;tagName,
<a name="l02140"></a>02140                                    <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;subTagName, <span class="keyword">const</span> <a class="codeRef" href="qstrlist.html">QStrList</a> &amp;list)
<a name="l02141"></a>02141 {
<a name="l02142"></a>02142     <a class="codeRef" href="qdomelement.html">QDomElement</a> el = doc.<a class="codeRef" href="qdomdocument.html#createElement">createElement</a>(tagName);
<a name="l02143"></a>02143 
<a name="l02144"></a>02144     <a class="codeRef" href="qstrlistiterator.html">QStrListIterator</a> it(list);
<a name="l02145"></a>02145     <span class="keywordflow">for</span> (; it.current(); ++it) {
<a name="l02146"></a>02146         <a class="codeRef" href="qdomelement.html">QDomElement</a> subel = doc.<a class="codeRef" href="qdomdocument.html#createElement">createElement</a>(subTagName);
<a name="l02147"></a>02147         subel.appendChild(doc.<a class="codeRef" href="qdomdocument.html#createTextNode">createTextNode</a>(<a class="codeRef" href="qstring.html#fromLatin1">QString::fromLatin1</a>(it.current())));
<a name="l02148"></a>02148         el.appendChild(subel);
<a name="l02149"></a>02149     }
<a name="l02150"></a>02150 
<a name="l02151"></a>02151     <span class="keywordflow">return</span> el;
<a name="l02152"></a>02152 }
<a name="l02153"></a>02153 
<a name="l02154"></a>02154 
<a name="l02155"></a>02155 <span class="keyword">static</span> <a class="codeRef" href="qstring.html">QString</a> stringEntry(<a class="codeRef" href="qdomelement.html">QDomElement</a> &amp;base, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;tagName)
<a name="l02156"></a>02156 {
<a name="l02157"></a>02157     <span class="keywordflow">return</span> base.namedItem(tagName).firstChild().toText().data();
<a name="l02158"></a>02158 }
<a name="l02159"></a>02159 
<a name="l02160"></a>02160 
<a name="l02161"></a>02161 <span class="keyword">static</span> <span class="keywordtype">bool</span> boolEntry(<a class="codeRef" href="qdomelement.html">QDomElement</a> &amp;base, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;tagName)
<a name="l02162"></a>02162 {
<a name="l02163"></a>02163     <span class="keywordflow">return</span> base.namedItem(tagName).firstChild().toText().data() == <span class="stringliteral">&quot;true&quot;</span>;
<a name="l02164"></a>02164 }
<a name="l02165"></a>02165 
<a name="l02166"></a>02166 
<a name="l02167"></a>02167 <span class="keyword">static</span> <span class="keywordtype">int</span> numberEntry(<a class="codeRef" href="qdomelement.html">QDomElement</a> &amp;base, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;tagName)
<a name="l02168"></a>02168 {
<a name="l02169"></a>02169     <span class="keywordflow">return</span> stringEntry(base, tagName).<a class="codeRef" href="qstring.html#toInt">toInt</a>();
<a name="l02170"></a>02170 }
<a name="l02171"></a>02171 
<a name="l02172"></a>02172 
<a name="l02173"></a>02173 <span class="keyword">static</span> <a class="codeRef" href="qrect.html">QRect</a> rectEntry(<a class="codeRef" href="qdomelement.html">QDomElement</a> &amp;base, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;tagName)
<a name="l02174"></a>02174 {
<a name="l02175"></a>02175     <a class="codeRef" href="qdomelement.html">QDomElement</a> el = base.namedItem(tagName).toElement();
<a name="l02176"></a>02176 
<a name="l02177"></a>02177     <span class="keywordtype">int</span> x = numberEntry(el, <span class="stringliteral">&quot;x&quot;</span>);
<a name="l02178"></a>02178     <span class="keywordtype">int</span> y = numberEntry(el, <span class="stringliteral">&quot;y&quot;</span>);
<a name="l02179"></a>02179     <span class="keywordtype">int</span> width = numberEntry(el, <span class="stringliteral">&quot;width&quot;</span>);
<a name="l02180"></a>02180     <span class="keywordtype">int</span> height = numberEntry(el,  <span class="stringliteral">&quot;height&quot;</span>);
<a name="l02181"></a>02181 
<a name="l02182"></a>02182     <span class="keywordflow">return</span> <a class="codeRef" href="qrect.html">QRect</a>(x, y, width, height);
<a name="l02183"></a>02183 }
<a name="l02184"></a>02184 
<a name="l02185"></a>02185 
<a name="l02186"></a>02186 <span class="keyword">static</span> <a class="codeRef" href="qstrlist.html">QStrList</a> listEntry(<a class="codeRef" href="qdomelement.html">QDomElement</a> &amp;base, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;tagName, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;subTagName)
<a name="l02187"></a>02187 {
<a name="l02188"></a>02188     <a class="codeRef" href="qstrlist.html">QStrList</a> list;
<a name="l02189"></a>02189 
<a name="l02190"></a>02190     <span class="keywordflow">for</span>( <a class="codeRef" href="qdomnode.html">QDomNode</a> n = base.namedItem(tagName).firstChild(); !n.isNull(); n = n.nextSibling() )
<a name="l02191"></a>02191     {
<a name="l02192"></a>02192         <a class="codeRef" href="qdomelement.html">QDomElement</a> subel = n.toElement();
<a name="l02193"></a>02193         <span class="keywordflow">if</span> (subel.<a class="codeRef" href="qdomelement.html#tagName">tagName</a>() == subTagName)
<a name="l02194"></a>02194             list.append(subel.firstChild().toText().data().latin1());
<a name="l02195"></a>02195     }
<a name="l02196"></a>02196 
<a name="l02197"></a>02197     <span class="keywordflow">return</span> list;
<a name="l02198"></a>02198 }
<a name="l02199"></a>02199 
<a name="l02200"></a>02200 
<a name="l02201"></a><a class="code" href="classKDockManager.html#a7852bd821af27dfa2530d4c071246ce6">02201</a> <span class="keywordtype">void</span> <a class="code" href="classKDockManager.html#a0b4fadda32ca4eecc3d69be5bd3924cf" title="Saves the current state of the dockmanager and of all controlled widgets.">KDockManager::writeConfig</a>(<a class="codeRef" href="qdomelement.html">QDomElement</a> &amp;base)
<a name="l02202"></a>02202 {
<a name="l02203"></a>02203     <span class="comment">// First of all, clear the tree under base</span>
<a name="l02204"></a>02204     <span class="keywordflow">while</span> (!base.firstChild().isNull())
<a name="l02205"></a>02205         base.removeChild(base.firstChild());
<a name="l02206"></a>02206     <a class="codeRef" href="qdomdocument.html">QDomDocument</a> doc = base.ownerDocument();
<a name="l02207"></a>02207 
<a name="l02208"></a>02208     <a class="codeRef" href="qstrlist.html">QStrList</a> nameList;
<a name="l02209"></a>02209     <a class="codeRef" href="qstring.html">QString</a> mainWidgetStr;
<a name="l02210"></a>02210 
<a name="l02211"></a>02211     <span class="comment">// collect widget names</span>
<a name="l02212"></a>02212     <a class="codeRef" href="qstringlist.html">QStringList</a> nList;
<a name="l02213"></a>02213     QObjectListIt it(*childDock);
<a name="l02214"></a>02214     <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *obj1;
<a name="l02215"></a>02215     <span class="keywordflow">while</span> ( (obj1=(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)it.current()) ) {
<a name="l02216"></a>02216         <span class="keywordflow">if</span> ( obj1-&gt;parent() == main )
<a name="l02217"></a>02217             mainWidgetStr = <a class="codeRef" href="qstring.html#fromLatin1">QString::fromLatin1</a>(obj1-&gt;name());
<a name="l02218"></a>02218         nList.append(obj1-&gt;name());
<a name="l02219"></a>02219         ++it;
<a name="l02220"></a>02220     }
<a name="l02221"></a>02221 
<a name="l02222"></a>02222     <span class="keywordflow">for</span> (QObjectListIt it(d-&gt;containerDocks);it.current();++it)
<a name="l02223"></a>02223     {
<a name="l02224"></a>02224         KDockContainer* dc = <span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(((<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)it.current())-&gt;widget);
<a name="l02225"></a>02225         <span class="keywordflow">if</span> (dc) {
<a name="l02226"></a>02226                 dc-&gt;prepareSave(nList);
<a name="l02227"></a>02227         }
<a name="l02228"></a>02228     }
<a name="l02229"></a>02229 
<a name="l02230"></a>02230     QStringList::Iterator nListIt=nList.begin();
<a name="l02231"></a>02231     <span class="keywordflow">while</span> ( nListIt!=nList.end() ) {
<a name="l02232"></a>02232         <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *obj = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( *nListIt);
<a name="l02233"></a>02233         <span class="keywordflow">if</span> ((obj-&gt;isGroup &amp;&amp; (!obj-&gt;d-&gt;isContainer)) &amp;&amp; (nameList.find( obj-&gt;firstName.<a class="codeRef" href="qstring.html#latin1">latin1</a>() ) == -1
<a name="l02234"></a>02234                              || nameList.find(obj-&gt;lastName.<a class="codeRef" href="qstring.html#latin1">latin1</a>()) == -1)) {
<a name="l02235"></a>02235             <span class="comment">// Skip until children are saved (why?)</span>
<a name="l02236"></a>02236             ++nListIt;
<a name="l02237"></a>02237 <span class="comment">//            nList.next();</span>
<a name="l02238"></a>02238 <span class="comment">//falk?            if ( !nList.current() ) nList.first();</span>
<a name="l02239"></a>02239             <span class="keywordflow">continue</span>;
<a name="l02240"></a>02240         }
<a name="l02241"></a>02241 
<a name="l02242"></a>02242         <a class="codeRef" href="qdomelement.html">QDomElement</a> groupEl;
<a name="l02243"></a>02243     <span class="keywordflow">if</span> (obj-&gt;d-&gt;isContainer) {
<a name="l02244"></a>02244             KDockContainer* x = <span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(obj-&gt;widget);
<a name="l02245"></a>02245             <span class="keywordflow">if</span> (x) {
<a name="l02246"></a>02246             groupEl=doc.<a class="codeRef" href="qdomdocument.html#createElement">createElement</a>(<span class="stringliteral">&quot;dockContainer&quot;</span>);
<a name="l02247"></a>02247                 x-&gt;save(groupEl);
<a name="l02248"></a>02248             }
<a name="l02249"></a>02249         } <span class="keywordflow">else</span>
<a name="l02250"></a>02250         <span class="keywordflow">if</span> (obj-&gt;isGroup) {
<a name="l02252"></a>02252             groupEl = doc.<a class="codeRef" href="qdomdocument.html#createElement">createElement</a>(<span class="stringliteral">&quot;splitGroup&quot;</span>);
<a name="l02253"></a>02253 
<a name="l02254"></a>02254             groupEl.appendChild(createStringEntry(doc, <span class="stringliteral">&quot;firstName&quot;</span>, obj-&gt;firstName));
<a name="l02255"></a>02255             groupEl.appendChild(createStringEntry(doc, <span class="stringliteral">&quot;secondName&quot;</span>, obj-&gt;lastName));
<a name="l02256"></a>02256             groupEl.appendChild(createNumberEntry(doc, <span class="stringliteral">&quot;orientation&quot;</span>, (<span class="keywordtype">int</span>)obj-&gt;splitterOrientation));
<a name="l02257"></a>02257             groupEl.appendChild(createNumberEntry(doc, <span class="stringliteral">&quot;separatorPos&quot;</span>, ((<a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*)obj-&gt;widget)-&gt;separatorPosInPercent()));
<a name="l02258"></a>02258         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (obj-&gt;isTabGroup) {
<a name="l02260"></a>02260             groupEl = doc.<a class="codeRef" href="qdomdocument.html#createElement">createElement</a>(<span class="stringliteral">&quot;tabGroup&quot;</span>);
<a name="l02261"></a>02261 
<a name="l02262"></a>02262             <a class="codeRef" href="qstrlist.html">QStrList</a> list;
<a name="l02263"></a>02263             <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0; i &lt; ((<a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>*)obj-&gt;widget)-&gt;count(); ++i )
<a name="l02264"></a>02264                 list.append( ((<a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>*)obj-&gt;widget)-&gt;page( i )-&gt;name() );
<a name="l02265"></a>02265             groupEl.appendChild(createListEntry(doc, <span class="stringliteral">&quot;tabs&quot;</span>, <span class="stringliteral">&quot;tab&quot;</span>, list));
<a name="l02266"></a>02266             groupEl.appendChild(createNumberEntry(doc, <span class="stringliteral">&quot;currentTab&quot;</span>, ((<a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>*)obj-&gt;widget)-&gt;currentPageIndex()));
<a name="l02267"></a>02267             <span class="keywordflow">if</span> (!obj-&gt;parent()) {
<a name="l02268"></a>02268                 groupEl.appendChild(createStringEntry(doc, <span class="stringliteral">&quot;dockBackTo&quot;</span>, obj-&gt;<a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a> ? obj-&gt;<a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a>-&gt;name() : <span class="stringliteral">&quot;&quot;</span>));
<a name="l02269"></a>02269                 groupEl.appendChild(createNumberEntry(doc, <span class="stringliteral">&quot;dockBackToPos&quot;</span>, obj-&gt;<a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a>));
<a name="l02270"></a>02270             }
<a name="l02271"></a>02271         } <span class="keywordflow">else</span> {
<a name="l02273"></a>02273             groupEl = doc.<a class="codeRef" href="qdomdocument.html#createElement">createElement</a>(<span class="stringliteral">&quot;dock&quot;</span>);
<a name="l02274"></a>02274             groupEl.appendChild(createStringEntry(doc, <span class="stringliteral">&quot;tabCaption&quot;</span>, obj-&gt;<a class="code" href="classKDockWidget.html#a67c74dfbbca7ace072bc6c0611e094a6">tabPageLabel</a>()));
<a name="l02275"></a>02275             groupEl.appendChild(createStringEntry(doc, <span class="stringliteral">&quot;tabToolTip&quot;</span>, obj-&gt;<a class="code" href="classKDockWidget.html#a436dbefc8e1e6b300fffb6c3196241a5">toolTipString</a>()));
<a name="l02276"></a>02276             <span class="keywordflow">if</span> (!obj-&gt;parent()) {
<a name="l02277"></a>02277                 groupEl.appendChild(createStringEntry(doc, <span class="stringliteral">&quot;dockBackTo&quot;</span>, obj-&gt;<a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a> ? obj-&gt;<a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a>-&gt;name() : <span class="stringliteral">&quot;&quot;</span>));
<a name="l02278"></a>02278                 groupEl.appendChild(createNumberEntry(doc, <span class="stringliteral">&quot;dockBackToPos&quot;</span>, obj-&gt;<a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a>));
<a name="l02279"></a>02279             }
<a name="l02280"></a>02280         }
<a name="l02281"></a>02281 
<a name="l02282"></a>02282         groupEl.appendChild(createStringEntry(doc, <span class="stringliteral">&quot;name&quot;</span>, <a class="codeRef" href="qstring.html#fromLatin1">QString::fromLatin1</a>(obj-&gt;name())));
<a name="l02283"></a>02283         groupEl.appendChild(createBoolEntry(doc, <span class="stringliteral">&quot;hasParent&quot;</span>, obj-&gt;parent()));
<a name="l02284"></a>02284         <span class="keywordflow">if</span> ( !obj-&gt;parent() ) {
<a name="l02285"></a>02285             groupEl.appendChild(createRectEntry(doc, <span class="stringliteral">&quot;geometry&quot;</span>, <a class="codeRef" href="qrect.html">QRect</a>(main-&gt;<a class="codeRef" href="qwidget.html#frameGeometry">frameGeometry</a>().topLeft(), main-&gt;<a class="codeRef" href="qwidget.html#size">size</a>())));
<a name="l02286"></a>02286             groupEl.appendChild(createBoolEntry(doc, <span class="stringliteral">&quot;visible&quot;</span>, obj-&gt;<a class="codeRef" href="qwidget.html#isVisible">isVisible</a>()));
<a name="l02287"></a>02287         }
<a name="l02288"></a>02288         <span class="keywordflow">if</span> (obj-&gt;header &amp;&amp; obj-&gt;header-&gt;inherits(<span class="stringliteral">&quot;KDockWidgetHeader&quot;</span>)) {
<a name="l02289"></a>02289             <a class="code" href="classKDockWidgetHeader.html" title="The header (additional bar) for a KDockWidget s (and member of the dockwidget class set)...">KDockWidgetHeader</a> *h = <span class="keyword">static_cast&lt;</span><a class="code" href="classKDockWidgetHeader.html" title="The header (additional bar) for a KDockWidget s (and member of the dockwidget class set)...">KDockWidgetHeader</a>*<span class="keyword">&gt;</span>(obj-&gt;header);
<a name="l02290"></a>02290             groupEl.appendChild(createBoolEntry(doc, <span class="stringliteral">&quot;dragEnabled&quot;</span>, h-&gt;dragEnabled()));
<a name="l02291"></a>02291         }
<a name="l02292"></a>02292 
<a name="l02293"></a>02293         base.appendChild(groupEl);
<a name="l02294"></a>02294         nameList.append(obj-&gt;name());
<a name="l02295"></a>02295         nList.remove(nListIt);
<a name="l02296"></a>02296         nListIt=nList.begin();
<a name="l02297"></a>02297     }
<a name="l02298"></a>02298 
<a name="l02299"></a>02299     <span class="keywordflow">if</span> (main-&gt;inherits(<span class="stringliteral">&quot;KDockMainWindow&quot;</span>)) {
<a name="l02300"></a>02300         <a class="code" href="classKDockMainWindow.html" title="A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwi...">KDockMainWindow</a> *dmain = (<a class="code" href="classKDockMainWindow.html" title="A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwi...">KDockMainWindow</a>*)main;
<a name="l02301"></a>02301         <a class="codeRef" href="qstring.html">QString</a> centralWidgetStr = <a class="codeRef" href="qstring.html">QString</a>(dmain-&gt;<a class="codeRef" href="qmainwindow.html#centralWidget">centralWidget</a>()? dmain-&gt;<a class="codeRef" href="qmainwindow.html#centralWidget">centralWidget</a>()-&gt;name() : <span class="stringliteral">&quot;&quot;</span>);
<a name="l02302"></a>02302         base.appendChild(createStringEntry(doc, <span class="stringliteral">&quot;centralWidget&quot;</span>, centralWidgetStr));
<a name="l02303"></a>02303         <a class="codeRef" href="qstring.html">QString</a> mainDockWidgetStr = <a class="codeRef" href="qstring.html">QString</a>(dmain-&gt;<a class="code" href="classKDockMainWindow.html#a370e47c553673eab5ff88b155ee631a0" title="Returns the main dockwidget.">getMainDockWidget</a>()? dmain-&gt;<a class="code" href="classKDockMainWindow.html#a370e47c553673eab5ff88b155ee631a0" title="Returns the main dockwidget.">getMainDockWidget</a>()-&gt;name() : <span class="stringliteral">&quot;&quot;</span>);
<a name="l02304"></a>02304         base.appendChild(createStringEntry(doc, <span class="stringliteral">&quot;mainDockWidget&quot;</span>, mainDockWidgetStr));
<a name="l02305"></a>02305     } <span class="keywordflow">else</span> {
<a name="l02306"></a>02306         base.appendChild(createStringEntry(doc, <span class="stringliteral">&quot;mainWidget&quot;</span>, mainWidgetStr));
<a name="l02307"></a>02307     }
<a name="l02308"></a>02308 
<a name="l02309"></a>02309     base.appendChild(createRectEntry(doc, <span class="stringliteral">&quot;geometry&quot;</span>, <a class="codeRef" href="qrect.html">QRect</a>(main-&gt;<a class="codeRef" href="qwidget.html#frameGeometry">frameGeometry</a>().topLeft(), main-&gt;<a class="codeRef" href="qwidget.html#size">size</a>())));
<a name="l02310"></a>02310 }
<a name="l02311"></a>02311 
<a name="l02312"></a>02312 
<a name="l02313"></a><a class="code" href="classKDockManager.html#a58bcdbc902b3233d0b9698902a6e20a9">02313</a> <span class="keywordtype">void</span> <a class="code" href="classKDockManager.html#ada938c7b90c71d8da7ed578db51c1a4f" title="Like writeConfig but reads the whole stuff in.">KDockManager::readConfig</a>(<a class="codeRef" href="qdomelement.html">QDomElement</a> &amp;base)
<a name="l02314"></a>02314 {
<a name="l02315"></a>02315     <span class="keywordflow">if</span> (base.namedItem(<span class="stringliteral">&quot;group&quot;</span>).isNull()
<a name="l02316"></a>02316         &amp;&amp; base.namedItem(<span class="stringliteral">&quot;tabgroup&quot;</span>).isNull()
<a name="l02317"></a>02317         &amp;&amp; base.namedItem(<span class="stringliteral">&quot;dock&quot;</span>).isNull()
<a name="l02318"></a>02318     &amp;&amp; base.namedItem(<span class="stringliteral">&quot;dockContainer&quot;</span>).isNull()) {
<a name="l02319"></a>02319         <a class="code" href="classKDockManager.html#abc8aa589c0a6823d8254fb2446a2d98e" title="Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are pare...">activate</a>();
<a name="l02320"></a>02320         <span class="keywordflow">return</span>;
<a name="l02321"></a>02321     }
<a name="l02322"></a>02322 
<a name="l02323"></a>02323     autoCreateDock = <span class="keyword">new</span> <a class="codeRef" href="qobjectlist.html">QObjectList</a>();
<a name="l02324"></a>02324     autoCreateDock-&gt;setAutoDelete( <span class="keyword">true</span> );
<a name="l02325"></a>02325 
<a name="l02326"></a>02326     <span class="keywordtype">bool</span> isMainVisible = main-&gt;<a class="codeRef" href="qwidget.html#isVisible">isVisible</a>();
<a name="l02327"></a>02327     main-&gt;<a class="codeRef" href="qwidget.html#hide">hide</a>();
<a name="l02328"></a>02328 
<a name="l02329"></a>02329     QObjectListIt it(*childDock);
<a name="l02330"></a>02330     <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *obj1;
<a name="l02331"></a>02331     <span class="keywordflow">while</span> ( (obj1=(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)it.current()) ) {
<a name="l02332"></a>02332         <span class="keywordflow">if</span> ( !obj1-&gt;isGroup &amp;&amp; !obj1-&gt;isTabGroup ) {
<a name="l02333"></a>02333             <span class="keywordflow">if</span> ( obj1-&gt;parent() )
<a name="l02334"></a>02334                 obj1-&gt;<a class="code" href="classKDockWidget.html#a2fa098fe2ac988870e7c86b1006e114c" title="Undocks this.">undock</a>();
<a name="l02335"></a>02335             <span class="keywordflow">else</span>
<a name="l02336"></a>02336                 obj1-&gt;<a class="codeRef" href="qwidget.html#hide">hide</a>();
<a name="l02337"></a>02337         }
<a name="l02338"></a>02338         ++it;
<a name="l02339"></a>02339     }
<a name="l02340"></a>02340 
<a name="l02341"></a>02341     <span class="comment">// firstly, recreate all common dockwidgets</span>
<a name="l02342"></a>02342     <span class="keywordflow">for</span>( <a class="codeRef" href="qdomnode.html">QDomNode</a> n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
<a name="l02343"></a>02343     {
<a name="l02344"></a>02344         <a class="codeRef" href="qdomelement.html">QDomElement</a> childEl = n.toElement();
<a name="l02345"></a>02345         <span class="keywordflow">if</span> (childEl.<a class="codeRef" href="qdomelement.html#tagName">tagName</a>() != <span class="stringliteral">&quot;dock&quot;</span>) <span class="keywordflow">continue</span>;
<a name="l02346"></a>02346 
<a name="l02347"></a>02347         <span class="comment">// Read an ordinary dock widget</span>
<a name="l02348"></a>02348         <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *obj = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(stringEntry(childEl, <span class="stringliteral">&quot;name&quot;</span>));
<a name="l02349"></a>02349         obj-&gt;<a class="code" href="classKDockWidget.html#a96f6bb5f4dfa702334d0f096feee2fc3" title="Sets a string that is used for the label of the tab page when in tab page mode.">setTabPageLabel</a>(stringEntry(childEl, <span class="stringliteral">&quot;tabCaption&quot;</span>));
<a name="l02350"></a>02350         obj-&gt;<a class="code" href="classKDockWidget.html#a0d39aff9f074457df22097c3ca3fbbb5" title="Stores a string for a tooltip.">setToolTipString</a>(stringEntry(childEl, <span class="stringliteral">&quot;tabToolTip&quot;</span>));
<a name="l02351"></a>02351 
<a name="l02352"></a>02352         <span class="keywordflow">if</span> (!boolEntry(childEl, <span class="stringliteral">&quot;hasParent&quot;</span>)) {
<a name="l02353"></a>02353             <a class="codeRef" href="qrect.html">QRect</a> r = rectEntry(childEl, <span class="stringliteral">&quot;geometry&quot;</span>);
<a name="l02354"></a>02354             obj = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(stringEntry(childEl, <span class="stringliteral">&quot;name&quot;</span>));
<a name="l02355"></a>02355             obj-&gt;applyToWidget(0);
<a name="l02356"></a>02356             obj-&gt;<a class="codeRef" href="qwidget.html#setGeometry">setGeometry</a>(r);
<a name="l02357"></a>02357             <span class="keywordflow">if</span> (boolEntry(childEl, <span class="stringliteral">&quot;visible&quot;</span>))
<a name="l02358"></a>02358                 obj-&gt;QWidget::show();
<a name="l02359"></a>02359         }
<a name="l02360"></a>02360 
<a name="l02361"></a>02361         <span class="keywordflow">if</span> (obj &amp;&amp; obj-&gt;header &amp;&amp; obj-&gt;header-&gt;inherits(<span class="stringliteral">&quot;KDockWidgetHeader&quot;</span>)) {
<a name="l02362"></a>02362             <a class="code" href="classKDockWidgetHeader.html" title="The header (additional bar) for a KDockWidget s (and member of the dockwidget class set)...">KDockWidgetHeader</a> *h = <span class="keyword">static_cast&lt;</span><a class="code" href="classKDockWidgetHeader.html" title="The header (additional bar) for a KDockWidget s (and member of the dockwidget class set)...">KDockWidgetHeader</a>*<span class="keyword">&gt;</span>(obj-&gt;header);
<a name="l02363"></a>02363             h-&gt;setDragEnabled(boolEntry(childEl, <span class="stringliteral">&quot;dragEnabled&quot;</span>));
<a name="l02364"></a>02364         }
<a name="l02365"></a>02365     }
<a name="l02366"></a>02366 
<a name="l02367"></a>02367     <span class="comment">// secondly, now iterate again and create the groups and tabwidgets, apply the dockwidgets to them</span>
<a name="l02368"></a>02368     <span class="keywordflow">for</span>( <a class="codeRef" href="qdomnode.html">QDomNode</a> n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
<a name="l02369"></a>02369     {
<a name="l02370"></a>02370         <a class="codeRef" href="qdomelement.html">QDomElement</a> childEl = n.toElement();
<a name="l02371"></a>02371         <span class="keywordflow">if</span> (childEl.isNull()) <span class="keywordflow">continue</span>;
<a name="l02372"></a>02372 
<a name="l02373"></a>02373         <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *obj = 0;
<a name="l02374"></a>02374 
<a name="l02375"></a>02375     <span class="keywordflow">if</span> (childEl.<a class="codeRef" href="qdomelement.html#tagName">tagName</a>() == <span class="stringliteral">&quot;dockContainer&quot;</span>) {
<a name="l02376"></a>02376 
<a name="l02377"></a>02377         <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *cont=<a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(stringEntry(childEl, <span class="stringliteral">&quot;name&quot;</span>));
<a name="l02378"></a>02378         <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;dockContainer: &quot;</span>&lt;&lt;stringEntry(childEl,<span class="stringliteral">&quot;name&quot;</span>)&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l02379"></a>02379         <span class="keywordflow">if</span> (!(cont-&gt;d-&gt;isContainer)) {
<a name="l02380"></a>02380             <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;restoration of dockContainer is only supported for already existing dock containers&quot;</span>&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l02381"></a>02381         } <span class="keywordflow">else</span> {
<a name="l02382"></a>02382             KDockContainer *dc=<span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(cont-&gt;<a class="code" href="classKDockWidget.html#aa347dafe43d49d61d7a252f4ad9532d4" title="Get the embedded widget.">getWidget</a>());
<a name="l02383"></a>02383             <span class="keywordflow">if</span> (!dc) <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;Error while trying to handle dockcontainer configuration restoration&quot;</span>&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l02384"></a>02384                 <span class="keywordflow">else</span> {
<a name="l02385"></a>02385                     dc-&gt;load(childEl);
<a name="l02386"></a>02386                     removeFromAutoCreateList(cont);
<a name="l02387"></a>02387                 }
<a name="l02388"></a>02388 
<a name="l02389"></a>02389         }
<a name="l02390"></a>02390     }
<a name="l02391"></a>02391     <span class="keywordflow">else</span>
<a name="l02392"></a>02392         <span class="keywordflow">if</span> (childEl.<a class="codeRef" href="qdomelement.html#tagName">tagName</a>() == <span class="stringliteral">&quot;splitGroup&quot;</span>) {
<a name="l02393"></a>02393             <span class="comment">// Read a group</span>
<a name="l02394"></a>02394             <a class="codeRef" href="qstring.html">QString</a> name = stringEntry(childEl, <span class="stringliteral">&quot;name&quot;</span>);
<a name="l02395"></a>02395             <a class="codeRef" href="qstring.html">QString</a> firstName = stringEntry(childEl, <span class="stringliteral">&quot;firstName&quot;</span>);
<a name="l02396"></a>02396             <a class="codeRef" href="qstring.html">QString</a> secondName = stringEntry(childEl, <span class="stringliteral">&quot;secondName&quot;</span>);
<a name="l02397"></a>02397             <span class="keywordtype">int</span> orientation = numberEntry(childEl, <span class="stringliteral">&quot;orientation&quot;</span>);
<a name="l02398"></a>02398             <span class="keywordtype">int</span> separatorPos = numberEntry(childEl, <span class="stringliteral">&quot;separatorPos&quot;</span>);
<a name="l02399"></a>02399 
<a name="l02400"></a>02400             <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *first = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(firstName);
<a name="l02401"></a>02401             <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *second = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(secondName);
<a name="l02402"></a>02402             <span class="keywordflow">if</span> (first &amp;&amp; second) {
<a name="l02403"></a>02403                 obj = first-&gt;<a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4" title="This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...">manualDock</a>(second,
<a name="l02404"></a>02404                                         (orientation == (<span class="keywordtype">int</span>)Vertical)? KDockWidget::DockLeft : KDockWidget::DockTop,
<a name="l02405"></a>02405                                         separatorPos);
<a name="l02406"></a>02406                 <span class="keywordflow">if</span> (obj)
<a name="l02407"></a>02407                     obj-&gt;setName(name.<a class="codeRef" href="qstring.html#latin1">latin1</a>());
<a name="l02408"></a>02408             }
<a name="l02409"></a>02409         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (childEl.<a class="codeRef" href="qdomelement.html#tagName">tagName</a>() == <span class="stringliteral">&quot;tabGroup&quot;</span>) {
<a name="l02410"></a>02410             <span class="comment">// Read a tab group</span>
<a name="l02411"></a>02411             <a class="codeRef" href="qstring.html">QString</a> name = stringEntry(childEl, <span class="stringliteral">&quot;name&quot;</span>);
<a name="l02412"></a>02412             <a class="codeRef" href="qstrlist.html">QStrList</a> list = listEntry(childEl, <span class="stringliteral">&quot;tabs&quot;</span>, <span class="stringliteral">&quot;tab&quot;</span>);
<a name="l02413"></a>02413 
<a name="l02414"></a>02414             <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *d1 = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( list.first() );
<a name="l02415"></a>02415             list.next();
<a name="l02416"></a>02416             <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *d2 = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( list.current() );
<a name="l02417"></a>02417 
<a name="l02418"></a>02418             <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *obj = d2-&gt;<a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4" title="This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...">manualDock</a>( d1, KDockWidget::DockCenter );
<a name="l02419"></a>02419             <span class="keywordflow">if</span> (obj) {
<a name="l02420"></a>02420                 <a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a> *tab = (<a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>*)obj-&gt;widget;
<a name="l02421"></a>02421                 list.next();
<a name="l02422"></a>02422                 <span class="keywordflow">while</span> (list.current() &amp;&amp; obj) {
<a name="l02423"></a>02423                     <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *tabDock = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(list.current());
<a name="l02424"></a>02424                     obj = tabDock-&gt;<a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4" title="This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...">manualDock</a>(d1, KDockWidget::DockCenter);
<a name="l02425"></a>02425                     list.next();
<a name="l02426"></a>02426                 }
<a name="l02427"></a>02427                 <span class="keywordflow">if</span> (obj) {
<a name="l02428"></a>02428                     obj-&gt;setName(name.<a class="codeRef" href="qstring.html#latin1">latin1</a>());
<a name="l02429"></a>02429                     tab-&gt;<a class="codeRef" href="qtabwidget.html#showPage">showPage</a>(tab-&gt;<a class="codeRef" href="qtabwidget.html#page">page</a>(numberEntry(childEl, <span class="stringliteral">&quot;currentTab&quot;</span>)));
<a name="l02430"></a>02430                 }
<a name="l02431"></a>02431             }
<a name="l02432"></a>02432         } <span class="keywordflow">else</span> {
<a name="l02433"></a>02433             <span class="keywordflow">continue</span>;
<a name="l02434"></a>02434         }
<a name="l02435"></a>02435 
<a name="l02436"></a>02436         <span class="keywordflow">if</span> (!boolEntry(childEl, <span class="stringliteral">&quot;hasParent&quot;</span>)) {
<a name="l02437"></a>02437             <a class="codeRef" href="qrect.html">QRect</a> r = rectEntry(childEl, <span class="stringliteral">&quot;geometry&quot;</span>);
<a name="l02438"></a>02438             obj = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(stringEntry(childEl, <span class="stringliteral">&quot;name&quot;</span>));
<a name="l02439"></a>02439             obj-&gt;applyToWidget(0);
<a name="l02440"></a>02440             obj-&gt;<a class="codeRef" href="qwidget.html#setGeometry">setGeometry</a>(r);
<a name="l02441"></a>02441             <span class="keywordflow">if</span> (boolEntry(childEl, <span class="stringliteral">&quot;visible&quot;</span>))
<a name="l02442"></a>02442                 obj-&gt;QWidget::show();
<a name="l02443"></a>02443         }
<a name="l02444"></a>02444 
<a name="l02445"></a>02445         <span class="keywordflow">if</span> (obj &amp;&amp; obj-&gt;header &amp;&amp; obj-&gt;header-&gt;inherits(<span class="stringliteral">&quot;KDockWidgetHeader&quot;</span>)) {
<a name="l02446"></a>02446             <a class="code" href="classKDockWidgetHeader.html" title="The header (additional bar) for a KDockWidget s (and member of the dockwidget class set)...">KDockWidgetHeader</a> *h = <span class="keyword">static_cast&lt;</span><a class="code" href="classKDockWidgetHeader.html" title="The header (additional bar) for a KDockWidget s (and member of the dockwidget class set)...">KDockWidgetHeader</a>*<span class="keyword">&gt;</span>(obj-&gt;header);
<a name="l02447"></a>02447             h-&gt;setDragEnabled(boolEntry(childEl, <span class="stringliteral">&quot;dragEnabled&quot;</span>));
<a name="l02448"></a>02448         }
<a name="l02449"></a>02449     }
<a name="l02450"></a>02450 
<a name="l02451"></a>02451     <span class="comment">// thirdly, now that all ordinary dockwidgets are created,</span>
<a name="l02452"></a>02452     <span class="comment">// iterate them again and link them with their corresponding dockwidget for the dockback action</span>
<a name="l02453"></a>02453     <span class="keywordflow">for</span>( <a class="codeRef" href="qdomnode.html">QDomNode</a> n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
<a name="l02454"></a>02454     {
<a name="l02455"></a>02455         <a class="codeRef" href="qdomelement.html">QDomElement</a> childEl = n.toElement();
<a name="l02456"></a>02456 
<a name="l02457"></a>02457         <span class="keywordflow">if</span> (childEl.<a class="codeRef" href="qdomelement.html#tagName">tagName</a>() != <span class="stringliteral">&quot;dock&quot;</span> &amp;&amp; childEl.<a class="codeRef" href="qdomelement.html#tagName">tagName</a>() != <span class="stringliteral">&quot;tabGroup&quot;</span>)
<a name="l02458"></a>02458             <span class="keywordflow">continue</span>;
<a name="l02459"></a>02459 
<a name="l02460"></a>02460         <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *obj = 0;
<a name="l02461"></a>02461 
<a name="l02462"></a>02462         <span class="keywordflow">if</span> (!boolEntry(childEl, <span class="stringliteral">&quot;hasParent&quot;</span>)) {
<a name="l02463"></a>02463             <span class="comment">// Read a common toplevel dock widget</span>
<a name="l02464"></a>02464             obj = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(stringEntry(childEl, <span class="stringliteral">&quot;name&quot;</span>));
<a name="l02465"></a>02465             <a class="codeRef" href="qstring.html">QString</a> name = stringEntry(childEl, <span class="stringliteral">&quot;dockBackTo&quot;</span>);
<a name="l02466"></a>02466             <span class="keywordflow">if</span> (!name.<a class="codeRef" href="qstring.html#isEmpty">isEmpty</a>()) {
<a name="l02467"></a>02467                 obj-&gt;<a class="code" href="classKDockWidget.html#aa3320a716c7f824f1bad7edb39e62781">setFormerBrotherDockWidget</a>(<a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(name));
<a name="l02468"></a>02468             }
<a name="l02469"></a>02469             obj-&gt;<a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a> = <a class="code" href="classKDockWidget.html#aa6d125044bf12191210c8cce5b5c4c62" title="The possible positions where a dockwidget can dock to another dockwidget.">KDockWidget::DockPosition</a>(numberEntry(childEl, <span class="stringliteral">&quot;dockBackToPos&quot;</span>));
<a name="l02470"></a>02470             obj-&gt;<a class="code" href="classKDockWidget.html#a5ef45e3136d313bb26b2fa7f22e7b961" title="Checks some conditions and shows or hides the dockwidget header (drag panel).">updateHeader</a>();
<a name="l02471"></a>02471         }
<a name="l02472"></a>02472     }
<a name="l02473"></a>02473 
<a name="l02474"></a>02474     <span class="keywordflow">if</span> (main-&gt;inherits(<span class="stringliteral">&quot;KDockMainWindow&quot;</span>)) {
<a name="l02475"></a>02475         <a class="code" href="classKDockMainWindow.html" title="A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwi...">KDockMainWindow</a> *dmain = (<a class="code" href="classKDockMainWindow.html" title="A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwi...">KDockMainWindow</a>*)main;
<a name="l02476"></a>02476 
<a name="l02477"></a>02477         <a class="codeRef" href="qstring.html">QString</a> mv = stringEntry(base, <span class="stringliteral">&quot;centralWidget&quot;</span>);
<a name="l02478"></a>02478         <span class="keywordflow">if</span> (!mv.<a class="codeRef" href="qstring.html#isEmpty">isEmpty</a>() &amp;&amp; <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(mv) ) {
<a name="l02479"></a>02479             <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *mvd  = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(mv);
<a name="l02480"></a>02480             mvd-&gt;applyToWidget(dmain);
<a name="l02481"></a>02481             mvd-&gt;<a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l02482"></a>02482             dmain-&gt;<a class="codeRef" href="qmainwindow.html#setCentralWidget">setCentralWidget</a>(mvd);
<a name="l02483"></a>02483         }
<a name="l02484"></a>02484         <a class="codeRef" href="qstring.html">QString</a> md = stringEntry(base, <span class="stringliteral">&quot;mainDockWidget&quot;</span>);
<a name="l02485"></a>02485         <span class="keywordflow">if</span> (!md.<a class="codeRef" href="qstring.html#isEmpty">isEmpty</a>() &amp;&amp; <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(md)) {
<a name="l02486"></a>02486             <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *mvd  = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(md);
<a name="l02487"></a>02487             dmain-&gt;<a class="code" href="classKDockMainWindow.html#a666d451aaf8c58cb86c5cbfe7f63feaa" title="Sets a new main dockwidget.">setMainDockWidget</a>(mvd);
<a name="l02488"></a>02488         }
<a name="l02489"></a>02489     } <span class="keywordflow">else</span> {
<a name="l02490"></a>02490         <a class="codeRef" href="qstring.html">QString</a> mv = stringEntry(base, <span class="stringliteral">&quot;mainWidget&quot;</span>);
<a name="l02491"></a>02491         <span class="keywordflow">if</span> (!mv.<a class="codeRef" href="qstring.html#isEmpty">isEmpty</a>() &amp;&amp; <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(mv)) {
<a name="l02492"></a>02492             <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *mvd  = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>(mv);
<a name="l02493"></a>02493             mvd-&gt;applyToWidget(main);
<a name="l02494"></a>02494             mvd-&gt;<a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l02495"></a>02495         }
<a name="l02496"></a>02496 
<a name="l02497"></a>02497         <span class="comment">// only resize + move non-mainwindows</span>
<a name="l02498"></a>02498         <a class="codeRef" href="qrect.html">QRect</a> mr = rectEntry(base, <span class="stringliteral">&quot;geometry&quot;</span>);
<a name="l02499"></a>02499         main-&gt;<a class="codeRef" href="qwidget.html#move">move</a>(mr.<a class="codeRef" href="qrect.html#topLeft">topLeft</a>());
<a name="l02500"></a>02500         main-&gt;<a class="codeRef" href="qwidget.html#resize">resize</a>(mr.<a class="codeRef" href="qrect.html#size">size</a>());
<a name="l02501"></a>02501     }
<a name="l02502"></a>02502 
<a name="l02503"></a>02503     <span class="keywordflow">if</span> (isMainVisible)
<a name="l02504"></a>02504         main-&gt;<a class="codeRef" href="qwidget.html#show">show</a>();
<a name="l02505"></a>02505 
<a name="l02506"></a>02506     <span class="keywordflow">if</span> (d-&gt;m_readDockConfigMode == WrapExistingWidgetsOnly) {
<a name="l02507"></a>02507         finishReadDockConfig(); <span class="comment">// remove empty dockwidgets</span>
<a name="l02508"></a>02508     }
<a name="l02509"></a>02509 }
<a name="l02510"></a>02510 
<a name="l02511"></a>02511 <span class="keywordtype">void</span> KDockManager::removeFromAutoCreateList(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* pDockWidget)
<a name="l02512"></a>02512 {
<a name="l02513"></a>02513     <span class="keywordflow">if</span> (!autoCreateDock) <span class="keywordflow">return</span>;
<a name="l02514"></a>02514     autoCreateDock-&gt;setAutoDelete(<span class="keyword">false</span>);
<a name="l02515"></a>02515     autoCreateDock-&gt;removeRef(pDockWidget);
<a name="l02516"></a>02516     autoCreateDock-&gt;setAutoDelete(<span class="keyword">true</span>);
<a name="l02517"></a>02517 }
<a name="l02518"></a>02518 
<a name="l02519"></a>02519 <span class="keywordtype">void</span> KDockManager::finishReadDockConfig()
<a name="l02520"></a>02520 {
<a name="l02521"></a>02521     <span class="keyword">delete</span> autoCreateDock;
<a name="l02522"></a>02522     autoCreateDock = 0;
<a name="l02523"></a>02523 }
<a name="l02524"></a>02524 
<a name="l02525"></a>02525 <span class="keywordtype">void</span> KDockManager::setReadDockConfigMode(<span class="keywordtype">int</span> mode)
<a name="l02526"></a>02526 {
<a name="l02527"></a>02527     d-&gt;m_readDockConfigMode = mode;
<a name="l02528"></a>02528 }
<a name="l02529"></a>02529 
<a name="l02530"></a>02530 <span class="preprocessor">#ifndef NO_KDE2</span>
<a name="l02531"></a><a class="code" href="classKDockManager.html#a0b4fadda32ca4eecc3d69be5bd3924cf">02531</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="classKDockManager.html#a0b4fadda32ca4eecc3d69be5bd3924cf" title="Saves the current state of the dockmanager and of all controlled widgets.">KDockManager::writeConfig</a>( <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfig.html">KConfig</a>* c, <a class="codeRef" href="qstring.html">QString</a> group )
<a name="l02532"></a>02532 {
<a name="l02533"></a>02533   <span class="comment">//debug(&quot;BEGIN Write Config&quot;);</span>
<a name="l02534"></a>02534   <span class="keywordflow">if</span> ( !c ) c = <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKGlobal.html#a71532b4619923ec5f7779c5f0065e6e7">KGlobal::config</a>();
<a name="l02535"></a>02535   <span class="keywordflow">if</span> ( group.<a class="codeRef" href="qstring.html#isEmpty">isEmpty</a>() ) group = <span class="stringliteral">&quot;dock_setting_default&quot;</span>;
<a name="l02536"></a>02536 
<a name="l02537"></a>02537   c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a1754e470553c9f9ac2556a9d63ce61c9">setGroup</a>( group );
<a name="l02538"></a>02538   c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( <span class="stringliteral">&quot;Version&quot;</span>, DOCK_CONFIG_VERSION );
<a name="l02539"></a>02539 
<a name="l02540"></a>02540   <a class="codeRef" href="qstringlist.html">QStringList</a> nameList;
<a name="l02541"></a>02541   <a class="codeRef" href="qstringlist.html">QStringList</a> findList;
<a name="l02542"></a>02542   QObjectListIt it( *childDock );
<a name="l02543"></a>02543   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> * obj;
<a name="l02544"></a>02544 
<a name="l02545"></a>02545   <span class="comment">// collect KDockWidget&#39;s name</span>
<a name="l02546"></a>02546   <a class="codeRef" href="qstringlist.html">QStringList</a> nList;
<a name="l02547"></a>02547   <span class="keywordflow">while</span> ( (obj=(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)it.current()) ) {
<a name="l02548"></a>02548     ++it;
<a name="l02549"></a>02549     <span class="comment">//debug(&quot;  +Add subdock %s&quot;, obj-&gt;name());</span>
<a name="l02550"></a>02550     nList.append( obj-&gt;name() );
<a name="l02551"></a>02551     <span class="keywordflow">if</span> ( obj-&gt;parent() == main )
<a name="l02552"></a>02552       c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( <span class="stringliteral">&quot;Main:view&quot;</span>, obj-&gt;name() );
<a name="l02553"></a>02553   }
<a name="l02554"></a>02554 
<a name="l02555"></a>02555 <span class="comment">//  kdDebug(282)&lt;&lt;QString(&quot;list size: %1&quot;).arg(nList.count())&lt;&lt;endl;</span>
<a name="l02556"></a>02556   <span class="keywordflow">for</span> (QObjectListIt it(d-&gt;containerDocks);it.current();++it)
<a name="l02557"></a>02557   {
<a name="l02558"></a>02558     KDockContainer* dc = <span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(((<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)it.current())-&gt;widget);
<a name="l02559"></a>02559     <span class="keywordflow">if</span> (dc) {
<a name="l02560"></a>02560         dc-&gt;prepareSave(nList);
<a name="l02561"></a>02561     }
<a name="l02562"></a>02562   }
<a name="l02563"></a>02563 <span class="comment">//  kdDebug(282)&lt;&lt;QString(&quot;new list size: %1&quot;).arg(nList.count())&lt;&lt;endl;</span>
<a name="l02564"></a>02564 
<a name="l02565"></a>02565   QStringList::Iterator nListIt=nList.begin();
<a name="l02566"></a>02566   <span class="keywordflow">while</span> ( nListIt!=nList.end() ){
<a name="l02567"></a>02567     <span class="comment">//debug(&quot;  -Try to save %s&quot;, nList.current());</span>
<a name="l02568"></a>02568     obj = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( *nListIt );
<a name="l02569"></a>02569     <a class="codeRef" href="qstring.html">QString</a> cname = obj-&gt;name();
<a name="l02570"></a>02570     <span class="keywordflow">if</span> ( obj-&gt;header ){
<a name="l02571"></a>02571       obj-&gt;header-&gt;<a class="code" href="classKDockWidgetAbstractHeader.html#a970deeddba1b93406802d9a00be8dfa3" title="Provides saving the current configuration.">saveConfig</a>( c );
<a name="l02572"></a>02572     }
<a name="l02573"></a>02573     <span class="keywordflow">if</span> (obj-&gt;d-&gt;isContainer) {
<a name="l02574"></a>02574        KDockContainer* x = <span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(obj-&gt;widget);
<a name="l02575"></a>02575        <span class="keywordflow">if</span> (x) {
<a name="l02576"></a>02576           x-&gt;save(c,group);
<a name="l02577"></a>02577        }
<a name="l02578"></a>02578     }
<a name="l02579"></a>02579 <span class="comment">/*************************************************************************************************/</span>
<a name="l02580"></a>02580     <span class="keywordflow">if</span> ( obj-&gt;isGroup ){
<a name="l02581"></a>02581       <span class="keywordflow">if</span> ( (findList.find( obj-&gt;firstName ) != findList.end()) &amp;&amp; (findList.find( obj-&gt;lastName ) != findList.end() )){
<a name="l02582"></a>02582 
<a name="l02583"></a>02583         c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:type&quot;</span>, <span class="stringliteral">&quot;GROUP&quot;</span>);
<a name="l02584"></a>02584         <span class="keywordflow">if</span> ( !obj-&gt;parent() ){
<a name="l02585"></a>02585           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:parent&quot;</span>, <span class="stringliteral">&quot;___null___&quot;</span>);
<a name="l02586"></a>02586           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:geometry&quot;</span>, <a class="codeRef" href="qrect.html">QRect</a>(obj-&gt;<a class="codeRef" href="qwidget.html#frameGeometry">frameGeometry</a>().topLeft(), obj-&gt;<a class="codeRef" href="qwidget.html#size">size</a>()) );
<a name="l02587"></a>02587           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:visible&quot;</span>, obj-&gt;<a class="codeRef" href="qwidget.html#isVisible">isVisible</a>());
<a name="l02588"></a>02588         } <span class="keywordflow">else</span> {
<a name="l02589"></a>02589           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:parent&quot;</span>, <span class="stringliteral">&quot;yes&quot;</span>);
<a name="l02590"></a>02590         }
<a name="l02591"></a>02591         c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:first_name&quot;</span>, obj-&gt;firstName );
<a name="l02592"></a>02592         c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:last_name&quot;</span>, obj-&gt;lastName );
<a name="l02593"></a>02593         c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:orientation&quot;</span>, (<span class="keywordtype">int</span>)obj-&gt;splitterOrientation );
<a name="l02594"></a>02594         c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:sepPos&quot;</span>, ((<a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*)obj-&gt;widget)-&gt;separatorPosInPercent() );
<a name="l02595"></a>02595 
<a name="l02596"></a>02596         nameList.append( obj-&gt;name() );
<a name="l02597"></a>02597         findList.append( obj-&gt;name() );
<a name="l02598"></a>02598         <span class="comment">//debug(&quot;  Save %s&quot;, nList.current());</span>
<a name="l02599"></a>02599         nList.remove(nListIt);
<a name="l02600"></a>02600         nListIt=nList.begin(); <span class="comment">//nList.first();</span>
<a name="l02601"></a>02601       } <span class="keywordflow">else</span> {
<a name="l02602"></a>02602 <span class="comment">/*************************************************************************************************/</span>
<a name="l02603"></a>02603         <span class="comment">//debug(&quot;  Skip %s&quot;, nList.current());</span>
<a name="l02604"></a>02604         <span class="comment">//if ( findList.find( obj-&gt;firstName ) == -1 )</span>
<a name="l02605"></a>02605         <span class="comment">//  debug(&quot;  ? Not found %s&quot;, obj-&gt;firstName);</span>
<a name="l02606"></a>02606         <span class="comment">//if ( findList.find( obj-&gt;lastName ) == -1 )</span>
<a name="l02607"></a>02607         <span class="comment">//  debug(&quot;  ? Not found %s&quot;, obj-&gt;lastName);</span>
<a name="l02608"></a>02608         ++nListIt;
<a name="l02609"></a>02609         <span class="comment">// if ( !nList.current() ) nList.first();</span>
<a name="l02610"></a>02610     <span class="keywordflow">if</span> (nListIt==nList.end()) nListIt=nList.begin();
<a name="l02611"></a>02611       }
<a name="l02612"></a>02612     } <span class="keywordflow">else</span> {
<a name="l02613"></a>02613 <span class="comment">/*************************************************************************************************/</span>
<a name="l02614"></a>02614       <span class="keywordflow">if</span> ( obj-&gt;isTabGroup){
<a name="l02615"></a>02615         c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:type&quot;</span>, <span class="stringliteral">&quot;TAB_GROUP&quot;</span>);
<a name="l02616"></a>02616         <span class="keywordflow">if</span> ( !obj-&gt;parent() ){
<a name="l02617"></a>02617           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:parent&quot;</span>, <span class="stringliteral">&quot;___null___&quot;</span>);
<a name="l02618"></a>02618           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:geometry&quot;</span>, <a class="codeRef" href="qrect.html">QRect</a>(obj-&gt;<a class="codeRef" href="qwidget.html#frameGeometry">frameGeometry</a>().topLeft(), obj-&gt;<a class="codeRef" href="qwidget.html#size">size</a>()) );
<a name="l02619"></a>02619           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:visible&quot;</span>, obj-&gt;<a class="codeRef" href="qwidget.html#isVisible">isVisible</a>());
<a name="l02620"></a>02620           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:dockBackTo&quot;</span>, obj-&gt;<a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a> ? obj-&gt;<a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a>-&gt;name() : <span class="stringliteral">&quot;&quot;</span>);
<a name="l02621"></a>02621           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:dockBackToPos&quot;</span>, obj-&gt;<a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a>);
<a name="l02622"></a>02622         } <span class="keywordflow">else</span> {
<a name="l02623"></a>02623           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:parent&quot;</span>, <span class="stringliteral">&quot;yes&quot;</span>);
<a name="l02624"></a>02624         }
<a name="l02625"></a>02625         <a class="codeRef" href="qstrlist.html">QStrList</a> list;
<a name="l02626"></a>02626         <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0; i &lt; ((<a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>*)obj-&gt;widget)-&gt;count(); ++i )
<a name="l02627"></a>02627           list.append( ((<a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>*)obj-&gt;widget)-&gt;page( i )-&gt;name() );
<a name="l02628"></a>02628         c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:tabNames&quot;</span>, list );
<a name="l02629"></a>02629         c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:curTab&quot;</span>, ((<a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>*)obj-&gt;widget)-&gt;currentPageIndex() );
<a name="l02630"></a>02630 
<a name="l02631"></a>02631         nameList.append( obj-&gt;name() );
<a name="l02632"></a>02632         findList.append( obj-&gt;name() ); <span class="comment">// not really need !!!</span>
<a name="l02633"></a>02633         <span class="comment">//debug(&quot;  Save %s&quot;, nList.current());</span>
<a name="l02634"></a>02634         nList.remove(nListIt);
<a name="l02635"></a>02635         nListIt=nList.begin();
<a name="l02636"></a>02636       } <span class="keywordflow">else</span> {
<a name="l02637"></a>02637 <span class="comment">/*************************************************************************************************/</span>
<a name="l02638"></a>02638         c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:tabCaption&quot;</span>, obj-&gt;<a class="code" href="classKDockWidget.html#a67c74dfbbca7ace072bc6c0611e094a6">tabPageLabel</a>());
<a name="l02639"></a>02639         c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:tabToolTip&quot;</span>, obj-&gt;<a class="code" href="classKDockWidget.html#a436dbefc8e1e6b300fffb6c3196241a5">toolTipString</a>());
<a name="l02640"></a>02640         <span class="keywordflow">if</span> ( !obj-&gt;parent() ){
<a name="l02641"></a>02641           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:type&quot;</span>, <span class="stringliteral">&quot;NULL_DOCK&quot;</span>);
<a name="l02642"></a>02642           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:geometry&quot;</span>, <a class="codeRef" href="qrect.html">QRect</a>(obj-&gt;<a class="codeRef" href="qwidget.html#frameGeometry">frameGeometry</a>().topLeft(), obj-&gt;<a class="codeRef" href="qwidget.html#size">size</a>()) );
<a name="l02643"></a>02643           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:visible&quot;</span>, obj-&gt;<a class="codeRef" href="qwidget.html#isVisible">isVisible</a>());
<a name="l02644"></a>02644           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:dockBackTo&quot;</span>, obj-&gt;<a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a> ? obj-&gt;<a class="code" href="classKDockWidget.html#aebb41e1dca10c6446a7fa421893bf9d5" title="earlier closest neighbor widget, so it&#39;s possible to dock back to it.">formerBrotherDockWidget</a>-&gt;name() : <span class="stringliteral">&quot;&quot;</span>);
<a name="l02645"></a>02645           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:dockBackToPos&quot;</span>, obj-&gt;<a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a>);
<a name="l02646"></a>02646         } <span class="keywordflow">else</span> {
<a name="l02647"></a>02647           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( cname+<span class="stringliteral">&quot;:type&quot;</span>, <span class="stringliteral">&quot;DOCK&quot;</span>);
<a name="l02648"></a>02648         }
<a name="l02649"></a>02649         nameList.append( cname.<a class="codeRef" href="qstring.html#latin1">latin1</a>() );
<a name="l02650"></a>02650         <span class="comment">//debug(&quot;  Save %s&quot;, nList.current());</span>
<a name="l02651"></a>02651         findList.append( obj-&gt;name() );
<a name="l02652"></a>02652         nList.remove(nListIt);
<a name="l02653"></a>02653         nListIt=nList.begin();
<a name="l02654"></a>02654       }
<a name="l02655"></a>02655     }
<a name="l02656"></a>02656   }
<a name="l02657"></a>02657   c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( <span class="stringliteral">&quot;NameList&quot;</span>, nameList );
<a name="l02658"></a>02658 
<a name="l02659"></a>02659   c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( <span class="stringliteral">&quot;Main:Geometry&quot;</span>, <a class="codeRef" href="qrect.html">QRect</a>(main-&gt;<a class="codeRef" href="qwidget.html#frameGeometry">frameGeometry</a>().topLeft(), main-&gt;<a class="codeRef" href="qwidget.html#size">size</a>()) );
<a name="l02660"></a>02660   c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( <span class="stringliteral">&quot;Main:visible&quot;</span>, main-&gt;<a class="codeRef" href="qwidget.html#isVisible">isVisible</a>()); <span class="comment">// curently nou use</span>
<a name="l02661"></a>02661 
<a name="l02662"></a>02662   <span class="keywordflow">if</span> ( main-&gt;inherits(<span class="stringliteral">&quot;KDockMainWindow&quot;</span>) ){
<a name="l02663"></a>02663     <a class="code" href="classKDockMainWindow.html" title="A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwi...">KDockMainWindow</a>* dmain = (<a class="code" href="classKDockMainWindow.html" title="A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwi...">KDockMainWindow</a>*)main;
<a name="l02664"></a>02664     <span class="comment">// for KDockMainWindow-&gt;setView() in readConfig()</span>
<a name="l02665"></a>02665     c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( <span class="stringliteral">&quot;Main:view&quot;</span>, dmain-&gt;<a class="codeRef" href="qmainwindow.html#centralWidget">centralWidget</a>() ? dmain-&gt;<a class="codeRef" href="qmainwindow.html#centralWidget">centralWidget</a>()-&gt;name():<span class="stringliteral">&quot;&quot;</span> );
<a name="l02666"></a>02666     c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#abdc1b550f51b069f2c67036572ae4d27">writeEntry</a>( <span class="stringliteral">&quot;Main:dock&quot;</span>, dmain-&gt;<a class="code" href="classKDockMainWindow.html#a370e47c553673eab5ff88b155ee631a0" title="Returns the main dockwidget.">getMainDockWidget</a>()     ? dmain-&gt;<a class="code" href="classKDockMainWindow.html#a370e47c553673eab5ff88b155ee631a0" title="Returns the main dockwidget.">getMainDockWidget</a>()-&gt;name()    :<span class="stringliteral">&quot;&quot;</span> );
<a name="l02667"></a>02667   }
<a name="l02668"></a>02668 
<a name="l02669"></a>02669   c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a062a2f1d6156f8c1677ea24e5c658cc1">sync</a>();
<a name="l02670"></a>02670   <span class="comment">//debug(&quot;END Write Config&quot;);</span>
<a name="l02671"></a>02671 }
<a name="l02672"></a>02672 <span class="preprocessor">#include &lt;qmessagebox.h&gt;</span>
<a name="l02673"></a><a class="code" href="classKDockManager.html#ada938c7b90c71d8da7ed578db51c1a4f">02673</a> <span class="keywordtype">void</span> <a class="code" href="classKDockManager.html#ada938c7b90c71d8da7ed578db51c1a4f" title="Like writeConfig but reads the whole stuff in.">KDockManager::readConfig</a>( <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfig.html">KConfig</a>* c, <a class="codeRef" href="qstring.html">QString</a> group )
<a name="l02674"></a>02674 {
<a name="l02675"></a>02675   <span class="keywordflow">if</span> ( !c ) c = <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKGlobal.html#a71532b4619923ec5f7779c5f0065e6e7">KGlobal::config</a>();
<a name="l02676"></a>02676   <span class="keywordflow">if</span> ( group.<a class="codeRef" href="qstring.html#isEmpty">isEmpty</a>() ) group = <span class="stringliteral">&quot;dock_setting_default&quot;</span>;
<a name="l02677"></a>02677 
<a name="l02678"></a>02678   c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a1754e470553c9f9ac2556a9d63ce61c9">setGroup</a>( group );
<a name="l02679"></a>02679   <a class="codeRef" href="qstrlist.html">QStrList</a> nameList;
<a name="l02680"></a>02680   c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#ac44dfc4886fd5247b6740493baa7c197">readListEntry</a>( <span class="stringliteral">&quot;NameList&quot;</span>, nameList );
<a name="l02681"></a>02681   <a class="codeRef" href="qstring.html">QString</a> ver = c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( <span class="stringliteral">&quot;Version&quot;</span>, <span class="stringliteral">&quot;0.0.1&quot;</span> );
<a name="l02682"></a>02682   nameList.first();
<a name="l02683"></a>02683   <span class="keywordflow">if</span> ( !nameList.current() || ver != DOCK_CONFIG_VERSION ){
<a name="l02684"></a>02684     <a class="code" href="classKDockManager.html#abc8aa589c0a6823d8254fb2446a2d98e" title="Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are pare...">activate</a>();
<a name="l02685"></a>02685     <span class="keywordflow">return</span>;
<a name="l02686"></a>02686   }
<a name="l02687"></a>02687 
<a name="l02688"></a>02688   autoCreateDock = <span class="keyword">new</span> <a class="codeRef" href="qobjectlist.html">QObjectList</a>();
<a name="l02689"></a>02689   autoCreateDock-&gt;setAutoDelete( <span class="keyword">true</span> );
<a name="l02690"></a>02690 
<a name="l02691"></a>02691   <span class="keywordtype">bool</span> isMainVisible = main-&gt;<a class="codeRef" href="qwidget.html#isVisible">isVisible</a>();
<a name="l02692"></a>02692  <span class="comment">// if (isMainVisible)  // CCC</span>
<a name="l02693"></a>02693   <span class="comment">//QMessageBox::information(0,&quot;&quot;,&quot;hallo&quot;);</span>
<a name="l02694"></a>02694 <span class="comment">//COMMENTED4TESTING  main-&gt;hide();</span>
<a name="l02695"></a>02695 
<a name="l02696"></a>02696   QObjectListIt it( *childDock );
<a name="l02697"></a>02697   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> * obj;
<a name="l02698"></a>02698 
<a name="l02699"></a>02699   <span class="keywordflow">while</span> ( (obj=(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)it.current()) ){
<a name="l02700"></a>02700     ++it;
<a name="l02701"></a>02701     <span class="keywordflow">if</span> ( !obj-&gt;isGroup &amp;&amp; !obj-&gt;isTabGroup )
<a name="l02702"></a>02702     {
<a name="l02703"></a>02703       <span class="keywordflow">if</span> ( obj-&gt;parent() ) obj-&gt;<a class="code" href="classKDockWidget.html#a2fa098fe2ac988870e7c86b1006e114c" title="Undocks this.">undock</a>(); <span class="keywordflow">else</span> obj-&gt;<a class="codeRef" href="qwidget.html#hide">hide</a>();
<a name="l02704"></a>02704     }
<a name="l02705"></a>02705   }
<a name="l02706"></a>02706 
<a name="l02707"></a>02707   <span class="comment">// firstly, only the common dockwidgets,</span>
<a name="l02708"></a>02708   <span class="comment">// they must be restored before e.g. tabgroups are restored</span>
<a name="l02709"></a>02709   nameList.first();
<a name="l02710"></a>02710   <span class="keywordflow">while</span> ( nameList.current() ){
<a name="l02711"></a>02711     <a class="codeRef" href="qstring.html">QString</a> oname = nameList.current();
<a name="l02712"></a>02712     c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a1754e470553c9f9ac2556a9d63ce61c9">setGroup</a>( group );
<a name="l02713"></a>02713     <a class="codeRef" href="qstring.html">QString</a> type = c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( oname + <span class="stringliteral">&quot;:type&quot;</span> );
<a name="l02714"></a>02714     obj = 0L;
<a name="l02715"></a>02715 
<a name="l02716"></a>02716     <span class="keywordflow">if</span> ( type == <span class="stringliteral">&quot;NULL_DOCK&quot;</span> || c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( oname + <span class="stringliteral">&quot;:parent&quot;</span>) == <span class="stringliteral">&quot;___null___&quot;</span> ){
<a name="l02717"></a>02717       <a class="codeRef" href="qrect.html">QRect</a> r = c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a44a04d751e6107669c7fbe2b29665962">readRectEntry</a>( oname + <span class="stringliteral">&quot;:geometry&quot;</span> );
<a name="l02718"></a>02718       obj = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( oname );
<a name="l02719"></a>02719       obj-&gt;applyToWidget( 0L );
<a name="l02720"></a>02720       obj-&gt;<a class="codeRef" href="qwidget.html#setGeometry">setGeometry</a>(r);
<a name="l02721"></a>02721 
<a name="l02722"></a>02722       c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a1754e470553c9f9ac2556a9d63ce61c9">setGroup</a>( group );
<a name="l02723"></a>02723       obj-&gt;<a class="code" href="classKDockWidget.html#a96f6bb5f4dfa702334d0f096feee2fc3" title="Sets a string that is used for the label of the tab page when in tab page mode.">setTabPageLabel</a>(c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( oname + <span class="stringliteral">&quot;:tabCaption&quot;</span> ));
<a name="l02724"></a>02724       obj-&gt;<a class="code" href="classKDockWidget.html#a0d39aff9f074457df22097c3ca3fbbb5" title="Stores a string for a tooltip.">setToolTipString</a>(c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( oname + <span class="stringliteral">&quot;:tabToolTip&quot;</span> ));
<a name="l02725"></a>02725       <span class="keywordflow">if</span> ( c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a515c85fb1b7b3ddab4c6612cdb67bf74">readBoolEntry</a>( oname + <span class="stringliteral">&quot;:visible&quot;</span> ) ){
<a name="l02726"></a>02726         obj-&gt;QWidget::show();
<a name="l02727"></a>02727       }
<a name="l02728"></a>02728     }
<a name="l02729"></a>02729 
<a name="l02730"></a>02730     <span class="keywordflow">if</span> ( type == <span class="stringliteral">&quot;DOCK&quot;</span>  ){
<a name="l02731"></a>02731       obj = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( oname );
<a name="l02732"></a>02732       obj-&gt;<a class="code" href="classKDockWidget.html#a96f6bb5f4dfa702334d0f096feee2fc3" title="Sets a string that is used for the label of the tab page when in tab page mode.">setTabPageLabel</a>(c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( oname + <span class="stringliteral">&quot;:tabCaption&quot;</span> ));
<a name="l02733"></a>02733       obj-&gt;<a class="code" href="classKDockWidget.html#a0d39aff9f074457df22097c3ca3fbbb5" title="Stores a string for a tooltip.">setToolTipString</a>(c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( oname + <span class="stringliteral">&quot;:tabToolTip&quot;</span> ));
<a name="l02734"></a>02734     }
<a name="l02735"></a>02735 
<a name="l02736"></a>02736     <span class="keywordflow">if</span> (obj &amp;&amp; obj-&gt;d-&gt;isContainer) {
<a name="l02737"></a>02737         <span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(obj-&gt;widget)-&gt;load(c,group);
<a name="l02738"></a>02738         removeFromAutoCreateList(obj);
<a name="l02739"></a>02739     }
<a name="l02740"></a>02740     <span class="keywordflow">if</span> ( obj &amp;&amp; obj-&gt;header){
<a name="l02741"></a>02741       obj-&gt;header-&gt;<a class="code" href="classKDockWidgetAbstractHeader.html#a554aa41d83880026f7ff0b22050ade72" title="Provides loading the current configuration.">loadConfig</a>( c );
<a name="l02742"></a>02742     }
<a name="l02743"></a>02743     nameList.next();
<a name="l02744"></a>02744   }
<a name="l02745"></a>02745 
<a name="l02746"></a>02746   <span class="comment">// secondly, after the common dockwidgets, restore the groups and tabgroups</span>
<a name="l02747"></a>02747   nameList.first();
<a name="l02748"></a>02748   <span class="keywordflow">while</span> ( nameList.current() ){
<a name="l02749"></a>02749     <a class="codeRef" href="qstring.html">QString</a> oname = nameList.current();
<a name="l02750"></a>02750     c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a1754e470553c9f9ac2556a9d63ce61c9">setGroup</a>( group );
<a name="l02751"></a>02751     <a class="codeRef" href="qstring.html">QString</a> type = c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( oname + <span class="stringliteral">&quot;:type&quot;</span> );
<a name="l02752"></a>02752     obj = 0L;
<a name="l02753"></a>02753 
<a name="l02754"></a>02754     <span class="keywordflow">if</span> ( type == <span class="stringliteral">&quot;GROUP&quot;</span> ){
<a name="l02755"></a>02755       <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* first = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( oname + <span class="stringliteral">&quot;:first_name&quot;</span> ) );
<a name="l02756"></a>02756       <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* last  = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( oname + <span class="stringliteral">&quot;:last_name&quot;</span>  ) );
<a name="l02757"></a>02757       <span class="keywordtype">int</span> sepPos = c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a42af93a695b1a80094b873a855eb4ab2">readNumEntry</a>( oname + <span class="stringliteral">&quot;:sepPos&quot;</span> );
<a name="l02758"></a>02758 
<a name="l02759"></a>02759       Orientation p = (Orientation)c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a42af93a695b1a80094b873a855eb4ab2">readNumEntry</a>( oname + <span class="stringliteral">&quot;:orientation&quot;</span> );
<a name="l02760"></a>02760       <span class="keywordflow">if</span> ( first  &amp;&amp; last ){
<a name="l02761"></a>02761         obj = first-&gt;<a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4" title="This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...">manualDock</a>( last, ( p == Vertical ) ? KDockWidget::DockLeft : KDockWidget::DockTop, sepPos );
<a name="l02762"></a>02762         <span class="keywordflow">if</span> (obj){
<a name="l02763"></a>02763           obj-&gt;setName( oname.<a class="codeRef" href="qstring.html#latin1">latin1</a>() );
<a name="l02764"></a>02764         }
<a name="l02765"></a>02765       }
<a name="l02766"></a>02766     }
<a name="l02767"></a>02767 
<a name="l02768"></a>02768     <span class="keywordflow">if</span> ( type == <span class="stringliteral">&quot;TAB_GROUP&quot;</span> ){
<a name="l02769"></a>02769       <a class="codeRef" href="qstrlist.html">QStrList</a> list;
<a name="l02770"></a>02770       <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* tabDockGroup = 0L;
<a name="l02771"></a>02771       c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#ac44dfc4886fd5247b6740493baa7c197">readListEntry</a>( oname+<span class="stringliteral">&quot;:tabNames&quot;</span>, list );
<a name="l02772"></a>02772       <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* d1 = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( list.first() );
<a name="l02773"></a>02773       list.next();
<a name="l02774"></a>02774       <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* d2 = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( list.current() );
<a name="l02775"></a>02775       tabDockGroup = d2-&gt;<a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4" title="This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...">manualDock</a>( d1, KDockWidget::DockCenter );
<a name="l02776"></a>02776       <span class="keywordflow">if</span> ( tabDockGroup ){
<a name="l02777"></a>02777         <a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>* tab = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classKDockTabGroup.html" title="It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget ...">KDockTabGroup</a>*<span class="keyword">&gt;</span>(tabDockGroup-&gt;widget);
<a name="l02778"></a>02778         list.next();
<a name="l02779"></a>02779         <span class="keywordflow">while</span> ( list.current() &amp;&amp; tabDockGroup ){
<a name="l02780"></a>02780           <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* tabDock = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( list.current() );
<a name="l02781"></a>02781           tabDockGroup = tabDock-&gt;<a class="code" href="classKDockWidget.html#a8569c4ec17682868b595fd1a2514e1f4" title="This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right pos...">manualDock</a>( d1, KDockWidget::DockCenter );
<a name="l02782"></a>02782           list.next();
<a name="l02783"></a>02783         }
<a name="l02784"></a>02784         <span class="keywordflow">if</span> ( tabDockGroup ){
<a name="l02785"></a>02785           tabDockGroup-&gt;setName( oname.<a class="codeRef" href="qstring.html#latin1">latin1</a>() );
<a name="l02786"></a>02786           c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a1754e470553c9f9ac2556a9d63ce61c9">setGroup</a>( group );
<a name="l02787"></a>02787           <span class="keywordflow">if</span> (tab)
<a name="l02788"></a>02788             tab-&gt;<a class="codeRef" href="qtabwidget.html#showPage">showPage</a>( tab-&gt;<a class="codeRef" href="qtabwidget.html#page">page</a>( c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a42af93a695b1a80094b873a855eb4ab2">readNumEntry</a>( oname+<span class="stringliteral">&quot;:curTab&quot;</span> ) ) );
<a name="l02789"></a>02789         }
<a name="l02790"></a>02790       }
<a name="l02791"></a>02791       obj = tabDockGroup;
<a name="l02792"></a>02792     }
<a name="l02793"></a>02793 
<a name="l02794"></a>02794     <span class="keywordflow">if</span> (obj &amp;&amp; obj-&gt;d-&gt;isContainer)  <span class="keyword">dynamic_cast&lt;</span>KDockContainer*<span class="keyword">&gt;</span>(obj-&gt;widget)-&gt;load(c,group);
<a name="l02795"></a>02795     <span class="keywordflow">if</span> ( obj &amp;&amp; obj-&gt;header){
<a name="l02796"></a>02796       obj-&gt;header-&gt;<a class="code" href="classKDockWidgetAbstractHeader.html#a554aa41d83880026f7ff0b22050ade72" title="Provides loading the current configuration.">loadConfig</a>( c );
<a name="l02797"></a>02797     }
<a name="l02798"></a>02798     nameList.next();
<a name="l02799"></a>02799   }
<a name="l02800"></a>02800 
<a name="l02801"></a>02801   <span class="comment">// thirdly, now that all ordinary dockwidgets are created,</span>
<a name="l02802"></a>02802   <span class="comment">// iterate them again and link the toplevel ones of them with their corresponding dockwidget for the dockback action</span>
<a name="l02803"></a>02803   nameList.first();
<a name="l02804"></a>02804   <span class="keywordflow">while</span> ( nameList.current() ){
<a name="l02805"></a>02805     <a class="codeRef" href="qstring.html">QString</a> oname = nameList.current();
<a name="l02806"></a>02806     c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a1754e470553c9f9ac2556a9d63ce61c9">setGroup</a>( group );
<a name="l02807"></a>02807     <a class="codeRef" href="qstring.html">QString</a> type = c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( oname + <span class="stringliteral">&quot;:type&quot;</span> );
<a name="l02808"></a>02808     obj = 0L;
<a name="l02809"></a>02809 
<a name="l02810"></a>02810     <span class="keywordflow">if</span> ( type == <span class="stringliteral">&quot;NULL_DOCK&quot;</span> || c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( oname + <span class="stringliteral">&quot;:parent&quot;</span>) == <span class="stringliteral">&quot;___null___&quot;</span> ){
<a name="l02811"></a>02811       obj = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( oname );
<a name="l02812"></a>02812       c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a1754e470553c9f9ac2556a9d63ce61c9">setGroup</a>( group );
<a name="l02813"></a>02813       <a class="codeRef" href="qstring.html">QString</a> name = c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( oname + <span class="stringliteral">&quot;:dockBackTo&quot;</span> );
<a name="l02814"></a>02814       <span class="keywordflow">if</span> (!name.<a class="codeRef" href="qstring.html#isEmpty">isEmpty</a>()) {
<a name="l02815"></a>02815           obj-&gt;<a class="code" href="classKDockWidget.html#aa3320a716c7f824f1bad7edb39e62781">setFormerBrotherDockWidget</a>(<a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( name ));
<a name="l02816"></a>02816       }
<a name="l02817"></a>02817       obj-&gt;<a class="code" href="classKDockWidget.html#a09ab1aa0f1e8b3f2171872ba410dd2bb" title="the former dock position when it really was at another position before.">formerDockPos</a> = <a class="code" href="classKDockWidget.html#aa6d125044bf12191210c8cce5b5c4c62" title="The possible positions where a dockwidget can dock to another dockwidget.">KDockWidget::DockPosition</a>(c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a42af93a695b1a80094b873a855eb4ab2">readNumEntry</a>( oname + <span class="stringliteral">&quot;:dockBackToPos&quot;</span> ));
<a name="l02818"></a>02818     }
<a name="l02819"></a>02819 
<a name="l02820"></a>02820     nameList.next();
<a name="l02821"></a>02821   }
<a name="l02822"></a>02822 
<a name="l02823"></a>02823   <span class="keywordflow">if</span> ( main-&gt;inherits(<span class="stringliteral">&quot;KDockMainWindow&quot;</span>) ){
<a name="l02824"></a>02824     <a class="code" href="classKDockMainWindow.html" title="A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwi...">KDockMainWindow</a>* dmain = (<a class="code" href="classKDockMainWindow.html" title="A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwi...">KDockMainWindow</a>*)main;
<a name="l02825"></a>02825 
<a name="l02826"></a>02826     c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a1754e470553c9f9ac2556a9d63ce61c9">setGroup</a>( group );
<a name="l02827"></a>02827     <a class="codeRef" href="qstring.html">QString</a> mv = c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( <span class="stringliteral">&quot;Main:view&quot;</span> );
<a name="l02828"></a>02828     <span class="keywordflow">if</span> ( !mv.<a class="codeRef" href="qstring.html#isEmpty">isEmpty</a>() &amp;&amp; <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( mv ) ){
<a name="l02829"></a>02829       <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* mvd  = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( mv );
<a name="l02830"></a>02830       mvd-&gt;applyToWidget( dmain );
<a name="l02831"></a>02831       mvd-&gt;<a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l02832"></a>02832       dmain-&gt;<a class="code" href="classKDockMainWindow.html#aa3ca7e83f6d5826c96ea3ff7d7976520" title="This method calls the base class method.">setView</a>( mvd );
<a name="l02833"></a>02833     }
<a name="l02834"></a>02834     c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a1754e470553c9f9ac2556a9d63ce61c9">setGroup</a>( group );
<a name="l02835"></a>02835     <a class="codeRef" href="qstring.html">QString</a> md = c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( <span class="stringliteral">&quot;Main:dock&quot;</span> );
<a name="l02836"></a>02836     <span class="keywordflow">if</span> ( !md.<a class="codeRef" href="qstring.html#isEmpty">isEmpty</a>() &amp;&amp; <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( md ) ){
<a name="l02837"></a>02837       <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* mvd  = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( md );
<a name="l02838"></a>02838       dmain-&gt;<a class="code" href="classKDockMainWindow.html#a666d451aaf8c58cb86c5cbfe7f63feaa" title="Sets a new main dockwidget.">setMainDockWidget</a>( mvd );
<a name="l02839"></a>02839     }
<a name="l02840"></a>02840   } <span class="keywordflow">else</span> {
<a name="l02841"></a>02841     c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a1754e470553c9f9ac2556a9d63ce61c9">setGroup</a>( group );
<a name="l02842"></a>02842     <a class="codeRef" href="qstring.html">QString</a> mv = c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a955d1210aeb86d7ec5265557333ab338">readEntry</a>( <span class="stringliteral">&quot;Main:view&quot;</span> );
<a name="l02843"></a>02843     <span class="keywordflow">if</span> ( !mv.<a class="codeRef" href="qstring.html#isEmpty">isEmpty</a>() &amp;&amp; <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( mv ) ){
<a name="l02844"></a>02844       <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* mvd  = <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">getDockWidgetFromName</a>( mv );
<a name="l02845"></a>02845       mvd-&gt;applyToWidget( main );
<a name="l02846"></a>02846       mvd-&gt;<a class="code" href="classKDockWidget.html#a954bd041ef75194fb0a894515623afc4" title="Add dockwidget management actions to QWidget::show.">show</a>();
<a name="l02847"></a>02847     }
<a name="l02848"></a>02848 
<a name="l02849"></a>02849   }
<a name="l02850"></a>02850 
<a name="l02851"></a>02851   <span class="comment">// delete all autocreate dock</span>
<a name="l02852"></a>02852   <span class="keywordflow">if</span> (d-&gt;m_readDockConfigMode == WrapExistingWidgetsOnly) {
<a name="l02853"></a>02853     finishReadDockConfig(); <span class="comment">// remove empty dockwidgets</span>
<a name="l02854"></a>02854   }
<a name="l02855"></a>02855 
<a name="l02856"></a>02856   c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a1754e470553c9f9ac2556a9d63ce61c9">setGroup</a>( group );
<a name="l02857"></a>02857 
<a name="l02858"></a>02858   <a class="codeRef" href="qrect.html">QRect</a> mr = c-&gt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfigBase.html#a44a04d751e6107669c7fbe2b29665962">readRectEntry</a>(<span class="stringliteral">&quot;Main:Geometry&quot;</span>);
<a name="l02859"></a>02859 
<a name="l02860"></a>02860   <span class="keywordflow">if</span> (!main-&gt;inherits(<span class="stringliteral">&quot;KDockMainWindow&quot;</span>))
<a name="l02861"></a>02861     main-&gt;<a class="codeRef" href="qwidget.html#move">move</a>(mr.<a class="codeRef" href="qrect.html#topLeft">topLeft</a>());
<a name="l02862"></a>02862 
<a name="l02863"></a>02863   main-&gt;<a class="codeRef" href="qwidget.html#resize">resize</a>(mr.<a class="codeRef" href="qrect.html#size">size</a>());
<a name="l02864"></a>02864 
<a name="l02865"></a>02865   <span class="keywordflow">if</span> ( isMainVisible ) main-&gt;<a class="codeRef" href="qwidget.html#show">show</a>();
<a name="l02866"></a>02866 }
<a name="l02867"></a>02867 <span class="preprocessor">#endif</span>
<a name="l02868"></a>02868 <span class="preprocessor"></span>
<a name="l02869"></a>02869 
<a name="l02870"></a>02870 <span class="keywordtype">void</span> KDockManager::dumpDockWidgets() {
<a name="l02871"></a>02871   QObjectListIt it( *childDock );
<a name="l02872"></a>02872   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> * obj;
<a name="l02873"></a>02873   <span class="keywordflow">while</span> ( (obj=(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)it.current()) ) {
<a name="l02874"></a>02874     ++it;
<a name="l02875"></a>02875     <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;KDockManager::dumpDockWidgets:&quot;</span>&lt;&lt;obj-&gt;name()&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l02876"></a>02876   }
<a name="l02877"></a>02877 
<a name="l02878"></a>02878 }
<a name="l02879"></a>02879 
<a name="l02880"></a><a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">02880</a> <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* <a class="code" href="classKDockManager.html#a23e07fe1bec33f288fc1917687e1fbf6">KDockManager::getDockWidgetFromName</a>( <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>&amp; dockName )
<a name="l02881"></a>02881 {
<a name="l02882"></a>02882   QObjectListIt it( *childDock );
<a name="l02883"></a>02883   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> * obj;
<a name="l02884"></a>02884   <span class="keywordflow">while</span> ( (obj=(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)it.current()) ) {
<a name="l02885"></a>02885     ++it;
<a name="l02886"></a>02886     <span class="keywordflow">if</span> ( <a class="codeRef" href="qstring.html">QString</a>(obj-&gt;name()) == dockName ) <span class="keywordflow">return</span> obj;
<a name="l02887"></a>02887   }
<a name="l02888"></a>02888 
<a name="l02889"></a>02889   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* autoCreate = 0L;
<a name="l02890"></a>02890   <span class="keywordflow">if</span> ( autoCreateDock ){
<a name="l02891"></a>02891     <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;Autocreating dock: &quot;</span>&lt;&lt;dockName&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l02892"></a>02892     autoCreate = <span class="keyword">new</span> <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>( <span class="keyword">this</span>, dockName.<a class="codeRef" href="qstring.html#latin1">latin1</a>(), <a class="codeRef" href="qpixmap.html">QPixmap</a>(<span class="stringliteral">&quot;&quot;</span>) );
<a name="l02893"></a>02893     autoCreateDock-&gt;append( autoCreate );
<a name="l02894"></a>02894   }
<a name="l02895"></a>02895   <span class="keywordflow">return</span> autoCreate;
<a name="l02896"></a>02896 }
<a name="l02897"></a><a class="code" href="classKDockManager.html#ac6b3d4e3c74c63b3f841ebd1217381e6">02897</a> <span class="keywordtype">void</span> <a class="code" href="classKDockManager.html#ac6b3d4e3c74c63b3f841ebd1217381e6" title="Enables opaque resizing.">KDockManager::setSplitterOpaqueResize</a>(<span class="keywordtype">bool</span> b)
<a name="l02898"></a>02898 {
<a name="l02899"></a>02899   d-&gt;splitterOpaqueResize = b;
<a name="l02900"></a>02900 }
<a name="l02901"></a>02901 
<a name="l02902"></a><a class="code" href="classKDockManager.html#a7386e1f2e0800e2d8ebd38e90a17303b">02902</a> <span class="keywordtype">bool</span> <a class="code" href="classKDockManager.html#a7386e1f2e0800e2d8ebd38e90a17303b" title="Returns true if opaque resizing is enabled, false otherwise.">KDockManager::splitterOpaqueResize</a>()<span class="keyword"> const</span>
<a name="l02903"></a>02903 <span class="keyword"></span>{
<a name="l02904"></a>02904   <span class="keywordflow">return</span> d-&gt;splitterOpaqueResize;
<a name="l02905"></a>02905 }
<a name="l02906"></a>02906 
<a name="l02907"></a><a class="code" href="classKDockManager.html#a112bf096c1ef9c8dcdaf6826f4aa6a86">02907</a> <span class="keywordtype">void</span> <a class="code" href="classKDockManager.html#a112bf096c1ef9c8dcdaf6826f4aa6a86" title="Try to preserve the widget&#39;s size.">KDockManager::setSplitterKeepSize</a>(<span class="keywordtype">bool</span> b)
<a name="l02908"></a>02908 {
<a name="l02909"></a>02909   d-&gt;splitterKeepSize = b;
<a name="l02910"></a>02910 }
<a name="l02911"></a>02911 
<a name="l02912"></a><a class="code" href="classKDockManager.html#a6b4b7942d9dfa715f498b97f975239e5">02912</a> <span class="keywordtype">bool</span> <a class="code" href="classKDockManager.html#a6b4b7942d9dfa715f498b97f975239e5" title="Returns true if the KeepSize is enabled, false otherwise.">KDockManager::splitterKeepSize</a>()<span class="keyword"> const</span>
<a name="l02913"></a>02913 <span class="keyword"></span>{
<a name="l02914"></a>02914   <span class="keywordflow">return</span> d-&gt;splitterKeepSize;
<a name="l02915"></a>02915 }
<a name="l02916"></a>02916 
<a name="l02917"></a><a class="code" href="classKDockManager.html#a3e8707566bbe553f1cd3fc204494d99e">02917</a> <span class="keywordtype">void</span> <a class="code" href="classKDockManager.html#a3e8707566bbe553f1cd3fc204494d99e" title="Operate the splitter with a higher resolution.">KDockManager::setSplitterHighResolution</a>(<span class="keywordtype">bool</span> b)
<a name="l02918"></a>02918 {
<a name="l02919"></a>02919   d-&gt;splitterHighResolution = b;
<a name="l02920"></a>02920 }
<a name="l02921"></a>02921 
<a name="l02922"></a><a class="code" href="classKDockManager.html#a381d9de4b66fe4c34b85a9af43a11f88">02922</a> <span class="keywordtype">bool</span> <a class="code" href="classKDockManager.html#a381d9de4b66fe4c34b85a9af43a11f88" title="Returns true if the splitter uses the high resolution, false otherwise.">KDockManager::splitterHighResolution</a>()<span class="keyword"> const</span>
<a name="l02923"></a>02923 <span class="keyword"></span>{
<a name="l02924"></a>02924   <span class="keywordflow">return</span> d-&gt;splitterHighResolution;
<a name="l02925"></a>02925 }
<a name="l02926"></a>02926 
<a name="l02927"></a>02927 <span class="keywordtype">void</span> KDockManager::slotMenuPopup()
<a name="l02928"></a>02928 {
<a name="l02929"></a>02929   menu-&gt;<a class="codeRef" href="qpopupmenu.html#clear">clear</a>();
<a name="l02930"></a>02930   menuData-&gt;<a class="codeRef" href="qptrlist.html#clear">clear</a>();
<a name="l02931"></a>02931 
<a name="l02932"></a>02932   QObjectListIt it( *childDock );
<a name="l02933"></a>02933   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> * obj;
<a name="l02934"></a>02934   <span class="keywordtype">int</span> numerator = 0;
<a name="l02935"></a>02935   <span class="keywordflow">while</span> ( (obj=(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)it.current()) ) {
<a name="l02936"></a>02936     ++it;
<a name="l02937"></a>02937     <span class="keywordflow">if</span> ( obj-&gt;<a class="code" href="classKDockWidget.html#a44449dfda656d62a7f54681e228824c5">mayBeHide</a>() )
<a name="l02938"></a>02938     {
<a name="l02939"></a>02939       menu-&gt;<a class="codeRef" href="qpopupmenu.html#insertItem">insertItem</a>( obj-&gt;<a class="codeRef" href="qwidget.html#icon">icon</a>() ? *(obj-&gt;<a class="codeRef" href="qwidget.html#icon">icon</a>()) : <a class="codeRef" href="qpixmap.html">QPixmap</a>(), i18n(<span class="stringliteral">&quot;Hide %1&quot;</span>).arg(obj-&gt;<a class="codeRef" href="qwidget.html#caption">caption</a>()), numerator++ );
<a name="l02940"></a>02940       menuData-&gt;<a class="codeRef" href="qptrlist.html#append">append</a>( <span class="keyword">new</span> MenuDockData( obj, <span class="keyword">true</span> ) );
<a name="l02941"></a>02941     }
<a name="l02942"></a>02942 
<a name="l02943"></a>02943     <span class="keywordflow">if</span> ( obj-&gt;<a class="code" href="classKDockWidget.html#af4d11e513934ce9af95020abd4754902">mayBeShow</a>() )
<a name="l02944"></a>02944     {
<a name="l02945"></a>02945       menu-&gt;<a class="codeRef" href="qpopupmenu.html#insertItem">insertItem</a>( obj-&gt;<a class="codeRef" href="qwidget.html#icon">icon</a>() ? *(obj-&gt;<a class="codeRef" href="qwidget.html#icon">icon</a>()) : <a class="codeRef" href="qpixmap.html">QPixmap</a>(), i18n(<span class="stringliteral">&quot;Show %1&quot;</span>).arg(obj-&gt;<a class="codeRef" href="qwidget.html#caption">caption</a>()), numerator++ );
<a name="l02946"></a>02946       menuData-&gt;<a class="codeRef" href="qptrlist.html#append">append</a>( <span class="keyword">new</span> MenuDockData( obj, <span class="keyword">false</span> ) );
<a name="l02947"></a>02947     }
<a name="l02948"></a>02948   }
<a name="l02949"></a>02949 }
<a name="l02950"></a>02950 
<a name="l02951"></a>02951 <span class="keywordtype">void</span> KDockManager::slotMenuActivated( <span class="keywordtype">int</span> <span class="keywordtype">id</span> )
<a name="l02952"></a>02952 {
<a name="l02953"></a>02953   MenuDockData* data = menuData-&gt;<a class="codeRef" href="qptrlist.html#at">at</a>( <span class="keywordtype">id</span> );
<a name="l02954"></a>02954   data-&gt;dock-&gt;changeHideShowState();
<a name="l02955"></a>02955 }
<a name="l02956"></a>02956 
<a name="l02957"></a><a class="code" href="classKDockManager.html#abec245144446fa950cc40cb2e7e4b975">02957</a> <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* <a class="code" href="classKDockManager.html#abec245144446fa950cc40cb2e7e4b975" title="This method finds out what a widgets&#39; dockwidget is.">KDockManager::findWidgetParentDock</a>( <a class="codeRef" href="qwidget.html">QWidget</a>* w )<span class="keyword"> const</span>
<a name="l02958"></a>02958 <span class="keyword"></span>{
<a name="l02959"></a>02959   QObjectListIt it( *childDock );
<a name="l02960"></a>02960   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> * dock;
<a name="l02961"></a>02961   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> * found = 0L;
<a name="l02962"></a>02962 
<a name="l02963"></a>02963   <span class="keywordflow">while</span> ( (dock=(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*)it.current()) ) {
<a name="l02964"></a>02964     ++it;
<a name="l02965"></a>02965     <span class="keywordflow">if</span> ( dock-&gt;widget == w ){ found  = dock; <span class="keywordflow">break</span>; }
<a name="l02966"></a>02966   }
<a name="l02967"></a>02967   <span class="keywordflow">return</span> found;
<a name="l02968"></a>02968 }
<a name="l02969"></a>02969 
<a name="l02970"></a>02970 <span class="keywordtype">void</span> KDockManager::drawDragRectangle()
<a name="l02971"></a>02971 {
<a name="l02972"></a>02972 <span class="preprocessor">#ifdef BORDERLESS_WINDOWS</span>
<a name="l02973"></a>02973 <span class="preprocessor"></span>    <span class="keywordflow">return</span>
<a name="l02974"></a>02974 <span class="preprocessor">#endif</span>
<a name="l02975"></a>02975 <span class="preprocessor"></span>  <span class="keywordflow">if</span> (d-&gt;oldDragRect == d-&gt;dragRect)
<a name="l02976"></a>02976     <span class="keywordflow">return</span>;
<a name="l02977"></a>02977 
<a name="l02978"></a>02978   <span class="keywordtype">int</span> i;
<a name="l02979"></a>02979   <a class="codeRef" href="qrect.html">QRect</a> oldAndNewDragRect[2];
<a name="l02980"></a>02980   oldAndNewDragRect[0] = d-&gt;oldDragRect;
<a name="l02981"></a>02981   oldAndNewDragRect[1] = d-&gt;dragRect;
<a name="l02982"></a>02982 
<a name="l02983"></a>02983   <span class="comment">// 2 calls, one for the old and one for the new drag rectangle</span>
<a name="l02984"></a>02984   <span class="keywordflow">for</span> (i = 0; i &lt;= 1; i++) {
<a name="l02985"></a>02985     <span class="keywordflow">if</span> (oldAndNewDragRect[i].isEmpty())
<a name="l02986"></a>02986       <span class="keywordflow">continue</span>;
<a name="l02987"></a>02987 
<a name="l02988"></a>02988     <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* pDockWdgAtRect = (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*) <a class="codeRef" href="qapplication.html#widgetAt">QApplication::widgetAt</a>( oldAndNewDragRect[i].topLeft(), true );
<a name="l02989"></a>02989     <span class="keywordflow">if</span> (!pDockWdgAtRect)
<a name="l02990"></a>02990       <span class="keywordflow">continue</span>;
<a name="l02991"></a>02991 
<a name="l02992"></a>02992     <span class="keywordtype">bool</span> isOverMainWdg = <span class="keyword">false</span>;
<a name="l02993"></a>02993     <span class="keywordtype">bool</span> unclipped;
<a name="l02994"></a>02994     <a class="code" href="classKDockMainWindow.html" title="A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwi...">KDockMainWindow</a>* pMain = 0L;
<a name="l02995"></a>02995     <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* pTLDockWdg = 0L;
<a name="l02996"></a>02996     <a class="codeRef" href="qwidget.html">QWidget</a>* topWdg;
<a name="l02997"></a>02997     <span class="keywordflow">if</span> (pDockWdgAtRect-&gt;<a class="codeRef" href="qwidget.html#topLevelWidget">topLevelWidget</a>() == main) {
<a name="l02998"></a>02998       isOverMainWdg = <span class="keyword">true</span>;
<a name="l02999"></a>02999       topWdg = pMain = (<a class="code" href="classKDockMainWindow.html" title="A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwi...">KDockMainWindow</a>*) main;
<a name="l03000"></a>03000       unclipped = pMain-&gt;testWFlags( WPaintUnclipped );
<a name="l03001"></a>03001       pMain-&gt;setWFlags( WPaintUnclipped );
<a name="l03002"></a>03002     }
<a name="l03003"></a>03003     <span class="keywordflow">else</span> {
<a name="l03004"></a>03004       topWdg = pTLDockWdg = (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*) pDockWdgAtRect-&gt;<a class="codeRef" href="qwidget.html#topLevelWidget">topLevelWidget</a>();
<a name="l03005"></a>03005       unclipped = pTLDockWdg-&gt;<a class="codeRef" href="qwidget.html#testWFlags">testWFlags</a>( WPaintUnclipped );
<a name="l03006"></a>03006       pTLDockWdg-&gt;<a class="codeRef" href="qwidget.html#setWFlags">setWFlags</a>( WPaintUnclipped );
<a name="l03007"></a>03007     }
<a name="l03008"></a>03008 
<a name="l03009"></a>03009     <span class="comment">// draw the rectangle unclipped over the main dock window</span>
<a name="l03010"></a>03010     <a class="codeRef" href="qpainter.html">QPainter</a> p;
<a name="l03011"></a>03011     p.<a class="codeRef" href="qpainter.html#begin">begin</a>( topWdg );
<a name="l03012"></a>03012       <span class="keywordflow">if</span> ( !unclipped ) {
<a name="l03013"></a>03013         <span class="keywordflow">if</span> (isOverMainWdg)
<a name="l03014"></a>03014           pMain-&gt;clearWFlags(WPaintUnclipped);
<a name="l03015"></a>03015         <span class="keywordflow">else</span>
<a name="l03016"></a>03016           pTLDockWdg-&gt;<a class="codeRef" href="qwidget.html#clearWFlags">clearWFlags</a>(WPaintUnclipped);
<a name="l03017"></a>03017       }
<a name="l03018"></a>03018       <span class="comment">// draw the rectangle</span>
<a name="l03019"></a>03019       p.<a class="codeRef" href="qpainter.html#setRasterOp">setRasterOp</a>(Qt::NotXorROP);
<a name="l03020"></a>03020       <a class="codeRef" href="qrect.html">QRect</a> r = oldAndNewDragRect[i];
<a name="l03021"></a>03021       r.<a class="codeRef" href="qrect.html#moveTopLeft">moveTopLeft</a>( r.<a class="codeRef" href="qrect.html#topLeft">topLeft</a>() - topWdg-&gt;<a class="codeRef" href="qwidget.html#mapToGlobal">mapToGlobal</a>(<a class="codeRef" href="qpoint.html">QPoint</a>(0,0)) );
<a name="l03022"></a>03022       p.<a class="codeRef" href="qpainter.html#drawRect">drawRect</a>(r.<a class="codeRef" href="qrect.html#x">x</a>(), r.<a class="codeRef" href="qrect.html#y">y</a>(), r.<a class="codeRef" href="qrect.html#width">width</a>(), r.<a class="codeRef" href="qrect.html#height">height</a>());
<a name="l03023"></a>03023     p.<a class="codeRef" href="qpainter.html#end">end</a>();
<a name="l03024"></a>03024   }
<a name="l03025"></a>03025 
<a name="l03026"></a>03026   <span class="comment">// memorize the current rectangle for later removing</span>
<a name="l03027"></a>03027   d-&gt;oldDragRect = d-&gt;dragRect;
<a name="l03028"></a>03028 }
<a name="l03029"></a>03029 
<a name="l03030"></a><a class="code" href="classKDockManager.html#af8cd655916e8811d6240abf5cc3f65b8">03030</a> <span class="keywordtype">void</span> <a class="code" href="classKDockManager.html#af8cd655916e8811d6240abf5cc3f65b8">KDockManager::setSpecialLeftDockContainer</a>(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* container) {
<a name="l03031"></a>03031     d-&gt;leftContainer=container;
<a name="l03032"></a>03032 }
<a name="l03033"></a>03033 
<a name="l03034"></a>03034 <span class="keywordtype">void</span> KDockManager::setSpecialTopDockContainer(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* container) {
<a name="l03035"></a>03035     d-&gt;topContainer=container;
<a name="l03036"></a>03036 }
<a name="l03037"></a>03037 
<a name="l03038"></a>03038 <span class="keywordtype">void</span> KDockManager::setSpecialRightDockContainer(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* container) {
<a name="l03039"></a>03039     d-&gt;rightContainer=container;
<a name="l03040"></a>03040 
<a name="l03041"></a>03041 }
<a name="l03042"></a>03042 
<a name="l03043"></a>03043 <span class="keywordtype">void</span> KDockManager::setSpecialBottomDockContainer(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* container) {
<a name="l03044"></a>03044     d-&gt;bottomContainer=container;
<a name="l03045"></a>03045 }
<a name="l03046"></a>03046 
<a name="l03047"></a>03047 
<a name="l03048"></a>03048 KDockArea::KDockArea( <a class="codeRef" href="qwidget.html">QWidget</a>* parent, <span class="keyword">const</span> <span class="keywordtype">char</span> *name)
<a name="l03049"></a>03049 :<a class="codeRef" href="qwidget.html">QWidget</a>( parent, name)
<a name="l03050"></a>03050 {
<a name="l03051"></a>03051   <a class="codeRef" href="qstring.html">QString</a> new_name = <a class="codeRef" href="qstring.html">QString</a>(name) + <a class="codeRef" href="qstring.html">QString</a>(<span class="stringliteral">&quot;_DockManager&quot;</span>);
<a name="l03052"></a>03052   dockManager = <span class="keyword">new</span> <a class="code" href="classKDockManager.html#acce76ee2a7297b83db82e6c26cdf5aba" title="Constructs a dockmanager.">KDockManager</a>( <span class="keyword">this</span>, new_name.<a class="codeRef" href="qstring.html#latin1">latin1</a>() );
<a name="l03053"></a>03053   mainDockWidget = 0L;
<a name="l03054"></a>03054 }
<a name="l03055"></a>03055 
<a name="l03056"></a>03056 KDockArea::~KDockArea()
<a name="l03057"></a>03057 {
<a name="l03058"></a>03058     <span class="keyword">delete</span> dockManager;
<a name="l03059"></a>03059 }
<a name="l03060"></a>03060 
<a name="l03061"></a>03061 <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* KDockArea::createDockWidget( <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>&amp; name, <span class="keyword">const</span> <a class="codeRef" href="qpixmap.html">QPixmap</a> &amp;pixmap, <a class="codeRef" href="qwidget.html">QWidget</a>* parent, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>&amp; strCaption, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>&amp; strTabPageLabel)
<a name="l03062"></a>03062 {
<a name="l03063"></a>03063   <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>( dockManager, name.<a class="codeRef" href="qstring.html#latin1">latin1</a>(), pixmap, parent, strCaption, strTabPageLabel );
<a name="l03064"></a>03064 }
<a name="l03065"></a>03065 
<a name="l03066"></a>03066 <span class="keywordtype">void</span> KDockArea::makeDockVisible( <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* dock )
<a name="l03067"></a>03067 {
<a name="l03068"></a>03068   <span class="keywordflow">if</span> ( dock )
<a name="l03069"></a>03069     dock-&gt;<a class="code" href="classKDockWidget.html#a1156e8c4d79e454cac3d51b50babd87e" title="Normally it simply shows the dockwidget.">makeDockVisible</a>();
<a name="l03070"></a>03070 }
<a name="l03071"></a>03071 
<a name="l03072"></a>03072 <span class="keywordtype">void</span> KDockArea::makeDockInvisible( <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* dock )
<a name="l03073"></a>03073 {
<a name="l03074"></a>03074   <span class="keywordflow">if</span> ( dock )
<a name="l03075"></a>03075     dock-&gt;<a class="code" href="classKDockWidget.html#a2fa098fe2ac988870e7c86b1006e114c" title="Undocks this.">undock</a>();
<a name="l03076"></a>03076 }
<a name="l03077"></a>03077 
<a name="l03078"></a>03078 <span class="keywordtype">void</span> KDockArea::makeWidgetDockVisible( <a class="codeRef" href="qwidget.html">QWidget</a>* widget )
<a name="l03079"></a>03079 {
<a name="l03080"></a>03080   makeDockVisible( dockManager-&gt;<a class="code" href="classKDockManager.html#abec245144446fa950cc40cb2e7e4b975" title="This method finds out what a widgets&#39; dockwidget is.">findWidgetParentDock</a>(widget) );
<a name="l03081"></a>03081 }
<a name="l03082"></a>03082 
<a name="l03083"></a>03083 <span class="keywordtype">void</span> KDockArea::writeDockConfig(<a class="codeRef" href="qdomelement.html">QDomElement</a> &amp;base)
<a name="l03084"></a>03084 {
<a name="l03085"></a>03085   dockManager-&gt;<a class="code" href="classKDockManager.html#a0b4fadda32ca4eecc3d69be5bd3924cf" title="Saves the current state of the dockmanager and of all controlled widgets.">writeConfig</a>(base);
<a name="l03086"></a>03086 }
<a name="l03087"></a>03087 
<a name="l03088"></a>03088 <span class="keywordtype">void</span> KDockArea::readDockConfig(<a class="codeRef" href="qdomelement.html">QDomElement</a> &amp;base)
<a name="l03089"></a>03089 {
<a name="l03090"></a>03090   dockManager-&gt;<a class="code" href="classKDockManager.html#ada938c7b90c71d8da7ed578db51c1a4f" title="Like writeConfig but reads the whole stuff in.">readConfig</a>(base);
<a name="l03091"></a>03091 }
<a name="l03092"></a>03092 
<a name="l03093"></a>03093 <span class="keywordtype">void</span> KDockArea::slotDockWidgetUndocked()
<a name="l03094"></a>03094 {
<a name="l03095"></a>03095   <a class="codeRef" href="qobject.html">QObject</a>* pSender = (<a class="codeRef" href="qobject.html">QObject</a>*) sender();
<a name="l03096"></a>03096   <span class="keywordflow">if</span> (!pSender-&gt;<a class="codeRef" href="qobject.html#inherits">inherits</a>(<span class="stringliteral">&quot;KDockWidget&quot;</span>)) <span class="keywordflow">return</span>;
<a name="l03097"></a>03097   <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* pDW = (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*) pSender;
<a name="l03098"></a>03098   emit dockWidgetHasUndocked( pDW);
<a name="l03099"></a>03099 }
<a name="l03100"></a>03100 
<a name="l03101"></a>03101 <span class="keywordtype">void</span> KDockArea::resizeEvent(<a class="codeRef" href="qresizeevent.html">QResizeEvent</a> *rsize)
<a name="l03102"></a>03102 {
<a name="l03103"></a>03103   <a class="codeRef" href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>(rsize);
<a name="l03104"></a>03104   <span class="keywordflow">if</span> (children()){
<a name="l03105"></a>03105 <span class="preprocessor">#ifndef NO_KDE2</span>
<a name="l03106"></a>03106 <span class="preprocessor"></span><span class="comment">//    kdDebug(282)&lt;&lt;&quot;KDockArea::resize&quot;&lt;&lt;endl;</span>
<a name="l03107"></a>03107 <span class="preprocessor">#endif</span>
<a name="l03108"></a>03108 <span class="preprocessor"></span>    <a class="codeRef" href="qobjectlist.html">QObjectList</a> *list=queryList(<span class="stringliteral">&quot;QWidget&quot;</span>,0,<span class="keyword">false</span>);
<a name="l03109"></a>03109 
<a name="l03110"></a>03110     QObjectListIt it( *list ); <span class="comment">// iterate over the buttons</span>
<a name="l03111"></a>03111     <a class="codeRef" href="qobject.html">QObject</a> *obj;
<a name="l03112"></a>03112 
<a name="l03113"></a>03113     <span class="keywordflow">while</span> ( (obj = it.current()) != 0 ) {
<a name="l03114"></a>03114         <span class="comment">// for each found object...</span>
<a name="l03115"></a>03115         ((<a class="codeRef" href="qwidget.html">QWidget</a>*)obj)-&gt;<a class="codeRef" href="qwidget.html#setGeometry">setGeometry</a>(<a class="codeRef" href="qrect.html">QRect</a>(<a class="codeRef" href="qpoint.html">QPoint</a>(0,0),size()));
<a name="l03116"></a>03116     <span class="keywordflow">break</span>;
<a name="l03117"></a>03117     }
<a name="l03118"></a>03118     <span class="keyword">delete</span> list;
<a name="l03119"></a>03119 <span class="preprocessor">#if 0</span>
<a name="l03120"></a>03120 <span class="preprocessor"></span>    <a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a> *split;
<a name="l03121"></a>03121 <span class="comment">//    for (unsigned int i=0;i&lt;children()-&gt;count();i++)</span>
<a name="l03122"></a>03122     {
<a name="l03123"></a>03123 <span class="comment">//      QPtrList&lt;QObject&gt; list(children());</span>
<a name="l03124"></a>03124 <span class="comment">//       QObject *obj=((QPtrList&lt;QObject*&gt;)children())-&gt;at(i);</span>
<a name="l03125"></a>03125     <a class="codeRef" href="qobject.html">QObject</a> *obj=children()-&gt;getFirst();
<a name="l03126"></a>03126        <span class="keywordflow">if</span> (split = dynamic_cast&lt;KDockSplitter*&gt;(obj))
<a name="l03127"></a>03127        {
<a name="l03128"></a>03128           split-&gt;<a class="codeRef" href="qwidget.html#setGeometry">setGeometry</a>( <a class="codeRef" href="qrect.html">QRect</a>(<a class="codeRef" href="qpoint.html">QPoint</a>(0,0), size() ));
<a name="l03129"></a>03129 <span class="comment">//    break;</span>
<a name="l03130"></a>03130        }
<a name="l03131"></a>03131     }
<a name="l03132"></a>03132 <span class="preprocessor">#endif</span>
<a name="l03133"></a>03133 <span class="preprocessor"></span>   }
<a name="l03134"></a>03134 }
<a name="l03135"></a>03135 
<a name="l03136"></a>03136 <span class="preprocessor">#ifndef NO_KDE2</span>
<a name="l03137"></a>03137 <span class="preprocessor"></span><span class="keywordtype">void</span> KDockArea::writeDockConfig( <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfig.html">KConfig</a>* c, <a class="codeRef" href="qstring.html">QString</a> group )
<a name="l03138"></a>03138 {
<a name="l03139"></a>03139   dockManager-&gt;<a class="code" href="classKDockManager.html#a0b4fadda32ca4eecc3d69be5bd3924cf" title="Saves the current state of the dockmanager and of all controlled widgets.">writeConfig</a>( c, group );
<a name="l03140"></a>03140 }
<a name="l03141"></a>03141 
<a name="l03142"></a>03142 <span class="keywordtype">void</span> KDockArea::readDockConfig( <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfig.html">KConfig</a>* c, <a class="codeRef" href="qstring.html">QString</a> group )
<a name="l03143"></a>03143 {
<a name="l03144"></a>03144   dockManager-&gt;<a class="code" href="classKDockManager.html#ada938c7b90c71d8da7ed578db51c1a4f" title="Like writeConfig but reads the whole stuff in.">readConfig</a>( c, group );
<a name="l03145"></a>03145 }
<a name="l03146"></a>03146 
<a name="l03147"></a>03147 <span class="keywordtype">void</span> KDockArea::setMainDockWidget( <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>* mdw )
<a name="l03148"></a>03148 {
<a name="l03149"></a>03149   <span class="keywordflow">if</span> ( mainDockWidget == mdw ) <span class="keywordflow">return</span>;
<a name="l03150"></a>03150   mainDockWidget = mdw;
<a name="l03151"></a>03151   mdw-&gt;applyToWidget(<span class="keyword">this</span>);
<a name="l03152"></a>03152 }
<a name="l03153"></a>03153 <span class="preprocessor">#endif</span>
<a name="l03154"></a>03154 <span class="preprocessor"></span>
<a name="l03155"></a>03155 
<a name="l03156"></a>03156 
<a name="l03157"></a>03157 <span class="comment">// KDOCKCONTAINER - AN ABSTRACTION OF THE KDOCKTABWIDGET</span>
<a name="l03158"></a>03158 KDockContainer::KDockContainer(){m_overlapMode=<span class="keyword">false</span>; m_childrenListBegin=0; m_childrenListEnd=0;}
<a name="l03159"></a>03159 KDockContainer::~KDockContainer(){
<a name="l03160"></a>03160 
<a name="l03161"></a>03161     <span class="keywordflow">if</span> (m_childrenListBegin)
<a name="l03162"></a>03162     {
<a name="l03163"></a>03163         <span class="keyword">struct </span>ListItem *tmp=m_childrenListBegin;
<a name="l03164"></a>03164         <span class="keywordflow">while</span> (tmp)
<a name="l03165"></a>03165         {
<a name="l03166"></a>03166             <span class="keyword">struct </span>ListItem *tmp2=tmp-&gt;next;
<a name="l03167"></a>03167             free(tmp-&gt;data);
<a name="l03168"></a>03168             <span class="keyword">delete</span> tmp;
<a name="l03169"></a>03169             tmp=tmp2;
<a name="l03170"></a>03170         }
<a name="l03171"></a>03171         m_childrenListBegin=0;
<a name="l03172"></a>03172         m_childrenListEnd=0;
<a name="l03173"></a>03173     }
<a name="l03174"></a>03174 
<a name="l03175"></a>03175 }
<a name="l03176"></a>03176 
<a name="l03177"></a>03177 <span class="keywordtype">void</span> KDockContainer::activateOverlapMode(<span class="keywordtype">int</span> nonOverlapSize) {
<a name="l03178"></a>03178     m_nonOverlapSize=nonOverlapSize;
<a name="l03179"></a>03179     m_overlapMode=<span class="keyword">true</span>;
<a name="l03180"></a>03180     <span class="keywordflow">if</span> (parentDockWidget() &amp;&amp; parentDockWidget()-&gt;parent()) {
<a name="l03181"></a>03181         <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;KDockContainer::activateOverlapMode: recalculating sizes&quot;</span>&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l03182"></a>03182         <a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a> *sp= <span class="keyword">static_cast&lt;</span><a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*<span class="keyword">&gt;</span>(parentDockWidget()-&gt;
<a name="l03183"></a>03183             parent()-&gt;qt_cast(<span class="stringliteral">&quot;KDockSplitter&quot;</span>));
<a name="l03184"></a>03184         <span class="keywordflow">if</span> (sp)
<a name="l03185"></a>03185             sp-&gt;<a class="code" href="classKDockSplitter.html#a6427a2fdf42c0e8bdb7fc7379220ec49" title="The resize event resizes child0, child1 and the divider.">resizeEvent</a>(0);
<a name="l03186"></a>03186     }
<a name="l03187"></a>03187 }
<a name="l03188"></a>03188 
<a name="l03189"></a>03189 <span class="keywordtype">void</span> KDockContainer::deactivateOverlapMode() {
<a name="l03190"></a>03190     <span class="keywordflow">if</span> (!m_overlapMode) <span class="keywordflow">return</span>;
<a name="l03191"></a>03191     m_overlapMode=<span class="keyword">false</span>;
<a name="l03192"></a>03192     <span class="keywordflow">if</span> (parentDockWidget() &amp;&amp; parentDockWidget()-&gt;parent()) {
<a name="l03193"></a>03193         <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;KDockContainer::deactivateOverlapMode: recalculating sizes&quot;</span>&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l03194"></a>03194         <a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a> *sp= <span class="keyword">static_cast&lt;</span><a class="code" href="classKDockSplitter.html" title="Like QSplitter but specially designed for dockwidgets stuff.">KDockSplitter</a>*<span class="keyword">&gt;</span>(parentDockWidget()-&gt;
<a name="l03195"></a>03195             parent()-&gt;qt_cast(<span class="stringliteral">&quot;KDockSplitter&quot;</span>));
<a name="l03196"></a>03196         <span class="keywordflow">if</span> (sp)
<a name="l03197"></a>03197             sp-&gt;<a class="code" href="classKDockSplitter.html#a6427a2fdf42c0e8bdb7fc7379220ec49" title="The resize event resizes child0, child1 and the divider.">resizeEvent</a>(0);
<a name="l03198"></a>03198         }
<a name="l03199"></a>03199 }
<a name="l03200"></a>03200 
<a name="l03201"></a>03201 <span class="keywordtype">bool</span> KDockContainer::isOverlapMode() {
<a name="l03202"></a>03202     <span class="keywordflow">return</span> m_overlapMode;
<a name="l03203"></a>03203 }
<a name="l03204"></a>03204 
<a name="l03205"></a>03205 
<a name="l03206"></a>03206 <span class="keywordtype">bool</span> KDockContainer::dockDragEnter(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*, <a class="codeRef" href="qmouseevent.html">QMouseEvent</a> *) { <span class="keywordflow">return</span> <span class="keyword">false</span>;}
<a name="l03207"></a>03207 <span class="keywordtype">bool</span> KDockContainer::dockDragMove(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*, <a class="codeRef" href="qmouseevent.html">QMouseEvent</a> *) { <span class="keywordflow">return</span> <span class="keyword">false</span>;}
<a name="l03208"></a>03208 <span class="keywordtype">bool</span> KDockContainer::dockDragLeave(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*, <a class="codeRef" href="qmouseevent.html">QMouseEvent</a> *) { <span class="keywordflow">return</span> <span class="keyword">false</span>;}
<a name="l03209"></a>03209 
<a name="l03210"></a>03210 
<a name="l03211"></a>03211 <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *KDockContainer::parentDockWidget(){<span class="keywordflow">return</span> 0;}
<a name="l03212"></a>03212 
<a name="l03213"></a>03213 <a class="codeRef" href="qstringlist.html">QStringList</a> KDockContainer::containedWidgets()<span class="keyword"> const </span>{
<a name="l03214"></a>03214     <a class="codeRef" href="qstringlist.html">QStringList</a> tmp;
<a name="l03215"></a>03215     <span class="keywordflow">for</span> (<span class="keyword">struct</span> ListItem *it=m_childrenListBegin;it;it=it-&gt;next) {
<a name="l03216"></a>03216         tmp&lt;&lt;<a class="codeRef" href="qstring.html">QString</a>(it-&gt;data);
<a name="l03217"></a>03217     }
<a name="l03218"></a>03218 
<a name="l03219"></a>03219     <span class="keywordflow">return</span> tmp;
<a name="l03220"></a>03220 }
<a name="l03221"></a>03221 
<a name="l03222"></a>03222 <span class="keywordtype">void</span> KDockContainer::showWidget(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *) {
<a name="l03223"></a>03223 }
<a name="l03224"></a>03224 
<a name="l03225"></a>03225 <span class="keywordtype">void</span> KDockContainer::insertWidget (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *dw, <a class="codeRef" href="qpixmap.html">QPixmap</a>, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a> &amp;, <span class="keywordtype">int</span> &amp;)
<a name="l03226"></a>03226     {
<a name="l03227"></a>03227         <span class="keyword">struct </span>ListItem *it=<span class="keyword">new</span> <span class="keyword">struct </span>ListItem;
<a name="l03228"></a>03228         it-&gt;data=strdup(dw-&gt;name());
<a name="l03229"></a>03229         it-&gt;next=0;
<a name="l03230"></a>03230 
<a name="l03231"></a>03231         <span class="keywordflow">if</span> (m_childrenListEnd)
<a name="l03232"></a>03232         {
<a name="l03233"></a>03233             m_childrenListEnd-&gt;next=it;
<a name="l03234"></a>03234             it-&gt;prev=m_childrenListEnd;
<a name="l03235"></a>03235             m_childrenListEnd=it;
<a name="l03236"></a>03236         }
<a name="l03237"></a>03237         <span class="keywordflow">else</span>
<a name="l03238"></a>03238         {
<a name="l03239"></a>03239             it-&gt;prev=0;
<a name="l03240"></a>03240             m_childrenListEnd=it;
<a name="l03241"></a>03241             m_childrenListBegin=it;
<a name="l03242"></a>03242         }
<a name="l03243"></a>03243     }
<a name="l03244"></a>03244 <span class="keywordtype">void</span> KDockContainer::removeWidget (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *dw){
<a name="l03245"></a>03245     <span class="keywordflow">for</span> (<span class="keyword">struct</span> ListItem *tmp=m_childrenListBegin;tmp;tmp=tmp-&gt;next)
<a name="l03246"></a>03246     {
<a name="l03247"></a>03247         <span class="keywordflow">if</span> (!strcmp(tmp-&gt;data,dw-&gt;name()))
<a name="l03248"></a>03248         {
<a name="l03249"></a>03249             free(tmp-&gt;data);
<a name="l03250"></a>03250             <span class="keywordflow">if</span> (tmp-&gt;next) tmp-&gt;next-&gt;prev=tmp-&gt;prev;
<a name="l03251"></a>03251             <span class="keywordflow">if</span> (tmp-&gt;prev) tmp-&gt;prev-&gt;next=tmp-&gt;next;
<a name="l03252"></a>03252             <span class="keywordflow">if</span> (tmp==m_childrenListBegin) m_childrenListBegin=tmp-&gt;next;
<a name="l03253"></a>03253             <span class="keywordflow">if</span> (tmp==m_childrenListEnd) m_childrenListEnd=tmp-&gt;prev;
<a name="l03254"></a>03254             <span class="keyword">delete</span> tmp;
<a name="l03255"></a>03255             <span class="keywordflow">break</span>;
<a name="l03256"></a>03256         }
<a name="l03257"></a>03257     }
<a name="l03258"></a>03258 }
<a name="l03259"></a>03259 
<a name="l03260"></a>03260 <span class="comment">//m_children.remove(dw-&gt;name());}</span>
<a name="l03261"></a>03261 <span class="keywordtype">void</span> KDockContainer::undockWidget (<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *){;}
<a name="l03262"></a>03262 <span class="keywordtype">void</span> KDockContainer::setToolTip(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *, <a class="codeRef" href="qstring.html">QString</a> &amp;){;}
<a name="l03263"></a>03263 <span class="keywordtype">void</span> KDockContainer::setPixmap(<a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*,<span class="keyword">const</span> <a class="codeRef" href="qpixmap.html">QPixmap</a>&amp;){;}
<a name="l03264"></a>03264 <span class="keywordtype">void</span> KDockContainer::load (<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfig.html">KConfig</a>*, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>&amp;){;}
<a name="l03265"></a>03265 <span class="keywordtype">void</span> KDockContainer::save (<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/classKConfig.html">KConfig</a>*, <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>&amp;){;}
<a name="l03266"></a>03266 <span class="keywordtype">void</span> KDockContainer::load (<a class="codeRef" href="qdomelement.html">QDomElement</a>&amp;){;}
<a name="l03267"></a>03267 <span class="keywordtype">void</span> KDockContainer::save (<a class="codeRef" href="qdomelement.html">QDomElement</a>&amp;){;}
<a name="l03268"></a>03268 <span class="keywordtype">void</span> KDockContainer::prepareSave(<a class="codeRef" href="qstringlist.html">QStringList</a> &amp;names)
<a name="l03269"></a>03269 {
<a name="l03270"></a>03270 
<a name="l03271"></a>03271     <span class="keywordflow">for</span> (<span class="keyword">struct</span> ListItem *tmp=m_childrenListBegin;tmp; tmp=tmp-&gt;next)
<a name="l03272"></a>03272         names.remove(tmp-&gt;data);
<a name="l03273"></a>03273 <span class="comment">//  for (uint i=0;i&lt;m_children.count();i++)</span>
<a name="l03274"></a>03274 <span class="comment">//  {</span>
<a name="l03275"></a>03275 <span class="comment">//      names.remove(m_children.at(i));</span>
<a name="l03276"></a>03276 <span class="comment">//  }</span>
<a name="l03277"></a>03277 }
<a name="l03278"></a>03278 
<a name="l03279"></a>03279 
<a name="l03280"></a>03280 <a class="codeRef" href="qwidget.html">QWidget</a> *KDockTabGroup::transientTo() {
<a name="l03281"></a>03281     <a class="codeRef" href="qwidget.html">QWidget</a> *tT=0;
<a name="l03282"></a>03282     <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0;i&lt;<a class="codeRef" href="qtabwidget.html#count">count</a>();i++) {
<a name="l03283"></a>03283         <a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a> *dw=<span class="keyword">static_cast&lt;</span><a class="code" href="classKDockWidget.html" title="Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and me...">KDockWidget</a>*<span class="keyword">&gt;</span>(<a class="codeRef" href="qtabwidget.html#page">page</a>(i)-&gt;qt_cast(<span class="stringliteral">&quot;KDockWidget&quot;</span>));
<a name="l03284"></a>03284         <a class="codeRef" href="qwidget.html">QWidget</a> *tmp;
<a name="l03285"></a>03285         <span class="keywordflow">if</span> ((tmp=dw-&gt;<a class="code" href="classKDockWidget.html#ae5467537d5dba824f002ef35f2a434d3" title="Returns the widget this dockwidget is set transient to, otherwise 0.">transientTo</a>())) {
<a name="l03286"></a>03286             <span class="keywordflow">if</span> (!tT) tT=tmp;
<a name="l03287"></a>03287             <span class="keywordflow">else</span> {
<a name="l03288"></a>03288                 <span class="keywordflow">if</span> (tT!=tmp) {
<a name="l03289"></a>03289                     <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;KDockTabGroup::transientTo: widget mismatch&quot;</span>&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l03290"></a>03290                     <span class="keywordflow">return</span> 0;
<a name="l03291"></a>03291                 }
<a name="l03292"></a>03292             }
<a name="l03293"></a>03293         }
<a name="l03294"></a>03294     }
<a name="l03295"></a>03295 
<a name="l03296"></a>03296     <a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#gafbb9aa4a84d6c0563d46550454b9714b">kdDebug</a>(282)&lt;&lt;<span class="stringliteral">&quot;KDockTabGroup::transientTo: &quot;</span>&lt;&lt;(tT?<span class="stringliteral">&quot;YES&quot;</span>:<span class="stringliteral">&quot;NO&quot;</span>)&lt;&lt;<a class="codeRef" doxygen="kdecore.tag:../../kdecore/html/" href="../../kdecore/html/group__kdebug.html#ga313d520ed8f8f6b46eeef22cfb3b082a">endl</a>;
<a name="l03297"></a>03297 
<a name="l03298"></a>03298     <span class="keywordflow">return</span> tT;
<a name="l03299"></a>03299 }
<a name="l03300"></a>03300 
<a name="l03301"></a>03301 <span class="keywordtype">void</span> KDockWidgetAbstractHeader::virtual_hook( <span class="keywordtype">int</span>, <span class="keywordtype">void</span>* )
<a name="l03302"></a>03302 { <span class="comment">/*BASE::virtual_hook( id, data );*/</span> }
<a name="l03303"></a>03303 
<a name="l03304"></a>03304 <span class="keywordtype">void</span> KDockWidgetAbstractHeaderDrag::virtual_hook( <span class="keywordtype">int</span>, <span class="keywordtype">void</span>* )
<a name="l03305"></a>03305 { <span class="comment">/*BASE::virtual_hook( id, data );*/</span> }
<a name="l03306"></a>03306 
<a name="l03307"></a>03307 <span class="keywordtype">void</span> KDockWidgetHeaderDrag::virtual_hook( <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keywordtype">void</span>* data )
<a name="l03308"></a>03308 { KDockWidgetAbstractHeaderDrag::virtual_hook( <span class="keywordtype">id</span>, data ); }
<a name="l03309"></a>03309 
<a name="l03310"></a>03310 <span class="keywordtype">void</span> KDockWidgetHeader::virtual_hook( <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keywordtype">void</span>* data )
<a name="l03311"></a>03311 { KDockWidgetAbstractHeader::virtual_hook( <span class="keywordtype">id</span>, data ); }
<a name="l03312"></a>03312 
<a name="l03313"></a>03313 <span class="keywordtype">void</span> KDockTabGroup::virtual_hook( <span class="keywordtype">int</span>, <span class="keywordtype">void</span>* )
<a name="l03314"></a>03314 { <span class="comment">/*BASE::virtual_hook( id, data );*/</span> }
<a name="l03315"></a>03315 
<a name="l03316"></a>03316 <span class="keywordtype">void</span> KDockWidget::virtual_hook( <span class="keywordtype">int</span>, <span class="keywordtype">void</span>* )
<a name="l03317"></a>03317 { <span class="comment">/*BASE::virtual_hook( id, data );*/</span> }
<a name="l03318"></a>03318 
<a name="l03319"></a>03319 <span class="keywordtype">void</span> KDockManager::virtual_hook( <span class="keywordtype">int</span>, <span class="keywordtype">void</span>* )
<a name="l03320"></a>03320 { <span class="comment">/*BASE::virtual_hook( id, data );*/</span> }
<a name="l03321"></a>03321 
<a name="l03322"></a>03322 <span class="keywordtype">void</span> KDockMainWindow::virtual_hook( <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keywordtype">void</span>* data )
<a name="l03323"></a>03323 { KMainWindow::virtual_hook( <span class="keywordtype">id</span>, data ); }
<a name="l03324"></a>03324 
<a name="l03325"></a>03325 <span class="keywordtype">void</span> KDockArea::virtual_hook( <span class="keywordtype">int</span>, <span class="keywordtype">void</span>* )
<a name="l03326"></a>03326 { <span class="comment">/*KMainWindow::virtual_hook( id, data );*/</span> }
<a name="l03327"></a>03327 
<a name="l03328"></a>03328 
<a name="l03329"></a>03329 <span class="preprocessor">#ifndef NO_INCLUDE_MOCFILES // for Qt-only projects, because tmake doesn&#39;t take this name</span>
<a name="l03330"></a>03330 <span class="preprocessor"></span><span class="preprocessor">#include &quot;kdockwidget.moc&quot;</span>
<a name="l03331"></a>03331 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
    </div></div>


      </td>
  </tr>
  <tr>
    <td valign="top" id="leftmenu" width="25%">
      <a name="navigation"></a>
      <div class="menu_box"><h2>kdeui</h2>
<div class="nav_list">
<ul><li><a href="index.html">Main Page</a></li><li><a href="namespaces.html">Namespace List</a></li><li><a href="hierarchy.html">Class Hierarchy</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="files.html">File List</a></li><li><a href="namespacemembers.html">Namespace Members</a></li><li><a href="functions.html">Class Members</a></li><li><a href="pages.html">Related Pages</a></li></ul>
<!--
<h2>Class Picker</h2>
<div style="text-align: center;">
<form name="guideform">
<select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value">
<option value="annotated.html">-- Choose --</option>
  <option value="classKAboutApplication.html">kaboutapplication</option>,  <option value="classKAboutContainer.html">kaboutcontainer</option>,  <option value="classKAboutContainerBase.html">kaboutcontainerbase</option>,  <option value="classKAboutContributor.html">kaboutcontributor</option>,  <option value="classKAboutDialog.html">kaboutdialog</option>,  <option value="classKAboutKDE.html">kaboutkde</option>,  <option value="classKAboutWidget.html">kaboutwidget</option>,  <option value="classKAccelGen_1_1Deref.html">kaccelgen::deref</option>,  <option value="classKAccelGen_1_1Deref__Key.html">kaccelgen::deref__key</option>,  <option value="classKAction.html">kaction</option>,  <option value="classKActionCollection.html">kactioncollection</option>,  <option value="classKActionMenu.html">kactionmenu</option>,  <option value="classKActionSelector.html">kactionselector</option>,  <option value="classKActiveLabel.html">kactivelabel</option>,  <option value="classKAnimWidget.html">kanimwidget</option>,  <option value="classKArrowButton.html">karrowbutton</option>,  <option value="classKAuthIcon.html">kauthicon</option>,  <option value="classKBugReport.html">kbugreport</option>,  <option value="classKButtonBox.html">kbuttonbox</option>,  <option value="classKCharSelect.html">kcharselect</option>,  <option value="classKCharSelectTable.html">kcharselecttable</option>,  <option value="classKCModule.html">kcmodule</option>,  <option value="classKColor.html">kcolor</option>,  <option value="classKColorButton.html">kcolorbutton</option>,  <option value="classKColorCells.html">kcolorcells</option>,  <option value="classKColorCombo.html">kcolorcombo</option>,  <option value="classKColorDialog.html">kcolordialog</option>,  <option value="classKColorDrag.html">kcolordrag</option>,  <option value="classKColorPatch.html">kcolorpatch</option>,  <option value="classKComboBox.html">kcombobox</option>,  <option value="classKCommand.html">kcommand</option>,  <option value="classKCommandHistory.html">kcommandhistory</option>,  <option value="classKCompletionBox.html">kcompletionbox</option>,  <option value="classKConfigDialog.html">kconfigdialog</option>,  <option value="classKContextMenuManager.html">kcontextmenumanager</option>,  <option value="classKCursor.html">kcursor</option>,  <option value="classKCursorPrivate.html">kcursorprivate</option>,  <option value="classKCursorPrivateAutoHideEventFilter.html">kcursorprivateautohideeventfilter</option>,  <option value="classKDateInternalMonthPicker.html">kdateinternalmonthpicker</option>,  <option value="classKDateInternalWeekSelector.html">kdateinternalweekselector</option>,  <option value="classKDateInternalYearSelector.html">kdateinternalyearselector</option>,  <option value="classKDatePicker.html">kdatepicker</option>,  <option value="classKDateTable.html">kdatetable</option>,  <option value="classKDateTimeWidget.html">kdatetimewidget</option>,  <option value="classKDateValidator.html">kdatevalidator</option>,  <option value="classKDateWidget.html">kdatewidget</option>,  <option value="classKDCOPActionProxy.html">kdcopactionproxy</option>,  <option value="classKDEPrivate_1_1ToolBarHandler.html">kdeprivate::toolbarhandler</option>,  <option value="classKDialog.html">kdialog</option>,  <option value="classKDialogBase.html">kdialogbase</option>,  <option value="classKDialogBaseButton.html">kdialogbasebutton</option>,  <option value="classKDialogBaseTile.html">kdialogbasetile</option>,  <option value="classKDictSpellingHighlighter.html">kdictspellinghighlighter</option>,  <option value="classKDockButton__Private.html">kdockbutton__private</option>,  <option value="classKDockMainWindow.html">kdockmainwindow</option>,  <option value="classKDockManager.html">kdockmanager</option>,  <option value="classKDockSplitter.html">kdocksplitter</option>,  <option value="classKDockTabGroup.html">kdocktabgroup</option>,  <option value="classKDockWidget.html">kdockwidget</option>,  <option value="classKDockWidgetAbstractHeader.html">kdockwidgetabstractheader</option>,  <option value="classKDockWidgetAbstractHeaderDrag.html">kdockwidgetabstractheaderdrag</option>,  <option value="classKDockWidgetHeader.html">kdockwidgetheader</option>,  <option value="classKDockWidgetHeaderDrag.html">kdockwidgetheaderdrag</option>,  <option value="classKDockWidgetPrivate.html">kdockwidgetprivate</option>,  <option value="classKDockWindow.html">kdockwindow</option>,  <option value="classKDoubleNumInput.html">kdoublenuminput</option>,  <option value="classKDoubleSpinBox.html">kdoublespinbox</option>,  <option value="classKDoubleValidator.html">kdoublevalidator</option>,  <option value="classKDualColorButton.html">kdualcolorbutton</option>,  <option value="classKEdit.html">kedit</option>,  <option value="classKEditListBox.html">keditlistbox</option>,  <option value="classKEditListBox_1_1CustomEditor.html">keditlistbox::customeditor</option>,  <option value="classKEditToolbar.html">kedittoolbar</option>,  <option value="classKEditToolbarWidget.html">kedittoolbarwidget</option>,  <option value="classKFloatValidator.html">kfloatvalidator</option>,  <option value="classKFontChooser.html">kfontchooser</option>,  <option value="classKFontCombo.html">kfontcombo</option>,  <option value="classKFontDialog.html">kfontdialog</option>,  <option value="classKFontRequester.html">kfontrequester</option>,  <option value="classKGradientSelector.html">kgradientselector</option>,  <option value="classKGuiItem.html">kguiitem</option>,  <option value="classKHelpMenu.html">khelpmenu</option>,  <option value="classKHistoryCombo.html">khistorycombo</option>,  <option value="classKHSSelector.html">khsselector</option>,  <option value="classKIconView.html">kiconview</option>,  <option value="classKIconViewItem.html">kiconviewitem</option>,  <option value="classKIconViewSearchLine.html">kiconviewsearchline</option>,  <option value="classKImageTrackLabel.html">kimagetracklabel</option>,  <option value="classKInputDialog.html">kinputdialog</option>,  <option value="classKIntNumInput.html">kintnuminput</option>,  <option value="classKIntSpinBox.html">kintspinbox</option>,  <option value="classKIntValidator.html">kintvalidator</option>,  <option value="classKJanusWidget.html">kjanuswidget</option>,  <option value="classKKeyButton.html">kkeybutton</option>,  <option value="classKKeyChooser.html">kkeychooser</option>,  <option value="classKKeyDialog.html">kkeydialog</option>,  <option value="classKLanguageButton.html">klanguagebutton</option>,  <option value="classKLed.html">kled</option>,  <option value="classKLineEdit.html">klineedit</option>,  <option value="classKLineEditDlg.html">klineeditdlg</option>,  <option value="classKListAction.html">klistaction</option>,  <option value="classKListBox.html">klistbox</option>,  <option value="classKListView.html">klistview</option>,  <option value="classKListViewItem.html">klistviewitem</option>,  <option value="classKListViewLineEdit.html">klistviewlineedit</option>,  <option value="classKListViewSearchLine.html">klistviewsearchline</option>,  <option value="classKListViewSearchLineWidget.html">klistviewsearchlinewidget</option>,  <option value="classKMacroCommand.html">kmacrocommand</option>,  <option value="classKMainWindow.html">kmainwindow</option>,  <option value="classKMainWindowInterface.html">kmainwindowinterface</option>,  <option value="classKMenuBar.html">kmenubar</option>,  <option value="classKMessageBox.html">kmessagebox</option>,  <option value="classKMimeTypeValidator.html">kmimetypevalidator</option>,  <option value="classKNamedCommand.html">knamedcommand</option>,  <option value="classKNumInput.html">knuminput</option>,  <option value="classKPaletteTable.html">kpalettetable</option>,  <option value="classKPanelApplet.html">kpanelapplet</option>,  <option value="classKPanelAppMenu.html">kpanelappmenu</option>,  <option value="classKPanelExtension.html">kpanelextension</option>,  <option value="classKPanelMenu.html">kpanelmenu</option>,  <option value="classKPassivePopup.html">kpassivepopup</option>,  <option value="classKPasswordDialog.html">kpassworddialog</option>,  <option value="classKPasswordEdit.html">kpasswordedit</option>,  <option value="classKPasteTextAction.html">kpastetextaction</option>,  <option value="classKPixmapIO.html">kpixmapio</option>,  <option value="classKPixmapRegionSelectorDialog.html">kpixmapregionselectordialog</option>,  <option value="classKPixmapRegionSelectorWidget.html">kpixmapregionselectorwidget</option>,  <option value="classKPopupFrame.html">kpopupframe</option>,  <option value="classKPopupMenu.html">kpopupmenu</option>,  <option value="classKPopupTitle.html">kpopuptitle</option>,  <option value="classKProgress.html">kprogress</option>,  <option value="classKProgressDialog.html">kprogressdialog</option>,  <option value="classKPushButton.html">kpushbutton</option>,  <option value="classKRadioAction.html">kradioaction</option>,  <option value="classKRecentFilesAction.html">krecentfilesaction</option>,  <option value="classKRestrictedLine.html">krestrictedline</option>,  <option value="classKRootPermsIcon.html">krootpermsicon</option>,  <option value="classKRootPixmap.html">krootpixmap</option>,  <option value="classKRuler.html">kruler</option>,  <option value="classKScrollView.html">kscrollview</option>,  <option value="classKSelectAction.html">kselectaction</option>,  <option value="classKSelector.html">kselector</option>,  <option value="classKSeparator.html">kseparator</option>,  <option value="classKShortcutDialog.html">kshortcutdialog</option>,  <option value="classKSpell.html">kspell</option>,  <option value="classKSpellConfig.html">kspellconfig</option>,  <option value="classKSplashScreen.html">ksplashscreen</option>,  <option value="classKSqueezedTextLabel.html">ksqueezedtextlabel</option>,  <option value="classKStatusBar.html">kstatusbar</option>,  <option value="classKStatusBarLabel.html">kstatusbarlabel</option>,  <option value="classKStdGuiItem.html">kstdguiitem</option>,  <option value="classKStringListValidator.html">kstringlistvalidator</option>,  <option value="classKSwitchLanguageDialog.html">kswitchlanguagedialog</option>,  <option value="classKSyntaxHighlighter.html">ksyntaxhighlighter</option>,  <option value="classKSystemTray.html">ksystemtray</option>,  <option value="classKTabBar.html">ktabbar</option>,  <option value="classKTabCtl.html">ktabctl</option>,  <option value="classKTabWidget.html">ktabwidget</option>,  <option value="classKTextBrowser.html">ktextbrowser</option>,  <option value="classKTextEdit.html">ktextedit</option>,  <option value="classKTimeWidget.html">ktimewidget</option>,  <option value="classKTimezoneWidget.html">ktimezonewidget</option>,  <option value="classKTipDatabase.html">ktipdatabase</option>,  <option value="classKTipDialog.html">ktipdialog</option>,  <option value="classKToggleAction.html">ktoggleaction</option>,  <option value="classKToggleFullScreenAction.html">ktogglefullscreenaction</option>,  <option value="classKToggleToolBarAction.html">ktoggletoolbaraction</option>,  <option value="classKToolBar.html">ktoolbar</option>,  <option value="classKToolBarButton.html">ktoolbarbutton</option>,  <option value="classKToolBarButtonList.html">ktoolbarbuttonlist</option>,  <option value="classKToolBarLabelAction.html">ktoolbarlabelaction</option>,  <option value="classKToolBarPopupAction.html">ktoolbarpopupaction</option>,  <option value="classKToolBarRadioGroup.html">ktoolbarradiogroup</option>,  <option value="classKURLLabel.html">kurllabel</option>,  <option value="classKValueSelector.html">kvalueselector</option>,  <option value="classKWidgetAction.html">kwidgetaction</option>,  <option value="classKWindowInfo.html">kwindowinfo</option>,  <option value="classKWizard.html">kwizard</option>,  <option value="classKWordWrap.html">kwordwrap</option>,  <option value="classKWritePermsIcon.html">kwritepermsicon</option>,  <option value="classKXMLGUIBuilder.html">kxmlguibuilder</option>,  <option value="classKXMLGUIClient.html">kxmlguiclient</option>,  <option value="classKXMLGUIFactory.html">kxmlguifactory</option>,  <option value="classKXYSelector.html">kxyselector</option>,
</select>
</form>
</div>
-->
</div></div>
<div class="menu_box"><h2>API Dox</h2>
<div class="nav_list">
<ul>
<li><a href="../../arts/html/index.html">arts</a></li><li><a href="../../dcop/html/index.html">dcop</a></li><li><a href="../../dnssd/html/index.html">dnssd</a></li><li><a href="../../interfaces/html/index.html">interfaces</a></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../interfaces/kimproxy/interface/html/index.html">interface</a></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../interfaces/kimproxy/library/html/index.html">library</a></li><li>&nbsp;&nbsp;<a href="../../interfaces/kspeech/html/index.html">kspeech</a></li><li>&nbsp;&nbsp;<a href="../../interfaces/ktexteditor/html/index.html">ktexteditor</a></li><li><a href="../../kabc/html/index.html">kabc</a></li><li><a href="../../kate/html/index.html">kate</a></li><li><a href="../../kcmshell/html/index.html">kcmshell</a></li><li><a href="../../kdecore/html/index.html">kdecore</a></li><li><a href="../../kded/html/index.html">kded</a></li><li><a href="../../kdefx/html/index.html">kdefx</a></li><li><a href="../../kdeprint/html/index.html">kdeprint</a></li><li><a href="../../kdesu/html/index.html">kdesu</a></li><li><a href="../../kdeui/html/index.html">kdeui</a></li><li><a href="../../kdoctools/html/index.html">kdoctools</a></li><li><a href="../../khtml/html/index.html">khtml</a></li><li><a href="../../kimgio/html/index.html">kimgio</a></li><li><a href="../../kinit/html/index.html">kinit</a></li><li><a href="../../kio/html/index.html">kio</a></li><li>&nbsp;&nbsp;<a href="../../kio/bookmarks/html/index.html">bookmarks</a></li><li>&nbsp;&nbsp;<a href="../../kio/httpfilter/html/index.html">httpfilter</a></li><li>&nbsp;&nbsp;<a href="../../kio/kfile/html/index.html">kfile</a></li><li>&nbsp;&nbsp;<a href="../../kio/kio/html/index.html">kio</a></li><li>&nbsp;&nbsp;<a href="../../kio/kioexec/html/index.html">kioexec</a></li><li>&nbsp;&nbsp;<a href="../../kio/kpasswdserver/html/index.html">kpasswdserver</a></li><li>&nbsp;&nbsp;<a href="../../kio/kssl/html/index.html">kssl</a></li><li><a href="../../kioslave/html/index.html">kioslave</a></li><li>&nbsp;&nbsp;<a href="../../kioslave/http/html/index.html">http</a></li><li><a href="../../kjs/html/index.html">kjs</a></li><li><a href="../../kmdi/html/index.html">kmdi</a></li><li>&nbsp;&nbsp;<a href="../../kmdi/kmdi/html/index.html">kmdi</a></li><li><a href="../../knewstuff/html/index.html">knewstuff</a></li><li><a href="../../kparts/html/index.html">kparts</a></li><li><a href="../../kresources/html/index.html">kresources</a></li><li><a href="../../kspell2/html/index.html">kspell2</a></li><li><a href="../../kunittest/html/index.html">kunittest</a></li><li><a href="../../kutils/html/index.html">kutils</a></li><li><a href="../../kwallet/html/index.html">kwallet</a></li><li><a href="../../libkmid/html/index.html">libkmid</a></li><li><a href="../../libkscreensaver/html/index.html">libkscreensaver</a></li>
</ul></div></div>


        </td>
</tr>
</table>

<span class="doNotDisplay">
  <a href="http://www.kde.org/" accesskey="8">KDE Home</a> |
  <a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> |
  <a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a>
</span>


<div style="height: 8px"></div>

<div id="footer">
  <div id="footer_left">
    Maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;groo&#116;&#64;kde&#46;or&#x67;">Adriaan de Groot</a>
and
<a href="&#109;a&#105;&#108;&#116;&#111;&#58;w&#105;nter&#64;kde&#46;or&#x67">Allen Winter</a>.
<br/>
    KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
    <a href="http://www.kde.org/contact/impressum.php">Legal</a>
  </div>
  <div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div>
</div>

<!--
WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL
BE BLOCKED INSTANTLY AND PERMANENTLY!
<a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a>
WARNING END
-->

</body>
</html>