📄 qworkspace.3qt
字号:
'\" t.TH QWorkspace 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQWorkspace \- Workspace window that can contain decorated windows, e.g. for MDI.SH SYNOPSIS\fC#include <qworkspace.h>\fR.PPInherits QWidget..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQWorkspace\fR ( QWidget * parent = 0, const char * name = 0 )".br.ti -1c.BI "\fB~QWorkspace\fR ()".br.ti -1c.BI "QWidget * \fBactiveWindow\fR () const".br.ti -1c.BI "QWidgetList \fBwindowList\fR () const".br.ti -1c.BI "bool \fBscrollBarsEnabled\fR () const".br.ti -1c.BI "void \fBsetScrollBarsEnabled\fR ( bool enable )".br.in -1c.SS "Public Slots".in +1c.ti -1c.BI "void \fBcascade\fR ()".br.ti -1c.BI "void \fBtile\fR ()".br.in -1c.SS "Signals".in +1c.ti -1c.BI "void \fBwindowActivated\fR ( QWidget * w )".br.in -1c.SS "Properties".in +1c.ti -1c.BI "bool \fBscrollBarsEnabled\fR - whether the workspace provides scrollbars".br.in -1c.SH DESCRIPTIONThe QWorkspace widget provides a workspace window that can contain decorated windows, e.g. for MDI..PPAn MDI (multiple document interface) application has one main window with a menu bar. The central widget of this window is a workspace. The workspace itself contains zero, one or more document windows, each of which displays a document..PPThe workspace itself is an ordinary Qt widget. It has a standard constructor that takes a parent widget and an object name. The parent window is usually a QMainWindow, but it need not be..PPDocument windows (i.e. MDI windows) are also ordinary Qt widgets which have the workspace as parent widget. When you call show(), hide(), showMaximized(), setCaption(), etc. on a document window, it is shown, hidden, etc. with a frame, caption, icon and icon text, just as you'd expect. You can provide widget flags which will be used for the layout of the decoration or the behaviour of the widget itself..PPTo change the geometry of the MDI windows it is necessary to make the function calls to the parentWidget() of the widget, as this will move or resize the decorated window. Similarily you have to make the function calls to the parentWidget() of the MDI window to get the geometry of decorated window..PPA document window becomes active when it gets the keyboard focus. You can activate it using setFocus(), and the user can activate it by moving focus in the normal ways. The workspace emits a signal windowActivated() when it detects the activation change, and the function activeWindow() always returns a pointer to the active document window..PPThe convenience function windowList() returns a list of all document windows. This is useful to create a popup menu" <u>W</u>indows" on the fly, for example..PPQWorkspace provides two built-in layout strategies for child windows: cascade() and tile(). Both are slots so you can easily connect menu entries to them..PPIf you want your users to be able to work with document windows larger than the actual workspace, set the scrollBarsEnabled property to TRUE..PPIf the top-level window contains a menu bar and a document window is maximised, QWorkspace moves the document window's minimize, restore and close buttons from the document window's frame to the workspace window's menu bar. It then inserts a window operations menu at the far left of the menu bar..PPSee also Main Window and Related Classes and Organizers..SH MEMBER FUNCTION DOCUMENTATION.SH "QWorkspace::QWorkspace ( QWidget * parent = 0, const char * name = 0 )"Constructs a workspace with a \fIparent\fR and a \fIname\fR..SH "QWorkspace::~QWorkspace ()"Destroys the workspace and frees any allocated resources..SH "QWidget * QWorkspace::activeWindow () const"Returns the active window, or 0 if no window is active..PPExample: mdi/application.cpp..SH "void QWorkspace::cascade ()\fC [slot]\fR"Arranges all child windows in a cascade pattern..PPSee also tile()..PPExample: mdi/application.cpp..SH "bool QWorkspace::scrollBarsEnabled () const"Returns TRUE if the workspace provides scrollbars; otherwise returns FALSE. See the "scrollBarsEnabled" property for details..SH "void QWorkspace::setScrollBarsEnabled ( bool enable )"Sets whether the workspace provides scrollbars to \fIenable\fR. See the "scrollBarsEnabled" property for details..SH "void QWorkspace::tile ()\fC [slot]\fR"Arranges all child windows in a tile pattern..PPSee also cascade()..PPExample: mdi/application.cpp..SH "void QWorkspace::windowActivated ( QWidget * w )\fC [signal]\fR"This signal is emitted when the window widget \fIw\fR becomes active. Note that \fIw\fR can be null, and that more than one signal may be fired for one activation event..PPSee also activeWindow() and windowList()..SH "QWidgetList QWorkspace::windowList () const"Returns a list of all windows..PPExample: mdi/application.cpp..SS "Property Documentation".SH "bool scrollBarsEnabled"This property holds whether the workspace provides scrollbars..PPIf this property is set to TRUE, it is possible to resize child windows over the right or the bottom edge out of the visible area of the workspace. The workspace shows scrollbars to make it possible for the user to access those windows. If this property is set to FALSE (the default), resizing windows out of the visible area of the workspace is not permitted..PPSet this property's value with setScrollBarsEnabled() and get this property's value with scrollBarsEnabled()..SH "SEE ALSO".BR http://doc.trolltech.com/qworkspace.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 (qworkspace.3qt) and the Qtversion (3.1.1).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -