.TH "KDockManager" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KDockManager \- The manager that knows all dockwidgets and handles the dock process (and member of the dockwidget class set).  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kdockwidget.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBEnReadDockConfigMode\fP { \fBUnknown\fP, \fBWrapExistingWidgetsOnly\fP, \fBRestoreAllDockwidgets\fP }"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBchange\fP ()"
.br
.ti -1c
.RI "void \fBreplaceDock\fP (\fBKDockWidget\fP *oldDock, \fBKDockWidget\fP *newDock)"
.br
.ti -1c
.RI "void \fBsetDockDefaultPos\fP (\fBKDockWidget\fP *)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKDockManager\fP (\fBQWidget\fP *mainWindow, const char *\fBname\fP=0L)"
.br
.ti -1c
.RI "virtual \fB~KDockManager\fP ()"
.br
.ti -1c
.RI "void \fBdumpDockWidgets\fP ()"
.br
.ti -1c
.RI "void \fBwriteConfig\fP (\fBKConfig\fP *c=0L, \fBQString\fP group=QString::null)"
.br
.ti -1c
.RI "void \fBreadConfig\fP (\fBKConfig\fP *c=0L, \fBQString\fP group=QString::null)"
.br
.ti -1c
.RI "void \fBsetMainDockWidget2\fP (\fBKDockWidget\fP *)"
.br
.ti -1c
.RI "void \fBwriteConfig\fP (\fBQDomElement\fP &base)"
.br
.ti -1c
.RI "void \fBreadConfig\fP (\fBQDomElement\fP &base)"
.br
.ti -1c
.RI "void \fBactivate\fP ()"
.br
.ti -1c
.RI "virtual bool \fBeventFilter\fP (\fBQObject\fP *object, \fBQEvent\fP *\fBevent\fP)"
.br
.ti -1c
.RI "\fBKDockWidget\fP * \fBfindWidgetParentDock\fP (\fBQWidget\fP *w) const "
.br
.ti -1c
.RI "void \fBmakeWidgetDockVisible\fP (\fBQWidget\fP *w)"
.br
.ti -1c
.RI "\fBQPopupMenu\fP * \fBdockHideShowMenu\fP () const "
.br
.ti -1c
.RI "\fBKDockWidget\fP * \fBgetDockWidgetFromName\fP (const \fBQString\fP &dockName)"
.br
.ti -1c
.RI "void \fBsetSplitterOpaqueResize\fP (bool b=true)"
.br
.ti -1c
.RI "bool \fBsplitterOpaqueResize\fP () const "
.br
.ti -1c
.RI "void \fBsetSplitterKeepSize\fP (bool b=true)"
.br
.ti -1c
.RI "bool \fBsplitterKeepSize\fP () const "
.br
.ti -1c
.RI "void \fBsetSplitterHighResolution\fP (bool b=true)"
.br
.ti -1c
.RI "bool \fBsplitterHighResolution\fP () const "
.br
.ti -1c
.RI "void \fBsetSpecialLeftDockContainer\fP (\fBKDockWidget\fP *container)"
.br
.ti -1c
.RI "void \fBsetSpecialTopDockContainer\fP (\fBKDockWidget\fP *container)"
.br
.ti -1c
.RI "void \fBsetSpecialRightDockContainer\fP (\fBKDockWidget\fP *container)"
.br
.ti -1c
.RI "void \fBsetSpecialBottomDockContainer\fP (\fBKDockWidget\fP *container)"
.br
.ti -1c
.RI "void \fBremoveFromAutoCreateList\fP (\fBKDockWidget\fP *pDockWidget)"
.br
.ti -1c
.RI "void \fBfinishReadDockConfig\fP ()"
.br
.ti -1c
.RI "void \fBsetReadDockConfigMode\fP (int mode)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKDockWidget\fP"
.br
.ti -1c
.RI "class \fBKDockMainWindow\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
The manager that knows all dockwidgets and handles the dock process (and member of the dockwidget class set). 

More or less a helper class for the \fBKDockWidget\fP class set but of interest for some functionality that can be called within a \fBKDockMainWindow\fP or a \fBKDockWidget\fP .
.PP
An important feature is the ability to read or save the current state of all things concerning to dockwidgets to \fBKConfig\fP .
.PP
The dockmanager is also often used when a certain dockwidget or a child of such dockwidget must be found.
.PP
\fBAuthor:\fP
.RS 4
Max Judin (documentation: Falk Brettschneider). 
.RE
.PP

.PP
Definition at line 904 of file kdockwidget.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KDockManager::KDockManager (\fBQWidget\fP * mainWindow, const char * name = \fC0L\fP)"
.PP
Constructs a dockmanager. 
.PP
Some initialization happen: 
.PD 0

.IP "\(bu" 2
It installs an event filter for the main window, 
.IP "\(bu" 2
a control list for dock objects 
.IP "\(bu" 2
a control list for menu items concerning to menus provided by the dockmanager 
.IP "\(bu" 2
Some state variables are set
.PP
\fBParameters:\fP
.RS 4
\fImainWindow\fP the main window controlled by this 
.br
\fIname\fP the internal QOject name 
.RE
.PP

.PP
Definition at line 1601 of file kdockwidget.cpp.
.PP
References QObject::connect(), KGlobalSettings::opaqueResize(), and QPtrList::setAutoDelete().
.SS "KDockManager::~\fBKDockManager\fP ()\fC [virtual]\fP"
.PP
Destructs a dockmanager. 
.PP
Definition at line 1656 of file kdockwidget.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KDockManager::writeConfig (\fBKConfig\fP * c = \fC0L\fP, \fBQString\fP group = \fCQString::null\fP)"
.PP
Saves the current state of the dockmanager and of all controlled widgets. 
.PP
State means here to save the geometry, visibility, parents, internal object names, orientation, separator positions, dockwidget-group information, tab widget states (if it is a tab group) and last but not least some necessary things for recovering the dockmainwindow state.
.PP
\fBParameters:\fP
.RS 4
\fIc\fP the \fBKDE\fP configuration saver 
.br
\fIgroup\fP the name of the section in \fBKConfig\fP 
.RE
.PP

.PP
Definition at line 2513 of file kdockwidget.cpp.
.PP
References QMainWindow::centralWidget(), KGlobal::config(), KDockWidget::d, KDockWidget::firstName, KDockWidget::formerBrotherDockWidget, KDockWidget::formerDockPos, QWidget::frameGeometry(), getDockWidgetFromName(), KDockMainWindow::getMainDockWidget(), KDockWidget::header, KDockWidgetPrivate::isContainer, QString::isEmpty(), KDockWidget::isGroup, KDockWidget::isTabGroup, QWidget::isVisible(), KDockWidget::lastName, QString::latin1(), KDockWidgetAbstractHeader::saveConfig(), QWidget::size(), KDockWidget::splitterOrientation, KDockWidget::tabPageLabel(), KDockWidget::toolTipString(), and KDockWidget::widget.
.PP
Referenced by KDockMainWindow::writeDockConfig().
.SS "void KDockManager::readConfig (\fBKConfig\fP * c = \fC0L\fP, \fBQString\fP group = \fCQString::null\fP)"
.PP
Like writeConfig but reads the whole stuff in. 
.PP
In order to restore a window configuration from a config file, it looks up widgets by name (\fBQObject::name\fP) in the childDock variable of KDockManager. This list in turn contains all KDockWidgets (according to the \fBKDockWidget\fP constructor). So in principle, in order to restore a window layout, one must first construct all widgets, put each of them in a \fBKDockWidget\fP and then call \fBreadConfig()\fP. And for all that to work, each widget must have a unique name.
.PP
\fBParameters:\fP
.RS 4
\fIc\fP the \fBKDE\fP configuration saver 
.br
\fIgroup\fP the name of the section in \fBKConfig\fP 
.RE
.PP

