• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kdeui

KDockManager Class Reference

The manager that knows all dockwidgets and handles the dock process (and member of the dockwidget class set). More...

#include <kdockwidget.h>

Inheritance diagram for KDockManager:

Inheritance graph
[legend]

List of all members.


Public Types

enum  EnReadDockConfigMode { Unknown, WrapExistingWidgetsOnly, RestoreAllDockwidgets }

Signals

void change ()
void replaceDock (KDockWidget *oldDock, KDockWidget *newDock)
void setDockDefaultPos (KDockWidget *)

Public Member Functions

void activate ()
QPopupMenu * dockHideShowMenu () const
void dumpDockWidgets ()
virtual bool eventFilter (QObject *object, QEvent *event)
KDockWidget * findWidgetParentDock (QWidget *w) const
void finishReadDockConfig ()
KDockWidget * getDockWidgetFromName (const QString &dockName)
 KDockManager (QWidget *mainWindow, const char *name=0L)
void makeWidgetDockVisible (QWidget *w)
void readConfig (QDomElement &base)
void readConfig (KConfig *c=0L, QString group=QString::null)
void removeFromAutoCreateList (KDockWidget *pDockWidget)
void setMainDockWidget2 (KDockWidget *)
void setReadDockConfigMode (int mode)
void setSpecialBottomDockContainer (KDockWidget *container)
void setSpecialLeftDockContainer (KDockWidget *container)
void setSpecialRightDockContainer (KDockWidget *container)
void setSpecialTopDockContainer (KDockWidget *container)
void setSplitterHighResolution (bool b=true)
void setSplitterKeepSize (bool b=true)
void setSplitterOpaqueResize (bool b=true)
bool splitterHighResolution () const
bool splitterKeepSize () const
bool splitterOpaqueResize () const
void writeConfig (QDomElement &base)
void writeConfig (KConfig *c=0L, QString group=QString::null)
virtual ~KDockManager ()

Protected Member Functions

virtual void virtual_hook (int id, void *data)

Detailed Description

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 KDockWidget class set but of interest for some functionality that can be called within a KDockMainWindow or a KDockWidget .

An important feature is the ability to read or save the current state of all things concerning to dockwidgets to KConfig .

The dockmanager is also often used when a certain dockwidget or a child of such dockwidget must be found.

Author:
Max Judin (documentation: Falk Brettschneider).

Definition at line 909 of file kdockwidget.h.


Member Enumeration Documentation

enum KDockManager::EnReadDockConfigMode

Enumerator:
Unknown 
WrapExistingWidgetsOnly 
RestoreAllDockwidgets 

Definition at line 916 of file kdockwidget.h.


Constructor & Destructor Documentation

KDockManager::KDockManager ( QWidget *  mainWindow,
const char *  name = 0L 
)

Constructs a dockmanager.

Some initialization happen:

  • It installs an event filter for the main window,
  • a control list for dock objects
  • a control list for menu items concerning to menus provided by the dockmanager
  • Some state variables are set
Parameters:
mainWindow the main window controlled by this
name the internal QOject name

Definition at line 1619 of file kdockwidget.cpp.

KDockManager::~KDockManager (  )  [virtual]

Destructs a dockmanager.

Definition at line 1674 of file kdockwidget.cpp.


Member Function Documentation

void KDockManager::activate (  ) 

Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are parent of a dockwidget tab group.

Definition at line 1690 of file kdockwidget.cpp.

void KDockManager::change (  )  [signal]

Signals changes of the docking state of a dockwidget.

Usually the dock-toolbar will be updated then.

QPopupMenu* KDockManager::dockHideShowMenu (  )  const [inline]

Returns:
the popupmenu for showing/hiding dockwidgets

Definition at line 1020 of file kdockwidget.h.

void KDockManager::dumpDockWidgets (  ) 

Definition at line 2870 of file kdockwidget.cpp.

bool KDockManager::eventFilter ( QObject *  object,
QEvent *  event 
) [virtual]

It's more or less a method that catches several events which are interesting for the dockmanager.

Mainly mouse events during the drag process of a dockwidgets are of interest here.

Parameters:
object the object that sends the event
event the event
Returns:
the return value of the method call of the base class method

Reimplemented from QObject.

Definition at line 1705 of file kdockwidget.cpp.

KDockWidget * KDockManager::findWidgetParentDock ( QWidget *  w  )  const

This method finds out what a widgets' dockwidget is.

That means the dockmanager has a look at all dockwidgets it knows and tells you when one of those dockwidgets covers the given widget.

Parameters:
w any widget that is supposed to be encapsulated by one of the controlled dockwidgets
Returns:
the dockwidget that encapsulates that widget, otherwise 0

Definition at line 2957 of file kdockwidget.cpp.

void KDockManager::finishReadDockConfig (  ) 

