# kdeui Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KDockWidget Class Reference

Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and member of the dockwidget class set). More...

`#include <kdockwidget.h>`

Inheritance diagram for KDockWidget:

[legend]
Collaboration diagram for KDockWidget:

[legend]
List of all members.

## Public Types

enum | DockPosition { DockNone = 0, DockTop = 0x0001, DockLeft = 0x0002, DockRight = 0x0004, DockBottom = 0x0008, DockCenter = 0x0010, DockDesktop = 0x0020, DockToSpecialSites = 0x0040, DockCorner = DockTop | DockLeft | DockRight | DockBottom, DockFullSite = DockCorner | DockCenter, DockFullDocking = DockFullSite | DockDesktop }
| The possible positions where a dockwidget can dock to another dockwidget. More...

## Public Slots

void | setForcedFixedWidth (int)
| subject to changes.
void | setForcedFixedHeight (int)
| subject to changes.
void | restoreFromForcedFixedSize ()

Since:
  3.1

int | forcedFixedWidth ()

Since:
  3.1

int | forcedFixedHeight ()

Since:
  3.1

void | dockBack ()
| Docks a dockwidget back to the dockwidget that was the neighbor widget before the current dock position.
void | changeHideShowState ()
| Toggles the visibility state of the dockwidget if it is able to be shown or to be hidden.
void | undock ()
| Undocks this.
void | toDesktop ()

Docks the widget to the desktop (as a toplevel widget)

Since:
  3.1.

## Signals

void | docking (KDockWidget *dw, KDockWidget::DockPosition dp)
| Emitted when another dock widget is docking to this.
void | setDockDefaultPos ()
| Signals that the dock default position is set.
void | headerCloseButtonClicked ()
| Emitted when the close button of the panel (KDockWidgetHeader) has been clicked.
void | headerDockbackButtonClicked ()
| Emitted when the dockback button of the panel (KDockWidgetHeader) has been clicked.
void | iMBeingClosed ()
| Emitted when the widget processes a close event.
void | hasUndocked ()
| Emitted when the widget has undocked.

## Public Member Functions

| KDockWidget (KDockManager *dockManager, const char *name, const QPixmap &pixmap, QWidget *parent=0L, const QString &strCaption=QString::null, const QString &strTabPageLabel=QString::fromLatin1(""), WFlags f=0)
| Construct a dockwidget.
virtual | ~KDockWidget ()
| Destructs a dockwidget.
KDockWidget * | manualDock (KDockWidget *target, DockPosition dockPos, int spliPos=50, QPoint pos=QPoint(0, 0), bool check=false, int tabIndex=-1)
| This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right position within its KDockMainWindow or a toplevel dockwidget.
void | setEnableDocking (int pos)
| Specify where it is either possible or impossible for this to dock to another dockwidget.
int | enableDocking () const
void | setDockSite (int pos)
| Specify where it is either possible or impossible for another dockwidget to dock to this.
int | dockSite () const
void | setWidget (QWidget *w)
| Sets the embedded widget.
QWidget * | getWidget () const
| Get the embedded widget.
void | setHeader (KDockWidgetAbstractHeader *ah)
| Sets the header of this dockwidget.
void | makeDockVisible ()
| Normally it simply shows the dockwidget.
bool | mayBeHide () const
bool | mayBeShow () const
KDockManager * | dockManager () const
void | setToolTipString (const QString &ttStr)
| Stores a string for a tooltip.
const QString & | toolTipString () const
bool | isDockBackPossible () const
void | setTabPageLabel (const QString &label)
| Sets a string that is used for the label of the tab page when in tab page mode.
const QString & | tabPageLabel () const
virtual bool | event (QEvent *)
| Catches and processes some QWidget events that are interesting for dockwidgets.
virtual void | show ()
| Add dockwidget management actions to QWidget::show.
KDockTabGroup * | parentDockTabGroup () const
QWidget * | parentDockContainer () const

Since:
  3.1

void | setDockWindowType (NET::WindowType windowType)
| Sets the type of the dock window.
void | setDockWindowTransient (QWidget *parent, bool transientEnabled)
| Sets the type of the dock window.
KDockWidget * | findNearestDockWidget (DockPosition pos)
| Lookup the nearest dockwidget docked left/right/top/bottom to this one or return 0.

## Protected Slots

void | loseFormerBrotherDockWidget ()
| Does several things here when it has noticed that the former brother widget (closest neighbor) gets lost.
virtual void | paintEvent (QPaintEvent *)
virtual void | mousePressEvent (QMouseEvent *)
virtual void | mouseReleaseEvent (QMouseEvent *)
virtual void | mouseMoveEvent (QMouseEvent *)
virtual void | leaveEvent (QEvent *)

## Protected Member Functions

void | updateHeader ()
| Checks some conditions and shows or hides the dockwidget header (drag panel).
void | setLatestKDockContainer (QWidget *)

Since:
  3.1

QWidget * | latestKDockContainer ()

Since:
  3.1

virtual void | virtual_hook (int id, void *data)

## Protected Attributes

KDockWidget * | formerBrotherDockWidget
| earlier closest neighbor widget, so it's possible to dock back to it.
DockPosition | currentDockPos
| the current dock position.
DockPosition | formerDockPos
| the former dock position when it really was at another position before.
QString | toolTipStr
| a string used as tooltip for the tab page header when in dock-centered mode.
QString | tabPageTitle
| a string used as title of the tab page when in tab page mode

## Friends

class | KDockSplitter
class | KDockMainWindow
class | KDockArea

## Detailed Description

Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and member of the dockwidget class set).

You just grip the double-lined panel, tear it off its parent widget, drag it somewhere and let it loose. Depending on the position where you leave it, the dockwidget becomes a toplevel window on the desktop (floating mode) or docks to a new widget (dock mode). Note: A KDockWidget can only be docked to a KDockWidget.

If you want to use this kind of widget, your main application window has to be a KDockMainWindow. That is because it has got several additional dock management features, for instance a KDockManager that has an overview over all dockwidgets and and a dockmovemanager (internal class) that handles the dock process.

Usually you create an KDockWidget that covers the actual widget in this way:

     ...
     KDockMainWindow* mainWidget;
     ...
     KDockWidget* dock = 0L;
     dock = mainWidget->createDockWidget( "Any window caption", nicePixmap, 0L, i18n("window caption")); // 0L==no parent
     QWidget* actualWidget = new QWidget( dock);
     dock->setWidget( actualWidget); // embed it
     dock->setToolTipString(i18n("That's me")); // available when appearing as tab page
     ...

See KDockMainWindow how a dockwidget is docked in.

Author:
  Max Judin (documentation: Falk Brettschneider).

Definition at line 392 of file kdockwidget.h.

## Member Enumeration Documentation

enum KDockWidget::DockPosition

The possible positions where a dockwidget can dock to another dockwidget.

Enumeration values:

  DockToSpecialSites

  Since:
    3.1

Definition at line 427 of file kdockwidget.h.

Referenced by manualDock().

## Constructor & Destructor Documentation

KDockWidget::KDockWidget | ( | KDockManager * | dockManager,
|  | const char * | name,
|  | const QPixmap & | pixmap,
|  | QWidget * | parent = 0L,
|  | const QString & | strCaption = QString::null,
|  | const QString & | strTabPageLabel = QString::fromLatin1(""),
|  | WFlags | f = 0
| ) |

Construct a dockwidget.

Initially, docking to another and docking to this is allowed for every `DockPosition`. It is supposed to be no (tab) group. It will taken under control of its dockmanager.

Parameters:

  dockManager | The responsible manager (dock helper)
  name | Object instance name
  pixmap | An icon (for instance shown when docked centered)
  parent | Parent widget
  strCaption | Title of the dockwidget window (shown when toplevel)
  strTabPageLabel | The title of the tab page (shown when in tab page mode), if it is "", only the icon will be shown, if it is 0L, the label is set to strCaption

Definition at line 383 of file kdockwidget.cpp.

References QObject::connect(), QObject::installEventFilter(), QObject::name(), and QObject::parent().

Referenced by manualDock().

KDockWidget::~KDockWidget | ( |  | ) | `[virtual]`

| Destructs a dockwidget. Definition at line 433 of file kdockwidget.cpp. References KDockWidgetPrivate::blockHasUndockedSignal, KDockManager::childDock, KDockManager::d, iMBeingClosed(), latestKDockContainer(), KDockWidgetPrivate::pendingDtor, undock(), and KDockManager::undockProcess.

## Member Function Documentation

KDockWidget * KDockWidget::manualDock | ( | KDockWidget * | target,
|  | DockPosition | dockPos,
|  | int | spliPos = 50,
|  | QPoint | pos = QPoint(0, 0),
|  | bool | check = false,
|  | int | tabIndex = -1
| ) |

This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right position within its KDockMainWindow or a toplevel dockwidget.

If the target is null, it will become a toplevel dockwidget at position pos; Note: Docking to another dockwidget means exactly: A new parent dockwidget will be created, that replaces the target dockwidget and contains another single helper widget (tab widget or panner) which contains both dockwidgets, this and the target dockwidget. So consider parent<->child relationships change completely during such actions.

Parameters:

  target | The dockwidget to dock to
  dockPos | One of the DockPositions this is going to dock to
  spliPos | The split relation (in percent, or percent*100 in high resolution) between both dockwidgets, target and this
  pos | The dock position, mainly of interest for docking to the desktop (as toplevel dockwidget)
  check | Only for internal use;
  tabIndex | The position index of the tab widget (when in tab page mode), -1 (default) means append

Returns:
  result The group dockwidget that replaces the target dockwidget and will be grandparent of target and `this`.

Definition at line 812 of file kdockwidget.cpp.

References KDockSplitter::activate(), applyToWidget(), KDockWidgetPrivate::blockHasUndockedSignal, KDockManager::change(), QObject::connect(), currentDockPos, KDockSplitter::deactivate(), docking(), DockPosition, eDocking, formerBrotherDockWidget, formerDockPos, QWidget::frameGeometry(), QWidget::geometry(), KDockSplitter::getFirst(), QWidget::icon(), iMBeingClosed(), QTabWidget::insertTab(), QString::isEmpty(), isGroup, isTabGroup, KDockWidget(), latestKDockContainer(), loseFormerBrotherDockWidget(), QWidget::move(), parentDockContainer(), parentDockTabGroup(), QWidget::parentWidget(), KDockManager::replaceDock(), QWidget::resize(), sDocking, QWidget::setFocusPolicy(), KDockSplitter::setKeepSize(), setLatestKDockContainer(), KDockSplitter::setOpaqueResize(), QTabWidget::setTabToolTip(), setWidget(), QWidget::show(), show(), KDockManager::splitterHighResolution(), KDockManager::splitterKeepSize(), KDockManager::splitterOpaqueResize(), tabPageLabel(), toolTipStr, toolTipString(), undock(), and widget.

Referenced by dockBack(), KDockManager::readConfig(), and toDesktop().

void KDockWidget::setEnableDocking | ( | int | pos | ) |

Specify where it is either possible or impossible for this to dock to another dockwidget.

Parameters:

  pos | An OR'ed set of `DockPositions`

Definition at line 635 of file kdockwidget.cpp.

References updateHeader().

int KDockWidget::enableDocking | ( |  | ) | const`[inline]`