.PP
Definition at line 2655 of file kdockwidget.cpp.
.PP
References activate(), KDockWidget::applyToWidget(), KGlobal::config(), KDockWidget::d, KDockWidget::formerDockPos, getDockWidgetFromName(), KDockWidget::header, QWidget::hide(), KDockWidgetPrivate::isContainer, QString::isEmpty(), KDockWidget::isGroup, KDockWidget::isTabGroup, QWidget::isVisible(), QString::latin1(), KDockWidgetAbstractHeader::loadConfig(), KDockWidget::manualDock(), QWidget::move(), QTabWidget::page(), QWidget::resize(), KDockWidget::setFormerBrotherDockWidget(), QWidget::setGeometry(), KDockMainWindow::setMainDockWidget(), KDockWidget::setTabPageLabel(), KDockWidget::setToolTipString(), KDockMainWindow::setView(), QWidget::show(), KDockWidget::show(), QTabWidget::showPage(), QRect::size(), QRect::topLeft(), KDockWidget::undock(), and KDockWidget::widget.
.PP
Referenced by KDockMainWindow::readDockConfig().
.SS "void KDockManager::setMainDockWidget2 (\fBKDockWidget\fP *)"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 1651 of file kdockwidget.cpp.
.PP
Referenced by KDockMainWindow::setMainDockWidget().
.SS "void KDockManager::writeConfig (\fBQDomElement\fP & base)"
.PP
Saves the current dock window layout into a DOM tree below the given element. 
.PP
Definition at line 2183 of file kdockwidget.cpp.
.PP
References QMainWindow::centralWidget(), QDomDocument::createElement(), KDockWidget::d, KDockWidgetHeader::dragEnabled(), KDockWidget::firstName, KDockWidget::formerBrotherDockWidget, KDockWidget::formerDockPos, QWidget::frameGeometry(), QString::fromLatin1(), getDockWidgetFromName(), KDockMainWindow::getMainDockWidget(), KDockWidget::header, KDockWidgetPrivate::isContainer, KDockWidget::isGroup, KDockWidget::isTabGroup, QWidget::isVisible(), KDockWidget::lastName, QString::latin1(), QWidget::size(), KDockWidget::splitterOrientation, KDockWidget::tabPageLabel(), KDockWidget::toolTipString(), and KDockWidget::widget.
.SS "void KDockManager::readConfig (\fBQDomElement\fP & base)"
.PP
Reads the current dock window layout from a DOM tree below the given element. 
.PP
Definition at line 2295 of file kdockwidget.cpp.
.PP
References activate(), KDockWidget::applyToWidget(), KDockWidget::d, endl(), QDomNode::firstChild(), KDockWidget::formerDockPos, getDockWidgetFromName(), KDockWidget::getWidget(), KDockWidget::header, QWidget::hide(), KDockWidgetPrivate::isContainer, QString::isEmpty(), KDockWidget::isGroup, QDomNode::isNull(), KDockWidget::isTabGroup, QWidget::isVisible(), kdDebug(), QString::latin1(), KDockWidget::manualDock(), QWidget::move(), QDomNode::nextSibling(), QTabWidget::page(), QWidget::resize(), QMainWindow::setCentralWidget(), KDockWidgetHeader::setDragEnabled(), KDockWidget::setFormerBrotherDockWidget(), QWidget::setGeometry(), KDockMainWindow::setMainDockWidget(), KDockWidget::setTabPageLabel(), KDockWidget::setToolTipString(), QWidget::show(), KDockWidget::show(), QTabWidget::showPage(), QRect::size(), QDomElement::tagName(), QDomNode::toElement(), QRect::topLeft(), KDockWidget::undock(), KDockWidget::updateHeader(), and KDockWidget::widget.
.SS "void KDockManager::activate ()"
.PP
Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are parent of a dockwidget tab group. 
.PP
Definition at line 1672 of file kdockwidget.cpp.
.PP
References KDockWidget::parentDockTabGroup(), KDockWidget::show(), QWidget::show(), and KDockWidget::widget.
.PP
Referenced by readConfig().
.SS "bool KDockManager::eventFilter (\fBQObject\fP * object, \fBQEvent\fP * event)\fC [virtual]\fP"
.PP
It's more or less a method that catches several events which are interesting for the dockmanager. 
.PP
Mainly mouse events during the drag process of a dockwidgets are of interest here.
.PP
\fBParameters:\fP
.RS 4
\fIobject\fP the object that sends the event 
.br
\fIevent\fP the event 
.RE
.PP
\fBReturns:\fP
.RS 4
the return value of the method call of the base class method 
.RE
.PP

.PP
Reimplemented from \fBQObject\fP.
.PP
Definition at line 1687 of file kdockwidget.cpp.
.PP
References KDockWidget::currentDockPos, KDockWidget::dockBack(), KDockWidget::eDocking, QObject::eventFilter(), QWidget::geometry(), QWidget::mapFromGlobal(), QWidget::mapToGlobal(), QWidget::move(), QCursor::pos(), QWidget::setFocus(), and KDockWidget::toDesktop().
.SS "\fBKDockWidget\fP * KDockManager::findWidgetParentDock (\fBQWidget\fP * w) const"
.PP
This method finds out what a widgets' dockwidget is. 
.PP
That means the dockmanager has a look at all dockwidgets it knows and tells you when one of those dockwidgets covers the given widget.
.PP
\fBParameters:\fP
.RS 4
\fIw\fP any widget that is supposed to be encapsulated by one of the controlled dockwidgets 
.RE
.PP
\fBReturns:\fP
.RS 4
the dockwidget that encapsulates that widget, otherwise 0 
.RE
.PP

.PP
Definition at line 2934 of file kdockwidget.cpp.
.PP
References KDockWidget::widget.
.PP
Referenced by KDockMainWindow::makeWidgetDockVisible().
.SS "void KDockManager::makeWidgetDockVisible (\fBQWidget\fP * w)\fC [inline]\fP"
.PP
Works like makeDockVisible() but can be called for widgets that covered by a dockwidget. 
.PP
\fBParameters:\fP
.RS 4
\fIw\fP the widget that is encapsulated by a dockwidget that turns to visible. 
.RE
.PP

.PP
Definition at line 1010 of file kdockwidget.h.
.PP
References KDockWidget::makeDockVisible().
.SS "\fBQPopupMenu\fP* KDockManager::dockHideShowMenu () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the popupmenu for showing/hiding dockwidgets 
.RE
.PP

.PP
Definition at line 1015 of file kdockwidget.h.
.SS "\fBKDockWidget\fP * KDockManager::getDockWidgetFromName (const \fBQString\fP & dockName)"
.PP
\fBParameters:\fP
.RS 4
\fIdockName\fP an internal \fBQObject\fP name 
.RE
.PP
\fBReturns:\fP
.RS 4
the dockwidget that has got that internal \fBQObject\fP name 
.RE
.PP

.PP
Definition at line 2857 of file kdockwidget.cpp.
.PP
References endl(), and kdDebug().
.PP
Referenced by readConfig(), and writeConfig().
.SS "void KDockManager::setSplitterOpaqueResize (bool b = \fCtrue\fP)"
.PP
Enables opaque resizing. 
.PP
Opaque resizing defaults to \fBKGlobalSettings::opaqueResize()\fP. Call this method before you create any dock widgets! 
.PP
Definition at line 2874 of file kdockwidget.cpp.
.SS "bool KDockManager::splitterOpaqueResize () const"
.PP
Returns true if opaque resizing is enabled, false otherwise. 
.PP
Definition at line 2879 of file kdockwidget.cpp.
.PP
Referenced by KDockWidget::manualDock().
.SS "void KDockManager::setSplitterKeepSize (bool b = \fCtrue\fP)"
.PP
Try to preserve the widget's size. 
.PP
Works like KeepSize resize mode of \fBQSplitter\fP. Off by default. Call this method before you create any dock widgets! 
.PP
Definition at line 2884 of file kdockwidget.cpp.
.SS "bool KDockManager::splitterKeepSize () const"
.PP
Returns true if the KeepSize is enabled, false otherwise. 
.PP
Definition at line 2889 of file kdockwidget.cpp.
.PP
Referenced by KDockWidget::manualDock().
.SS "void KDockManager::setSplitterHighResolution (bool b = \fCtrue\fP)"
.PP
Operate the splitter with a higher resolution. 
.PP
Off by default. Call this method before you create any dock widgets! If high resolution is used all splitter position parameters are percent*100 instead of percent. 
.PP
Definition at line 2894 of file kdockwidget.cpp.
.SS "bool KDockManager::splitterHighResolution () const"
.PP
Returns true if the splitter uses the high resolution, false otherwise. 
.PP
Definition at line 2899 of file kdockwidget.cpp.
.PP
Referenced by KDockWidget::manualDock().
.SS "void KDockManager::setSpecialLeftDockContainer (\fBKDockWidget\fP * container)"
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 3007 of file kdockwidget.cpp.
.SS "void KDockManager::change ()\fC [signal]\fP"
.PP
Signals changes of the docking state of a dockwidget. 
.PP
Usually the dock-toolbar will be updated then. 
.PP
Referenced by KDockWidget::event(), KDockWidget::manualDock(), and KDockWidget::undock().
.SS "void KDockManager::replaceDock (\fBKDockWidget\fP * oldDock, \fBKDockWidget\fP * newDock)\fC [signal]\fP"
.PP
Signals a dockwidget is replaced with another one. 
.PP
Referenced by KDockWidget::manualDock(), and KDockWidget::undock().
.SS "void KDockManager::setDockDefaultPos (\fBKDockWidget\fP *)\fC [signal]\fP"
.PP
Signals a dockwidget without parent (toplevel) is shown. 
.PP
Referenced by KDockWidget::show().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
