qwidget-h.html

来自「QT 下载资料仅供参考」· HTML 代码 · 共 1,014 行 · 第 1/3 页

HTML
1,014
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/reggie/tmp/qt-3.0-reggie-5401/qt-x11-commercial-3.0.5/include/qwidget.h:1 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="Translator" content="Cavendish"><meta name="Qt zh_CN Documents Website" content="http://www.qiliang.net/qt"><title>qwidget.h包含文件</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; font-family: "Times New Roman" }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr bgcolor="#E5E5E5"><td valign=center> <a href="index.html"><font color="#004faf">主页</font></a> | <a href="classes.html"><font color="#004faf">所有的类</font></a> | <a href="mainclasses.html"><font color="#004faf">主要的类</font></a> | <a href="annotated.html"><font color="#004faf">注释的类</font></a> | <a href="groups.html"><font color="#004faf">分组的类</font></a> | <a href="functions.html"><font color="#004faf">函数</font></a></td><td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qwidget.h</h1><p>这里是qwidget.h包含文件的所有文本,一字不差。它仅仅用来说明,版权由Trolltech保留。<hr><pre>/****************************************************************************** $Id:  qt/qwidget.h   3.0.5   edited Apr 30 21:58 $**** Definition of QWidget class**** Created : 931029**** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.**** This file is part of the kernel module of the Qt GUI Toolkit.**** This file may be distributed under the terms of the Q Public License** as defined by Trolltech AS of Norway and appearing in the file** LICENSE.QPL included in the packaging of this file.**** This file may be distributed and/or modified under the terms of the** GNU General Public License version 2 as published by the Free Software** Foundation and appearing in the file LICENSE.GPL included in the** packaging of this file.**** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition** licenses may use this file in accordance with the Qt Commercial License** Agreement provided with the Software.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.**** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for**   information about Qt Commercial License Agreements.** See http://www.trolltech.com/qpl/ for QPL licensing information.** See http://www.trolltech.com/gpl/ for GPL licensing information.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.************************************************************************/#ifndef QWIDGET_H#define QWIDGET_H#ifndef QT_H#include "qwindowdefs.h"#include "qobject.h"#include "qpaintdevice.h"#include "qpalette.h"#include "qfont.h"#include "qfontmetrics.h"#include "qfontinfo.h"#include "qsizepolicy.h"#endif // QT_Hclass QLayout;struct QWExtra;struct QTLWExtra;class QFocusData;class QCursor;class QWSRegionManager;class QStyle;class Q_EXPORT QWidget : public QObject, public QPaintDevice{    Q_OBJECT    Q_ENUMS( BackgroundMode FocusPolicy BackgroundOrigin )    Q_PROPERTY( bool isTopLevel READ isTopLevel )    Q_PROPERTY( bool isDialog READ isDialog )    Q_PROPERTY( bool isModal READ isModal )    Q_PROPERTY( bool isPopup READ isPopup )    Q_PROPERTY( bool isDesktop READ isDesktop )    Q_PROPERTY( bool enabled READ isEnabled WRITE setEnabled )    Q_PROPERTY( QRect geometry READ geometry WRITE setGeometry )    Q_PROPERTY( QRect frameGeometry READ frameGeometry )    Q_PROPERTY( int x READ x )    Q_PROPERTY( int y READ y )    Q_PROPERTY( QPoint pos READ pos WRITE move DESIGNABLE false STORED false )    Q_PROPERTY( QSize frameSize READ frameSize )    Q_PROPERTY( QSize size READ size WRITE resize DESIGNABLE false STORED false )    Q_PROPERTY( int width READ width )    Q_PROPERTY( int height READ height )    Q_PROPERTY( QRect rect READ rect )    Q_PROPERTY( QRect childrenRect READ childrenRect )    Q_PROPERTY( QRegion childrenRegion READ childrenRegion )    Q_PROPERTY( QSizePolicy sizePolicy READ sizePolicy WRITE setSizePolicy )    Q_PROPERTY( QSize minimumSize READ minimumSize WRITE setMinimumSize )    Q_PROPERTY( QSize maximumSize READ maximumSize WRITE setMaximumSize )    Q_PROPERTY( int minimumWidth READ minimumWidth WRITE setMinimumWidth STORED false DESIGNABLE false )    Q_PROPERTY( int minimumHeight READ minimumHeight WRITE setMinimumHeight STORED false DESIGNABLE false )    Q_PROPERTY( int maximumWidth READ maximumWidth WRITE setMaximumWidth STORED false DESIGNABLE false )    Q_PROPERTY( int maximumHeight READ maximumHeight WRITE setMaximumHeight STORED false DESIGNABLE false )    Q_PROPERTY( QSize sizeIncrement READ sizeIncrement WRITE setSizeIncrement )    Q_PROPERTY( QSize baseSize READ baseSize WRITE setBaseSize )    Q_PROPERTY( BackgroundMode backgroundMode READ backgroundMode WRITE setBackgroundMode DESIGNABLE false )    Q_PROPERTY( QColor paletteForegroundColor READ paletteForegroundColor WRITE setPaletteForegroundColor RESET unsetPalette )    Q_PROPERTY( QColor paletteBackgroundColor READ paletteBackgroundColor WRITE setPaletteBackgroundColor RESET unsetPalette )    Q_PROPERTY( QPixmap paletteBackgroundPixmap READ paletteBackgroundPixmap WRITE setPaletteBackgroundPixmap RESET unsetPalette )    Q_PROPERTY( QBrush backgroundBrush READ backgroundBrush )    Q_PROPERTY( QColorGroup colorGroup READ colorGroup )    Q_PROPERTY( QPalette palette READ palette WRITE setPalette RESET unsetPalette  STORED ownPalette )    Q_PROPERTY( BackgroundOrigin backgroundOrigin READ backgroundOrigin WRITE setBackgroundOrigin )    Q_PROPERTY( bool ownPalette READ ownPalette )    Q_PROPERTY( QFont font READ font WRITE setFont RESET unsetFont STORED ownFont )    Q_PROPERTY( bool ownFont READ ownFont )#ifndef QT_NO_CURSOR    Q_PROPERTY( QCursor cursor READ cursor WRITE setCursor RESET unsetCursor STORED ownCursor )    Q_PROPERTY( bool ownCursor READ ownCursor )#endif#ifndef QT_NO_WIDGET_TOPEXTRA    Q_PROPERTY( QString caption READ caption WRITE setCaption )    Q_PROPERTY( QPixmap icon READ icon WRITE setIcon )    Q_PROPERTY( QString iconText READ iconText WRITE setIconText )#endif    Q_PROPERTY( bool mouseTracking READ hasMouseTracking WRITE setMouseTracking )    Q_PROPERTY( bool underMouse READ hasMouse )    Q_PROPERTY( bool isActiveWindow READ isActiveWindow )    Q_PROPERTY( bool focusEnabled READ isFocusEnabled )    Q_PROPERTY( FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy )    Q_PROPERTY( bool focus READ hasFocus )    Q_PROPERTY( bool updatesEnabled READ isUpdatesEnabled WRITE setUpdatesEnabled DESIGNABLE false )    Q_PROPERTY( bool visible READ isVisible )    Q_PROPERTY( QRect visibleRect READ visibleRect )    Q_PROPERTY( bool hidden READ isHidden )    Q_PROPERTY( bool minimized READ isMinimized )    Q_PROPERTY( QSize sizeHint READ sizeHint )    Q_PROPERTY( QSize minimumSizeHint READ minimumSizeHint )    Q_PROPERTY( QRect microFocusHint READ microFocusHint )    Q_PROPERTY( bool acceptDrops READ acceptDrops WRITE setAcceptDrops )    Q_PROPERTY( bool autoMask READ autoMask WRITE setAutoMask DESIGNABLE false SCRIPTABLE false )    Q_PROPERTY( bool customWhatsThis READ customWhatsThis )public:    QWidget( QWidget* parent=0, const char* name=0, WFlags f=0 );    ~QWidget();    WId		 winId() const;    void	 setName( const char *name );#ifndef QT_NO_STYLE    // GUI style setting    QStyle     &amp;style() const;    void        setStyle( QStyle * );    QStyle*	setStyle( const QString&amp; );#endif    // Widget types and states    bool	 isTopLevel()	const;    bool	 isDialog()	const;    bool	 isPopup()	const;    bool	 isDesktop()	const;    bool	 isModal()	const;    bool	 isEnabled()	const;    bool	 isEnabledTo(QWidget*) const;    bool	 isEnabledToTLW() const;public slots:    virtual void setEnabled( bool );    void setDisabled( bool );    // Widget coordinatespublic:    QRect	 frameGeometry() const;    const QRect &amp;geometry()	const;    int		 x()		const;    int		 y()		const;    QPoint	 pos()		const;    QSize	 frameSize()    const;    QSize	 size()		const;    int		 width()	const;    int		 height()	const;    QRect	 rect()		const;    QRect	 childrenRect() const;    QRegion	 childrenRegion() const;    QSize	 minimumSize()	 const;    QSize	 maximumSize()	 const;    int		 minimumWidth()	 const;    int		 minimumHeight() const;    int		 maximumWidth()	 const;    int		 maximumHeight() const;    void	 setMinimumSize( const QSize &amp; );    virtual void setMinimumSize( int minw, int minh );    void	 setMaximumSize( const QSize &amp; );    virtual void setMaximumSize( int maxw, int maxh );    void	 setMinimumWidth( int minw );    void	 setMinimumHeight( int minh );    void	 setMaximumWidth( int maxw );    void	 setMaximumHeight( int maxh );    QSize	 sizeIncrement() const;    void	 setSizeIncrement( const QSize &amp; );    virtual void setSizeIncrement( int w, int h );    QSize	 baseSize() const;    void	 setBaseSize( const QSize &amp; );    void	 setBaseSize( int basew, int baseh );    void	setFixedSize( const QSize &amp; );    void	setFixedSize( int w, int h );    void	setFixedWidth( int w );    void	setFixedHeight( int h );    // Widget coordinate mapping    QPoint	 mapToGlobal( const QPoint &amp; )	 const;    QPoint	 mapFromGlobal( const QPoint &amp; ) const;    QPoint	 mapToParent( const QPoint &amp; )	 const;    QPoint	 mapFromParent( const QPoint &amp; ) const;    QPoint	 mapTo( QWidget *, const QPoint &amp; ) const;    QPoint	 mapFrom( QWidget *, const QPoint &amp; ) const;    QWidget	*topLevelWidget()   const;    // Widget attribute functions    BackgroundMode	backgroundMode() const;    virtual void	setBackgroundMode( BackgroundMode );    void 		setBackgroundMode( BackgroundMode, BackgroundMode );    const QColor &amp;	foregroundColor() const;    const QColor &amp;	eraseColor() const;    virtual void	setEraseColor( const QColor &amp; );    const QPixmap *	erasePixmap() const;    virtual void	setErasePixmap( const QPixmap &amp; );#ifndef QT_NO_PALETTE    const QColorGroup &amp; colorGroup() const;    const QPalette &amp;	palette()    const;    bool		ownPalette() const;    virtual void	setPalette( const QPalette &amp; );    void		unsetPalette();#endif    const QColor &amp;	paletteForegroundColor() const;    void		setPaletteForegroundColor( const QColor &amp; );    const QColor &amp;	paletteBackgroundColor() const;    virtual void	setPaletteBackgroundColor( const QColor &amp; );    const QPixmap *	paletteBackgroundPixmap() const;    virtual void 	setPaletteBackgroundPixmap( const QPixmap &amp; );    const QBrush&amp;	backgroundBrush() const;    QFont		font() const;    bool		ownFont() const;    virtual void	setFont( const QFont &amp; );    void		unsetFont();    QFontMetrics	fontMetrics() const;    QFontInfo	 	fontInfo() const;#ifndef QT_NO_CURSOR    const QCursor      &amp;cursor() const;    bool		ownCursor() const;    virtual void	setCursor( const QCursor &amp; );    virtual void	unsetCursor();#endif#ifndef QT_NO_WIDGET_TOPEXTRA    QString		caption() const;    const QPixmap      *icon() const;    QString		iconText() const;#endif    bool		hasMouseTracking() const;    bool		hasMouse() const;    virtual void	setMask( const QBitmap &amp; );    virtual void	setMask( const QRegion &amp; );    void		clearMask();    const QColor &amp;	backgroundColor() const; // obsolete, use eraseColor()    virtual void	setBackgroundColor( const QColor &amp; ); // obsolete, use setEraseColor()    const QPixmap *	backgroundPixmap() const; // obsolete, use erasePixmap()    virtual void	setBackgroundPixmap( const QPixmap &amp; ); // obsolete, use setErasePixmap()public slots:#ifndef QT_NO_WIDGET_TOPEXTRA    virtual void	setCaption( const QString &amp;);    virtual void	setIcon( const QPixmap &amp; );    virtual void	setIconText( const QString &amp;);#endif    virtual void	setMouseTracking( bool enable );    // Keyboard input focus functions    virtual void	setFocus();    void		clearFocus();public:    enum FocusPolicy {	NoFocus = 0,	TabFocus = 0x1,	ClickFocus = 0x2,	StrongFocus = 0x3,	WheelFocus = 0x7    };    bool		isActiveWindow() const;    virtual void	setActiveWindow();    bool		isFocusEnabled() const;

⌨️ 快捷键说明

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