Returns:
  Where it is either possible or impossible for this to dock to another dockwidget (an OR'ed set of DockPositions).

Definition at line 473 of file kdockwidget.h.

void KDockWidget::setDockSite | ( | int | pos | ) | `[inline]`

Specify where it is either possible or impossible for another dockwidget to dock to this.

Parameters:

  pos | An OR'ed set of `DockPositions`

Definition at line 480 of file kdockwidget.h.

int KDockWidget::dockSite | ( |  | ) | const`[inline]`

Returns:
  There it is either possible or impossible for another dockwidget to dock to this (an OR'ed set of `DockPositions`).

Definition at line 485 of file kdockwidget.h.

void KDockWidget::setWidget | ( | QWidget * | w | ) |

Sets the embedded widget.

A QLayout takes care about proper resizing, automatically.

Parameters:

  w | The pointer to the dockwidget's child widget.

Definition at line 1250 of file kdockwidget.cpp.

References KDockManager::d, KDockWidgetPrivate::isContainer, QWidget::ownCursor(), QWidget::reparent(), QWidget::setCursor(), and updateHeader().

Referenced by manualDock(), and setHeader().

QWidget* KDockWidget::getWidget | ( |  | ) | const`[inline]`

Get the embedded widget.

Returns:
  The pointer to the dockwidget's child widget, 0L if there's no such child.

Definition at line 501 of file kdockwidget.h.

Referenced by findNearestDockWidget().

void KDockWidget::setHeader | ( | KDockWidgetAbstractHeader * | ah | ) |

Sets the header of this dockwidget.

A QLayout takes care about proper resizing, automatically. The header contains the drag panel, the close button and the stay button.

Parameters:

  ah | A base class pointer to the dockwidget header

Definition at line 617 of file kdockwidget.cpp.

References setWidget().

void KDockWidget::makeDockVisible | ( |  | ) |

Normally it simply shows the dockwidget.

But additionally, if it is docked to a tab widget (`DockCenter`), it is set as the active (visible) tab page.

Definition at line 1334 of file kdockwidget.cpp.

References dockBack(), QWidget::isVisible(), parentDockTabGroup(), QWidget::parentWidget(), show(), QWidget::show(), and QTabWidget::showPage().

Referenced by changeHideShowState(), dockBack(), KDockMainWindow::makeDockVisible(), KDockManager::makeWidgetDockVisible(), and show().

bool KDockWidget::mayBeHide | ( |  | ) | const

Returns:
  If it may be possible to hide this.

There are reasons that it's impossible:

- It is a (tab) group.
- It is already invisible ;-)
- The parent of this is the KDockMainWindow.
- It isn't able to dock to another widget.

Definition at line 1306 of file kdockwidget.cpp.

References QWidget::isVisible(), and KDockManager::main.

Referenced by changeHideShowState().

bool KDockWidget::mayBeShow | ( |  | ) | const

Returns:
  If it may be possible to show this. There are reasons that it's impossible:
  - It is a (tab) group.
  - It is already visible ;-)
  - The parent of this is the `KDockMainWindow`.

Definition at line 1312 of file kdockwidget.cpp.

References QWidget::isVisible(), and KDockManager::main.

Referenced by changeHideShowState().

KDockManager* KDockWidget::dockManager | ( |  | ) | const`[inline]`

Returns:
  The dockmanager that is responsible for this.

Definition at line 543 of file kdockwidget.h.

void KDockWidget::setToolTipString | ( | const QString & | ttStr | ) | `[inline]`

Stores a string for a tooltip.

That tooltip string has only a meaning when this dockwidget is shown as tab page. In this case the tooltip is shown when one holds the mouse cursor on the tab page header. Such tooltip will for instance be useful, if you use only icons there. Note: Setting an empty string switches the tooltip off.

Parameters:

  ttStr | A string for the tooltip on the tab.

Definition at line 555 of file kdockwidget.h.

const QString& KDockWidget::toolTipString | ( |  | ) | const`[inline]`

Returns:
  The tooltip string being shown on the appropriate tab page header when in dock-centered mode.

Definition at line 560 of file kdockwidget.h.

Referenced by manualDock().

bool KDockWidget::isDockBackPossible | ( |  | ) | const

Returns:
  result `true`, if a dockback is possible, otherwise `false`.

Definition at line 1393 of file kdockwidget.cpp.

Referenced by KDockWidgetHeader::setTopLevel().

void KDockWidget::setTabPageLabel | ( | const QString & | label | ) | `[inline]`

Sets a string that is used for the label of the tab page when in tab page mode.

Parameters:

  label | The new tab page label.

Definition at line 571 of file kdockwidget.h.

References KStdAccel::label().

const QString& KDockWidget::tabPageLabel | ( |  | ) | const`[inline]`

Returns:
  A string that is used for the label of the tab page when in tab page mode.

Definition at line 576 of file kdockwidget.h.

Referenced by event(), and manualDock().

bool KDockWidget::event | ( | QEvent * |  | ) | `[virtual]`

| Catches and processes some QWidget events that are interesting for dockwidgets. Reimplemented from QWidget. Definition at line 742 of file kdockwidget.cpp. References KDockManager::change(), QWidget::event(), KNotifyClient::event(), iMBeingClosed(), parentDockTabGroup(), QWidget::parentWidget(), KDockWidgetPrivate::pendingFocusInEvent, QTabWidget::setTabLabel(), and tabPageLabel().

void KDockWidget::show | ( |  | ) | `[virtual]`

| Add dockwidget management actions to QWidget::show. Reimplemented from QWidget. Definition at line 709 of file kdockwidget.cpp. References QWidget::isVisible(), KDockManager::main, makeDockVisible(), setDockDefaultPos(), KDockManager::setDockDefaultPos(), and QWidget::show(). Referenced by KDockManager::activate(), makeDockVisible(), manualDock(), KDockManager::readConfig(), and undock().

KDockTabGroup * KDockWidget::parentDockTabGroup | ( |  | ) | const

Returns:
  the parent widget of this if it inherits class KDockTabGroup

Definition at line 1030 of file kdockwidget.cpp.

References QWidget::parentWidget().

Referenced by KDockManager::activate(), event(), makeDockVisible(), manualDock(), and undock().

QWidget * KDockWidget::parentDockContainer | ( |  | ) | const

Since:
  3.1

Definition at line 1038 of file kdockwidget.cpp.

References QWidget::parentWidget().

Referenced by manualDock().

void KDockWidget::setDockWindowType | ( | NET::WindowType | windowType | ) |

Sets the type of the dock window.

Parameters:

  windowType | is type of dock window

Definition at line 727 of file kdockwidget.cpp.

References QWidget::parentWidget(), and KDockWidgetPrivate::windowType.

void KDockWidget::setDockWindowTransient | ( | QWidget * | parent,
|  | bool | transientEnabled
| ) |

Sets the type of the dock window.

Parameters:

  windowType | is type of dock window

Definition at line 735 of file kdockwidget.cpp.

References KDockWidgetPrivate::_parent, QWidget::parentWidget(), and KDockWidgetPrivate::transient.

KDockWidget * KDockWidget::findNearestDockWidget | ( | DockPosition | pos | ) |

Lookup the nearest dockwidget docked left/right/top/bottom to this one or return 0.

Parameters:

  pos | is the position the wanted widget is docked to this one

Since:
  3.1

Definition at line 785 of file kdockwidget.cpp.

References getWidget().

void KDockWidget::setForcedFixedWidth | ( | int |  | ) | `[slot]`

subject to changes.

It doesn't completely work yet without small hacks from within the calling application (Perhaps KDE 3.1.x oder 3.2 width is in pixel. It only affects a widget, which is placed directly into a horizontal KDockSplitter

Since:
  3.1

Definition at line 1047 of file kdockwidget.cpp.

References KDockWidgetPrivate::forcedWidth, and QWidget::setFixedWidth().

void KDockWidget::setForcedFixedHeight | ( | int |  | ) | `[slot]`

subject to changes.

It doesn't completely work yet without small hacks from within the calling application (Perhaps KDE 3.1.x oder 3.2 height is in pixel. It only affects a widget, which is placed directly into a vertical KDockSplitter

Since:
  3.1

Definition at line 1056 of file kdockwidget.cpp.

References KDockWidgetPrivate::forcedHeight, and QWidget::setFixedHeight().

void KDockWidget::restoreFromForcedFixedSize | ( |  | ) | `[slot]`

Since:
  3.1

Definition at line 1075 of file kdockwidget.cpp.

References KDockWidgetPrivate::forcedWidth, QWidget::setMaximumHeight(), QWidget::setMaximumWidth(), QWidget::setMinimumHeight(), and QWidget::setMinimumWidth().

int KDockWidget::forcedFixedWidth | ( |  | ) | `[slot]`

Since:
  3.1

Definition at line 1065 of file kdockwidget.cpp.

References KDockWidgetPrivate::forcedWidth.

int KDockWidget::forcedFixedHeight | ( |  | ) | `[slot]`

Since:
  3.1

Definition at line 1070 of file kdockwidget.cpp.

References KDockWidgetPrivate::forcedHeight.

void KDockWidget::dockBack | ( |  | ) | `[slot]`

| Docks a dockwidget back to the dockwidget that was the neighbor widget before the current dock position. Definition at line 1361 of file kdockwidget.cpp. References KDockWidgetPrivate::index, KDockManager::main, makeDockVisible(), manualDock(), and KDockWidgetPrivate::splitPosInPercent. Referenced by KDockManager::eventFilter(), and makeDockVisible().

void KDockWidget::changeHideShowState | ( |  | ) | `[slot]`

| Toggles the visibility state of the dockwidget if it is able to be shown or to be hidden. Definition at line 1318 of file kdockwidget.cpp. References KDockManager::main, makeDockVisible(), mayBeHide(), mayBeShow(), and undock().

void KDockWidget::undock | ( |  | ) | `[slot]`

Undocks this.

It means it becomes a toplevel widget framed by the system window manager. A small panel at the top of this undocked widget gives the possibility to drag it into another dockwidget by mouse (docking).

Definition at line 1097 of file kdockwidget.cpp.

References KDockSplitter::activate(), applyToWidget(), KDockWidgetPrivate::blockHasUndockedSignal, QObject::blockSignals(), KDockManager::change(), QObject::connect(), KDockWidgetPrivate::container, QTabWidget::count(), currentDockPos, KDockManager::d, KDockSplitter::deactivate(), KDockManager::drawDragRectangle(), formerDockPos, QWidget::frameGeometry(), KDockSplitter::getAnother(), KDockSplitter::getFirst(), hasUndocked(), QWidget::height(), QWidget::hide(), iMBeingClosed(), KDockWidgetPrivate::index, QTabWidget::indexOf(), loseFormerBrotherDockWidget(), QWidget::move(), QTabWidget::page(), parentDockTabGroup(), QWidget::parentWidget(), KDockWidgetPrivate::pendingDtor, QTabWidget::removePage(), KDockManager::replaceDock(), KDockSplitter::separatorPos(), QWidget::show(), show(), KDockWidgetPrivate::splitPosInPercent, KDockManager::undockProcess, and QWidget::width().

Referenced by changeHideShowState(), KDockMainWindow::makeDockInvisible(), manualDock(), KDockManager::readConfig(), and ~KDockWidget().

void KDockWidget::toDesktop | ( |  | ) | `[slot]`

Docks the widget to the desktop (as a toplevel widget)

Since:
  3.1.

Definition at line 1087 of file kdockwidget.cpp.

References manualDock(), QWidget::mapToGlobal(), QPoint::setX(), QPoint::setY(), QPoint::x(), and QPoint::y().

