|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QObject
com.trolltech.qt.gui.QWidget
com.trolltech.qt.gui.QMdiSubWindow
public class QMdiSubWindow
The QMdiSubWindow class provides a subwindow class for QMdiArea
. QMdiSubWindow represents a top-level window in a QMdiArea
, and consists of a title bar with window decorations, an internal widget, and (depending on the current style) a window frame and a size grip. QMdiSubWindow has its own layout, which consists of the title bar and a center area for the internal widget.
QMdiArea::addSubWindow()
with the internal widget as the argument. You can also create a subwindow yourself, and set an internal widget by calling setWidget()
. You use the same API when programming with subwindows as with regular top-level windows (e.g., you can call functions such as By default, each QMdiSubWindow is visible inside the MDI area viewport when moved around, but it is also possible to specify transparent window movement and resizing behavior, where only the outline of a subwindow is updated during these operations. The The In keyboard-interactive mode, the windows are moved and resized with the keyboard. You can enter this mode through the system menu of the window. The You can also change the active window with the keyboard. By pressing the control and tab keys at the same time, the next (using the current
show()
, hide()
, showMaximized()
, and setWindowTitle()).Subwindow Handling
QMdiSubWindow also supports behavior specific to subwindows in an MDI area. setOption()
function is used to enable this behavior. isShaded()
function detects whether the subwindow is currently shaded (i.e., the window is collapsed so that only the title bar is visible). To enter shaded mode, call showShaded()
. QMdiSubWindow emits the windowStateChanged()
signal whenever the window state has changed (e.g., when the window becomes minimized, or is restored). It also emits aboutToActivate()
before it is activated. keyboardSingleStep
and keyboardPageStep
properties control the distance the widget is moved or resized for each keypress event. When shift is pressed down page step is used; otherwise single step is used. WindowOrder
) subwindow will be activated. By pressing control, shift, and tab, you will activate the previous window. This is equivalent to calling activateNextSubWindow()
and activatePreviousSubWindow()
. Note that these shortcuts overrides global shortcuts, but not the QMdiArea
s shortcuts. QMdiArea
.
Nested Class Summary | |
---|---|
static class |
QMdiSubWindow.SubWindowOption
This enum describes options that customize the behavior of QMdiSubWindow . |
static class |
QMdiSubWindow.SubWindowOptions
|
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QWidget |
---|
QWidget.RenderFlag, QWidget.RenderFlags |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary | |
---|---|
QSignalEmitter.Signal0 |
aboutToActivate
QMdiSubWindow emits this signal immediately before it is activated. |
QSignalEmitter.Signal2 |
windowStateChanged
This signal takes 2 generic argument(s). |
Fields inherited from class com.trolltech.qt.gui.QWidget |
---|
customContextMenuRequested |
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
QMdiSubWindow()
Constructs a new QMdiSubWindow widget. |
|
QMdiSubWindow(QWidget parent)
Constructs a new QMdiSubWindow widget. |
|
QMdiSubWindow(QWidget parent,
Qt.WindowFlags flags)
Constructs a new QMdiSubWindow widget. |
|
QMdiSubWindow(QWidget parent,
Qt.WindowType[] flags)
This is an overloaded method provided for convenience. |
Method Summary | |
---|---|
boolean |
isShaded()
Returns true if this window is shaded; otherwise returns false. |
int |
keyboardPageStep()
This property holds sets how far a widget should move or resize when using the keyboard page keys. |
int |
keyboardSingleStep()
This property holds sets how far a widget should move or resize when using the keyboard arrow keys. |
QMdiArea |
mdiArea()
Returns the area containing this sub-window, or 0 if there is none. |
void |
setKeyboardPageStep(int step)
This property holds sets how far a widget should move or resize when using the keyboard page keys. |
void |
setKeyboardSingleStep(int step)
This property holds sets how far a widget should move or resize when using the keyboard arrow keys. |
void |
setOption(QMdiSubWindow.SubWindowOption option)
If on is true, option is enabled on the subwindow; otherwise it is disabled. |
void |
setOption(QMdiSubWindow.SubWindowOption option,
boolean on)
If on is true, option is enabled on the subwindow; otherwise it is disabled. |
void |
setSystemMenu(QMenu systemMenu)
Sets systemMenu as the current system menu for this subwindow. |
void |
setWidget(QWidget widget)
Sets widget as the internal widget of this subwindow. |
void |
showShaded()
Calling this function makes the subwindow enter the shaded mode. |
void |
showSystemMenu()
Shows the system menu below the system menu icon in the title bar. |
QMenu |
systemMenu()
Returns a pointer to the current system menu, or zero if no system menu is set. |
boolean |
testOption(QMdiSubWindow.SubWindowOption arg__1)
Returns true if option is enabled; otherwise returns false. |
QWidget |
widget()
Returns the current internal widget. |
Methods inherited from class com.trolltech.qt.core.QObject |
---|
childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Field Detail |
---|
public final QSignalEmitter.Signal0 aboutToActivate
QMdiArea
that manages the subwindow will also emit the subWindowActivated()
signal. QMdiArea::subWindowActivated()
.
public final QSignalEmitter.Signal2 windowStateChanged
This signal takes 2 generic argument(s). We list their type and the name they go by in the description of this signal. <com.trolltech.qt.core.Qt$WindowStates(named: oldState), com.trolltech.qt.core.Qt$WindowStates(named: newState)>:
QMdiSubWindow emits this signal after the window state changes. oldState is the window state before it changed, and newState is the new, current state.
Constructor Detail |
---|
public QMdiSubWindow(QWidget parent, Qt.WindowType[] flags)
public QMdiSubWindow(QWidget parent)
QWidget
's constructor. Instead of using addSubWindow(), it is also simply possible to use setParent()
when you add the subwindow to a QMdiArea
.
Note that only QMdiSubWindows can be set as children of QMdiArea
; you cannot, for instance, write:QMdiArea mdiArea;
QTextEdit editor(&mdiArea); // invalid child widget
QMdiArea::addSubWindow()
.
public QMdiSubWindow()
QWidget
's constructor. Instead of using addSubWindow(), it is also simply possible to use setParent()
when you add the subwindow to a QMdiArea
.
Note that only QMdiSubWindows can be set as children of QMdiArea
; you cannot, for instance, write:QMdiArea mdiArea;
QTextEdit editor(&mdiArea); // invalid child widget
QMdiArea::addSubWindow()
.
public QMdiSubWindow(QWidget parent, Qt.WindowFlags flags)
QWidget
's constructor. Instead of using addSubWindow(), it is also simply possible to use setParent()
when you add the subwindow to a QMdiArea
.
Note that only QMdiSubWindows can be set as children of QMdiArea
; you cannot, for instance, write:QMdiArea mdiArea;
QTextEdit editor(&mdiArea); // invalid child widget
QMdiArea::addSubWindow()
.
Method Detail |
---|
public final boolean isShaded()
A window is shaded if it is collapsed so that only the title bar is visible.
public final int keyboardPageStep()
The default keyboard page step value is 20 pixels.
keyboardSingleStep
.
public final int keyboardSingleStep()
The default keyboard single step value is 5 pixels.
keyboardPageStep
.
public final QMdiArea mdiArea()
QMdiArea::addSubWindow()
.
public final void setKeyboardPageStep(int step)
The default keyboard page step value is 20 pixels.
keyboardSingleStep
.
public final void setKeyboardSingleStep(int step)
The default keyboard single step value is 5 pixels.
keyboardPageStep
.
public final void setOption(QMdiSubWindow.SubWindowOption option)
SubWindowOption
for the effect of each option. SubWindowOption
, and testOption()
.
public final void setOption(QMdiSubWindow.SubWindowOption option, boolean on)
SubWindowOption
for the effect of each option. SubWindowOption
, and testOption()
.
public final void setSystemMenu(QMenu systemMenu)
By default, each QMdiSubWindow has a standard system menu.
QActions for the system menu created by QMdiSubWindow will automatically be updated depending on the current window state; e.g., the minimize action will be disabled after the window is minimized.
QActions added by the user are not updated by QMdiSubWindow.
QMdiSubWindow takes ownership of systemMenu; you do not have to delete it. Any existing menus will be deleted.
systemMenu()
, and showSystemMenu()
.
public final void setWidget(QWidget widget)
QMdiSubWindow takes temporary ownership of widget; you do not have to delete it. Any existing internal widget will be removed and reparented to the root window.
widget()
.
public final void showShaded()
Although shading is not supported by all styles, this function will still show the subwindow as shaded, regardless of whether support for shading is available. However, when used with styles without shading support, the user will be unable to return from shaded mode through the user interface (e.g., through a shade button in the title bar).
isShaded()
.
public final void showSystemMenu()
setSystemMenu()
, and systemMenu()
.
public final QMenu systemMenu()
setSystemMenu()
. setSystemMenu()
, and showSystemMenu()
.
public final boolean testOption(QMdiSubWindow.SubWindowOption arg__1)
SubWindowOption
, and setOption()
.
public final QWidget widget()
setWidget()
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |