# eric6.WebBrowser.QtHelp.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
newBackgroundTab(QUrl, str)
  emitted to open an entry in a new background tab
newTab(QUrl, str)
  emitted to open an entry in a new tab
newWindow(QUrl, str)
  emitted to open an entry in a new window
openUrl(QUrl, str)
  emitted to open an entry in the current tab

### Derived from

QWidget

### Class Attributes

None

### Class Methods

None

### Methods

HelpTocWidget | Constructor
__contentsCreated | Private slot to be run after the contents was generated.
__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.
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, parent=None)

Constructor

engine
  reference to the help engine (QHelpEngine)
parent
  reference to the parent widget (QWidget)

#### HelpTocWidget.__contentsCreated

__contentsCreated()

Private slot to be run after the contents was generated.

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