'\" t .TH TQToolBox 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. .\" .ad l .nh .SH NAME TQToolBox \- Column of tabbed widget items .SH SYNOPSIS \fC#include \fR .PP Inherits TQFrame. .PP .SS "Public Members" .in +1c .ti -1c .BI "\fBTQToolBox\fR ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )" .br .ti -1c .BI "int \fBaddItem\fR ( TQWidget * w, const TQString & label )" .br .ti -1c .BI "int \fBaddItem\fR ( TQWidget * item, const TQIconSet & iconSet, const TQString & label )" .br .ti -1c .BI "int \fBinsertItem\fR ( int index, TQWidget * item, const TQString & label )" .br .ti -1c .BI "int \fBinsertItem\fR ( int index, TQWidget * item, const TQIconSet & iconSet, const TQString & label )" .br .ti -1c .BI "int \fBremoveItem\fR ( TQWidget * item )" .br .ti -1c .BI "void \fBsetItemEnabled\fR ( int index, bool enabled )" .br .ti -1c .BI "bool \fBisItemEnabled\fR ( int index ) const" .br .ti -1c .BI "void \fBsetItemLabel\fR ( int index, const TQString & label )" .br .ti -1c .BI "TQString \fBitemLabel\fR ( int index ) const" .br .ti -1c .BI "void \fBsetItemIconSet\fR ( int index, const TQIconSet & iconSet )" .br .ti -1c .BI "TQIconSet \fBitemIconSet\fR ( int index ) const" .br .ti -1c .BI "void \fBsetItemToolTip\fR ( int index, const TQString & toolTip )" .br .ti -1c .BI "TQString \fBitemToolTip\fR ( int index ) const" .br .ti -1c .BI "TQWidget * \fBcurrentItem\fR () const" .br .ti -1c .BI "void \fBsetCurrentItem\fR ( TQWidget * item )" .br .ti -1c .BI "int \fBcurrentIndex\fR () const" .br .ti -1c .BI "TQWidget * \fBitem\fR ( int index ) const" .br .ti -1c .BI "int \fBindexOf\fR ( TQWidget * item ) const" .br .ti -1c .BI "int \fBcount\fR () const" .br .in -1c .SS "Public Slots" .in +1c .ti -1c .BI "void \fBsetCurrentIndex\fR ( int index )" .br .in -1c .SS "Signals" .in +1c .ti -1c .BI "void \fBcurrentChanged\fR ( int index )" .br .in -1c .SS "Properties" .in +1c .ti -1c .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 TQToolBox 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 TQWidget. .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 TQTabWidget and Advanced Widgets. .SH MEMBER FUNCTION DOCUMENTATION .SH "TQToolBox::TQToolBox ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )" Constructs a toolbox called \fIname\fR with parent \fIparent\fR and flags \fIf\fR. .SH "int TQToolBox::addItem ( TQWidget * item, const TQIconSet & iconSet, const TQString & label )" 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. .SH "int TQToolBox::addItem ( TQWidget * w, const TQString & label )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Adds the widget \fIw\fR in a new tab at bottom of the toolbox. The new tab's label is set to \fIlabel\fR. Returns the new tab's index. .SH "int TQToolBox::count () const" Returns the number of items contained in the toolbox. See the "count" property for details. .SH "void TQToolBox::currentChanged ( int index )\fC [signal]\fR" This signal is emitted when the current item changed. The new current item's index is passed in \fIindex\fR, or -1 if there is no current item. .SH "int TQToolBox::currentIndex () const" Returns the index of the current item, or -1 if the toolbox is empty. See the "currentIndex" property for details. .SH "TQWidget * TQToolBox::currentItem () const" Returns the toolbox's current item, or 0 if the toolbox is empty. .SH "int TQToolBox::indexOf ( TQWidget * item ) const" Returns the index of item \fIitem\fR, or -1 if the item does not exist. .SH "int TQToolBox::insertItem ( int index, TQWidget * item, const TQIconSet & iconSet, const TQString & label )" 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. .SH "int TQToolBox::insertItem ( int index, TQWidget * item, const TQString & label )" 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 TQToolBox::isItemEnabled ( int index ) const" Returns TRUE if the item at position \fIindex\fR is enabled; otherwise returns FALSE. .SH "TQWidget * TQToolBox::item ( int index ) const" Returns the item at position \fIindex\fR, or 0 if there is no such item. .SH "TQIconSet TQToolBox::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 TQToolBox::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 "TQString TQToolBox::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 TQToolBox::itemRemoved ( int index )\fC [virtual protected]\fR" This virtual handler is called after an item was removed from position \fIindex\fR. .SH "TQString TQToolBox::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 TQToolBox::removeItem ( TQWidget * 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 TQToolBox::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. .SH "void TQToolBox::setCurrentItem ( TQWidget * item )" Sets the current item to be \fIitem\fR. .SH "void TQToolBox::setItemEnabled ( int index, bool enabled )" If \fIenabled\fR is TRUE then the item at position \fIindex\fR is enabled; otherwise item \fIindex\fR is disabled. .SH "void TQToolBox::setItemIconSet ( int index, const TQIconSet & iconSet )" Sets the icon of the item at position \fIindex\fR to \fIiconSet\fR. .SH "void TQToolBox::setItemLabel ( int index, const TQString & label )" Sets the label of the item at position \fIindex\fR to \fIlabel\fR. .SH "void TQToolBox::setItemToolTip ( int index, const TQString & toolTip )" Sets the tooltip of the item at position \fIindex\fR to \fItoolTip\fR. .SS "Property Documentation" .SH "int count" This property holds the number of items contained in the toolbox. .PP Get this property's value with count(). .SH "int currentIndex" This property holds the index of the current item, or -1 if the toolbox is empty. .PP Set this property's value with setCurrentIndex() and get this property's value with currentIndex(). .PP See also currentItem(), indexOf(), and item(). .SH "SEE ALSO" .BR http://doc.trolltech.com/tqtoolbox.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. .SH AUTHOR Generated automatically from the source code. .SH BUGS If you find a bug in Qt, please report it as described in .BR http://doc.trolltech.com/bughowto.html . Good bug reports help us to help you. Thank you. .P The definitive TQt documentation is provided in HTML format; it is located at $TQTDIR/doc/html and can be read using TQt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. .P If you find errors in this manual page, please report them to .BR qt-bugs@trolltech.com . Please include the name of the manual page (tqtoolbox.3qt) and the Qt version (3.3.8).