# eric4.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(const 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.
__showContextMenu | Private slot showing the context menu.
eventFilter | Public method called to filter the event queue.
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 (KQMainWindow)
parent
  reference to the parent widget (QWidget)

#### HelpTocWidget.__expandTOC

__expandTOC()

Private slot to expand the table of contents.

#### HelpTocWidget.__showContextMenu

__showContextMenu(pos)

Private slot showing the context menu.

pos
  position to show the menu at (QPoint)

#### HelpTocWidget.eventFilter

eventFilter(watched, event)

Public method called to filter the event queue.

watched
  the QObject being watched (QObject)
event
  the event that occurred (QEvent)

Returns:
  flag indicating whether the event was handled (boolean)

#### 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