org.kde.koala

Class KDockManager

public class KDockManager extends QObject

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. See KDockManagerSignals for signals emitted by KDockManager

Author: Max Judin (documentation: Falk Brettschneider).

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

Field Summary
static intRestoreAllDockwidgets
static intUnknown
static intWrapExistingWidgetsOnly
Constructor Summary
protected KDockManager(Class dummy)
KDockManager(QWidget mainWindow, String name)
Constructs a dockmanager.
KDockManager(QWidget mainWindow)
Method Summary
voidactivate()
Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are parent of a dockwidget tab group.
StringclassName()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
QPopupMenudockHideShowMenu()
voiddumpDockWidgets()
booleaneventFilter(QObject object, QEvent event)
It's more or less a method that catches several events which are interesting for the dockmanager.
protected voidfinalize()
Deletes the wrapped C++ instance
KDockWidgetfindWidgetParentDock(QWidget w)
This method finds out what a widgets' dockwidget is.
voidfinishReadDockConfig()
KDockWidgetgetDockWidgetFromName(String dockName)
booleanisDisposed()
Has the wrapped C++ instance been deleted?
voidmakeWidgetDockVisible(QWidget w)
Works like makeDockVisible() but can be called for widgets that covered by a dockwidget.
QMetaObjectmetaObject()
voidreadConfig(KConfig c, String group)
Like writeConfig but reads the whole stuff in.
voidreadConfig(KConfig c)
voidreadConfig()
voidreadConfig(QDomElement base)
Reads the current dock window layout from a DOM tree below the given element.
voidremoveFromAutoCreateList(KDockWidget pDockWidget)
voidsetMainDockWidget2(KDockWidget arg1)
voidsetReadDockConfigMode(int mode)
voidsetSpecialBottomDockContainer(KDockWidget container)
voidsetSpecialLeftDockContainer(KDockWidget container)
voidsetSpecialRightDockContainer(KDockWidget container)
voidsetSpecialTopDockContainer(KDockWidget container)
voidsetSplitterHighResolution(boolean b)
Operate the splitter with a higher resolution.
voidsetSplitterHighResolution()
voidsetSplitterKeepSize(boolean b)
Try to preserve the widget's size.
voidsetSplitterKeepSize()
voidsetSplitterOpaqueResize(boolean b)
Enables opaque resizing.
voidsetSplitterOpaqueResize()
booleansplitterHighResolution()
Returns true if the splitter uses the high resolution, false otherwise.
booleansplitterKeepSize()
Returns true if the KeepSize is enabled, false otherwise.
booleansplitterOpaqueResize()
Returns true if opaque resizing is enabled, false otherwise.
voidwriteConfig(KConfig c, String group)
Saves the current state of the dockmanager and of all controlled widgets.
voidwriteConfig(KConfig c)
voidwriteConfig()
voidwriteConfig(QDomElement base)
Saves the current dock window layout into a DOM tree below the given element.

Field Detail

RestoreAllDockwidgets

public static final int RestoreAllDockwidgets

Unknown

public static final int Unknown

WrapExistingWidgetsOnly

public static final int WrapExistingWidgetsOnly

Constructor Detail

KDockManager

protected KDockManager(Class dummy)

KDockManager

public KDockManager(QWidget mainWindow, String name)
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

    UNKNOWN: Constructs a dockmanager.

    KDockManager

    public KDockManager(QWidget mainWindow)

    Method Detail

    activate

    public void activate()
    Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are parent of a dockwidget tab group.

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

    className

    public String className()

    dispose

    public void dispose()
    Delete the wrapped C++ instance ahead of finalize()

    dockHideShowMenu

    public QPopupMenu dockHideShowMenu()

    Returns: the popupmenu for showing/hiding dockwidgets

    UNKNOWN:

    dumpDockWidgets

    public void dumpDockWidgets()

    eventFilter

    public boolean eventFilter(QObject object, QEvent event)
    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

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

    finalize

    protected void finalize()
    Deletes the wrapped C++ instance

    findWidgetParentDock

    public KDockWidget findWidgetParentDock(QWidget w)
    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

    UNKNOWN: This method finds out what a widgets' dockwidget is.

    finishReadDockConfig

    public void finishReadDockConfig()

    getDockWidgetFromName

    public KDockWidget getDockWidgetFromName(String dockName)

    Parameters: dockName an internal QObject name

    Returns: the dockwidget that has got that internal QObject name

    UNKNOWN:

    isDisposed

    public boolean isDisposed()
    Has the wrapped C++ instance been deleted?

    makeWidgetDockVisible

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

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

    metaObject

    public QMetaObject metaObject()

    readConfig

    public void readConfig(KConfig c, String group)
    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

    UNKNOWN: Like writeConfig but reads the whole stuff in.

    readConfig

    public void readConfig(KConfig c)

    readConfig

    public void readConfig()

    readConfig

    public void readConfig(QDomElement base)
    Reads the current dock window layout from a DOM tree below the given element.

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

    removeFromAutoCreateList

    public void removeFromAutoCreateList(KDockWidget pDockWidget)

    setMainDockWidget2

    public void setMainDockWidget2(KDockWidget arg1)

    setReadDockConfigMode

    public void setReadDockConfigMode(int mode)

    setSpecialBottomDockContainer

    public void setSpecialBottomDockContainer(KDockWidget container)

    setSpecialLeftDockContainer

    public void setSpecialLeftDockContainer(KDockWidget container)

    UNKNOWN:

    setSpecialRightDockContainer

    public void setSpecialRightDockContainer(KDockWidget container)

    setSpecialTopDockContainer

    public void setSpecialTopDockContainer(KDockWidget container)

    setSplitterHighResolution

    public void setSplitterHighResolution(boolean b)
    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.

    UNKNOWN: Since KDE 3.5 this is ignored. Internally the splitter always calcualtes in high resolution values. For KDE 4, this will be removed. Operate the splitter with a higher resolution.

    setSplitterHighResolution

    public void setSplitterHighResolution()

    setSplitterKeepSize

    public void setSplitterKeepSize(boolean b)
    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!

    UNKNOWN: Try to preserve the widget's size.

    setSplitterKeepSize

    public void setSplitterKeepSize()

    setSplitterOpaqueResize

    public void setSplitterOpaqueResize(boolean b)
    Enables opaque resizing. Opaque resizing defaults to KGlobalSettings.opaqueResize(). Call this method before you create any dock widgets!

    UNKNOWN: Enables opaque resizing.

    setSplitterOpaqueResize

    public void setSplitterOpaqueResize()

    splitterHighResolution

    public boolean splitterHighResolution()
    Returns true if the splitter uses the high resolution, false otherwise.

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

    splitterKeepSize

    public boolean splitterKeepSize()
    Returns true if the KeepSize is enabled, false otherwise.

    UNKNOWN: Returns true if the KeepSize is enabled, false otherwise.

    splitterOpaqueResize

    public boolean splitterOpaqueResize()
    Returns true if opaque resizing is enabled, false otherwise.

    UNKNOWN: Returns true if opaque resizing is enabled, false otherwise.

    writeConfig

    public void writeConfig(KConfig c, String group)
    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

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

    writeConfig

    public void writeConfig(KConfig c)

    writeConfig

    public void writeConfig()

    writeConfig

    public void writeConfig(QDomElement base)
    Saves the current dock window layout into a DOM tree below the given element.

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