|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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.
The most common way to construct a QMdiSubWindow is to call 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 show, hide, showMaximized, and setWindowTitle).
QMdiSubWindow also supports behavior specific to subwindows in an MDI area.
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 setOption function is used to enable this behavior.
The 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.
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 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.
Nested Class Summary | |
---|---|
static class |
QMdiSubWindow.SubWindowOption
This enum describes options that customize the behavior of QMdiSubWindow. |
static class |
QMdiSubWindow.SubWindowOptions
This QFlag class provides flags for the int enum. |
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QWidget |
---|
QWidget.RenderFlag, QWidget.RenderFlags |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Field Summary | |
---|---|
QSignalEmitter.Signal0 |
aboutToActivate
QMdiSubWindow emits this signal immediately before it is activated. |
QSignalEmitter.Signal2<Qt.WindowStates,Qt.WindowStates> |
windowStateChanged
QMdiSubWindow emits this signal after the window state changes. |
Fields inherited from class com.trolltech.qt.gui.QWidget |
---|
customContextMenuRequested |
Constructor Summary | |
---|---|
QMdiSubWindow()
Equivalent to QMdiSubWindow(0, 0). |
|
QMdiSubWindow(QWidget parent)
Equivalent to QMdiSubWindow(parent, 0). |
|
QMdiSubWindow(QWidget parent,
Qt.WindowFlags flags)
Constructs a new QMdiSubWindow widget. |
Method Summary | |
---|---|
protected void |
changeEvent(QEvent changeEvent)
This function is reimplemented for internal reasons. |
protected void |
childEvent(QChildEvent childEvent)
This function is reimplemented for internal reasons. |
protected void |
closeEvent(QCloseEvent closeEvent)
This function is reimplemented for internal reasons. |
protected void |
contextMenuEvent(QContextMenuEvent contextMenuEvent)
This function is reimplemented for internal reasons. |
boolean |
event(QEvent event)
This function is reimplemented for internal reasons. |
boolean |
eventFilter(QObject object,
QEvent event)
This function is reimplemented for internal reasons. |
protected void |
focusInEvent(QFocusEvent focusInEvent)
This function is reimplemented for internal reasons. |
protected void |
focusOutEvent(QFocusEvent focusOutEvent)
This function is reimplemented for internal reasons. |
static QMdiSubWindow |
fromNativePointer(QNativePointer nativePointer)
This function returns the QMdiSubWindow instance pointed to by nativePointer |
protected void |
hideEvent(QHideEvent hideEvent)
This function is reimplemented for internal reasons. |
boolean |
isShaded()
Returns true if this window is shaded; otherwise returns false. |
int |
keyboardPageStep()
Returns sets how far a widget should move or resize when using the keyboard page keys.. |
int |
keyboardSingleStep()
Returns sets how far a widget should move or resize when using the keyboard arrow keys.. |
protected void |
keyPressEvent(QKeyEvent keyEvent)
This function is reimplemented for internal reasons. |
protected void |
leaveEvent(QEvent leaveEvent)
This function is reimplemented for internal reasons. |
QWidget |
maximizedButtonsWidget()
|
QWidget |
maximizedSystemMenuIconWidget()
|
QSize |
minimumSizeHint()
This function is reimplemented for internal reasons. |
protected void |
mouseDoubleClickEvent(QMouseEvent mouseEvent)
This function is reimplemented for internal reasons. |
protected void |
mouseMoveEvent(QMouseEvent mouseEvent)
This function is reimplemented for internal reasons. |
protected void |
mousePressEvent(QMouseEvent mouseEvent)
This function is reimplemented for internal reasons. |
protected void |
mouseReleaseEvent(QMouseEvent mouseEvent)
This function is reimplemented for internal reasons. |
protected void |
moveEvent(QMoveEvent moveEvent)
This function is reimplemented for internal reasons. |
protected void |
paintEvent(QPaintEvent paintEvent)
This function is reimplemented for internal reasons. |
protected void |
resizeEvent(QResizeEvent resizeEvent)
This function is reimplemented for internal reasons. |
void |
setKeyboardPageStep(int step)
Sets sets how far a widget should move or resize when using the keyboard page keys. to step. |
void |
setKeyboardSingleStep(int step)
Sets sets how far a widget should move or resize when using the keyboard arrow keys. to step. |
void |
setOption(QMdiSubWindow.SubWindowOption option)
Equivalent to setOption(option, true). |
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. |
protected void |
showEvent(QShowEvent showEvent)
This function is reimplemented for internal reasons. |
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. |
QSize |
sizeHint()
This function is reimplemented for internal reasons. |
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 arg__1 is enabled; otherwise returns false. |
protected void |
timerEvent(QTimerEvent timerEvent)
This function is reimplemented for internal reasons. |
QWidget |
widget()
Returns the current internal widget. |
Methods inherited from class com.trolltech.qt.core.QObject |
---|
blockSignals, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, property, removeEventFilter, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
disconnect, disconnect, signalSender |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Field Detail |
---|
public final QSignalEmitter.Signal0 aboutToActivate
QMdiSubWindow emits this signal immediately before it is activated. After the subwindow has been activated, the QMdiArea that manages the subwindow will also emit the subWindowActivated() signal.
public final QSignalEmitter.Signal2<Qt.WindowStates,Qt.WindowStates> windowStateChanged
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)
Equivalent to QMdiSubWindow(parent, 0).
public QMdiSubWindow()
Equivalent to QMdiSubWindow(0, 0).
public QMdiSubWindow(QWidget parent, Qt.WindowFlags flags)
Constructs a new QMdiSubWindow widget. The parent and flags arguments are passed to 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
Method Detail |
---|
public final boolean isShaded()
Returns true if this window is shaded; otherwise returns false.
A window is shaded if it is collapsed so that only the title bar is visible.
public final int keyboardPageStep()
Returns sets how far a widget should move or resize when using the keyboard page keys..
When in keyboard-interactive mode, you can use the arrow and page keys to either move or resize the window. This property controls the page keys. The common way to enter keyboard interactive mode is to enter the subwindow menu, and select either "resize" or "move".
The default keyboard page step value is 20 pixels.
public final int keyboardSingleStep()
Returns sets how far a widget should move or resize when using the keyboard arrow keys..
When in keyboard-interactive mode, you can use the arrow and page keys to either move or resize the window. This property controls the arrow keys. The common way to enter keyboard interactive mode is to enter the subwindow menu, and select either "resize" or "move".
The default keyboard single step value is 5 pixels.
public final QWidget maximizedButtonsWidget()
public final QWidget maximizedSystemMenuIconWidget()
public final void setKeyboardPageStep(int step)
Sets sets how far a widget should move or resize when using the keyboard page keys. to step.
When in keyboard-interactive mode, you can use the arrow and page keys to either move or resize the window. This property controls the page keys. The common way to enter keyboard interactive mode is to enter the subwindow menu, and select either "resize" or "move".
The default keyboard page step value is 20 pixels.
public final void setKeyboardSingleStep(int step)
Sets sets how far a widget should move or resize when using the keyboard arrow keys. to step.
When in keyboard-interactive mode, you can use the arrow and page keys to either move or resize the window. This property controls the arrow keys. The common way to enter keyboard interactive mode is to enter the subwindow menu, and select either "resize" or "move".
The default keyboard single step value is 5 pixels.
public final void setOption(QMdiSubWindow.SubWindowOption option)
Equivalent to setOption(option, true).
public final void setOption(QMdiSubWindow.SubWindowOption option, boolean on)
If on is true, option is enabled on the subwindow; otherwise it is disabled. See SubWindowOption for the effect of each option.
public final void setSystemMenu(QMenu systemMenu)
Sets systemMenu as the current system menu for this subwindow.
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.
public final void setWidget(QWidget widget)
Sets widget as the internal widget of this subwindow. The internal widget is displayed in the center of the subwindow beneath the title bar.
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.
public final void showShaded()
Calling this function makes the subwindow enter the shaded mode. When the subwindow is shaded, only the title bar is visible.
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).
public final void showSystemMenu()
Shows the system menu below the system menu icon in the title bar.
public final QMenu systemMenu()
Returns a pointer to the current system menu, or zero if no system menu is set. QMdiSubWindow provides a default system menu, but you can also set the menu with setSystemMenu.
public final boolean testOption(QMdiSubWindow.SubWindowOption arg__1)
Returns true if arg__1 is enabled; otherwise returns false.
public final QWidget widget()
Returns the current internal widget.
protected void changeEvent(QEvent changeEvent)
This function is reimplemented for internal reasons.
changeEvent
in class QWidget
protected void childEvent(QChildEvent childEvent)
This function is reimplemented for internal reasons.
childEvent
in class QObject
protected void closeEvent(QCloseEvent closeEvent)
This function is reimplemented for internal reasons.
closeEvent
in class QWidget
protected void contextMenuEvent(QContextMenuEvent contextMenuEvent)
This function is reimplemented for internal reasons.
contextMenuEvent
in class QWidget
public boolean event(QEvent event)
This function is reimplemented for internal reasons.
event
in class QWidget
public boolean eventFilter(QObject object, QEvent event)
This function is reimplemented for internal reasons.
eventFilter
in class QObject
protected void focusInEvent(QFocusEvent focusInEvent)
This function is reimplemented for internal reasons.
focusInEvent
in class QWidget
protected void focusOutEvent(QFocusEvent focusOutEvent)
This function is reimplemented for internal reasons.
focusOutEvent
in class QWidget
protected void hideEvent(QHideEvent hideEvent)
This function is reimplemented for internal reasons.
hideEvent
in class QWidget
visible
,
event,
QHideEventprotected void keyPressEvent(QKeyEvent keyEvent)
This function is reimplemented for internal reasons.
keyPressEvent
in class QWidget
protected void leaveEvent(QEvent leaveEvent)
This function is reimplemented for internal reasons.
leaveEvent
in class QWidget
public QSize minimumSizeHint()
This function is reimplemented for internal reasons.
minimumSizeHint
in class QWidget
protected void mouseDoubleClickEvent(QMouseEvent mouseEvent)
This function is reimplemented for internal reasons.
mouseDoubleClickEvent
in class QWidget
protected void mouseMoveEvent(QMouseEvent mouseEvent)
This function is reimplemented for internal reasons.
mouseMoveEvent
in class QWidget
Example
protected void mousePressEvent(QMouseEvent mouseEvent)
This function is reimplemented for internal reasons.
mousePressEvent
in class QWidget
Example
protected void mouseReleaseEvent(QMouseEvent mouseEvent)
This function is reimplemented for internal reasons.
mouseReleaseEvent
in class QWidget
Example
protected void moveEvent(QMoveEvent moveEvent)
This function is reimplemented for internal reasons.
moveEvent
in class QWidget
protected void paintEvent(QPaintEvent paintEvent)
This function is reimplemented for internal reasons.
paintEvent
in class QWidget
protected void resizeEvent(QResizeEvent resizeEvent)
This function is reimplemented for internal reasons.
resizeEvent
in class QWidget
Example
protected void showEvent(QShowEvent showEvent)
This function is reimplemented for internal reasons.
showEvent
in class QWidget
visible
,
event,
QShowEventpublic QSize sizeHint()
This function is reimplemented for internal reasons.
sizeHint
in class QWidget
protected void timerEvent(QTimerEvent timerEvent)
This function is reimplemented for internal reasons.
timerEvent
in class QObject
public static QMdiSubWindow fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |