Eneboo - Documentación para desarrolladores
Slots públicos | Señales | Métodos públicos | Métodos protegidos | Propiedades
Referencia de la Clase QToolBox

The QToolBox class provides a column of tabbed widget items. Más...

#include <qtoolbox.h>

Diagrama de herencias de QToolBox
QFrame QFrame QWidget QWidget QWidget QWidget QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QDesignerToolBox

Lista de todos los miembros.

Slots públicos

void setCurrentIndex (int index)
void setCurrentIndex (int index)

Señales

void currentChanged (int index)
void currentChanged (int index)

Métodos públicos

 QToolBox (QWidget *parent=0, const char *name=0, WFlags f=0)
 ~QToolBox ()
int addItem (QWidget *item, const QString &label)
int addItem (QWidget *item, const QIconSet &iconSet, const QString &label)
int insertItem (int index, QWidget *item, const QString &label)
int insertItem (int index, QWidget *item, const QIconSet &iconSet, const QString &label)
int removeItem (QWidget *item)
void setItemEnabled (int index, bool enabled)
bool isItemEnabled (int index) const
void setItemLabel (int index, const QString &label)
QString itemLabel (int index) const
void setItemIconSet (int index, const QIconSet &iconSet)
QIconSet itemIconSet (int index) const
void setItemToolTip (int index, const QString &toolTip)
QString itemToolTip (int index) const
QWidgetcurrentItem () const
void setCurrentItem (QWidget *item)
int currentIndex () const
QWidgetitem (int index) const
int indexOf (QWidget *item) const
int count () const
 QToolBox (QWidget *parent=0, const char *name=0, WFlags f=0)
 ~QToolBox ()
int addItem (QWidget *item, const QString &label)
int addItem (QWidget *item, const QIconSet &iconSet, const QString &label)
int insertItem (int index, QWidget *item, const QString &label)
int insertItem (int index, QWidget *item, const QIconSet &iconSet, const QString &label)
int removeItem (QWidget *item)
void setItemEnabled (int index, bool enabled)
bool isItemEnabled (int index) const
void setItemLabel (int index, const QString &label)
QString itemLabel (int index) const
void setItemIconSet (int index, const QIconSet &iconSet)
QIconSet itemIconSet (int index) const
void setItemToolTip (int index, const QString &toolTip)
QString itemToolTip (int index) const
QWidgetcurrentItem () const
void setCurrentItem (QWidget *item)
int currentIndex () const
QWidgetitem (int index) const
int indexOf (QWidget *item) const
int count () const

Métodos protegidos

virtual void itemInserted (int index)
virtual void itemRemoved (int index)
void showEvent (QShowEvent *e)
void frameChanged ()
void styleChange (QStyle &)
virtual void itemInserted (int index)
virtual void itemRemoved (int index)
void showEvent (QShowEvent *e)
void frameChanged ()
void styleChange (QStyle &)

Propiedades

int currentIndex
 the index of the current item, or -1 if the toolbox is empty.
int count
 The number of items contained in the toolbox.

Descripción detallada

The QToolBox class provides a column of tabbed widget items.

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.

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().

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.

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().

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

Ver también:
QTabWidget

Documentación del constructor y destructor

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

Constructs a toolbox called name with parent parent and flags f.

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

Documentación de las funciones miembro

int QToolBox::addItem ( QWidget w,
const QString label 
) [inline]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Adds the widget w in a new tab at bottom of the toolbox. The new tab's label is set to label. Returns the new tab's index.

int QToolBox::addItem ( QWidget item,
const QIconSet iconSet,
const QString label 
) [inline]

Adds the widget item 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. Returns the new tab's index.

int QToolBox::addItem ( QWidget item,
const QString label 
)
int QToolBox::addItem ( QWidget item,
const QIconSet iconSet,
const QString label 
)
int QToolBox::count ( ) const
int QToolBox::count ( ) const
void QToolBox::currentChanged ( int  index) [signal]

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

void QToolBox::currentChanged ( int  index) [signal]
int QToolBox::currentIndex ( ) const
int QToolBox::currentIndex ( ) const
QWidget* QToolBox::currentItem ( ) const
QWidget * QToolBox::currentItem ( ) const

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

void QToolBox::frameChanged ( ) [protected, virtual]

Virtual function that is called when the frame style, line width or mid-line width changes.

This function can be reimplemented by subclasses that need to know when the frame attributes change.

The default implementation calls update().

Reimplementado de QFrame.

void QToolBox::frameChanged ( ) [protected, virtual]

Reimplementado de QFrame.

int QToolBox::indexOf ( QWidget item) const

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

int QToolBox::indexOf ( QWidget item) const
int QToolBox::insertItem ( int  index,
QWidget item,
const QIconSet iconSet,
const QString label 
)

Inserts the widget item at position index, or at the bottom of the toolbox if index is out of range. The new item's label is set to label, and the iconSet is displayed to the left of the label. Returns the new item's index.

int QToolBox::insertItem ( int  index,
QWidget item,
const QString label 
) [inline]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Inserts the widget item at position index, or at the bottom of the toolbox if index is out of range. The new item's label is set to label. Returns the new item's index.

int QToolBox::insertItem ( int  index,
QWidget item,
const QString label 
)
int QToolBox::insertItem ( int  index,
QWidget item,
const QIconSet iconSet,
const QString label 
)
bool QToolBox::isItemEnabled ( int  index) const
bool QToolBox::isItemEnabled ( int  index) const

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

QWidget * QToolBox::item ( int  index) const

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

QWidget* QToolBox::item ( int  index) const
QIconSet QToolBox::itemIconSet ( int  index) const
QIconSet QToolBox::itemIconSet ( int  index) const

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

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

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

Reimplementado en QDesignerToolBox.

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

Reimplementado en QDesignerToolBox.

QString QToolBox::itemLabel ( int  index) const
QString QToolBox::itemLabel ( int  index) const

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

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

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

virtual void QToolBox::itemRemoved ( int  index) [protected, virtual]
QString QToolBox::itemToolTip ( int  index) const
QString QToolBox::itemToolTip ( int  index) const

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

int QToolBox::removeItem ( QWidget item)

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

int QToolBox::removeItem ( QWidget item)
void QToolBox::setCurrentIndex ( int  index) [slot]
void QToolBox::setCurrentIndex ( int  index) [slot]
void QToolBox::setCurrentItem ( QWidget item)
void QToolBox::setCurrentItem ( QWidget item)

Sets the current item to be item.

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

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

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

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

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

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

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

Sets the tooltip of the item at position index to toolTip.

void QToolBox::showEvent ( QShowEvent ) [protected, virtual]

This event handler can be reimplemented in a subclass to receive widget show events.

Non-spontaneous show events are sent to widgets immediately before they are shown. The spontaneous show events of top-level widgets are delivered afterwards.

Ver también:
event(), QShowEvent

Reimplementado de QWidget.

void QToolBox::showEvent ( QShowEvent e) [protected, virtual]

Reimplementado de QWidget.

void QToolBox::styleChange ( QStyle old) [protected, virtual]

Reimplementado de QFrame.

void QToolBox::styleChange ( QStyle style) [protected, virtual]

Reimplementado de QFrame.


Documentación de propiedades

int QToolBox::count [read]

The number of items contained in the toolbox.

int QToolBox::currentIndex [read, write]

the index of the current item, or -1 if the toolbox is empty.

Ver también:
currentItem(), indexOf(), item()

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'