📄 qdockwindow.3qt
字号:
.PPNote that dock windows can always be minimized if the user clicks their dock window handle when they are docked..SH "QDockWindow::Place"This enum specifies the possible locations for a QDockWindow:.TP\fCQDockWindow::InDock\fR - Inside a QDockArea..TP\fCQDockWindow::OutsideDock\fR - Floating as a top level window on the desktop..SH MEMBER FUNCTION DOCUMENTATION.SH "QDockWindow::QDockWindow ( Place p = InDock, QWidget * parent = 0, const char * name = 0, WFlags f = 0 )"Constructs a QDockWindow with parent \fIparent\fR, name \fIname\fR and widget flags \fIf\fR..PPIf \fIp\fR is InDock, the dock window is docked into a dock area and \fIparent\fR \fImust\fR be a QDockArea or a QMainWindow. If the \fIparent\fR is a QMainWindow the dock window will be docked in the main window's Top dock area..PPIf \fIp\fR is OutsideDock, the parent \fImust\fR be 0 and the dock window is created as a floating window..PPWe recommend creating the dock area InDock with a QMainWindow as parent then calling QMainWindow::moveDockWindow() to move the dock window where you want it..SH "QDockArea * QDockWindow::area () const"Returns the dock area in which this dock window is docked, or 0 if the dock window is floating..SH "QBoxLayout * QDockWindow::boxLayout ()"Returns the layout which is used for adding widgets to the dock window. The layout's orientation is set automatically to match the orientation of the dock window. You can add widgets to the layout using the box layout's QBoxLayout::addWidget() function..PPIf the dock window only needs to contain a single widget use setWidget() instead..PPSee also setWidget() and setOrientation()..SH "int QDockWindow::closeMode () const"Returns the close mode of a dock window. See the "closeMode" property for details..SH "void QDockWindow::dock ()\fC [virtual slot]\fR"Docks the dock window into the last dock area in which it was docked..PPIf the dock window has no last dock area (e.g. it was created as a floating window and has never been docked), or if the last dock area it was docked in does not exist (e.g. the dock area has been deleted), nothing happens..PPSee also undock()..SH "QSize QDockWindow::fixedExtent () const"Returns the dock window's preferred size (fixed extent)..PPSee also setFixedExtentWidth() and setFixedExtentHeight()..SH "bool QDockWindow::isCloseEnabled () const"Returns TRUE if the dock window has a close button; otherwise returns FALSE. The result depends on the dock window's Place and its CloseMode..PPSee also closeMode..SH "bool QDockWindow::isHorizontalStretchable () const"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "bool QDockWindow::isHorizontallyStretchable () const"Returns TRUE if the dock window is horizontally stretchable; otherwise returns FALSE. See the "horizontallyStretchable" property for details..SH "bool QDockWindow::isMovingEnabled () const"Returns TRUE if the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window; otherwise returns FALSE. See the "movingEnabled" property for details..SH "bool QDockWindow::isResizeEnabled () const"Returns TRUE if the dock window is resizeable; otherwise returns FALSE. See the "resizeEnabled" property for details..SH "bool QDockWindow::isStretchable () const"Returns TRUE if the dock window is stretchable in the current orientation(); otherwise returns FALSE. See the "stretchable" property for details..SH "bool QDockWindow::isVerticalStretchable () const"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "bool QDockWindow::isVerticallyStretchable () const"Returns TRUE if the dock window is vertically stretchable. A dock window is horizontally stretchable if you call setVerticallyStretchable(TRUE) or setResizeEnabled(TRUE); otherwise returns FALSE. See the "verticallyStretchable" property for details..SH "bool QDockWindow::newLine () const"Returns TRUE if the dock window prefers to start a new line in the dock area; otherwise returns FALSE. See the "newLine" property for details..SH "int QDockWindow::offset () const"Returns the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas). See the "offset" property for details..SH "bool QDockWindow::opaqueMoving () const"Returns TRUE if the dock window will be shown normally whilst it is being moved; otherwise returns FALSE. See the "opaqueMoving" property for details..SH "Qt::Orientation QDockWindow::orientation () const"Returns the orientation of the dock window..PPSee also orientationChanged()..SH "void QDockWindow::orientationChanged ( Orientation o )\fC [signal]\fR"This signal is emitted when the orientation of the dock window is changed. The new orientation is \fIo\fR..SH "Place QDockWindow::place () const"Returns TRUE if the dock window is in a dock area; otherwise returns FALSE. See the "place" property for details..SH "void QDockWindow::placeChanged ( QDockWindow::Place p )\fC [signal]\fR"This signal is emitted when the dock window is docked (\fIp\fR is InDock) or undocked (\fIp\fR is OutsideDock)..PPSee also QDockArea::moveDockWindow(), QDockArea::removeDockWindow(), QMainWindow::moveDockWindow() and QMainWindow::removeDockWindow()..SH "void QDockWindow::setCloseMode ( int m )\fC [virtual]\fR"Sets the close mode of a dock window to \fIm\fR. See the "closeMode" property for details..SH "void QDockWindow::setFixedExtentHeight ( int h )\fC [virtual]\fR"Sets the dock window's preferred height for its fixed extent (size) to \fIh\fR..PPSee also setFixedExtentWidth()..SH "void QDockWindow::setFixedExtentWidth ( int w )\fC [virtual]\fR"Sets the dock window's preferred width for its fixed extent (size) to \fIw\fR..PPSee also setFixedExtentHeight()..SH "void QDockWindow::setHorizontalStretchable ( bool b )"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "void QDockWindow::setHorizontallyStretchable ( bool b )\fC [virtual]\fR"Sets whether the dock window is horizontally stretchable to \fIb\fR. See the "horizontallyStretchable" property for details..SH "void QDockWindow::setMovingEnabled ( bool b )\fC [virtual]\fR"Sets whether the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window to \fIb\fR. See the "movingEnabled" property for details..SH "void QDockWindow::setNewLine ( bool b )\fC [virtual]\fR"Sets whether the dock window prefers to start a new line in the dock area to \fIb\fR. See the "newLine" property for details..SH "void QDockWindow::setOffset ( int o )\fC [virtual]\fR"Sets the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas) to \fIo\fR. See the "offset" property for details..SH "void QDockWindow::setOpaqueMoving ( bool b )\fC [virtual]\fR"Sets whether the dock window will be shown normally whilst it is being moved to \fIb\fR. See the "opaqueMoving" property for details..SH "void QDockWindow::setOrientation ( Orientation o )\fC [virtual slot]\fR"Sets the orientation of the dock window to \fIo\fR. The orientation is propagated to the layout boxLayout()..SH "void QDockWindow::setResizeEnabled ( bool b )\fC [virtual]\fR"Sets whether the dock window is resizeable to \fIb\fR. See the "resizeEnabled" property for details..SH "void QDockWindow::setVerticalStretchable ( bool b )"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "void QDockWindow::setVerticallyStretchable ( bool b )\fC [virtual]\fR"Sets whether the dock window is vertically stretchable. A dock window is horizontally stretchable if you call setVerticallyStretchable(TRUE) or setResizeEnabled(TRUE) to \fIb\fR. See the "verticallyStretchable" property for details..SH "void QDockWindow::setWidget ( QWidget * w )\fC [virtual]\fR"Sets the dock window's main widget to \fIw\fR..PPSee also boxLayout()..SH "void QDockWindow::undock ( QWidget * w )\fC [virtual slot]\fR"Undocks the QDockWindow from its current dock area, if it is docked; otherwise does nothing..PPDo not pass any \fIw\fR paramenter, it is for internal use only..PPSee also dock(), QDockArea::moveDockWindow(), QDockArea::removeDockWindow(), QMainWindow::moveDockWindow() and QMainWindow::removeDockWindow()..SH "void QDockWindow::visibilityChanged ( bool visible )\fC [signal]\fR"This signal is emitted if the visibility of the dock window is changed. If \fIvisible\fR is TRUE, the QDockWindow is now visible, otherwise it has been hidden..PPA dock window can be hidden if it has a close button which the user has clicked. In the case of a QMainWindow a dock window can have its visibility changed (hidden or shown) by clicking its name in the dock window menu that lists the QMainWindow's dock windows..SH "QWidget * QDockWindow::widget () const"Returns the dock window's main widget..PPSee also setWidget()..SS "Property Documentation".SH "int closeMode"This property holds the close mode of a dock window..PPDefines when (if ever) the dock window has a close button. The choices are Never, Docked (i.e. only when docked), Undocked (only when undocked, i.e. floated) or Always..PPThe default is Never..PPSet this property's value with setCloseMode() and get this property's value with closeMode()..SH "bool horizontallyStretchable"This property holds whether the dock window is horizontally stretchable..PPA dock window is horizontally stretchable if you call setHorizontallyStretchable(TRUE) or setResizeEnabled(TRUE)..PPSee also resizeEnabled..PPSet this property's value with setHorizontallyStretchable() and get this property's value with isHorizontallyStretchable()..SH "bool movingEnabled"This property holds whether the user can move the dock window within the dock area, move the dock window to another dock area, or float the dock window..PPThis property is TRUE by default..PPSet this property's value with setMovingEnabled() and get this property's value with isMovingEnabled()..SH "bool newLine"This property holds whether the dock window prefers to start a new line in the dock area..PPThe default is FALSE, i.e. the dock window doesn't require a new line in the dock area..PPSet this property's value with setNewLine() and get this property's value with newLine()..SH "int offset"This property holds the dock window's preferred offset from the dock area's left edge (top edge for vertical dock areas)..PPThe default is 0..PPSet this property's value with setOffset() and get this property's value with offset()..SH "bool opaqueMoving"This property holds whether the dock window will be shown normally whilst it is being moved..PPIf this property is FALSE, (the default), the dock window will be represented by an outline rectangle whilst it is being moved..PPSet this property's value with setOpaqueMoving() and get this property's value with opaqueMoving()..SH "Place place"This property holds whether the dock window is in a dock area..PPThe place() function returns the current place of the dock window. This is either InDock or OutsideDock..PPSee also QDockArea::moveDockWindow(), QDockArea::removeDockWindow(), QMainWindow::moveDockWindow() and QMainWindow::removeDockWindow()..PPGet this property's value with place()..SH "bool resizeEnabled"This property holds whether the dock window is resizeable..PPA resizeable dock window can be resized using splitter-like handles inside a dock area and like every other top level window when floating..PPA dock window is both horizontally and vertically stretchable if you call or setResizeEnabled(TRUE)..PPThis property is FALSE by default..PPSee also verticallyStretchable and horizontallyStretchable..PPSet this property's value with setResizeEnabled() and get this property's value with isResizeEnabled()..SH "bool stretchable"This property holds whether the dock window is stretchable in the current orientation()..PPThis property can be set using setHorizontallyStretchable() and setVerticallyStretchable(), or with setResizeEnabled()..PPSee also resizeEnabled..PPGet this property's value with isStretchable()..SH "bool verticallyStretchable"This property holds whether the dock window is vertically stretchable. A dock window is horizontally stretchable if you call setVerticallyStretchable(TRUE) or setResizeEnabled(TRUE)..PPSet this property's value with setVerticallyStretchable() and get this property's value with isVerticallyStretchable()..PPSee also resizeEnabled..SH "SEE ALSO".BR http://doc.trolltech.com/qdockwindow.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qdockwindow.3qt) and the Qtversion (3.0.0).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -