# eric3.Helpviewer.HelpWindow

Module implementing the helpviewer main window.

### Classes

HelpWindow | Class implementing the helpviewer main window.

### Functions

None

## HelpWindow

Class implementing the helpviewer main window. It was ported to PyQt from the Qt examples. This version includes some enhancements to the original like a search dialog, a history and a bookmark function.

### Derived from

QMainWindow

### Methods

HelpWindow | Constructor
closeEvent | Private event handler for the close event.
handleAbout | Private slot to show the about information.
handleAboutQt | Private slot to show info about Qt.
handleAddBookmark | Private slot called to add the displayed file to the bookmarks.
handleBookmChosen | Private slot called by the bookmarks menu to display the selected file.
handleClearHistory | Private slot called to clear the current history.
handleEditBookmarks | Private slot called to edit the bookmarks.
handleFind | Private slot to handle the find action.
handleHistChosen | Private slot called by the history menu to display the selected file.
handleNewWindow | Public slot called to open a new help window.
handleOpenFile | Private slot called to open a file.
handlePathSelected | Private slot called when a file is selected in the combobox.
handlePrintFile | Private slot called to print the displayed file.
handleShowBookmarksMenu | Private slot called in order to show the bookmarks menu.
handleShowHistoryMenu | Private slot called in order to show the history menu.
handleTextChanged | Private slot called when the displayed text of the combobox is changed.
initActions | Private method to define the user interface actions.
initMenus | Private method to create the menus.
initToolbars | Private method to create the toolbars.
readBookmarks | Private function to read the bookmarks from the eric3 preferences file.
readHistory | Private function to read the history from the eric3 preferences file.
setBackwardAvailable | Private slot called when backward references are available.
setForwardAvailable | Private slot called when forward references are available.
writeBookmarks | Public function to write the bookmarks to the eric3 preferences file.

### HelpWindow (Constructor)

HelpWindow(home, path, parent, name, fromEric=0)

Constructor

home
  the helpfile to be shown (string or QString)
path
  the path of the working dir (usually '.') (string or QString)
parent
  parent widget of this window (QWidget)
name
  name of this window (string or QString)
fromEric
  flag indicating whether it was called from within eric3 (boolean)

### HelpWindow.closeEvent

closeEvent(e)

Private event handler for the close event. This handler saves the current history entries to the eric3 Preferences file.

e
  the close event (QCloseEvent)
  This event is simply accepted after the history has been saved and all window references have been deleted.

### HelpWindow.handleAbout

handleAbout()

Private slot to show the about information.

### HelpWindow.handleAboutQt

handleAboutQt()

Private slot to show info about Qt.

### HelpWindow.handleAddBookmark

handleAddBookmark()

Private slot called to add the displayed file to the bookmarks.

### HelpWindow.handleBookmChosen

handleBookmChosen(i)

Private slot called by the bookmarks menu to display the selected file.

### HelpWindow.handleClearHistory

handleClearHistory()

Private slot called to clear the current history.

### HelpWindow.handleEditBookmarks

handleEditBookmarks()

Private slot called to edit the bookmarks. It opens the bookmark dialog to rearrange, delete or edit the collection of bookmarks.

### HelpWindow.handleFind

handleFind()

Private slot to handle the find action. It opens the search dialog in order to perform the various search actions and to collect the various search info.

### HelpWindow.handleHistChosen

handleHistChosen(i)

Private slot called by the history menu to display the selected file.

### HelpWindow.handleNewWindow

handleNewWindow(link = None)

Public slot called to open a new help window. This new help window is a clone of the current one unless a new file is given.

link
  file to be displayed in the new window (QString)

### HelpWindow.handleOpenFile

handleOpenFile()

Private slot called to open a file.

### HelpWindow.handlePathSelected

handlePathSelected(path)

Private slot called when a file is selected in the combobox.

### HelpWindow.handlePrintFile

handlePrintFile()

Private slot called to print the displayed file.

### HelpWindow.handleShowBookmarksMenu

handleShowBookmarksMenu()

Private slot called in order to show the bookmarks menu.

### HelpWindow.handleShowHistoryMenu

handleShowHistoryMenu()

Private slot called in order to show the history menu.

### HelpWindow.handleTextChanged

handleTextChanged()

Private slot called when the displayed text of the combobox is changed.

### HelpWindow.initActions

initActions()

Private method to define the user interface actions.

### HelpWindow.initMenus

initMenus()

Private method to create the menus.

### HelpWindow.initToolbars

initToolbars()

Private method to create the toolbars.

### HelpWindow.readBookmarks

readBookmarks()

Private function to read the bookmarks from the eric3 preferences file.

### HelpWindow.readHistory

readHistory()

Private function to read the history from the eric3 preferences file.

### HelpWindow.setBackwardAvailable

setBackwardAvailable(b)

Private slot called when backward references are available.

### HelpWindow.setForwardAvailable

setForwardAvailable(b)

Private slot called when forward references are available.

### HelpWindow.writeBookmarks

writeBookmarks()

Public function to write the bookmarks to the eric3 preferences file.

Up