File: qdesktopwidget.html

package info (click to toggle)
python-qt4 4.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,632 kB
  • ctags: 2,639
  • sloc: python: 29,409; sh: 5,646; cpp: 3,168; xml: 149; makefile: 109
file content (51 lines) | stat: -rw-r--r-- 11,336 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QDesktopWidget Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QDesktopWidget Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QDesktopWidget class provides access to screen information on multi-head systems. <a href="#details">More...</a></p>
<p>Inherits <a href="qwidget.html">QWidget</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qdesktopwidget.html#QDesktopWidget">__init__</a></b> (<i>self</i>)</li><li><div class="fn" />QRect <b><a href="qdesktopwidget.html#availableGeometry">availableGeometry</a></b> (<i>self</i>, int&#160;<i>screen</i>&#160;=&#160;-1)</li><li><div class="fn" />QRect <b><a href="qdesktopwidget.html#availableGeometry-2">availableGeometry</a></b> (<i>self</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" />QRect <b><a href="qdesktopwidget.html#availableGeometry-3">availableGeometry</a></b> (<i>self</i>, QPoint&#160;<i>point</i>)</li><li><div class="fn" />bool <b><a href="qdesktopwidget.html#isVirtualDesktop">isVirtualDesktop</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qdesktopwidget.html#numScreens">numScreens</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qdesktopwidget.html#primaryScreen">primaryScreen</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdesktopwidget.html#resized">resized</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qdesktopwidget.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QResizeEvent&#160;<i>e</i>)</li><li><div class="fn" />QWidget <b><a href="qdesktopwidget.html#screen">screen</a></b> (<i>self</i>, int&#160;<i>screen</i>&#160;=&#160;-1)</li><li><div class="fn" />QRect <b><a href="qdesktopwidget.html#screenGeometry">screenGeometry</a></b> (<i>self</i>, int&#160;<i>screen</i>&#160;=&#160;-1)</li><li><div class="fn" />QRect <b><a href="qdesktopwidget.html#screenGeometry-2">screenGeometry</a></b> (<i>self</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" />QRect <b><a href="qdesktopwidget.html#screenGeometry-3">screenGeometry</a></b> (<i>self</i>, QPoint&#160;<i>point</i>)</li><li><div class="fn" />int <b><a href="qdesktopwidget.html#screenNumber">screenNumber</a></b> (<i>self</i>, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" />int <b><a href="qdesktopwidget.html#screenNumber-2">screenNumber</a></b> (<i>self</i>, QPoint)</li><li><div class="fn" /><b><a href="qdesktopwidget.html#workAreaResized">workAreaResized</a></b> (<i>self</i>, int)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QDesktopWidget 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">isVirtualDesktop</a>()). For an application, one of the available screens is the primary screen, i.e. the screen where the main widget resides (see <a href="qdesktopwidget.html#primaryScreen">primaryScreen</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 QDesktopWidget provides information about the geometry of the available screens with <a href="qdesktopwidget.html#screenGeometry">screenGeometry</a>(). The number of screens available is returned by <a href="qdesktopwidget.html#numScreens">numScreens</a>(). The screen number that a particular point or widget is located in is returned by <a href="qdesktopwidget.html#screenNumber">screenNumber</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 alt="Managing Multiple Screens" src="images/qdesktopwidget.png" /></p>
<p>In the illustration above, Application One's primary screen is screen 0, and App Two's primary screen is screen 1.</p>
<p>See also <a href="qapplication.html">QApplication</a> and <a href="qx11info.html#appRootWindow">QX11Info.appRootWindow</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QDesktopWidget" />QDesktopWidget.__init__ (<i>self</i>)</h3><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</a> directly, use <a href="qapplication.html#desktop">QApplication.desktop</a>().</p>
<h3 class="fn"><a name="availableGeometry" /><a href="qrect.html">QRect</a> QDesktopWidget.availableGeometry (<i>self</i>, int&#160;<i>screen</i>&#160;=&#160;-1)</h3><p>Returns the available geometry of the screen with index <i>screen</i>. What is available will be subrect of <a href="qdesktopwidget.html#screenGeometry">screenGeometry</a>() based on what the platform decides is available (for example excludes the <a href="qt.html#Dock-enum">Qt.Dock</a> and menu bar on Mac OS X, or the taskbar on Windows).</p>
<p>See also <a href="qdesktopwidget.html#screenNumber">screenNumber</a>() and <a href="qdesktopwidget.html#screenGeometry">screenGeometry</a>().</p>
<h3 class="fn"><a name="availableGeometry-2" /><a href="qrect.html">QRect</a> QDesktopWidget.availableGeometry (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Returns the available geometry of the screen which contains <i>widget</i>.</p>
<p>See also <a href="qdesktopwidget.html#screenGeometry">screenGeometry</a>().</p>
<h3 class="fn"><a name="availableGeometry-3" /><a href="qrect.html">QRect</a> QDesktopWidget.availableGeometry (<i>self</i>, <a href="qpoint.html">QPoint</a>&#160;<i>point</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Returns the available geometry of the screen which contains <i>p</i>.</p>
<p>See also <a href="qdesktopwidget.html#screenGeometry">screenGeometry</a>().</p>
<h3 class="fn"><a name="isVirtualDesktop" />bool QDesktopWidget.isVirtualDesktop (<i>self</i>)</h3><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">screen</a>() will always return the same widget. The size of the virtual desktop is the size of this desktop widget.</p>
<h3 class="fn"><a name="numScreens" />int QDesktopWidget.numScreens (<i>self</i>)</h3><p>Returns the number of available screens.</p>
<p>See also <a href="qdesktopwidget.html#primaryScreen">primaryScreen</a>().</p>
<h3 class="fn"><a name="primaryScreen" />int QDesktopWidget.primaryScreen (<i>self</i>)</h3><p>Returns the index of the primary screen.</p>
<p>See also <a href="qdesktopwidget.html#numScreens">numScreens</a>().</p>
<h3 class="fn"><a name="resized" />QDesktopWidget.resized (<i>self</i>, int)</h3><p>This signal is emitted when the size of <i>screen</i> changes.</p>
<h3 class="fn"><a name="resizeEvent" />QDesktopWidget.resizeEvent (<i>self</i>, <a href="qresizeevent.html">QResizeEvent</a>&#160;<i>e</i>)</h3><h3 class="fn"><a name="screen" /><a href="qwidget.html">QWidget</a> QDesktopWidget.screen (<i>self</i>, int&#160;<i>screen</i>&#160;=&#160;-1)</h3><p>Returns a widget that represents the screen with index <i>screen</i>.</p>
<p>If the system uses a virtual desktop, the returned widget will have the geometry of the entire virtual desktop i.e. bounding every <i>screen</i>.</p>
<p>See also <a href="qdesktopwidget.html#primaryScreen">primaryScreen</a>(), <a href="qdesktopwidget.html#numScreens">numScreens</a>(), and <a href="qdesktopwidget.html#isVirtualDesktop">isVirtualDesktop</a>().</p>
<h3 class="fn"><a name="screenGeometry" /><a href="qrect.html">QRect</a> QDesktopWidget.screenGeometry (<i>self</i>, int&#160;<i>screen</i>&#160;=&#160;-1)</h3><p>Returns the geometry of the screen with index <i>screen</i>.</p>
<p>See also <a href="qdesktopwidget.html#screenNumber">screenNumber</a>().</p>
<h3 class="fn"><a name="screenGeometry-2" /><a href="qrect.html">QRect</a> QDesktopWidget.screenGeometry (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Returns the geometry of the screen which contains <i>widget</i>.</p>
<h3 class="fn"><a name="screenGeometry-3" /><a href="qrect.html">QRect</a> QDesktopWidget.screenGeometry (<i>self</i>, <a href="qpoint.html">QPoint</a>&#160;<i>point</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Returns the geometry of the screen which contains <i>p</i>.</p>
<h3 class="fn"><a name="screenNumber" />int QDesktopWidget.screenNumber (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>Returns the index of the screen that contains the largest part of <i>widget</i>, or -1 if the widget not on a screen.</p>
<p>See also <a href="qdesktopwidget.html#primaryScreen">primaryScreen</a>().</p>
<h3 class="fn"><a name="screenNumber-2" />int QDesktopWidget.screenNumber (<i>self</i>, <a href="qpoint.html">QPoint</a>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Returns the index of the screen that contains <i>point</i>, or -1 if no screen contains the point.</p>
<p>See also <a href="qdesktopwidget.html#primaryScreen">primaryScreen</a>().</p>
<h3 class="fn"><a name="workAreaResized" />QDesktopWidget.workAreaResized (<i>self</i>, int)</h3><p>This signal is emitted when the work area available on <i>screen</i> changes.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt&#160;4.0.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.trolltech.com">Trolltech&#160;AS</a> 2006</td><td align="right" width="25%">Qt&#160;4.1.4</td></tr></table></div></address></body></html>