# eric7.EricWidgets.EricToolBox

Module implementing a horizontal and a vertical toolbox class.

### Global Attributes

None

### Classes

EricHorizontalToolBox | Class implementing a vertical QToolBox like widget.
EricVerticalToolBox | Class implementing a ToolBox class substituting QToolBox to support wheel events.

### Functions

None

## EricHorizontalToolBox

Class implementing a vertical QToolBox like widget.

### Derived from

EricTabWidget

### Class Attributes

None

### Class Methods

None

### Methods

EricHorizontalToolBox | Constructor
addItem | Public method to add a widget to the toolbox.
insertItem | Public method to add a widget to the toolbox.
removeItem | Public method to remove a widget from the toolbox.
setCurrentWidget | Public slot to set the current widget.
setItemEnabled | Public method to set the enabled state of an item.
setItemToolTip | Public method to set the tooltip of an item.

### Static Methods

None

#### EricHorizontalToolBox (Constructor)

EricHorizontalToolBox(parent=None)

Constructor

parent (QWidget)
  reference to the parent widget

#### EricHorizontalToolBox.addItem

addItem(widget, icon, text)

Public method to add a widget to the toolbox.

widget (QWidget)
  reference to the widget to be added
icon (QIcon)
  the icon to be shown
text (str)
  the text to be shown

Return:
  index of the added widget

Return Type:
  int

#### EricHorizontalToolBox.insertItem

insertItem(index, widget, icon, text)

Public method to add a widget to the toolbox.

index (int)
  position at which the widget should be inserted
widget (QWidget)
  reference to the widget to be added
icon (QIcon)
  the icon to be shown
text (str)
  the text to be shown

Return:
  index of the added widget

Return Type:
  int

#### EricHorizontalToolBox.removeItem

removeItem(index)

Public method to remove a widget from the toolbox.

index (int)
  index of the widget to remove

#### EricHorizontalToolBox.setCurrentWidget

setCurrentWidget(widget)

Public slot to set the current widget.

widget (QWidget)
  reference to the widget to become the current widget

#### EricHorizontalToolBox.setItemEnabled

setItemEnabled(index, enabled)

Public method to set the enabled state of an item.

index (int)
  index of the item
enabled (bool)
  flag indicating the enabled state

#### EricHorizontalToolBox.setItemToolTip

setItemToolTip(index, toolTip)

Public method to set the tooltip of an item.

index (int)
  index of the item
toolTip (str)
  tooltip text to be set

Up

## EricVerticalToolBox

Class implementing a ToolBox class substituting QToolBox to support wheel events.

### Derived from

QToolBox

### Class Attributes

None

### Class Methods

None

### Methods

EricVerticalToolBox | Constructor
setCurrentWidget | Public slot to set the current widget.

### Static Methods

None

#### EricVerticalToolBox (Constructor)

EricVerticalToolBox(parent=None)

Constructor

parent (QWidget)
  reference to the parent widget

#### EricVerticalToolBox.setCurrentWidget

setCurrentWidget(widget)

Public slot to set the current widget.

widget (QWidget)
  reference to the widget to become the current widget

Up