class KDockWidget

Floatable widget that can be dragged around with the mouse und encapsulate the actual widget. More...

Definition#include <kdockwidget.h>
InheritsQWidget (qt)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public Slots

Signals

Protected Methods


Detailed Description

Floatable widget that can be dragged around with the mouse und encapsulate the actual widget.

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: KDockWidget can only be dock to KDockWidget.

 KDockWidget ( KDockManager* dockManager, const char* name, const QPixmap &pixmap, QWidget* parent = 0L )

Constructs 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:
dockManagerthe responsible manager (dock helper)
nameobject instance name
pixmapan icon (for instance shown when docked centered)
parentparent widget

KDockWidget ()

[virtual]

Destructs a dockwidget.

enum DockPosition {DockNone = 0, DockTop = 0x0001, DockLeft = 0x0002, DockRight = 0x0004, DockBottom = 0x0008, DockCenter = 0x0010, DockDesktop= 0x0020, DockCorner = DockTop | DockLeft | DockRight | DockBottom, DockFullSite = DockCorner | DockCenter, DockFullDocking = DockFullSite | DockDesktop }

The possible positions where a dockwidget can dock to another dockwidget

void  setEnableDocking ( int pos )

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

Parameters:
posan OR'ed set of DockPositions

int  enableDocking ()

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

void  setDockSite ( int pos )

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

Parameters:
posan OR'ed set of DockPositions

int  dockSite ()

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

void  setWidget ( QWidget* w)

Set the embedded widget. A QLayout takes care about proper resizing, automatically.

Parameters:
wthe pointer to the dockwidget's child widget

void  setHeader ( KDockWidgetAbstractHeader* ah)

Set 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:
aha base class pointer to the dockwidget header

void  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.

bool  mayBeHide ()

Returns: if it may be possible to hide this. There are reasons that it's impossible: <UL><LI>it is a (tab) group</LI> <LI>it is invisible, already ;-)</LI> <LI>the parent of this is the KDockMainWindow</LI> <LI>it isn't able to dock to another widget</LI></UL>

bool  mayBeShow ()

Returns: if it may be possible to show this There are reasons that it's impossible: <UL><LI>it is a (tab) group</LI> <LI>it is visible, already ;-)</LI> <LI>the parent of this is the KDockMainWindow</LI></UL>

KDockManager*  dockManager ()

Returns: the dockmanager that is responsible for this.

bool  event ( QEvent * )

[virtual]

Catches and processes some QWidget events that are interesting for dockwidgets.

Reimplemented from QWidget

void  show ()

[virtual]

Add dockwidget management actions to QWidget::show.

Reimplemented from QWidget

void  changeHideShowState ()

[slot]

Toggles the visibility state of the dockwidget if it is able to be shown or to be hidden.

KDockTabGroup*  parentTabGroup ()

[protected]

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

void  updateHeader ()

[protected]

Check some conditions and show or hide the dockwidget header (drag panel). The header is hidden if: <LU><LI>the parent widget is the KDockMainWindow</LI> <LI>this is a (tab) group dockwidget</LI> <LI>it is not able to dock to another dockwidgets</LI>

void  docking ( KDockWidget* dw, KDockWidget::DockPosition )

[signal]

Emits that another dockwidget is docking to this.

Parameters:
dwthe dockwidget that is docking to this
theDockPosition where it wants to dock to

void  setDockDefaultPos ()

[signal]

Signals that the dock default position is set.

void  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).