Homepage > Man Pages > Category > Subroutines
Homepage > Man Pages > Name > Q

qdesktopwidget

man page of qdesktopwidget

qdesktopwidget: Access to screen information on multi-head systems

NAME

QDesktopWidget - Access to screen information on multi-head systems

SYNOPSIS

#include <qdesktopwidget.h> Inherits QWidget. Public Members QDesktopWidget () ~QDesktopWidget () bool isVirtualDesktop () const int numScreens () const int primaryScreen () const int screenNumber ( QWidget * widget = 0 ) const int screenNumber ( const QPoint & point ) const QWidget * screen ( int screen = -1 ) const QRect & screenGeometry ( int screen = -1 ) const const QRect & screenGeometry ( QWidget * widget ) const const QRect & screenGeometry ( const QPoint & p ) const const QRect & availableGeometry ( int screen = -1 ) const const QRect & availableGeometry ( QWidget * widget ) const const QRect & availableGeometry ( const QPoint & p ) const Signals void resized ( int screen )

DESCRIPTION

The QDesktopWidget class provides access to screen information on multi-head systems. 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 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 must 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. The 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(). Widgets provided by Qt use this class, for example, to place tooltips, menus and dialog boxes according to the parent or application widget. Applications can use this class to save window positions, or to place child widgets on one screen. <center> [Image Omitted] </center> In the illustration above, Application One's primary screen is screen 0, and App Two's primary screen is screen 1. See also Advanced Widgets and Environment Classes.

MEMBER FUNCTION DOCUMENTATION

QDESKTOPWIDGET::QDESKTOPWIDGET ()
Creates the desktop widget. 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. Instead of using QDesktopWidget directly, use QApplication::desktop().
QDESKTOPWIDGET::~QDESKTOPWIDGET ()
Destroy the object and free allocated resources.

CONST QRECT & QDESKTOPWIDGET::AVAILABLEGEOMETRY ( INT SCREEN = -1 ) CONST

Returns the available geometry of the screen with index screen. What is available will be subrect of screenGeometry() based on what the platform decides is available (for example excludes the Dock and Menubar on Mac OS X, or the taskbar on Windows). See also screenNumber() and screenGeometry().

CONST QRECT & QDESKTOPWIDGET::AVAILABLEGEOMETRY ( QWIDGET * WIDGET ) CONST

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Returns the available geometry of the screen which contains widget. See also screenGeometry().

CONST QRECT & QDESKTOPWIDGET::AVAILABLEGEOMETRY ( CONST QPOINT & P ) CONST

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Returns the available geometry of the screen which contains p. See also screenGeometry().

BOOL QDESKTOPWIDGET::ISVIRTUALDESKTOP () CONST

Returns TRUE if the system manages the available screens in a virtual desktop; otherwise returns FALSE. For virtual desktops, screen() will always return the same widget. The size of the virtual desktop is the size of this desktop widget.
INT QDESKTOPWIDGET::NUMSCREENS () CONST
Returns the number of available screens. See also primaryScreen().
INT QDESKTOPWIDGET::PRIMARYSCREEN () CONST
Returns the index of the primary screen. See also numScreens().

VOID QDESKTOPWIDGET::RESIZED ( INT SCREEN ) [SIGNAL]

This signal is emitted when the size of screen changes.

QWIDGET * QDESKTOPWIDGET::SCREEN ( INT SCREEN = -1 )

Returns a widget that represents the screen with index screen. This widget can be used to draw directly on the desktop, using an unclipped painter like this: QPainter paint( QApplication::desktop()->screen( 0 ), TRUE ); paint.draw... ... paint.end(); If the system uses a virtual desktop, the returned widget will have the geometry of the entire virtual desktop i.e. bounding every screen. See also primaryScreen(), numScreens(), and isVirtualDesktop().

CONST QRECT & QDESKTOPWIDGET::SCREENGEOMETRY ( INT SCREEN = -1 ) CONST

Returns the geometry of the screen with index screen. See also screenNumber().

CONST QRECT & QDESKTOPWIDGET::SCREENGEOMETRY ( QWIDGET * WIDGET ) CONST

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Returns the geometry of the screen which contains widget.
CONST QRECT & QDESKTOPWIDGET::SCREENGEOMETRY ( CONST QPOINT & P ) CONST
This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Returns the geometry of the screen which contains p.
INT QDESKTOPWIDGET::SCREENNUMBER ( QWIDGET * WIDGET = 0 ) CONST
Returns the index of the screen that contains the largest part of widget, or -1 if the widget not on a screen. See also primaryScreen().

INT QDESKTOPWIDGET::SCREENNUMBER ( CONST QPOINT & POINT ) CONST

This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Returns the index of the screen that contains point, or -1 if no screen contains the point. See also primaryScreen().

SEE ALSO

//doc.trolltech.com/qdesktopwidget.html //www.trolltech.com/faq/tech.html

COPYRIGHT

Copyright 1992-2007 Trolltech ASA, //www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR

Generated automatically from the source code.
BUGS
If you find a bug in Qt, please report it as described in //doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt- bugs@trolltech.com. Please include the name of the manual page (qdesktopwidget.3qt) and the Qt version (3.3.8). QDESKTOPWIDGET(3)
 
 
 

Copyright © 2011–2018 by topics-of-interest.com . All rights reserved. Hosted by all-inkl.
Contact · Imprint · Privacy

Page generated in 27.06ms.

roboter.name | meinehunde.net | und-verkauft.de