.BI "int \fBcount\fR - the number of items contained in the toolbox \fI(read " "only" ")\fR"
.br
.ti -1c
.BI "int \fBcurrentIndex\fR - the index of the current " "item" ", or -1 if the toolbox is empty"
.br
.in -1c
.SS "Protected Members"
.in +1c
.ti -1c
.BI "virtual void \fBitemInserted\fR ( int index )"
.br
.ti -1c
.BI "virtual void \fBitemRemoved\fR ( int index )"
.br
.in -1c
.SH DESCRIPTION
The QToolBox class provides a column of tabbed widget items.
.PP
A toolbox is a widget that displays a column of tabs one above the other, with the current item displayed below the current tab. Every tab has an index position within the column of tabs. A tab's item is a QWidget.
.PP
Each item has an itemLabel(), an optional icon, itemIconSet(), an optional itemToolTip(), and a widget. The item's attributes can be changed with setItemLabel(), setItemIconSet() and setItemToolTip().
.PP
Items are added using addItem(), or inserted at particular positions using insertItem(). The total number of items is given by count(). Items can be deleted with delete, or removed from the toolbox with removeItem(). Combining removeItem() and insertItem() allows to move items to different positions.
.PP
The current item widget is returned by currentItem() and set with setCurrentItem(). If you prefer you can work in terms of indexes using currentIndex(), setCurrentIndex(), indexOf() and item().
.PP
The currentChanged() signal is emitted when the current item is changed.
.PP
See also QTabWidget and Advanced Widgets.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QToolBox::QToolBox ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )"
Constructs a toolbox called \fIname\fR with parent \fIparent\fR and flags \fIf\fR.
Adds the widget \fIitem\fR in a new tab at bottom of the toolbox. The new tab's label is set to \fIlabel\fR, and the \fIiconSet\fR is displayed to the left of the \fIlabel\fR. Returns the new tab's index.
Inserts the widget \fIitem\fR at position \fIindex\fR, or at the bottom of the toolbox if \fIindex\fR is out of range. The new item's label is set to \fIlabel\fR, and the \fIiconSet\fR is displayed to the left of the \fIlabel\fR. Returns the new item's index.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Inserts the widget \fIitem\fR at position \fIindex\fR, or at the bottom of the toolbox if \fIindex\fR is out of range. The new item's label is set to \fIlabel\fR. Returns the new item's index.
.SH "bool QToolBox::isItemEnabled ( int index ) const"
Returns TRUE if the item at position \fIindex\fR is enabled; otherwise returns FALSE.
.SH "QWidget * QToolBox::item ( int index ) const"
Returns the item at position \fIindex\fR, or 0 if there is no such item.
.SH "QIconSet QToolBox::itemIconSet ( int index ) const"
Returns the icon of the item at position \fIindex\fR, or a null icon if \fIindex\fR is out of range.
.SH "void QToolBox::itemInserted ( int index )\fC [virtual protected]\fR"
This virtual handler is called after a new item was added or inserted at position \fIindex\fR.
.SH "QString QToolBox::itemLabel ( int index ) const"
Returns the label of the item at position \fIindex\fR, or a null string if \fIindex\fR is out of range.
.SH "void QToolBox::itemRemoved ( int index )\fC [virtual protected]\fR"
This virtual handler is called after an item was removed from position \fIindex\fR.
.SH "QString QToolBox::itemToolTip ( int index ) const"
Returns the tooltip of the item at position \fIindex\fR, or a null string if \fIindex\fR is out of range.
.SH "int QToolBox::removeItem ( QWidget * item )"
Removes the widget \fIitem\fR from the toolbox. Note that the widget is \fInot\fR deleted. Returns the removed widget's index, or -1 if the widget was not in this tool box.
.SH "void QToolBox::setCurrentIndex ( int index )\fC [slot]\fR"
Sets the index of the current item, or -1 if the toolbox is empty to \fIindex\fR. See the "currentIndex" property for details.