<class name="QDesktopWidget" doc="/** <p>The <a href="QDesktopWidget.html#QDesktopWidget()"><tt>QDesktopWidget</tt></a> class provides access to screen information on multi-head systems.</p> <p>Systems 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 <a href="QDesktopWidget.html#isVirtualDesktop()"><tt>isVirtualDesktop</tt></a>). For an application, one of the available screens is the primary screen, i.e&#x2e; the screen where the main widget resides (see <a href="QDesktopWidget.html#primaryScreen()"><tt>primaryScreen</tt></a>). All windows opened in the context of the application should 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.</p> <p>The <a href="QDesktopWidget.html#QDesktopWidget()"><tt>QDesktopWidget</tt></a> provides information about the geometry of the available screens with <a href="QDesktopWidget.html#screenGeometry(com.trolltech.qt.gui.QWidget)"><tt>screenGeometry</tt></a>. The number of screens available is returned by <a href="QDesktopWidget.html#numScreens()"><tt>numScreens</tt></a>. The screen number that a particular point or widget is located in is returned by <a href="QDesktopWidget.html#screenNumber(com.trolltech.qt.gui.QWidget)"><tt>screenNumber</tt></a>.</p> <p>Widgets provided by Qt use this class, for example, to place tooltips, menus and dialog boxes according to the parent or application widget.</p> <p>Applications can use this class to save window positions, or to place child widgets on one screen.</p> <p align="center"><img src="%2E%2E/images/qdesktopwidget.png" alt="Managing Multiple Screens" /></p><p>In the illustration above, Application One's primary screen is screen 0, and App Two's primary screen is screen 1.</p> @see <a href="QApplication.html"><tt>QApplication</tt></a> @see <tt>QX11Info::appRootWindow</tt> */"> <signal name="protected final void customContextMenuRequested(com.trolltech.qt.core.QPoint pos)" doc="/** <p>This signal is emitted when the widget's <a href="QWidget.html#contextMenuPolicy()"><tt>contextMenuPolicy</tt></a> is Qt::CustomContextMenu, and the user has requested a context menu on the widget. The position <tt>pos</tt> is the position of the context menu event that the widget receives. Normally this is in widget coordinates. The exception to this rule is <a href="QAbstractScrollArea.html"><tt>QAbstractScrollArea</tt></a> and its subclasses that map the context menu event to coordinates of the viewport()</tt> .</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(com.trolltech.qt.core.QPoint pos)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QWidget.html#mapToGlobal(com.trolltech.qt.core.QPoint)"><tt>mapToGlobal</tt></a>, <a href="QMenu.html"><tt>QMenu</tt></a>, <a href="QWidget.html#contextMenuPolicy()"><tt>contextMenuPolicy</tt></a></dd> </dl> */"/> <signal name="protected final void resized(int arg__1)" doc="/** <p>This signal is emitted when the size of <tt>arg__1</tt> changes.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(int arg__1)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> */"/> <signal name="protected final void workAreaResized(int arg__1)" doc="/** <p>This signal is emitted when the work area available on <tt>arg__1</tt> changes.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(int arg__1)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> */"/> <method name="public QDesktopWidget()" doc="/** <p>Creates the desktop widget.</p> <p>If 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.</p> <p>Instead of using <a href="QDesktopWidget.html#QDesktopWidget()"><tt>QDesktopWidget</tt></a> directly, use QApplication::desktop().</p> */"/> <method name="public final com.trolltech.qt.core.QRect availableGeometry(com.trolltech.qt.gui.QWidget widget)" doc="/** <p>Returns the available geometry of the screen which contains <tt>widget</tt>.</p> @see <a href="QDesktopWidget.html#screenGeometry(com.trolltech.qt.gui.QWidget)"><tt>screenGeometry</tt></a> */"/> <method name="public final com.trolltech.qt.core.QRect availableGeometry(com.trolltech.qt.core.QPoint point)" doc="/** <p>Returns the available geometry of the screen which contains <tt>point</tt>.</p> @see <a href="QDesktopWidget.html#screenGeometry(com.trolltech.qt.gui.QWidget)"><tt>screenGeometry</tt></a> */"/> <method name="public final com.trolltech.qt.core.QRect availableGeometry(int screen)" doc="/** <p>Returns the available geometry of the screen with index <tt>screen</tt>. What is available will be subrect of <a href="QDesktopWidget.html#screenGeometry(com.trolltech.qt.gui.QWidget)"><tt>screenGeometry</tt></a> based on what the platform decides is available (for example excludes the dock and menu bar on Mac OS X, or the task bar on Windows).</p> @see <a href="QDesktopWidget.html#screenNumber(com.trolltech.qt.gui.QWidget)"><tt>screenNumber</tt></a> @see <a href="QDesktopWidget.html#screenGeometry(com.trolltech.qt.gui.QWidget)"><tt>screenGeometry</tt></a> */"/> <method name="public final com.trolltech.qt.core.QRect availableGeometry()" doc="/** <p>Equivalent to <a href="QDesktopWidget.html#availableGeometry(int)"><tt>availableGeometry</tt></a>(-1). */"/> <method name="public final boolean isVirtualDesktop()" doc="/** <p>Returns true if the system manages the available screens in a virtual desktop; otherwise returns false.</p> <p>For virtual desktops, <a href="QDesktopWidget.html#screen(int)"><tt>screen</tt></a> will always return the same widget. The size of the virtual desktop is the size of this desktop widget.</p> */"/> <method name="public final int numScreens()" doc="/** <p>Returns the number of available screens.</p> @see <a href="QDesktopWidget.html#primaryScreen()"><tt>primaryScreen</tt></a> */"/> <method name="public final int primaryScreen()" doc="/** <p>Returns the index of the primary screen.</p> @see <a href="QDesktopWidget.html#numScreens()"><tt>numScreens</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QWidget screen(int screen)" doc="/** <p>Returns a widget that represents the screen with index <tt>screen</tt>.</p> <p>If the system uses a virtual desktop, the returned widget will have the geometry of the entire virtual desktop; i.e&#x2e;, bounding every <tt>screen</tt>.</p> @see <a href="QDesktopWidget.html#primaryScreen()"><tt>primaryScreen</tt></a> @see <a href="QDesktopWidget.html#numScreens()"><tt>numScreens</tt></a> @see <a href="QDesktopWidget.html#isVirtualDesktop()"><tt>isVirtualDesktop</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QWidget screen()" doc="/** <p>Equivalent to <a href="QDesktopWidget.html#screen(int)">screen</tt></a>(-1). */"/> <method name="public final com.trolltech.qt.core.QRect screenGeometry(int screen)" doc="/** <p>Returns the geometry of the screen with index <tt>screen</tt>.</p> @see <a href="QDesktopWidget.html#screenNumber(com.trolltech.qt.gui.QWidget)"><tt>screenNumber</tt></a> */"/> <method name="public final com.trolltech.qt.core.QRect screenGeometry()" doc="/** <p>Equivalent to <a href="QDesktopWidget.html#screenGeometry(com.trolltech.qt.gui.QWidget)"><tt>screenGeometry</tt></a>(-1). */"/> <method name="public final com.trolltech.qt.core.QRect screenGeometry(com.trolltech.qt.core.QPoint point)" doc="/** <p>Returns the geometry of the screen which contains <tt>point</tt>.</p> */"/> <method name="public final com.trolltech.qt.core.QRect screenGeometry(com.trolltech.qt.gui.QWidget widget)" doc="/** <p>Returns the geometry of the screen which contains <tt>widget</tt>.</p> */"/> <method name="public final int screenNumber(com.trolltech.qt.core.QPoint arg__1)" doc="/** <p>Returns the index of the screen that contains the <tt>arg__1</tt>, or the screen which is the shortest distance from the <tt>arg__1</tt>.</p> @see <a href="QDesktopWidget.html#primaryScreen()"><tt>primaryScreen</tt></a> */"/> <method name="public final int screenNumber(com.trolltech.qt.gui.QWidget widget)" doc="/** <p>Returns the index of the screen that contains the largest part of <tt>widget</tt>, or -1 if the widget not on a screen.</p> @see <a href="QDesktopWidget.html#primaryScreen()"><tt>primaryScreen</tt></a> */"/> <method name="public final int screenNumber()" doc="/** <p>Equivalent to <a href="QDesktopWidget.html#screenNumber(com.trolltech.qt.gui.QWidget)"><tt>screenNumber</tt></a>(0). */"/> <method name="protected void resizeEvent(com.trolltech.qt.gui.QResizeEvent e)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> </class>