org.kde.koala
public class KDockWidget extends QWidget
... KDockMainWindow mainWidget; ... KDockWidget dock = null; dock = mainWidget.createDockWidget( "Any window caption", nicePixmap, null, i18n("window caption")); // null==no parent QWidget actualWidget = new QWidget( dock); dock.setWidget( actualWidget); // embed it dock.setToolTipString(i18n("That's me")); // available when appearing as tab page ...See KDockMainWindow how a dockwidget is docked in. See KDockWidgetSignals for signals emitted by KDockWidget
UNKNOWN: Floatable widget that can be dragged around with the mouse and encapsulate the actual widgets (and member of the dockwidget class set).
Field Summary | |
---|---|
static int | DockBottom |
static int | DockCenter |
static int | DockCorner |
static int | DockDesktop |
static int | DockFullDocking |
static int | DockFullSite |
static int | DockLeft |
static int | DockNone
The possible positions where a dockwidget can dock to another dockwidget |
static int | DockRight |
static int | DockTop |
static int | DockToSpecialSites |
Constructor Summary | |
---|---|
protected | KDockWidget(Class dummy) |
KDockWidget(KDockManager dockManager, String name, QPixmap pixmap, QWidget parent, String strCaption, String strTabPageLabel, int f)
Construct a dockwidget.
| |
KDockWidget(KDockManager dockManager, String name, QPixmap pixmap, QWidget parent, String strCaption, String strTabPageLabel) | |
KDockWidget(KDockManager dockManager, String name, QPixmap pixmap, QWidget parent, String strCaption) | |
KDockWidget(KDockManager dockManager, String name, QPixmap pixmap, QWidget parent) | |
KDockWidget(KDockManager dockManager, String name, QPixmap pixmap) |
Method Summary | |
---|---|
void | changeHideShowState()
Toggles the visibility state of the dockwidget if it is able to be shown or to be hidden. |
String | className() |
int | currentDockPosition() |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
void | dockBack()
Docks a dockwidget back to the dockwidget that was the neighbor
widget before the current dock position. |
KDockManager | dockManager() |
int | dockSite() |
int | enableDocking() |
boolean | event(QEvent arg1)
Catches and processes some QWidget events that are interesting for dockwidgets. |
protected void | finalize() Deletes the wrapped C++ instance |
KDockWidget | findNearestDockWidget(int pos)
Lookup the nearest dockwidget docked left/right/top/bottom to this one or return 0 |
int | forcedFixedHeight() |
int | forcedFixedWidth() |
KDockWidgetAbstractHeader | getHeader() |
QWidget | getWidget()
Get the embedded widget. |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
boolean | isDockBackPossible() |
protected QWidget | latestKDockContainer() |
protected void | leaveEvent(QEvent arg1) |
protected void | loseFormerBrotherDockWidget() Does several things here when it has noticed that the former brother widget (closest neighbor) gets lost.
|
void | makeDockVisible()
Normally it simply shows the dockwidget.
|
KDockWidget | manualDock(KDockWidget target, int dockPos, int spliPos, QPoint pos, boolean check, int tabIndex)
This is a key method of this class! |
KDockWidget | manualDock(KDockWidget target, int dockPos, int spliPos, QPoint pos, boolean check) |
KDockWidget | manualDock(KDockWidget target, int dockPos, int spliPos, QPoint pos) |
KDockWidget | manualDock(KDockWidget target, int dockPos, int spliPos) |
KDockWidget | manualDock(KDockWidget target, int dockPos) |
boolean | mayBeHide()
There are reasons that it's impossible:
|
boolean | mayBeShow() |
QMetaObject | metaObject() |
protected void | mouseMoveEvent(QMouseEvent arg1) |
protected void | mousePressEvent(QMouseEvent arg1) |
protected void | mouseReleaseEvent(QMouseEvent arg1) |
protected void | paintEvent(QPaintEvent arg1) |
QWidget | parentDockContainer() |
KDockTabGroup | parentDockTabGroup() |
QPixmap | pixmap()
Returns the dockwidget's associated caption/dock tab pixmap |
void | restoreFromForcedFixedSize() |
void | setDockSite(int pos)
Specify where it is either possible or impossible for another dockwidget to dock to this. |
void | setDockWindowTransient(QWidget parent, boolean transientEnabled) |
void | setDockWindowType(int windowType)
Sets the type of the dock window |
void | setEnableDocking(int pos)
Specify where it is either possible or impossible for this to dock to another dockwidget. |
void | setForcedFixedHeight(int arg1)
subject to changes. |
void | setForcedFixedWidth(int arg1)
subject to changes. |
protected void | setFormerBrotherDockWidget(KDockWidget arg1) |
void | setHeader(KDockWidgetAbstractHeader ah)
Sets the header of this dockwidget.
|
protected void | setLatestKDockContainer(QWidget arg1) |
void | setPixmap(QPixmap pixmap)
Allows changing the pixmap which is used for the caption or dock tabs |
void | setPixmap() |
void | setTabPageLabel(String label)
Sets a string that is used for the label of the tab page when in tab page mode |
void | setToolTipString(String ttStr)
Stores a string for a tooltip.
|
void | setWidget(QWidget w)
Sets the embedded widget.
|
void | show()
Add dockwidget management actions to QWidget.show. |
String | tabPageLabel() |
void | toDesktop()
Docks the widget to the desktop (as a toplevel widget) |
String | toolTipString() |
QWidget | transientTo()
Returns the widget this dockwidget is set transient to, otherwise 0 |
void | undock()
Undocks this. |
protected void | updateHeader()
Checks some conditions and shows or hides the dockwidget header (drag panel).
|
UNKNOWN: The possible positions where a dockwidget can dock to another dockwidget
DockPosition.
It is supposed to be no (tab) group. It will
taken under control of its dockmanager.Parameters: dockManager The responsible manager (dock helper) name Object instance name pixmap An icon (for instance shown when docked centered) parent Parent widget strCaption Title of the dockwidget window (shown when toplevel) strTabPageLabel The title of the tab page (shown when in tab page mode), if it is "", only the icon will be shown, if it is null, the label is set to strCaption f Qt.WidgetFlags widget flags
UNKNOWN: Construct a dockwidget.
UNKNOWN: Toggles the visibility state of the dockwidget if it is able to be shown or to be hidden.
Returns: the current dock position.
UNKNOWN:
UNKNOWN: Docks a dockwidget back to the dockwidget that was the neighbor widget before the current dock position.
Returns: The dockmanager that is responsible for this.
UNKNOWN:
Returns: There it is either possible or impossible for another dockwidget to dock to this (an OR'ed set of DockPositions
).
UNKNOWN:
Returns: Where it is either possible or impossible for this to dock to another dockwidget (an OR'ed set of DockPositions).
UNKNOWN:
UNKNOWN: Catches and processes some QWidget events that are interesting for dockwidgets.
Parameters: pos is the position the wanted widget is docked to this one
UNKNOWN: Lookup the nearest dockwidget docked left/right/top/bottom to this one or return 0
Since: 3.2 get the pointer to the header widget
UNKNOWN: @since 3.
Returns: The pointer to the dockwidget's child widget, 0L if there's no such child.
UNKNOWN: Get the embedded widget.
Returns: result true
, if a dockback is possible, otherwise false.
UNKNOWN:
UNKNOWN: Does several things here when it has noticed that the former brother widget (closest neighbor) gets lost.
DockCenter
), it is set as the active (visible) tab page.UNKNOWN: Normally it simply shows the dockwidget.
Parameters: target The dockwidget to dock to dockPos One of the DockPositions this is going to dock to spliPos The split relation (in percent, or percent*100 in high resolution) between both dockwidgets, target and this pos The dock position, mainly of interest for docking to the desktop (as toplevel dockwidget) check Only for internal use; tabIndex The position index of the tab widget (when in tab page mode), -1 (default) means append
Returns: result The group dockwidget that replaces the target dockwidget and will be grandparent of target and this.
UNKNOWN: Since KDE 3.5 the splitter position spliPos
is always a value between [0..100]. If
the value is > 100, it will be treated like the old code and normalized to a value between
0 and 100. Example: If the value was 4000, it will be fixed to 40. In short: The old and
the new behavior both work, so it is compatible with older KDE-versions. This is a key method of this class! Use it to dock dockwidgets to another dockwidget at the right position within its KDockMainWindow or a toplevel dockwidget.
UNKNOWN:
KDockMainWindow.
UNKNOWN:
Returns: the parent widget of this if it inherits class KDockTabGroup
UNKNOWN:
UNKNOWN: Returns the dockwidget's associated caption/dock tab pixmap
Parameters: pos An OR'ed set of DockPositions
UNKNOWN: Specify where it is either possible or impossible for another dockwidget to dock to this.
Parameters: windowType is type of dock window
UNKNOWN: Sets the type of the dock window
Parameters: pos An OR'ed set of DockPositions
UNKNOWN: Specify where it is either possible or impossible for this to dock to another dockwidget.
UNKNOWN: subject to changes.
UNKNOWN: subject to changes.
Parameters: ah A base class pointer to the dockwidget header
UNKNOWN: Sets the header of this dockwidget.
Parameters: pixmap is the pixmap to set
UNKNOWN: Allows changing the pixmap which is used for the caption or dock tabs
Parameters: label The new tab page label.
UNKNOWN: Sets a string that is used for the label of the tab page when in tab page mode
Parameters: ttStr A string for the tooltip on the tab.
UNKNOWN: Stores a string for a tooltip.
Parameters: w The pointer to the dockwidget's child widget.
UNKNOWN: Sets the embedded widget.
UNKNOWN: Add dockwidget management actions to QWidget.show.
Returns: A string that is used for the label of the tab page when in tab page mode.
UNKNOWN:
UNKNOWN: Docks the widget to the desktop (as a toplevel widget)
Returns: The tooltip string being shown on the appropriate tab page header when in dock-centered mode.
UNKNOWN:
UNKNOWN: Returns the widget this dockwidget is set transient to, otherwise 0
UNKNOWN: Undocks this.