org.kde.koala
public class KDockMainWindow extends KMainWindow
DockApplication.DockApplication( String name) { ... KDockWidget mainDock; mainDock = createDockWidget( "Falk's MainDockWidget", mainPixmap, null, "main_dock_widget"); AnyContentsWidget cw = new AnyContentsWidget( mainDock); mainDock.setWidget( cw); // allow others to dock to the 4 sides mainDock.setDockSite(KDockWidget.DockCorner); // forbit docking abilities of mainDock itself mainDock.setEnableDocking(KDockWidget.DockNone); setView( mainDock); // central widget in a KDE mainwindow setMainDockWidget( mainDock); // master dockwidget ... KDockWidget dockLeft; dockLeft = createDockWidget( "Intially left one", anyOtherPixmap, null, i18n("The left dockwidget")); AnotherWidget aw = new AnotherWidget( dockLeft); dockLeft.setWidget( aw); dockLeft.manualDock( mainDock, // dock target KDockWidget.DockLeft, // dock site 20 ); // relation target/this (in percent) ...Docking is fully dynamic at runtime. That means you can always move dockwidgets via drag and drop. And last but not least you can use the popupmenu for showing or hiding any controlled dockwidget of this class and insert it to your main menu bar or anywhere else. See KDockMainWindowSignals for signals emitted by KDockMainWindow
UNKNOWN: A special kind of KMainWindow that is able to have dockwidget child widgets (and member of the dockwidget class set).
Constructor Summary | |
---|---|
protected | KDockMainWindow(Class dummy) |
KDockMainWindow(QWidget parent, String name, int f)
Constructs a dockmainwindow. | |
KDockMainWindow(QWidget parent, String name) | |
KDockMainWindow(QWidget parent) | |
KDockMainWindow() |
Method Summary | |
---|---|
void | activateDock()
It runs through all dockwidgets which are under control of the dockmanager and calls show() for every
encapsulated widget and show() for the dockwidget itself if it is not in tab mode.
|
String | className() |
KDockWidget | createDockWidget(String name, QPixmap pixmap, QWidget parent, String strCaption, String strTabPageLabel)
This is one of the most important methods!
|
KDockWidget | createDockWidget(String name, QPixmap pixmap, QWidget parent, String strCaption) |
KDockWidget | createDockWidget(String name, QPixmap pixmap, QWidget parent) |
KDockWidget | createDockWidget(String name, QPixmap pixmap) |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
QPopupMenu | dockHideShowMenu()
Returns a popup menu that contains entries for all controlled dockwidgets making hiding and showing
them possible. |
protected void | finalize() Deletes the wrapped C++ instance |
KDockWidget | getMainDockWidget()
Returns the main dockwidget. |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
void | makeDockInvisible(KDockWidget dock)
This method hides the given dockwidget. |
void | makeDockVisible(KDockWidget dock)
This method shows the given dockwidget.
|
void | makeWidgetDockVisible(QWidget widget)
This is an overloaded member function, provided for convenience.
|
KDockManager | manager()
Returns the dockmanager of this. (see KDockManager) |
QMetaObject | metaObject() |
void | readDockConfig(QDomElement base)
Reads the current dock window layout from a DOM tree below the given element. |
void | readDockConfig(KConfig c, String group)
It reads the current dock state from the given section of KConfig. |
void | readDockConfig(KConfig c) |
void | readDockConfig() |
void | setMainDockWidget(KDockWidget dockwidget)
Sets a new main dockwidget.
|
void | setView(QWidget widget)
This method calls the base class method.
|
protected void | slotDockWidgetUndocked()
Called whenever one of the dockwidgets of this has been undocked. |
void | writeDockConfig(QDomElement base)
Saves the current dock window layout into a DOM tree below the given element. |
void | writeDockConfig(KConfig c, String group)
It writes the current dock state in the given section of KConfig. |
void | writeDockConfig(KConfig c) |
void | writeDockConfig() |
Parameters: parent Parent widget for the dock main widget name internal object name f Qt.WidgetFlags widget flags
UNKNOWN: Constructs a dockmainwindow.
UNKNOWN: It runs through all dockwidgets which are under control of the dockmanager and calls show() for every encapsulated widget and show() for the dockwidget itself if it is not in tab mode.
Parameters: name QObject name (default dockwidget caption) pixmap window icon (for instance shown when docked as tabwidget entry) parent parent widget for the new dockwidget strCaption window title (shown when toplevel) strTabPageLabel title of the tab page (visible when in tab page mode), if it is "", only the icon will be shown; if it is null, the label is set to strCaption
Returns: a pointer to the new created dockwidget
UNKNOWN: This is one of the most important methods! The KDockMainWindow creates a new dockwidget object here that usually should encapsulate the user's widget.
Returns: the wanted popup menu
UNKNOWN: Returns a popup menu that contains entries for all controlled dockwidgets making hiding and showing them possible.
Returns: pointer to the main dockwidget
UNKNOWN: Returns the main dockwidget.
Parameters: dock the dockwidget that is to be shown
UNKNOWN: This method hides the given dockwidget.
Parameters: dock the dockwidget that is to be shown
UNKNOWN: This method shows the given dockwidget.
UNKNOWN: This is an overloaded member function, provided for convenience.
Returns: pointer to the wanted dockmanager
UNKNOWN: Returns the dockmanager of this.
UNKNOWN: Reads the current dock window layout from a DOM tree below the given element.
Parameters: c KDE class for saving configurations group name of section to read from
UNKNOWN: It reads the current dock state from the given section of KConfig.
Parameters: dockwidget dockwidget that become the new main dockwidget
UNKNOWN: Sets a new main dockwidget.
Parameters: widget any widget that should become the main view
UNKNOWN: This method calls the base class method.
UNKNOWN: Called whenever one of the dockwidgets of this has been undocked.
UNKNOWN: Saves the current dock window layout into a DOM tree below the given element.
Parameters: c KDE class for saving configurations group name of section to write to
UNKNOWN: It writes the current dock state in the given section of KConfig.