• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

Public Types | Signals | Public Member Functions | Protected Member Functions | Friends | List of all members
KDockManager Class Reference

#include <kdockwidget.h>

Inherits TQObject.

Public Types

enum  EnReadDockConfigMode { Unknown , WrapExistingWidgetsOnly , RestoreAllDockwidgets }
 

Signals

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

Public Member Functions

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

Protected Member Functions

virtual void virtual_hook (int id, void *data)
 

Friends

class KDockWidget
 
class KDockMainWindow
 

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

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 915 of file kdockwidget.h.

Member Enumeration Documentation

◆ EnReadDockConfigMode

enum KDockManager::EnReadDockConfigMode

Definition at line 923 of file kdockwidget.h.

Constructor & Destructor Documentation

◆ KDockManager()

KDockManager::KDockManager ( TQWidget *  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
mainWindowthe main window controlled by this
namethe internal QOject name

Definition at line 1619 of file kdockwidget.cpp.

◆ ~KDockManager()

KDockManager::~KDockManager ( )
virtual

Destructs a dockmanager.

Definition at line 1674 of file kdockwidget.cpp.

Member Function Documentation

◆ activate()

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.

◆ change

void KDockManager::change ( )
signal

Signals changes of the docking state of a dockwidget.

Usually the dock-toolbar will be updated then.

◆ dockHideShowMenu()

TQPopupMenu * KDockManager::dockHideShowMenu ( ) const
inline
Returns
the popupmenu for showing/hiding dockwidgets

Definition at line 1027 of file kdockwidget.h.

◆ dumpDockWidgets()

void KDockManager::dumpDockWidgets ( )

Definition at line 2870 of file kdockwidget.cpp.

◆ eventFilter()

bool KDockManager::eventFilter ( TQObject *  object,
TQEvent *  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
objectthe object that sends the event
eventthe event
Returns
the return value of the method call of the base class method

Definition at line 1705 of file kdockwidget.cpp.

◆ findWidgetParentDock()

KDockWidget * KDockManager::findWidgetParentDock ( TQWidget *  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
wany 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.

◆ finishReadDockConfig()

void KDockManager::finishReadDockConfig ( )

Definition at line 2519 of file kdockwidget.cpp.

◆ getDockWidgetFromName()

KDockWidget * KDockManager::getDockWidgetFromName ( const TQString &  dockName)
Parameters
dockNamean internal TQObject name
Returns
the dockwidget that has got that internal TQObject name

Definition at line 2880 of file kdockwidget.cpp.

◆ makeWidgetDockVisible()

void KDockManager::makeWidgetDockVisible ( TQWidget *  w)
inline

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

Parameters
wthe widget that is encapsulated by a dockwidget that turns to visible.

Definition at line 1022 of file kdockwidget.h.

◆ readConfig() [1/2]

void KDockManager::readConfig ( TDEConfig *  c = 0L,
TQString  group = TQString::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 (TQObject::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
cthe KDE configuration saver
groupthe name of the section in TDEConfig

Definition at line 2673 of file kdockwidget.cpp.

◆ readConfig() [2/2]

void KDockManager::readConfig ( TQDomElement &  base)

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

Definition at line 2313 of file kdockwidget.cpp.

◆ removeFromAutoCreateList()

void KDockManager::removeFromAutoCreateList ( KDockWidget *  pDockWidget)

Definition at line 2511 of file kdockwidget.cpp.

◆ replaceDock

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

Signals a dockwidget is replaced with another one.

◆ setDockDefaultPos

void KDockManager::setDockDefaultPos ( KDockWidget *  )
signal

Signals a dockwidget without parent (toplevel) is shown.

◆ setMainDockWidget2()

void KDockManager::setMainDockWidget2 ( KDockWidget *  w)
Since
3.1

Definition at line 1669 of file kdockwidget.cpp.

◆ setReadDockConfigMode()

void KDockManager::setReadDockConfigMode ( int  mode)

Definition at line 2525 of file kdockwidget.cpp.

◆ setSpecialBottomDockContainer()

void KDockManager::setSpecialBottomDockContainer ( KDockWidget *  container)

Definition at line 3043 of file kdockwidget.cpp.

◆ setSpecialLeftDockContainer()

void KDockManager::setSpecialLeftDockContainer ( KDockWidget *  container)
Since
3.2

Definition at line 3030 of file kdockwidget.cpp.

◆ setSpecialRightDockContainer()

void KDockManager::setSpecialRightDockContainer ( KDockWidget *  container)

Definition at line 3038 of file kdockwidget.cpp.

◆ setSpecialTopDockContainer()

void KDockManager::setSpecialTopDockContainer ( KDockWidget *  container)

Definition at line 3034 of file kdockwidget.cpp.

◆ setSplitterHighResolution()

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.

◆ setSplitterKeepSize()

void KDockManager::setSplitterKeepSize ( bool  b = true)

Try to preserve the widget's size.

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

Definition at line 2907 of file kdockwidget.cpp.

◆ setSplitterOpaqueResize()

void KDockManager::setSplitterOpaqueResize ( bool  b = true)

Enables opaque resizing.

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

Definition at line 2897 of file kdockwidget.cpp.

◆ splitterHighResolution()

bool KDockManager::splitterHighResolution ( ) const

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

Definition at line 2922 of file kdockwidget.cpp.

◆ splitterKeepSize()

bool KDockManager::splitterKeepSize ( ) const

Returns true if the KeepSize is enabled, false otherwise.

Definition at line 2912 of file kdockwidget.cpp.

◆ splitterOpaqueResize()

bool KDockManager::splitterOpaqueResize ( ) const

Returns true if opaque resizing is enabled, false otherwise.

Definition at line 2902 of file kdockwidget.cpp.

◆ virtual_hook()

void KDockManager::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 3319 of file kdockwidget.cpp.

◆ writeConfig() [1/2]

void KDockManager::writeConfig ( TDEConfig *  c = 0L,
TQString  group = TQString::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
cthe KDE configuration saver
groupthe name of the section in TDEConfig

Definition at line 2531 of file kdockwidget.cpp.

◆ writeConfig() [2/2]

void KDockManager::writeConfig ( TQDomElement &  base)

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

Definition at line 2201 of file kdockwidget.cpp.

Friends And Related Function Documentation

◆ KDockMainWindow

friend class KDockMainWindow
friend

Definition at line 920 of file kdockwidget.h.

◆ KDockWidget

friend class KDockWidget
friend

Definition at line 919 of file kdockwidget.h.


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

tdeui

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

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.