Eneboo - Documentación para desarrolladores
|
00001 /**************************************************************************** 00002 ** $Id: qt/qdesktopwidget.h 3.3.8 edited Jan 11 14:38 $ 00003 ** 00004 ** Definition of QDesktopWidget class. 00005 ** 00006 ** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved. 00007 ** 00008 ** This file is part of the kernel module of the Qt GUI Toolkit. 00009 ** 00010 ** This file may be distributed under the terms of the Q Public License 00011 ** as defined by Trolltech ASA of Norway and appearing in the file 00012 ** LICENSE.QPL included in the packaging of this file. 00013 ** 00014 ** This file may be distributed and/or modified under the terms of the 00015 ** GNU General Public License version 2 as published by the Free Software 00016 ** Foundation and appearing in the file LICENSE.GPL included in the 00017 ** packaging of this file. 00018 ** 00019 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 00020 ** licenses for Unix/X11 may use this file in accordance with the Qt Commercial 00021 ** License Agreement provided with the Software. 00022 ** 00023 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00024 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00025 ** 00026 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 00027 ** information about Qt Commercial License Agreements. 00028 ** See http://www.trolltech.com/qpl/ for QPL licensing information. 00029 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 00030 ** 00031 ** Contact info@trolltech.com if any conditions of this licensing are 00032 ** not clear to you. 00033 ** 00034 **********************************************************************/ 00035 00036 #ifndef QDESKTOPWIDGET_H 00037 #define QDESKTOPWIDGET_H 00038 00039 #ifndef QT_H 00040 #include "qwidget.h" 00041 #endif // QT_H 00042 00043 class QApplication; 00044 class QDesktopWidgetPrivate; /* Don't touch! */ 00045 00046 class Q_EXPORT QDesktopWidget : public QWidget 00047 { 00048 Q_OBJECT 00049 public: 00050 QDesktopWidget(); 00051 ~QDesktopWidget(); 00052 00053 bool isVirtualDesktop() const; 00054 00055 int numScreens() const; 00056 int primaryScreen() const; 00057 00058 int screenNumber( QWidget *widget = 0 ) const; // ### 4.0: const QWidget* 00059 int screenNumber( const QPoint & ) const; 00060 00061 QWidget *screen( int screen = -1 ); 00062 00063 const QRect& screenGeometry( int screen = -1 ) const; 00064 const QRect& screenGeometry( QWidget *widget ) const 00065 { return screenGeometry( screenNumber( widget ) ); } 00066 const QRect& screenGeometry( const QPoint &point ) const 00067 { return screenGeometry( screenNumber( point ) ); } 00068 00069 const QRect& availableGeometry( int screen = -1 ) const; 00070 const QRect& availableGeometry( QWidget *widget ) const 00071 { return availableGeometry( screenNumber( widget ) ); } 00072 const QRect& availableGeometry( const QPoint &point ) const 00073 { return availableGeometry( screenNumber( point ) ); } 00074 00075 void insertChild( QObject * ); 00076 00077 signals: 00078 void resized( int ); 00079 void workAreaResized( int ); 00080 00081 protected: 00082 void resizeEvent( QResizeEvent *e ); 00083 00084 private: 00085 QDesktopWidgetPrivate *d; 00086 00087 #if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator= 00088 QDesktopWidget( const QDesktopWidget & ); 00089 QDesktopWidget &operator=( const QDesktopWidget & ); 00090 #endif 00091 00092 friend class QApplication; 00093 #ifdef Q_WS_QWS 00094 friend class QWSDisplay; 00095 #endif 00096 }; 00097 00098 #endif //QDESKTOPWIDGET_H