Referenced by KDockManager::eventFilter().

void KDockWidget::updateHeader | ( |  | ) | `[protected]`

Checks some conditions and shows or hides the dockwidget header (drag panel).

The header is hidden if:

- the parent widget is the KDockMainWindow
- this is a (tab) group dockwidget
- it is not able to dock to another dockwidget

Definition at line 643 of file kdockwidget.cpp.

References KDockManager::main, QWidget::setCursor(), QWidget::setMouseTracking(), KDockWidgetAbstractHeader::setTopLevel(), and QWidget::style().

Referenced by setEnableDocking(), and setWidget().

void KDockWidget::setLatestKDockContainer | ( | QWidget * |  | ) | `[protected]`

Since:
  3.1

Definition at line 597 of file kdockwidget.cpp.

References KDockWidgetPrivate::container.

Referenced by manualDock().

QWidget * KDockWidget::latestKDockContainer | ( |  | ) | `[protected]`

Since:
  3.1

Definition at line 608 of file kdockwidget.cpp.

References KDockWidgetPrivate::container.

Referenced by manualDock(), and ~KDockWidget().

void KDockWidget::docking | ( | KDockWidget * | dw,
|  | KDockWidget::DockPosition | dp
| ) | `[signal]`

Emitted when another dock widget is docking to this.

Parameters:

  dw | the dockwidget that is docking to this
  dp | the DockPosition where it wants to dock to

Referenced by manualDock().

void KDockWidget::setDockDefaultPos | ( |  | ) | `[signal]`

| Signals that the dock default position is set. Referenced by show().

void KDockWidget::headerCloseButtonClicked | ( |  | ) | `[signal]`

| Emitted when the close button of the panel (KDockWidgetHeader) has been clicked.

void KDockWidget::headerDockbackButtonClicked | ( |  | ) | `[signal]`

| Emitted when the dockback button of the panel (KDockWidgetHeader) has been clicked.

void KDockWidget::iMBeingClosed | ( |  | ) | `[signal]`

| Emitted when the widget processes a close event. Referenced by event(), loseFormerBrotherDockWidget(), manualDock(), undock(), and ~KDockWidget().

void KDockWidget::hasUndocked | ( |  | ) | `[signal]`

| Emitted when the widget has undocked. Referenced by undock().

void KDockWidget::loseFormerBrotherDockWidget | ( |  | ) | `[protected, slot]`

Does several things here when it has noticed that the former brother widget (closest neighbor) gets lost.

The former brother widget is needed for a possible dockback action, to speak with the Beatles: "To get back to where you once belonged" ;-)

Definition at line 1352 of file kdockwidget.cpp.

References QObject::disconnect(), iMBeingClosed(), and QWidget::repaint().

Referenced by manualDock(), and undock().

## Member Data Documentation

KDockWidget* KDockWidget::formerBrotherDockWidget `[protected]`

| earlier closest neighbor widget, so it's possible to dock back to it. Definition at line 735 of file kdockwidget.h. Referenced by manualDock().

DockPosition KDockWidget::currentDockPos `[protected]`

| the current dock position. Definition at line 739 of file kdockwidget.h. Referenced by KDockManager::eventFilter(), manualDock(), and undock().

DockPosition KDockWidget::formerDockPos `[protected]`

| the former dock position when it really was at another position before. Definition at line 743 of file kdockwidget.h. Referenced by manualDock(), and undock().

QString KDockWidget::toolTipStr `[protected]`

| a string used as tooltip for the tab page header when in dock-centered mode. Definition at line 747 of file kdockwidget.h. Referenced by manualDock().

QString KDockWidget::tabPageTitle `[protected]`

| a string used as title of the tab page when in tab page mode Definition at line 751 of file kdockwidget.h.

The documentation for this class was generated from the following files:

- kdockwidget.h
- kdockwidget.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:59:59 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001