QToolBox(3qt)

NAME
QToolBox - Column of tabbed widgets

SYNOPSIS
#include <qtoolbox.h>

Inherits QWidget.

  Public Members
QToolBox ( QWidget * parent = 0, const char * name = 0 )
void addPage ( QWidget * page, const QString & label )
void addPage ( QWidget * page, const QIconSet & iconSet, const QString & label )
void insertPage ( QWidget * page, const QString & label, int index = -1 )
void insertPage ( QWidget * page, const QIconSet & iconSet, const QString & label, int index = -1 )
void setPageEnabled ( QWidget * page, bool enabled )
bool isPageEnabled ( QWidget * page ) const
void setPageLabel ( QWidget * page, const QString & label )
QString pageLabel ( QWidget * page ) const
void setPageIconSet ( QWidget * page, const QIconSet & iconSet )
QIconSet pageIconSet ( QWidget * page ) const
void setPageToolTip ( QWidget * page, const QString & toolTip )
QString pageToolTip ( QWidget * page ) const
QWidget * currentPage () const
void setCurrentPage ( QWidget * page )
int currentIndex () const
QWidget * page ( int index ) const
int indexOf ( QWidget * page ) const
int count () const
void setPageBackgroundMode ( BackgroundMode bm )
BackgroundMode pageBackgroundMode () const
void removePage ( QWidget * page )

  Public Slots
void setCurrentIndex ( int index )

  Signals
void currentChanged ( int index )

  Properties
int count - the number of pages contained in the toolbox (read only)
int currentIndex - the current page's index position
BackgroundMode pageBackgroundMode - the background mode in which the current page should be displayed. If this pageBackgroundMode is set to something else than NoBackground, the background mode is also set to all children of the pages

DESCRIPTION
The QToolBox class provides a column of tabbed widgets.

A toolbox is a widget that displays a column of tabs one above the other, with the current page displayed below the current tab. Every tab has an index position within the column of tabs. A tab's page is a QWidget.

Each tab has a pageLabel(), an optional icon, pageIconSet(), an optional pageToolTip(), and a widget. The tab's attributes can be changed with setPageLabel(), setPageIconSet() and setPageToolTip().

Pages are added using addPage(), or inserted at particular positions using insertPage(). Pages are deleted with removePage(). The total number of pages is given by count().

The current page is returned by currentPage() and set with setCurrentPage(). If you prefer you can work in terms of indexes using currentIndex(), setCurrentIndex(), indexOf() and page().

The currentChanged() signal is emitted when the current page is changed.

See also QTabWidget and Advanced Widgets.

MEMBER FUNCTION DOCUMENTATION

QToolBox::QToolBox ( QWidget * parent = 0, const char * name = 0 )
Constructs a toolbox called name with parent parent.

void QToolBox::addPage ( QWidget * page, const QIconSet & iconSet, const QString & label )
Adds the widget page in a new tab at bottom of the toolbox. The new tab's label is set to label, and the iconSet is displayed to the left of the label.

void QToolBox::addPage ( QWidget * page, const QString & label )
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Adds the widget page in a new tab at bottom of the toolbox. The new tab's label is set to label.

int QToolBox::count () const
Returns the number of pages contained in the toolbox. See the "count" property for details.

void QToolBox::currentChanged ( int index ) [signal]
This signal is emitted when the current page is changed. The index position of the new current page is passed in index.

int QToolBox::currentIndex () const
Returns the current page's index position. See the "currentIndex" property for details.

QWidget * QToolBox::currentPage () const
Returns the toolbox's current page.

int QToolBox::indexOf ( QWidget * page ) const
Returns the index position of page page.

void QToolBox::insertPage ( QWidget * page, const QIconSet & iconSet, const QString & label, int index = -1 )
Inserts the widget page in a new tab at position index. The new tab's label is set to label, and the iconSet is displayed to the left of the label.

void QToolBox::insertPage ( QWidget * page, const QString & label, int index = -1 )
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Inserts the widget page in a new tab at position index. The new tab's label is set to label.

bool QToolBox::isPageEnabled ( QWidget * page ) const
Returns TRUE if page page is enabled; otherwise returns FALSE.

QWidget * QToolBox::page ( int index ) const
Returns the page at position index.

BackgroundMode QToolBox::pageBackgroundMode () const
Returns the background mode in which the current page should be displayed. If this pageBackgroundMode is set to something else than NoBackground, the background mode is also set to all children of the pages. See the "pageBackgroundMode" property for details.

QIconSet QToolBox::pageIconSet ( QWidget * page ) const
Returns page page's tab icon.

QString QToolBox::pageLabel ( QWidget * page ) const
Returns page page's tab label.

QString QToolBox::pageToolTip ( QWidget * page ) const
Returns page page's tooltip.

void QToolBox::removePage ( QWidget * page )
Removes the widget page from the toolbox. Note that the page is not deleted.

void QToolBox::setCurrentIndex ( int index ) [slot]
Sets the current page's index position to index. See the "currentIndex" property for details.

void QToolBox::setCurrentPage ( QWidget * page )
Sets the current page to be page.

void QToolBox::setPageBackgroundMode ( BackgroundMode bm )
Sets the background mode in which the current page should be displayed. If this pageBackgroundMode is set to something else than NoBackground, the background mode is also set to all children of the pages to bm. See the "pageBackgroundMode" property for details.

void QToolBox::setPageEnabled ( QWidget * page, bool enabled )
If enabled is TRUE then page page is enabled; otherwise page page is disabled.

void QToolBox::setPageIconSet ( QWidget * page, const QIconSet & iconSet )
Sets the tab icon of page page to iconSet.

void QToolBox::setPageLabel ( QWidget * page, const QString & label )
Sets the tab label of page page to label.

void QToolBox::setPageToolTip ( QWidget * page, const QString & toolTip )
Sets the tab tooltip of page page to toolTip.

  Property Documentation

int count
This property holds the number of pages contained in the toolbox.

Get this property's value with count().

int currentIndex
This property holds the current page's index position.

Set this property's value with setCurrentIndex() and get this property's value with currentIndex().

BackgroundMode pageBackgroundMode
This property holds the background mode in which the current page should be displayed. If this pageBackgroundMode is set to something else than NoBackground, the background mode is also set to all children of the pages.

Set this property's value with setPageBackgroundMode() and get this property's value with pageBackgroundMode().

SEE ALSO
http://doc.trolltech.com/qtoolbox.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you.

The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt 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.

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qtoolbox.3qt) and the Qt version (3.2.0b1).