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

KDE3Support

K3DockManager Class Reference

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

#include <k3dockwidget.h>

Inheritance diagram for K3DockManager:

Inheritance graph
[legend]

List of all members.


Public Types

enum  EnReadDockConfigMode { Unknown, WrapExistingWidgetsOnly, RestoreAllDockwidgets }

Signals

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

Public Member Functions

void activate ()
Q3PopupMenu * dockHideShowMenu () const
void dumpDockWidgets ()
virtual bool eventFilter (QObject *object, QEvent *event)
K3DockWidget * findWidgetParentDock (QWidget *w) const
void finishReadDockConfig ()
K3DockWidget * getDockWidgetFromName (const QString &dockName)
 K3DockManager (QWidget *mainWindow, const char *name=0L)
void makeWidgetDockVisible (QWidget *w)
void readConfig (QDomElement &base)
void readConfig (KConfig *c=0L, const QString &group=QString())
void removeFromAutoCreateList (K3DockWidget *pDockWidget)
void setMainDockWidget2 (K3DockWidget *)
void setReadDockConfigMode (int mode)
void setSpecialBottomDockContainer (K3DockWidget *container)
void setSpecialLeftDockContainer (K3DockWidget *container)
void setSpecialRightDockContainer (K3DockWidget *container)
void setSpecialTopDockContainer (K3DockWidget *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, const QString &group=QString())
virtual ~K3DockManager ()

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

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 884 of file k3dockwidget.h.


Member Enumeration Documentation

enum K3DockManager::EnReadDockConfigMode

Enumerator:
Unknown 
WrapExistingWidgetsOnly 
RestoreAllDockwidgets 

Definition at line 891 of file k3dockwidget.h.


Constructor & Destructor Documentation

K3DockManager::K3DockManager ( 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 1731 of file k3dockwidget.cpp.

K3DockManager::~K3DockManager (  )  [virtual]

Destructs a dockmanager.

Definition at line 1785 of file k3dockwidget.cpp.


Member Function Documentation

void K3DockManager::activate (  ) 

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

Definition at line 1802 of file k3dockwidget.cpp.

void K3DockManager::change (  )  [signal]

Signals changes of the docking state of a dockwidget.

Usually the dock-toolbar will be updated then.

Q3PopupMenu * K3DockManager::dockHideShowMenu (  )  const

Returns:
the popupmenu for showing/hiding dockwidgets

Definition at line 3078 of file k3dockwidget.cpp.

void K3DockManager::dumpDockWidgets (  ) 

Definition at line 2974 of file k3dockwidget.cpp.

bool K3DockManager::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 1815 of file k3dockwidget.cpp.

K3DockWidget * K3DockManager::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 3060 of file k3dockwidget.cpp.

void K3DockManager::finishReadDockConfig (  ) 

Definition at line 2626 of file k3dockwidget.cpp.

K3DockWidget * K3DockManager::getDockWidgetFromName ( const QString &  dockName  ) 

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

Definition at line 2984 of file k3dockwidget.cpp.

void K3DockManager::makeWidgetDockVisible ( QWidget *  w  ) 

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 3073 of file k3dockwidget.cpp.

void K3DockManager::readConfig ( QDomElement &  base  ) 

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

Definition at line 2423 of file k3dockwidget.cpp.

void K3DockManager::readConfig ( KConfig *  c = 0L,
const QString &  group = QString() 
)

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 K3DockManager. This list in turn contains all K3DockWidgets (according to the K3DockWidget constructor). So in principle, in order to restore a window layout, one must first construct all widgets, put each of them in a K3DockWidget 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 2787 of file k3dockwidget.cpp.

void K3DockManager::removeFromAutoCreateList ( K3DockWidget *  pDockWidget  ) 

Definition at line 2620 of file k3dockwidget.cpp.

void K3DockManager::replaceDock ( K3DockWidget *  oldDock,
K3DockWidget *  newDock 
) [signal]

Signals a dockwidget is replaced with another one.

void K3DockManager::setDockDefaultPos ( K3DockWidget *   )  [signal]

Signals a dockwidget without parent (toplevel) is shown.

void K3DockManager::setMainDockWidget2 ( K3DockWidget *  w  ) 

Definition at line 1780 of file k3dockwidget.cpp.

void K3DockManager::setReadDockConfigMode ( int  mode  ) 

Definition at line 2632 of file k3dockwidget.cpp.

void K3DockManager::setSpecialBottomDockContainer ( K3DockWidget *  container  ) 

Definition at line 3158 of file k3dockwidget.cpp.

void K3DockManager::setSpecialLeftDockContainer ( K3DockWidget *  container  ) 

Definition at line 3145 of file k3dockwidget.cpp.

void K3DockManager::setSpecialRightDockContainer ( K3DockWidget *  container  ) 

Definition at line 3153 of file k3dockwidget.cpp.

void K3DockManager::setSpecialTopDockContainer ( K3DockWidget *  container  ) 

Definition at line 3149 of file k3dockwidget.cpp.

void K3DockManager::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 3021 of file k3dockwidget.cpp.

void K3DockManager::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 3011 of file k3dockwidget.cpp.

void K3DockManager::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 3001 of file k3dockwidget.cpp.

bool K3DockManager::splitterHighResolution (  )  const

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

Definition at line 3026 of file k3dockwidget.cpp.

bool K3DockManager::splitterKeepSize (  )  const

Returns true if the KeepSize is enabled, false otherwise.

Definition at line 3016 of file k3dockwidget.cpp.

bool K3DockManager::splitterOpaqueResize (  )  const

Returns true if opaque resizing is enabled, false otherwise.

Definition at line 3006 of file k3dockwidget.cpp.

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

Definition at line 3457 of file k3dockwidget.cpp.

void K3DockManager::writeConfig ( QDomElement &  base  ) 

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

Definition at line 2307 of file k3dockwidget.cpp.

void K3DockManager::writeConfig ( KConfig *  c = 0L,
const QString &  group = QString() 
)

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 2638 of file k3dockwidget.cpp.


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

KDE3Support

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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