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

📄 qdesktopwidget.3qt

📁 linux下GUI编程工具qt的在线连接帮助手册
💻 3QT
字号:
'\" t.TH QDesktopWidget 3qt "11 October 2001" "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 NAMEQDesktopWidget \- Access to screen information on multi-head systems.PP\fC#include <qdesktopwidget.h>\fR.PPInherits QWidget..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQDesktopWidget\fR ()".br.ti -1c.BI "\fB~QDesktopWidget\fR ()".br.ti -1c.BI "bool \fBisVirtualDesktop\fR () const".br.ti -1c.BI "int \fBnumScreens\fR () const".br.ti -1c.BI "int \fBprimaryScreen\fR () const".br.ti -1c.BI "int \fBscreenNumber\fR ( QWidget * widget = 0 ) const".br.ti -1c.BI "int \fBscreenNumber\fR ( const QPoint & point ) const".br.ti -1c.BI "QWidget * \fBscreen\fR ( int screen = -1 )".br.ti -1c.BI "const QRect & \fBscreenGeometry\fR ( int screen = -1 ) const".br.in -1c.SH DESCRIPTIONThe QDesktopWidget class provides access to screen information on multi-head systems..PPSystems with more than one graphics card and monitor can manage the physical screen space available either as multiple desktops, or as a large virtual desktop, which usually has the size of the bounding rectangle of all the screens (see isVirtualDesktop()). For an application, one of the available screens is the primary screen, i.e. the screen where the main widget resides (see primaryScreen()). All windows opened in the context of the application have to be constrained to the boundaries of the primary screen; for example, it would be inconvenient if a dialog box popped up on a different screen, or split over two screens..PPThe QDesktopWidget provides information about the geometry of the available screens with screenGeometry(). The number of screens available is returned by numScreens(). The screen number that a particular point or widget is located in is returned by screenNumber()..PPWidgets provided by Qt use this class, for example, to place tooltips, menus and dialog boxes according to the parent or application widget..PPApplications can use this class to save window positions, or to place child widgets on one screen..PPSee also Advanced Widgets and Environment Classes..SH MEMBER FUNCTION DOCUMENTATION.SH "QDesktopWidget::QDesktopWidget ()"Creates the desktop widget..PPIf the system supports a virtual desktop, this widget will have the size of the virtual desktop; otherwise this widget will have the size of the primary screen..SH "QDesktopWidget::~QDesktopWidget ()"Destroy the object and free allocated resources..SH "bool QDesktopWidget::isVirtualDesktop () const"Returns TRUE if the system manages the available screens in a virtual desktop; otherwise returns FALSE..PPFor virtual desktops, screen() will always return the same widget. The size of the virtual desktop is the size of this desktop widget..SH "int QDesktopWidget::numScreens () const"Returns the number of available screens..PPSee also primaryScreen()..SH "int QDesktopWidget::primaryScreen () const"Returns the index of the primary screen..PPSee also numScreens()..SH "QWidget * QDesktopWidget::screen ( int screen = -1 )"Returns a widget that represents the screen with index \fIscreen\fR. This widget can be used to draw directly on the desktop, using an unclipped painter like this:.PP.nf.br  QPainter paint( QApplication::desktop()->screen( 0 ), TRUE );.br  paint.draw....br  ....br  paint.end();.br.fi.PPIf the system uses a virtual desktop, the returned widget will have the geometry of the entire virtual desktop i.e. bounding every \fIscreen\fR..PPSee also primaryScreen(), numScreens() and isVirtualDesktop()..SH "const QRect & QDesktopWidget::screenGeometry ( int screen = -1 ) const"Returns the geometry of the screen with index \fIscreen\fR..PPSee also screenNumber()..SH "int QDesktopWidget::screenNumber ( QWidget * widget = 0 ) const"Returns the index of the screen that contains the largest part of \fIwidget\fR, or -1 if the widget not on a screen..PPSee also primaryScreen()..SH "int QDesktopWidget::screenNumber ( const QPoint & point ) const"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPReturns the index of the screen that contains \fIpoint\fR, or -1 if no screen contains the point..PPSee also primaryScreen()..SH "SEE ALSO".BR http://doc.trolltech.com/qdesktopwidget.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 (qdesktopwidget.3qt) and the Qtversion (3.0.0).

⌨️ 快捷键说明

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