⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qmainwindow.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
📖 第 1 页 / 共 3 页
字号:
.SH "bool QMainWindow::dockWindowsMovable () const"Returns TRUE if the dock windows are movable; otherwise returns FALSE. See the "dockWindowsMovable" property for details..SH "bool QMainWindow::getLocation ( QDockWindow * dw, Dock & dock, int & index, bool & nl, int & extraOffset ) const"Finds the location of the dock window \fIdw\fR..PPIf the \fIdw\fR dock window is found in the main window the function returns TRUE and populates the \fIdock\fR variable with the dw's dock area and the \fIindex\fR with the dw's position within the dock area. It also sets \fInl\fR to TRUE if the \fIdw\fR begins a new line (otherwise FALSE), and \fIextraOffset\fR with the dock window's offset..PPIf the \fIdw\fR dock window is not found then the function returns FALSE and the state of \fIdock\fR, \fIindex\fR, \fInl\fR and \fIextraOffset\fR is undefined..PPIf you want to save and restore dock window positions then use operator>>() and operator<<()..PPSee also operator>>() and operator<<()..SH "bool QMainWindow::hasDockWindow ( QDockWindow * dw )"Returns TRUE if \fIdw\fR is a dock window known to the main window; otherwise returns FALSE..SH "bool QMainWindow::isCustomizable () const\fC [virtual]\fR"Returns TRUE if the dock area dock window menu includes the Customize menu item (which calls customize() when clicked). Returns FALSE by default, i.e. the popup menu will not contain a Customize menu item. You will need to reimplement this function and set it to return TRUE if you wish the user to be able to see the dock window menu..PPSee also customize()..SH "bool QMainWindow::isDockEnabled ( Dock dock ) const"Returns TRUE if the \fIdock\fR dock area is enabled, i.e. it can accept user dragged dock windows; otherwise returns FALSE..PPSee also setDockEnabled()..SH "bool QMainWindow::isDockEnabled ( QDockArea * area ) const"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPReturns TRUE if dock area \fIarea\fR is enabled, i.e. it can accept user dragged dock windows; otherwise returns FALSE..PPSee also setDockEnabled()..SH "bool QMainWindow::isDockEnabled ( QDockWindow * tb, Dock dock ) const"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPReturns TRUE if dock area \fIdock\fR is enabled for the dock window \fItb\fR; otherwise returns FALSE..PPSee also setDockEnabled()..SH "bool QMainWindow::isDockEnabled ( QDockWindow * dw, QDockArea * area ) const"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPReturns TRUE if dock area \fIarea\fR is enabled for the dock window \fIdw\fR; otherwise returns FALSE..PPSee also setDockEnabled()..SH "bool QMainWindow::isDockMenuEnabled () const"Returns TRUE, if the dock window menu is enabled; otherwise returns FALSE..PPThe menu lists the (appropriate()) dock windows (which may be shown or hidden), and has a "Line Up Dock Windows" menu item. It will also have a "Customize" menu item if isCustomizable() returns TRUE..PPSee also setDockEnabled(), lineUpDockWindows(), appropriate(), and setAppropriate()..SH "QDockArea * QMainWindow::leftDock () const"Returns the Left dock area.PPSee also rightDock(), topDock(), and bottomDock()..SH "void QMainWindow::lineUpDockWindows ( bool keepNewLines = FALSE )"This function will line up dock windows within the visible dock areas (Top, Left, Right and Bottom) as compactly as possible..PPIf \fIkeepNewLines\fR is TRUE, all dock windows stay on their original lines. If \fIkeepNewLines\fR is FALSE then newlines may be removed to achieve the most compact layout possible..PPThe method only works if dockWindowsMovable() returns TRUE..SH "void QMainWindow::lineUpToolBars ( bool keepNewLines = FALSE )"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "void QMainWindow::menuAboutToShow ()\fC [protected slot]\fR"This slot is called from the aboutToShow() signal of the default dock menu of the mainwindow. The default implementation initializes the menu with all dock windows and toolbars in this slot..SH "QMenuBar * QMainWindow::menuBar () const"Returns the menu bar for this window..PPIf there isn't one, then menuBar() creates an empty menu bar..PPSee also statusBar()..SH "void QMainWindow::moveDockWindow ( QDockWindow * dockWindow, Dock edge = DockTop )\fC [virtual]\fR"Moves \fIdockWindow\fR to the end of the \fIedge\fR..PPFor vertical edges the end is at the bottom, for horizontal edges (including Minimized) the end is at the right..PPIf \fIdockWindow\fR is managed by another main window, it is first removed from that window..SH "void QMainWindow::moveDockWindow ( QDockWindow * dockWindow, Dock edge, bool nl, int index, int extraOffset = -1 )\fC [virtual]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPMoves \fIdockWindow\fR to position \fIindex\fR within the \fIedge\fR dock area..PPAny dock windows with positions \fIindex\fR or higher have their position number incremented and any of these on the same line are moved right (down for vertical dock areas) to make room..PPIf \fInl\fR is TRUE, a new dock window line is created below the line in which the moved dock window appears and the moved dock window, with any others with higher positions on the same line, is moved to this new line..PPThe \fIextraOffset\fR is the space to put between the left side of the dock area (top side for vertical dock areas) and the dock window. (This is mostly used for restoring dock windows to the positions the user has dragged them to.).PPIf \fIdockWindow\fR is managed by another main window, it is first removed from that window..SH "void QMainWindow::moveToolBar ( QDockWindow *, Dock = DockTop )"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "void QMainWindow::moveToolBar ( QDockWindow *, Dock, bool nl, int index, int extraOffset = -1 )"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..PPThis is an overloaded member function, provided for convenience. It behaves essentially like the above function..SH "bool QMainWindow::opaqueMoving () const"Returns TRUE if dock windows are moved opaquely; otherwise returns FALSE. See the "opaqueMoving" property for details..SH "void QMainWindow::pixmapSizeChanged ( bool )\fC [signal]\fR"This signal is emitted whenever the setUsesBigPixmaps() is called with a value different to the current setting. All widgets that should respond to such changes, e.g. toolbar buttons, must connect to this signal..SH "void QMainWindow::removeDockWindow ( QDockWindow * dockWindow )\fC [virtual]\fR"Removes \fIdockWindow\fR from the main window's docking area, provided \fIdockWindow\fR is non-null and managed by this main window..SH "void QMainWindow::removeToolBar ( QDockWindow * )"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "QDockArea * QMainWindow::rightDock () const"Returns the Right dock area.PPSee also leftDock(), topDock(), and bottomDock()..SH "bool QMainWindow::rightJustification () const"Returns TRUE if the main window right-justifies its dock windows; otherwise returns FALSE. See the "rightJustification" property for details..SH "void QMainWindow::setAppropriate ( QDockWindow * dw, bool a )\fC [virtual slot]\fR"Use this function to control whether or not the \fIdw\fR dock window's caption should appear as a menu item on the dock window menu that lists the dock windows..PPIf \fIa\fR is TRUE then the \fIdw\fR will appear as a menu item on the dock window menu. The user is able to change the state (show or hide) a dock window that has a menu item by clicking the item; depending on the state of your application, this may or may not be appropriate. If \fIa\fR is FALSE the \fIdw\fR will not appear on the popup menu..PPSee also showDockMenu(), isCustomizable(), and customize()..SH "void QMainWindow::setCentralWidget ( QWidget * w )\fC [virtual]\fR"Sets the central widget for this main window to \fIw\fR..PPThe central widget is surrounded by the left, top, right and bottom dock areas. The menu bar is above the top dock area..PPSee also centralWidget()..SH "void QMainWindow::setDockEnabled ( Dock dock, bool enable )\fC [virtual]\fR"If \fIenable\fR is TRUE then users can dock windows in the \fIdock\fR area. If \fIenable\fR is FALSE users cannot dock windows in the \fIdock\fR dock area..PPUsers can dock (drag) dock windows into any enabled dock area..SH "void QMainWindow::setDockEnabled ( QDockWindow * dw, Dock dock, bool enable )\fC [virtual]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPIf \fIenable\fR is TRUE then users can dock the \fIdw\fR dock window in the \fIdock\fR area. If \fIenable\fR is FALSE users cannot dock the \fIdw\fR dock window in the \fIdock\fR area..PPIn general users can dock (drag) dock windows into any enabled dock area. Using this function particular dock areas can be enabled (or disabled) as docking points for particular dock windows..SH "void QMainWindow::setDockMenuEnabled ( bool b )\fC [virtual slot]\fR"If \fIb\fR is TRUE, then right clicking on a dock window or dock area will pop up the dock window menu. If \fIb\fR is FALSE, right clicking a dock window or dock area will not pop up the menu..PPThe menu lists the (appropriate()) dock windows (which may be shown or hidden), and has a "Line Up Dock Windows" item. It will also have a "Customize" menu item if isCustomizable() returns TRUE..PPSee also lineUpDockWindows() and isDockMenuEnabled()..SH "void QMainWindow::setDockWindowsMovable ( bool )\fC [virtual slot]\fR"Sets whether the dock windows are movable. See the "dockWindowsMovable" property for details..SH "void QMainWindow::setOpaqueMoving ( bool )\fC [virtual slot]\fR"Sets whether dock windows are moved opaquely. See the "opaqueMoving" property for details..SH "void QMainWindow::setRightJustification ( bool )\fC [virtual slot]\fR"Sets whether the main window right-justifies its dock windows. See the "rightJustification" property for details..SH "void QMainWindow::setToolBarsMovable ( bool )\fC [slot]\fR"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "void QMainWindow::setUpLayout ()\fC [virtual protected slot]\fR"Sets up the geometry management of the window. It is called automatically when needed, so you shouldn't need to call it..SH "void QMainWindow::setUsesBigPixmaps ( bool )\fC [virtual slot]\fR"Sets whether big pixmaps are enabled. See the "usesBigPixmaps" property for details..SH "void QMainWindow::setUsesTextLabel ( bool )\fC [virtual slot]\fR"Sets whether text labels for toolbar buttons are enabled. See the "usesTextLabel" property for details..SH "bool QMainWindow::showDockMenu ( const QPoint & globalPos )\fC [virtual protected slot]\fR"Shows the dock menu at the position \fIglobalPos\fR. The menu lists the dock windows so that they can be shown (or hidden), lined up, and possibly customized. Returns TRUE if the menu is shown; otherwise returns FALSE..PPIf you want a custom menu, reimplement this function. You can create the menu from scratch or call createDockWindowMenu() and modify the result..SH "QStatusBar * QMainWindow::statusBar () const"Returns this main window's status bar. If there isn't one, statusBar() creates an empty status bar, and if necessary a tool tip group too..PPSee also menuBar() and toolTipGroup()..PPExample: qfd/qfd.cpp..SH "void QMainWindow::toolBarPositionChanged ( QToolBar * )\fC [signal]\fR"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "QPtrList<QToolBar> QMainWindow::toolBars ( Dock dock ) const"Returns a list of all the toolbars which are in the \fIdock\fR dock area, regardless of their state..PPFor example, the TornOff dock area may contain closed toolbars but these are returned along with the visible toolbars..PPSee also dockWindows()..SH "bool QMainWindow::toolBarsMovable () const"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "QToolTipGroup * QMainWindow::toolTipGroup () const"Returns this main window's tool tip group. If there isn't one, toolTipGroup() creates an empty tool tip group..PPSee also menuBar() and statusBar()..SH "QDockArea * QMainWindow::topDock () const"Returns the Top dock area.PPSee also bottomDock(), leftDock(), and rightDock()..SH "bool QMainWindow::usesBigPixmaps () const"Returns TRUE if big pixmaps are enabled; otherwise returns FALSE. See the "usesBigPixmaps" property for details..SH "bool QMainWindow::usesTextLabel () const"Returns TRUE if text labels for toolbar buttons are enabled; otherwise returns FALSE. See the "usesTextLabel" property for details..SH "void QMainWindow::usesTextLabelChanged ( bool )\fC [signal]\fR"This signal is emitted whenever the setUsesTextLabel() is called with a value different to the current setting. All widgets that should respond to such changes, e.g. toolbar buttons, must connect to this signal..SH "void QMainWindow::whatsThis ()\fC [virtual slot]\fR"Enters 'What's This?' mode and returns immediately..PPThis is the same as QWhatsThis::enterWhatsThisMode(), but implemented as a main window object's slot. This way it can easily be used for popup menus, for example:.PP.nf.br    QPopupMenu * help = new QPopupMenu( this );.br    help->insertItem( "What's &This", this , SLOT(whatsThis()), SHIFT+Key_F1);.br.fi.PPSee also QWhatsThis::enterWhatsThisMode()..SS "Property Documentation".SH "bool dockWindowsMovable"This property holds whether the dock windows are movable..PPIf TRUE (the default), the user will be able to move movable dock windows from one QMainWindow dock area to another, including the \fCTearOff\fR area (i.e. where the dock window floats freely as a window in its own right), and the Minimized area (where only the dock window's handle is shown below the menu bar). Moveable dock windows can also be moved within QMainWindow dock areas, i.e. to rearrange them within a dock area..PPIf FALSE the user will not be able to move any dock windows..PPBy default dock windows are moved transparently (i.e. only an outline rectangle is shown during the drag), but this setting can be changed with setOpaqueMoving()..PPSee also setDockEnabled() and opaqueMoving..PPSet this property's value with setDockWindowsMovable() and get this property's value with dockWindowsMovable()..SH "bool opaqueMoving"This property holds whether dock windows are moved opaquely..PPIf TRUE the dock windows of the main window are shown opaquely (i.e. it shows the toolbar as it looks when docked) whilst it is being moved. If FALSE (the default) they are shown transparently, (i.e. as an outline rectangle)..PP\fBWarning:\fR Opaque moving of toolbars and dockwindows is known to have several problems. We recommend avoiding the use of this feature for the time being. We intend fixing the problems in a future release..PPSet this property's value with setOpaqueMoving() and get this property's value with opaqueMoving()..SH "bool rightJustification"This property holds whether the main window right-justifies its dock windows..PPIf disabled (the default), stretchable dock windows are expanded, and non-stretchable dock windows are given the minimum space they need. Since most dock windows are not stretchable, this usually results in an unjustified right edge (or unjustified bottom edge for a vertical dock area). If enabled, the main window will right-justify its dock windows..PPSee also QDockWindow::setVerticalStretchable() and QDockWindow::setHorizontalStretchable()..PPSet this property's value with setRightJustification() and get this property's value with rightJustification()..SH "bool usesBigPixmaps"This property holds whether big pixmaps are enabled..PPIf FALSE (the default), the tool buttons will use small pixmaps; otherwise big pixmaps will be used..PPTool buttons and other widgets that wish to respond to this setting are responsible for reading the correct state on startup, and for connecting to the main window's widget's pixmapSizeChanged() signal..PPSet this property's value with setUsesBigPixmaps() and get this property's value with usesBigPixmaps()..SH "bool usesTextLabel"This property holds whether text labels for toolbar buttons are enabled..PPIf disabled (the default), the tool buttons will not use text labels. If enabled, text labels will be used..PPTool buttons and other widgets that wish to respond to this setting are responsible for reading the correct state on startup, and for connecting to the main window's widget's usesTextLabelChanged() signal..PPSee also QToolButton::usesTextLabel..PPSet this property's value with setUsesTextLabel() and get this property's value with usesTextLabel()..SH RELATED FUNCTION DOCUMENTATION.SH "QTextStream & operator<< ( QTextStream & ts, const QMainWindow & mainWindow )"Writes the layout (sizes and positions) of the dock windows in the dock areas of the QMainWindow \fImainWindow\fR, including Minimized and TornOff dock windows, to the text stream \fIts\fR..PPThis can be used, for example, in conjunction with QSettings to save the user's layout..PPSee also operator>>()..SH "QTextStream & operator>> ( QTextStream & ts, QMainWindow & mainWindow )"Reads the layout (sizes and positions) of the dock windows in the dock areas of the QMainWindow \fImainWindow\fR from the text stream, \fIts\fR, including Minimized and TornOff dock windows. Restores the dock windows and dock areas to these sizes and positions. The layout information must be in the format produced by operator<<()..PPThis can be used, for example, in conjunction with QSettings to restore the user's layout..PPSee also operator<<()..SH "SEE ALSO".BR http://doc.trolltech.com/qmainwindow.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 (qmainwindow.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -