# eric6.Helpviewer.HelpTocWidget

Module implementing a window for showing the QtHelp TOC.

### Global Attributes

None

### Classes

HelpTocWidget | Class implementing a window for showing the QtHelp TOC.

### Functions

None

## HelpTocWidget

Class implementing a window for showing the QtHelp TOC.

### Signals

escapePressed()
  emitted when the ESC key was pressed
linkActivated(QUrl)
  emitted when a TOC entry is activated

### Derived from

QWidget

### Class Attributes

None

### Class Methods

None

### Methods

HelpTocWidget | Constructor
__expandTOC | Private slot to expand the table of contents.
__linkActivated | Private slot handling the activation of an entry.
__showContextMenu | Private slot showing the context menu.
expandToDepth | Public slot to expand the table of contents to a specific depth.
focusInEvent | Protected method handling focus in events.
itemClicked | Public slot handling a click of a TOC entry.
keyPressEvent | Protected method handling key press events.
syncToContent | Public method to sync the TOC to the displayed page.

### Static Methods

None

#### HelpTocWidget (Constructor)

HelpTocWidget(engine, mainWindow, parent=None)

Constructor

engine
  reference to the help engine (QHelpEngine)
mainWindow
  reference to the main window object (QMainWindow)
parent
  reference to the parent widget (QWidget)

#### HelpTocWidget.__expandTOC

__expandTOC()

Private slot to expand the table of contents.

#### HelpTocWidget.__linkActivated

__linkActivated(url)

Private slot handling the activation of an entry.

url (QUrl)
  URL of the activated entry

#### HelpTocWidget.__showContextMenu

__showContextMenu(pos)

Private slot showing the context menu.

pos
  position to show the menu at (QPoint)

#### HelpTocWidget.expandToDepth

expandToDepth(depth)

Public slot to expand the table of contents to a specific depth.

depth
  depth to expand to (integer)

#### HelpTocWidget.focusInEvent

focusInEvent(evt)

Protected method handling focus in events.

evt
  reference to the focus event object (QFocusEvent)

#### HelpTocWidget.itemClicked

itemClicked(index)

Public slot handling a click of a TOC entry.

index
  index of the TOC clicked (QModelIndex)

#### HelpTocWidget.keyPressEvent

keyPressEvent(evt)

Protected method handling key press events.

evt
  reference to the key press event (QKeyEvent)

#### HelpTocWidget.syncToContent

syncToContent(url)

Public method to sync the TOC to the displayed page.

url
  URL of the displayed page (QUrl)

Returns:
  flag indicating a successful synchronization (boolean)

Up