Definition at line 2519 of file kdockwidget.cpp.

KDockWidget * KDockManager::getDockWidgetFromName ( const QString &  dockName  ) 

Parameters:
dockName an internal QObject name
Returns:
the dockwidget that has got that internal QObject name

Definition at line 2880 of file kdockwidget.cpp.

void KDockManager::makeWidgetDockVisible ( QWidget *  w  )  [inline]

Works like makeDockVisible() but can be called for widgets that covered by a dockwidget.

Parameters:
w the widget that is encapsulated by a dockwidget that turns to visible.

Definition at line 1015 of file kdockwidget.h.

void KDockManager::readConfig ( QDomElement &  base  ) 

Reads the current dock window layout from a DOM tree below the given element.

Definition at line 2313 of file kdockwidget.cpp.

void KDockManager::readConfig ( KConfig *  c = 0L,
QString  group = QString::null 
)

Like writeConfig but reads the whole stuff in.

In order to restore a window configuration from a config file, it looks up widgets by name (QObject::name) in the childDock variable of KDockManager. This list in turn contains all KDockWidgets (according to the KDockWidget constructor). So in principle, in order to restore a window layout, one must first construct all widgets, put each of them in a KDockWidget and then call readConfig(). And for all that to work, each widget must have a unique name.

Parameters:
c the KDE configuration saver
group the name of the section in KConfig

Definition at line 2673 of file kdockwidget.cpp.

void KDockManager::removeFromAutoCreateList ( KDockWidget *  pDockWidget  ) 

Definition at line 2511 of file kdockwidget.cpp.

void KDockManager::replaceDock ( KDockWidget *  oldDock,
KDockWidget *  newDock 
) [signal]

Signals a dockwidget is replaced with another one.

void KDockManager::setDockDefaultPos ( KDockWidget *   )  [signal]

Signals a dockwidget without parent (toplevel) is shown.

void KDockManager::setMainDockWidget2 ( KDockWidget *  w  ) 

Since:
3.1

Definition at line 1669 of file kdockwidget.cpp.

void KDockManager::setReadDockConfigMode ( int  mode  ) 

Definition at line 2525 of file kdockwidget.cpp.

void KDockManager::setSpecialBottomDockContainer ( KDockWidget *  container  ) 

Definition at line 3043 of file kdockwidget.cpp.

void KDockManager::setSpecialLeftDockContainer ( KDockWidget *  container  ) 

Since:
3.2

Definition at line 3030 of file kdockwidget.cpp.

void KDockManager::setSpecialRightDockContainer ( KDockWidget *  container  ) 

Definition at line 3038 of file kdockwidget.cpp.

void KDockManager::setSpecialTopDockContainer ( KDockWidget *  container  ) 

Definition at line 3034 of file kdockwidget.cpp.

void KDockManager::setSplitterHighResolution ( bool  b = true  ) 

Operate the splitter with a higher resolution.

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.

Note:
Since KDE 3.5 this is ignored. Internally the splitter always calcualtes in high resolution values. For KDE 4, this will be removed.

Definition at line 2917 of file kdockwidget.cpp.

void KDockManager::setSplitterKeepSize ( bool  b = true  ) 

Try to preserve the widget's size.

Works like KeepSize resize mode of QSplitter. Off by default. Call this method before you create any dock widgets!

Definition at line 2907 of file kdockwidget.cpp.

void KDockManager::setSplitterOpaqueResize ( bool  b = true  ) 

Enables opaque resizing.

Opaque resizing defaults to KGlobalSettings::opaqueResize(). Call this method before you create any dock widgets!

Definition at line 2897 of file kdockwidget.cpp.

bool KDockManager::splitterHighResolution (  )  const

Returns true if the splitter uses the high resolution, false otherwise.

Definition at line 2922 of file kdockwidget.cpp.

bool KDockManager::splitterKeepSize (  )  const

Returns true if the KeepSize is enabled, false otherwise.

Definition at line 2912 of file kdockwidget.cpp.

bool KDockManager::splitterOpaqueResize (  )  const

Returns true if opaque resizing is enabled, false otherwise.

Definition at line 2902 of file kdockwidget.cpp.

void KDockManager::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Definition at line 3319 of file kdockwidget.cpp.

void KDockManager::writeConfig ( QDomElement &  base  ) 

Saves the current dock window layout into a DOM tree below the given element.

Definition at line 2201 of file kdockwidget.cpp.

void KDockManager::writeConfig ( KConfig *  c = 0L,
QString  group = QString::null 
)

Saves the current state of the dockmanager and of all controlled widgets.

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.

Parameters:
c the KDE configuration saver
group the name of the section in KConfig

Definition at line 2531 of file kdockwidget.cpp.


The documentation for this class was generated from the following files:
  • kdockwidget.h
  • kdockwidget.cpp

kdeui

Skip menu "kdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal