[190] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/include/qtabwidget.h:1 -->
|
---|
| 3 | <html>
|
---|
| 4 | <head>
|
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
| 6 | <title>qtabwidget.h Include File</title>
|
---|
| 7 | <style type="text/css"><!--
|
---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
| 9 | a:link { color: #004faf; text-decoration: none }
|
---|
| 10 | a:visited { color: #672967; text-decoration: none }
|
---|
| 11 | body { background: #ffffff; color: black; }
|
---|
| 12 | --></style>
|
---|
| 13 | </head>
|
---|
| 14 | <body>
|
---|
| 15 |
|
---|
| 16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
| 17 | <tr bgcolor="#E5E5E5">
|
---|
| 18 | <td valign=center>
|
---|
| 19 | <a href="index.html">
|
---|
| 20 | <font color="#004faf">Home</font></a>
|
---|
| 21 | | <a href="classes.html">
|
---|
| 22 | <font color="#004faf">All Classes</font></a>
|
---|
| 23 | | <a href="mainclasses.html">
|
---|
| 24 | <font color="#004faf">Main Classes</font></a>
|
---|
| 25 | | <a href="annotated.html">
|
---|
| 26 | <font color="#004faf">Annotated</font></a>
|
---|
| 27 | | <a href="groups.html">
|
---|
| 28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
| 29 | | <a href="functions.html">
|
---|
| 30 | <font color="#004faf">Functions</font></a>
|
---|
| 31 | </td>
|
---|
| 32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qtabwidget.h</h1>
|
---|
| 33 |
|
---|
| 34 | <p>This is the verbatim text of the qtabwidget.h include file. It is provided only for illustration; the copyright remains with Trolltech.
|
---|
| 35 | <hr>
|
---|
| 36 | <pre>
|
---|
| 37 | /****************************************************************************
|
---|
| 38 | ** $Id: qtabwidget-h.html 2051 2007-02-21 10:04:20Z chehrlic $
|
---|
| 39 | **
|
---|
| 40 | ** Definition of QTabWidget class
|
---|
| 41 | **
|
---|
| 42 | ** Created : 990318
|
---|
| 43 | **
|
---|
| 44 | ** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
|
---|
| 45 | **
|
---|
| 46 | ** This file is part of the widgets module of the Qt GUI Toolkit.
|
---|
| 47 | **
|
---|
| 48 | ** This file may be distributed under the terms of the Q Public License
|
---|
| 49 | ** as defined by Trolltech ASA of Norway and appearing in the file
|
---|
| 50 | ** LICENSE.QPL included in the packaging of this file.
|
---|
| 51 | **
|
---|
| 52 | ** This file may be distributed and/or modified under the terms of the
|
---|
| 53 | ** GNU General Public License version 2 as published by the Free Software
|
---|
| 54 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
| 55 | ** packaging of this file.
|
---|
| 56 | **
|
---|
| 57 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
|
---|
| 58 | ** licenses may use this file in accordance with the Qt Commercial License
|
---|
| 59 | ** Agreement provided with the Software.
|
---|
| 60 | **
|
---|
| 61 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
---|
| 62 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
---|
| 63 | **
|
---|
| 64 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
|
---|
| 65 | ** information about Qt Commercial License Agreements.
|
---|
| 66 | ** See http://www.trolltech.com/qpl/ for QPL licensing information.
|
---|
| 67 | ** See http://www.trolltech.com/gpl/ for GPL licensing information.
|
---|
| 68 | **
|
---|
| 69 | ** Contact info@trolltech.com if any conditions of this licensing are
|
---|
| 70 | ** not clear to you.
|
---|
| 71 | **
|
---|
| 72 | **********************************************************************/
|
---|
| 73 |
|
---|
| 74 | #ifndef QTABWIDGET_H
|
---|
| 75 | #define QTABWIDGET_H
|
---|
| 76 |
|
---|
| 77 | #ifndef QT_H
|
---|
| 78 | #include "qwidget.h"
|
---|
| 79 | #include "qiconset.h"
|
---|
| 80 | #endif // QT_H
|
---|
| 81 |
|
---|
| 82 | #ifndef QT_NO_TABWIDGET
|
---|
| 83 |
|
---|
| 84 | class QTabBar;
|
---|
| 85 | class QTabWidgetData;
|
---|
| 86 | class QTab;
|
---|
| 87 | class QWidgetStack;
|
---|
| 88 |
|
---|
| 89 |
|
---|
| 90 | class Q_EXPORT QTabWidget : public QWidget
|
---|
| 91 | {
|
---|
| 92 | Q_OBJECT
|
---|
| 93 | Q_ENUMS( TabPosition )
|
---|
| 94 | Q_ENUMS( TabShape )
|
---|
| 95 | Q_PROPERTY( TabPosition tabPosition READ tabPosition WRITE setTabPosition )
|
---|
| 96 | Q_PROPERTY( TabShape tabShape READ tabShape WRITE setTabShape )
|
---|
| 97 | Q_PROPERTY( int margin READ margin WRITE setMargin )
|
---|
| 98 | Q_PROPERTY( int currentPage READ currentPageIndex WRITE setCurrentPage )
|
---|
| 99 | Q_PROPERTY( int count READ count )
|
---|
| 100 | Q_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
|
---|
| 101 |
|
---|
| 102 | public:
|
---|
| 103 | QTabWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
|
---|
| 104 | ~QTabWidget();
|
---|
| 105 |
|
---|
| 106 | virtual void addTab( QWidget *, const QString & ); // ### make these inline in 4.0
|
---|
| 107 | virtual void addTab( QWidget *child, const QIconSet& iconset,
|
---|
| 108 | const QString &label );
|
---|
| 109 | virtual void addTab( QWidget *, QTab* );
|
---|
| 110 |
|
---|
| 111 | virtual void insertTab( QWidget *, const QString &, int index = -1 );
|
---|
| 112 | virtual void insertTab( QWidget *child, const QIconSet& iconset,
|
---|
| 113 | const QString &label, int index = -1 );
|
---|
| 114 | virtual void insertTab( QWidget *, QTab*, int index = -1 );
|
---|
| 115 |
|
---|
| 116 | void changeTab( QWidget *, const QString &);
|
---|
| 117 | void changeTab( QWidget *child, const QIconSet& iconset,
|
---|
| 118 | const QString &label );
|
---|
| 119 |
|
---|
| 120 | bool isTabEnabled( QWidget * ) const;
|
---|
| 121 | void setTabEnabled( QWidget *, bool );
|
---|
| 122 |
|
---|
| 123 | void setCornerWidget( QWidget * w, Qt::Corner corner = Qt::TopRight );
|
---|
| 124 | QWidget * cornerWidget( Qt::Corner corner = Qt::TopRight ) const;
|
---|
| 125 |
|
---|
| 126 | QString tabLabel( QWidget * ) const;
|
---|
| 127 | void setTabLabel( QWidget *p, const QString &l );
|
---|
| 128 |
|
---|
| 129 | QIconSet tabIconSet( QWidget * w ) const;
|
---|
| 130 | void setTabIconSet( QWidget * w, const QIconSet & iconset );
|
---|
| 131 |
|
---|
| 132 | void removeTabToolTip( QWidget * w );
|
---|
| 133 | void setTabToolTip( QWidget * w, const QString & tip );
|
---|
| 134 | QString tabToolTip( QWidget * w ) const;
|
---|
| 135 |
|
---|
| 136 | QWidget * currentPage() const;
|
---|
| 137 | QWidget *page( int ) const;
|
---|
| 138 | QString label( int ) const;
|
---|
| 139 | int currentPageIndex() const;
|
---|
| 140 | int indexOf( QWidget * ) const;
|
---|
| 141 |
|
---|
| 142 | QSize sizeHint() const;
|
---|
| 143 | QSize minimumSizeHint() const;
|
---|
| 144 |
|
---|
| 145 | enum TabPosition { Top, Bottom };
|
---|
| 146 | TabPosition tabPosition() const;
|
---|
| 147 | void setTabPosition( TabPosition );
|
---|
| 148 |
|
---|
| 149 | enum TabShape { Rounded, Triangular };
|
---|
| 150 | TabShape tabShape() const;
|
---|
| 151 | void setTabShape( TabShape s );
|
---|
| 152 |
|
---|
| 153 | int margin() const;
|
---|
| 154 | void setMargin( int );
|
---|
| 155 |
|
---|
| 156 | int count() const;
|
---|
| 157 |
|
---|
| 158 | public slots:
|
---|
| 159 | void setCurrentPage( int );
|
---|
| 160 | virtual void showPage( QWidget * );
|
---|
| 161 | virtual void removePage( QWidget * );
|
---|
| 162 |
|
---|
| 163 | protected:
|
---|
| 164 | void showEvent( QShowEvent * );
|
---|
| 165 | void resizeEvent( QResizeEvent * );
|
---|
| 166 | void setTabBar( QTabBar * );
|
---|
| 167 | QTabBar* tabBar() const;
|
---|
| 168 | void styleChange( QStyle& );
|
---|
| 169 | void updateMask();
|
---|
| 170 | bool eventFilter( QObject *, QEvent * );
|
---|
| 171 |
|
---|
| 172 | signals:
|
---|
| 173 | void currentChanged( QWidget * );
|
---|
| 174 | #ifndef Q_QDOC
|
---|
| 175 | void selected( const QString& );
|
---|
| 176 | #endif
|
---|
| 177 |
|
---|
| 178 | private slots:
|
---|
| 179 | void showTab( int );
|
---|
| 180 |
|
---|
| 181 | private:
|
---|
| 182 | QTabWidgetData *d;
|
---|
| 183 | void setUpLayout( bool = FALSE );
|
---|
| 184 | friend class QTabDialog;
|
---|
| 185 |
|
---|
| 186 | private: // Disabled copy constructor and operator=
|
---|
| 187 | #if defined(Q_DISABLE_COPY)
|
---|
| 188 | QTabWidget( const QTabWidget & );
|
---|
| 189 | QTabWidget& operator=( const QTabWidget & );
|
---|
| 190 | #endif
|
---|
| 191 | };
|
---|
| 192 |
|
---|
| 193 | #endif // QT_NO_TABWIDGET
|
---|
| 194 |
|
---|
| 195 | #endif // QTABWIDGET_H
|
---|
| 196 | </pre>
|
---|
| 197 | <!-- eof -->
|
---|
| 198 | <p><address><hr><div align=center>
|
---|
| 199 | <table width=100% cellspacing=0 border=0><tr>
|
---|
| 200 | <td>Copyright © 2007
|
---|
| 201 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
| 202 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
| 203 | </table></div></address></body>
|
---|
| 204 | </html>
|
---|