1QToolBox(3qt)                                                    QToolBox(3qt)
2
3
4

NAME

6       QToolBox - Column of tabbed widget items
7

SYNOPSIS

9       #include <qtoolbox.h>
10
11       Inherits QFrame.
12
13   Public Members
14       QToolBox ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )
15       int addItem ( QWidget * w, const QString & label )
16       int addItem ( QWidget * item, const QIconSet & iconSet, const QString &
17           label )
18       int insertItem ( int index, QWidget * item, const QString & label )
19       int insertItem ( int index, QWidget * item, const QIconSet & iconSet,
20           const QString & label )
21       int removeItem ( QWidget * item )
22       void setItemEnabled ( int index, bool enabled )
23       bool isItemEnabled ( int index ) const
24       void setItemLabel ( int index, const QString & label )
25       QString itemLabel ( int index ) const
26       void setItemIconSet ( int index, const QIconSet & iconSet )
27       QIconSet itemIconSet ( int index ) const
28       void setItemToolTip ( int index, const QString & toolTip )
29       QString itemToolTip ( int index ) const
30       QWidget * currentItem () const
31       void setCurrentItem ( QWidget * item )
32       int currentIndex () const
33       QWidget * item ( int index ) const
34       int indexOf ( QWidget * item ) const
35       int count () const
36
37   Public Slots
38       void setCurrentIndex ( int index )
39
40   Signals
41       void currentChanged ( int index )
42
43   Properties
44       int count - the number of items contained in the toolbox  (read only)
45       int currentIndex - the index of the current item, or -1 if the toolbox
46           is empty
47
48   Protected Members
49       virtual void itemInserted ( int index )
50       virtual void itemRemoved ( int index )
51

DESCRIPTION

53       The QToolBox class provides a column of tabbed widget items.
54
55       A toolbox is a widget that displays a column of tabs one above the
56       other, with the current item displayed below the current tab. Every tab
57       has an index position within the column of tabs. A tab's item is a
58       QWidget.
59
60       Each item has an itemLabel(), an optional icon, itemIconSet(), an
61       optional itemToolTip(), and a widget. The item's attributes can be
62       changed with setItemLabel(), setItemIconSet() and setItemToolTip().
63
64       Items are added using addItem(), or inserted at particular positions
65       using insertItem(). The total number of items is given by count().
66       Items can be deleted with delete, or removed from the toolbox with
67       removeItem(). Combining removeItem() and insertItem() allows to move
68       items to different positions.
69
70       The current item widget is returned by currentItem() and set with
71       setCurrentItem(). If you prefer you can work in terms of indexes using
72       currentIndex(), setCurrentIndex(), indexOf() and item().
73
74       The currentChanged() signal is emitted when the current item is
75       changed.
76
77       See also QTabWidget and Advanced Widgets.
78

MEMBER FUNCTION DOCUMENTATION

QToolBox::QToolBox ( QWidget * parent = 0, const char * name = 0, WFlags f = 0

81       )
82       Constructs a toolbox called name with parent parent and flags f.
83

int QToolBox::addItem ( QWidget * item, const QIconSet & iconSet, const

85       QString & label )
86       Adds the widget item in a new tab at bottom of the toolbox. The new
87       tab's label is set to label, and the iconSet is displayed to the left
88       of the label. Returns the new tab's index.
89

int QToolBox::addItem ( QWidget * w, const QString & label )

91       This is an overloaded member function, provided for convenience. It
92       behaves essentially like the above function.
93
94       Adds the widget w in a new tab at bottom of the toolbox. The new tab's
95       label is set to label. Returns the new tab's index.
96

int QToolBox::count () const

98       Returns the number of items contained in the toolbox. See the "count"
99       property for details.
100

void QToolBox::currentChanged ( int index ) [signal]

102       This signal is emitted when the current item changed. The new current
103       item's index is passed in index, or -1 if there is no current item.
104

int QToolBox::currentIndex () const

106       Returns the index of the current item, or -1 if the toolbox is empty.
107       See the "currentIndex" property for details.
108

QWidget * QToolBox::currentItem () const

110       Returns the toolbox's current item, or 0 if the toolbox is empty.
111

int QToolBox::indexOf ( QWidget * item ) const

113       Returns the index of item item, or -1 if the item does not exist.
114

int QToolBox::insertItem ( int index, QWidget * item, const QIconSet &

116       iconSet, const QString & label )
117       Inserts the widget item at position index, or at the bottom of the
118       toolbox if index is out of range. The new item's label is set to label,
119       and the iconSet is displayed to the left of the label. Returns the new
120       item's index.
121

int QToolBox::insertItem ( int index, QWidget * item, const QString & label )

123       This is an overloaded member function, provided for convenience. It
124       behaves essentially like the above function.
125
126       Inserts the widget item at position index, or at the bottom of the
127       toolbox if index is out of range. The new item's label is set to label.
128       Returns the new item's index.
129

bool QToolBox::isItemEnabled ( int index ) const

131       Returns TRUE if the item at position index is enabled; otherwise
132       returns FALSE.
133

QWidget * QToolBox::item ( int index ) const

135       Returns the item at position index, or 0 if there is no such item.
136

QIconSet QToolBox::itemIconSet ( int index ) const

138       Returns the icon of the item at position index, or a null icon if index
139       is out of range.
140

void QToolBox::itemInserted ( int index ) [virtual protected]

142       This virtual handler is called after a new item was added or inserted
143       at position index.
144

QString QToolBox::itemLabel ( int index ) const

146       Returns the label of the item at position index, or a null string if
147       index is out of range.
148

void QToolBox::itemRemoved ( int index ) [virtual protected]

150       This virtual handler is called after an item was removed from position
151       index.
152

QString QToolBox::itemToolTip ( int index ) const

154       Returns the tooltip of the item at position index, or a null string if
155       index is out of range.
156

int QToolBox::removeItem ( QWidget * item )

158       Removes the widget item from the toolbox. Note that the widget is not
159       deleted. Returns the removed widget's index, or -1 if the widget was
160       not in this tool box.
161

void QToolBox::setCurrentIndex ( int index ) [slot]

163       Sets the index of the current item, or -1 if the toolbox is empty to
164       index. See the "currentIndex" property for details.
165

void QToolBox::setCurrentItem ( QWidget * item )

167       Sets the current item to be item.
168

void QToolBox::setItemEnabled ( int index, bool enabled )

170       If enabled is TRUE then the item at position index is enabled;
171       otherwise item index is disabled.
172

void QToolBox::setItemIconSet ( int index, const QIconSet & iconSet )

174       Sets the icon of the item at position index to iconSet.
175

void QToolBox::setItemLabel ( int index, const QString & label )

177       Sets the label of the item at position index to label.
178

void QToolBox::setItemToolTip ( int index, const QString & toolTip )

180       Sets the tooltip of the item at position index to toolTip.
181
182   Property Documentation

int count

184       This property holds the number of items contained in the toolbox.
185
186       Get this property's value with count().
187

int currentIndex

189       This property holds the index of the current item, or -1 if the toolbox
190       is empty.
191
192       Set this property's value with setCurrentIndex() and get this
193       property's value with currentIndex().
194
195       See also currentItem(), indexOf(), and item().
196
197

SEE ALSO

199       http://doc.trolltech.com/qtoolbox.html
200       http://www.trolltech.com/faq/tech.html
201
203       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
204       license file included in the distribution for a complete license
205       statement.
206

AUTHOR

208       Generated automatically from the source code.
209

BUGS

211       If you find a bug in Qt, please report it as described in
212       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
213       help you. Thank you.
214
215       The definitive Qt documentation is provided in HTML format; it is
216       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
217       web browser. This man page is provided as a convenience for those users
218       who prefer man pages, although this format is not officially supported
219       by Trolltech.
220
221       If you find errors in this manual page, please report them to qt-
222       bugs@trolltech.com.  Please include the name of the manual page
223       (qtoolbox.3qt) and the Qt version (3.3.8).
224
225
226
227Trolltech AS                    2 February 2007                  QToolBox(3qt)
Impressum