org.kde.koala
public class KMdiChildView extends QWidget
public class MyMdiWidget implements KMdiChildView
{ .... }
...
MyMdiWidget w;
mainframe.addWindow(w, flags);
or you wrap them by a KMdiChildView somehow like this:
void DocViewMan.addKMdiFrame(QWidget pNewView, boolean bShow, QPixmap icon)
{
// cover it by a KMdi childview and add that MDI system
KMdiChildView pMDICover = new KMdiChildView( pNewView.caption());
pMDICover.setIcon(icon);
m_MDICoverList.append( pMDICover);
QBoxLayout pLayout = new QHBoxLayout( pMDICover, 0, -1, "layout");
pNewView.reparent( pMDICover, QPoint(0,0));
pLayout.addWidget( pNewView);
pMDICover.setName( pNewView.name());
// captions
String shortName = pNewView.caption();
int length = shortName.length();
shortName = shortName.right(length - (shortName.findRev('/') +1));
pMDICover.setTabCaption( shortName);
pMDICover.setCaption(pNewView.caption());
// fake a viewActivated to update the currentEditView/currentBrowserView pointers _before_ adding to MDI control
slot_viewActivated( pMDICover);
// take it under MDI mainframe control (note: this triggers also a setFocus())
int flags;
if (bShow) {
flags = KMdi.StandardAdd;
}
else {
flags = KMdi.Hide;
}
// set the accelerators for Toplevel MDI mode (each toplevel window needs its own accels
connect( m_pParent, SIGNAL("childViewIsDetachedNow(QWidget)"), this, SLOT("initKeyAccel(QWidget)") );
m_pParent.addWindow( pMDICover, flags);
// correct the default settings of KMdi ('cause we haven't a tab order for subwidget focuses)
pMDICover.setFirstFocusableChildWidget(null);
pMDICover.setLastFocusableChildWidget(null);
}
See KMdiChildViewSignals for signals emitted by KMdiChildViewUNKNOWN: Base class for all your special view windows.
| Constructor Summary | |
|---|---|
| protected | KMdiChildView(Class dummy) |
| KMdiChildView(String caption, QWidget parentWidget, String name, int f)
Constructor | |
| KMdiChildView(String caption, QWidget parentWidget, String name) | |
| KMdiChildView(String caption, QWidget parentWidget) | |
| KMdiChildView(String caption) | |
| KMdiChildView(QWidget parentWidget, String name, int f)
Constructor
sets "Unnamed" as default caption | |
| KMdiChildView(QWidget parentWidget, String name) | |
| KMdiChildView(QWidget parentWidget) | |
| KMdiChildView() | |
| Method Summary | |
|---|---|
| void | activate()
This method does the same as focusInEvent(). |
| void | attach()
Attaches this window to the Mdi manager.
|
| String | caption()
Returns the caption of the child window (different from the caption on the button in the taskbar) |
| String | className() |
| protected void | closeEvent(QCloseEvent e)
Ignores the event and calls KMdiMainFrm.childWindowCloseRequest instead. |
| void | detach()
Detaches this window from the Mdi manager.
|
| void | dispose() Delete the wrapped C++ instance ahead of finalize() |
| boolean | eventFilter(QObject arg1, QEvent e)
It only catches QEvent.KeyPress events there. |
| QRect | externalGeometry()
Returns the frame geometry of this window or of the parent if there is any... |
| protected void | finalize() Deletes the wrapped C++ instance |
| QWidget | focusedChildWidget()
Returns the current focused child widget of this widget |
| protected void | focusInEvent(QFocusEvent e)
If attached, the childframe will be activated and the MDI taskbar button will be pressed. |
| protected void | focusOutEvent(QFocusEvent e)
Send the lostFocus signal |
| Calendar | getTimeStamp()
Recall a previously remembered time, i.e. the value of m_time |
| void | hide()
Calls QWidget.hide() or it's parent widget hide() if attached |
| QRect | internalGeometry()
Returns the geometry of this MDI child window as QWidget.geometry() does. |
| boolean | isAttached()
Returns true if the MDI view is a child window within the MDI mainframe widget
or false if the MDI view is in toplevel mode |
| boolean | isDisposed() Has the wrapped C++ instance been deleted? |
| boolean | isMaximized()
Tells if the window is minimized when attached to the Mdi manager,
otherwise returns false. |
| boolean | isMinimized()
Tells if the window is minimized when attached to the Mdi manager,
or if it is VISIBLE when 'floating'. |
| boolean | isToolView()
Returns if this is added as MDI tool-view |
| void | maximize(boolean bAnimate)
Maximizes this window when it is attached to the Mdi manager.
|
| void | maximize()
Maximizes the MDI view. |
| KMdiChildFrm | mdiParent()
Returns the KMdiChildFrm parent widget (or 0 if the window is not attached) |
| QMetaObject | metaObject() |
| void | minimize(boolean bAnimate)
Minimizes this window when it is attached to the Mdi manager.
|
| void | minimize()
Mimimizes the MDI view. |
| QPixmap | myIconPtr()
You should override this function in the derived class. |
| void | raise()
Calls QWidget.raise() or it's parent widget raise() if attached |
| void | removeEventFilterForAllChildren()
Switches interposing in event loop of all current child widgets off. |
| protected void | resizeEvent(QResizeEvent e)
Internally used for the minimize/maximize/restore mechanism when in attach mode. |
| void | restore()
Restores this window to its normal size. |
| QRect | restoreGeometry()
Returns the geometry that will be restored by calling restore(). |
| void | setCaption(String szCaption)
Sets the window caption string...
|
| void | setExternalGeometry(QRect newGeomety)
Sets the geometry of the frame of this MDI child window. |
| void | setFirstFocusableChildWidget(QWidget arg1)
Memorizes the first focusable child widget of this widget |
| void | setInternalGeometry(QRect newGeomety)
Sets the geometry of the client area of this MDI child window. |
| void | setLastFocusableChildWidget(QWidget arg1)
Memorizes the last focusable child widget of this widget |
| void | setMaximumSize(int maxw, int maxh)
Sets the maximum size of the widget to w by h pixels.
|
| void | setMDICaption(String caption)
Sets the caption of both the window and the button on the taskbar |
| void | setMinimumSize(int minw, int minh)
Sets the minimum size of the widget to w by h pixels.
|
| void | setRestoreGeometry(QRect newRestGeo)
Sets the geometry that will be restored by calling restore(). |
| void | setTabCaption(String caption)
Sets the caption of the button referring to this window |
| void | setWindowMenuID(int id)
Internally used for setting an ID for the 'Window' menu entry |
| void | show()
Calls QWidget.show but also for it's parent widget if attached |
| void | showMaximized()
Overridden from its base class method. |
| void | showMinimized()
Overridden from its base class method. |
| void | showNormal()
Overridden from its base class method. |
| protected void | slot_childDestroyed() |
| void | slot_clickedInDockMenu()
Called if someone click on the "Dock/Undock..." menu item for this child frame window |
| void | slot_clickedInWindowMenu()
Called if someone click on the "Window" menu item for this child frame window |
| String | tabCaption()
Returns the caption of the button on the taskbar |
| protected void | trackIconAndCaptionChanges(QWidget view) |
| void | updateTimeStamp()
Remember the current time |
| void | youAreAttached(KMdiChildFrm lpC)
Internally called, if KMdiMainFrm.attach is called.
|
| void | youAreDetached()
Internally called, if KMdiMainFrm.detach is called.
|
UNKNOWN: Constructor
UNKNOWN: Constructor sets "Unnamed" as default caption
UNKNOWN: This method does the same as focusInEvent().
UNKNOWN: Attaches this window to the Mdi manager.
UNKNOWN: Returns the caption of the child window (different from the caption on the button in the taskbar)
UNKNOWN: Ignores the event and calls KMdiMainFrm.childWindowCloseRequest instead.
UNKNOWN: Detaches this window from the Mdi manager.
UNKNOWN: It only catches QEvent.KeyPress events there.
UNKNOWN: Returns the frame geometry of this window or of the parent if there is any.
UNKNOWN: Returns the current focused child widget of this widget
UNKNOWN: If attached, the childframe will be activated and the MDI taskbar button will be pressed.
UNKNOWN: Send the lostFocus signal
UNKNOWN: Recall a previously remembered time, i.
UNKNOWN: Calls QWidget.hide() or it's parent widget hide() if attached
UNKNOWN: Returns the geometry of this MDI child window as QWidget.geometry() does.
UNKNOWN: Returns true if the MDI view is a child window within the MDI mainframe widget or false if the MDI view is in toplevel mode
UNKNOWN: Tells if the window is minimized when attached to the Mdi manager, otherwise returns false.
UNKNOWN: Tells if the window is minimized when attached to the Mdi manager, or if it is VISIBLE when 'floating'.
UNKNOWN: Returns if this is added as MDI tool-view
UNKNOWN: Maximizes this window when it is attached to the Mdi manager.
UNKNOWN: Maximizes the MDI view.
UNKNOWN: Returns the KMdiChildFrm parent widget (or 0 if the window is not attached)
UNKNOWN: Minimizes this window when it is attached to the Mdi manager.
UNKNOWN: Mimimizes the MDI view.
UNKNOWN: You should override this function in the derived class.
UNKNOWN: Calls QWidget.raise() or it's parent widget raise() if attached
UNKNOWN: Switches interposing in event loop of all current child widgets off.
UNKNOWN: Internally used for the minimize/maximize/restore mechanism when in attach mode.
UNKNOWN: Restores this window to its normal size.
UNKNOWN: Returns the geometry that will be restored by calling restore().
UNKNOWN: Sets the window caption string.
UNKNOWN: Sets the geometry of the frame of this MDI child window.
UNKNOWN: Memorizes the first focusable child widget of this widget
UNKNOWN: Sets the geometry of the client area of this MDI child window.
UNKNOWN: Memorizes the last focusable child widget of this widget
UNKNOWN: Sets the maximum size of the widget to w by h pixels.
UNKNOWN: Sets the caption of both the window and the button on the taskbar
UNKNOWN: Sets the minimum size of the widget to w by h pixels.
UNKNOWN: Sets the geometry that will be restored by calling restore().
UNKNOWN: Sets the caption of the button referring to this window
UNKNOWN: Internally used for setting an ID for the 'Window' menu entry
UNKNOWN: Calls QWidget.show but also for it's parent widget if attached
UNKNOWN: Overridden from its base class method.
UNKNOWN: Overridden from its base class method.
UNKNOWN: Overridden from its base class method.
UNKNOWN: Called if someone click on the "Dock/Undock.
UNKNOWN: Called if someone click on the "Window" menu item for this child frame window
UNKNOWN: Returns the caption of the button on the taskbar
UNKNOWN: Remember the current time
UNKNOWN: Internally called, if KMdiMainFrm.attach is called.
UNKNOWN: Internally called, if KMdiMainFrm.detach is called.