54 #ifndef QT_NO_TABWIDGET
57 class QTabWidgetPrivate;
65 Q_PROPERTY(TabShape tabShape READ tabShape WRITE setTabShape)
66 Q_PROPERTY(
int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentChanged)
70 Q_PROPERTY(
bool usesScrollButtons READ usesScrollButtons WRITE setUsesScrollButtons)
71 Q_PROPERTY(
bool documentMode READ documentMode WRITE setDocumentMode)
72 Q_PROPERTY(
bool tabsClosable READ tabsClosable WRITE setTabsClosable)
80 int addTab(
QWidget *widget, const
QIcon& icon, const QString &label);
82 int insertTab(
int index,
QWidget *widget, const QString &);
83 int insertTab(
int index,
QWidget *widget, const
QIcon& icon, const QString &label);
85 void removeTab(
int index);
87 bool isTabEnabled(
int index) const;
88 void setTabEnabled(
int index,
bool);
90 QString tabText(
int index) const;
91 void setTabText(
int index, const QString &);
93 QIcon tabIcon(
int index) const;
94 void setTabIcon(
int index, const
QIcon & icon);
97 void setTabToolTip(
int index,
const QString & tip);
98 QString tabToolTip(
int index)
const;
101 #ifndef QT_NO_WHATSTHIS
102 void setTabWhatsThis(
int index,
const QString &text);
103 QString tabWhatsThis(
int index)
const;
106 int currentIndex()
const;
107 QWidget *currentWidget()
const;
108 QWidget *widget(
int index)
const;
109 int indexOf(
QWidget *widget)
const;
113 #if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN)
114 , Top = North, Bottom = South
117 TabPosition tabPosition()
const;
118 void setTabPosition(TabPosition);
120 bool tabsClosable()
const;
121 void setTabsClosable(
bool closeable);
123 bool isMovable()
const;
124 void setMovable(
bool movable);
126 enum TabShape { Rounded, Triangular };
127 TabShape tabShape()
const;
128 void setTabShape(TabShape
s);
140 QSize iconSize()
const;
143 bool usesScrollButtons()
const;
144 void setUsesScrollButtons(
bool useButtons);
146 bool documentMode()
const;
147 void setDocumentMode(
bool set);
152 void setCurrentIndex(
int index);
153 void setCurrentWidget(
QWidget *widget);
156 void currentChanged(
int index);
157 void tabCloseRequested(
int index);
160 virtual void tabInserted(
int index);
161 virtual void tabRemoved(
int index);
177 inline QT3_SUPPORT
void insertTab(
QWidget *
w,
const QString &
s,
int index = -1) { insertTab(index, w, s); }
178 inline QT3_SUPPORT
void insertTab(
QWidget *child,
const QIcon& icon,
179 const QString &label,
int index = -1) { insertTab(index, child, icon, label); }
181 inline QT3_SUPPORT
void changeTab(
QWidget *
w,
const QString &
s) {setTabText(indexOf(w), s); }
182 inline QT3_SUPPORT
void changeTab(
QWidget *w,
const QIcon& icon,
183 const QString &label) {
int idx = indexOf(w); setTabText(idx, label); setTabIcon(idx, icon); }
185 inline QT3_SUPPORT
bool isTabEnabled(
QWidget *w)
const {
return isTabEnabled(indexOf(w)); }
186 inline QT3_SUPPORT
void setTabEnabled(
QWidget *w,
bool b) { setTabEnabled(indexOf(w), b); }
188 inline QT3_SUPPORT QString tabLabel(
QWidget *w)
const {
return tabText(indexOf(w)); }
189 inline QT3_SUPPORT
void setTabLabel(
QWidget *w,
const QString &l) { setTabText(indexOf(w), l); }
191 inline QT3_SUPPORT
QIcon tabIconSet(
QWidget * w)
const {
return tabIcon(indexOf(w)); }
192 inline QT3_SUPPORT
void setTabIconSet(
QWidget * w,
const QIcon & icon) { setTabIcon(indexOf(w), icon); }
194 inline QT3_SUPPORT
void removeTabToolTip(
QWidget * w) {
195 #ifndef QT_NO_TOOLTIP
196 setTabToolTip(indexOf(w), QString());
201 inline QT3_SUPPORT
void setTabToolTip(
QWidget * w,
const QString & tip) {
202 #ifndef QT_NO_TOOLTIP
203 setTabToolTip(indexOf(w), tip);
210 inline QT3_SUPPORT QString tabToolTip(
QWidget * w)
const {
211 #ifndef QT_NO_TOOLTIP
212 return tabToolTip(indexOf(w));
219 inline QT3_SUPPORT
QWidget * currentPage()
const {
return currentWidget(); }
220 inline QT3_SUPPORT
QWidget *page(
int index)
const {
return widget(index); }
221 inline QT3_SUPPORT QString label(
int index)
const {
return tabText(index); }
222 inline QT3_SUPPORT
int currentPageIndex()
const {
return currentIndex(); }
224 inline QT3_SUPPORT
int margin()
const {
return 0; }
225 inline QT3_SUPPORT
void setMargin(
int) {}
228 inline QT_MOC_COMPAT
void setCurrentPage(
int index) { setCurrentIndex(index); }
229 inline QT_MOC_COMPAT
void showPage(
QWidget *w) { setCurrentIndex(indexOf(w)); }
230 inline QT_MOC_COMPAT
void removePage(
QWidget *w) { removeTab(indexOf(w)); }
233 QT_MOC_COMPAT
void currentChanged(
QWidget *);
234 QT_MOC_COMPAT
void selected(
const QString&);
235 #endif // QT3_SUPPORT
243 void setUpLayout(
bool = false);
244 friend class Q3TabDialog;
247 #endif // QT_NO_TABWIDGET
253 #endif // QTABWIDGET_H
#define Q_PRIVATE_SLOT(d, signature)
#define QT_BEGIN_NAMESPACE
GLuint GLuint GLsizei count
GLuint const GLchar * name
GLubyte GLubyte GLubyte GLubyte w