# eric4.Helpviewer.HelpWindow

Module implementing the helpviewer main window.

### Global Attributes

None

### Classes

HelpWindow | Class implementing the web browser main window.

### Functions

None

## HelpWindow

Class implementing the web browser main window.

#### Signals

helpClosed()
  emitted after the window was requested to close down
zoomTextOnlyChanged(bool)
  emitted after the zoom text only setting was changed

### Derived from

KQMainWindow

### Class Attributes

_adblockManager
_bookmarksManager
_cookieJar
_helpEngine
_historyManager
_networkAccessManager
_passwordManager
helpwindows
maxMenuFilePathLen

### Methods

HelpWindow | Constructor
__about | Private slot to show the about information.
__aboutQt | Private slot to show info about Qt.
__activateCurrentBrowser | Private slot to activate the current browser.
__activateDock | Private method to activate the dock widget of the given widget.
__addBookmark | Private slot called to add the displayed file to the bookmarks.
__addBookmarkFolder | Private slot to add a new bookmarks folder.
__backward | Private slot called to handle the backward action.
__bookmarkAll | Private slot to bookmark all open tabs.
__clearIconsDatabase | Private slot to clear the icons databse.
__clearPrivateData | Private slot to clear the private data.
__close | Private slot called to handle the close action.
__closeAll | Private slot called to handle the close all action.
__closeAt | Private slot to close a window based on it's index.
__closeNetworkMonitor | Private slot to close the network monitor dialog.
__copy | Private slot called to handle the copy action.
__currentChanged | Private slot to handle the currentChanged signal.
__docsInstalled | Private slot handling the end of documentation installation.
__elide | Private method to elide some text.
__filterQtHelpDocumentation | Private slot to filter the QtHelp documentation.
__find | Private slot to handle the find action.
__forward | Private slot called to handle the forward action.
__getWebIcon | Private static method to fetch the icon for a URL.
__guessUrlFromPath | Private method to guess an URL given a path string.
__hideIndexWindow | Private method to hide the index window.
__hideSearchWindow | Private method to hide the search window.
__hideTocWindow | Private method to hide the table of contents window.
__home | Private slot called to handle the home action.
__indexingFinished | Private slot to handle the start of the indexing process.
__indexingStarted | Private slot to handle the start of the indexing process.
__initActions | Private method to define the user interface actions.
__initHelpDb | Private slot to initialize the documentation database.
__initMenus | Private method to create the menus.
__initTabContextMenu | Private mezhod to create the tab context menu.
__initToolbars | Private method to create the toolbars.
__initWebSettings | Private method to set the global web settings.
__isFullScreen | Private method to determine, if the window is in full screen mode.
__linkActivated | Private slot to handle the selection of a link in the TOC window.
__linksActivated | Private slot to select a topic to be shown.
__lookForNewDocumentation | Private slot to look for new documentation to be loaded into the help database.
__manageQtHelpDocumentation | Private slot to manage the QtHelp documentation database.
__manageQtHelpFilters | Private slot to manage the QtHelp filters.
__navigationMenuActionTriggered | Private slot to go to the selected page.
__navigationMenuTriggered | Private slot called to handle the navigation button menu selection.
__nextTab | Private slot used to show the next tab.
__openFile | Private slot called to open a file.
__openFileNewTab | Private slot called to open a file in a new tab.
__openUrl | Private slot to load a URL from the bookmarks menu or bookmarks toolbar in the current tab.
__openUrlNewTab | Private slot to load a URL from the bookmarks menu or bookmarks toolbar in a new tab.
__pathSelected | Private slot called when a file is selected in the combobox.
__prevTab | Private slot used to show the previous tab.
__printFile | Private slot called to print the displayed file.
__printPreview | Public slot to generate a print preview.
__printPreviewFile | Private slot called to show a print preview of the displayed file.
__printRequested | Private slot to handle a print request.
__privateBrowsing | Private slot to switch private browsing.
__reload | Private slot called to handle the reload action.
__removeOldHistory | Private method to remove the old history from the eric4 preferences file.
__savePageAs | Private slot to save the current page.
__searchForWord | Private slot to search for a word.
__setBackwardAvailable | Private slot called when backward references are available.
__setForwardAvailable | Private slot called when forward references are available.
__setIconDatabasePath | Private method to set the favicons path.
__setLoadingActions | Private slot to set the loading dependent actions.
__setPathComboBackground | Private slot to change the path combo background to indicate save URLs.
__setupFilterCombo | Private slot to setup the filter combo box.
__showAcceptedLanguages | Private slot to configure the accepted languages for web pages.
__showAdBlockDialog | Private slot to show the AdBlock configuration dialog.
__showBackMenu | Private slot showing the backwards navigation menu.
__showBookmarksDialog | Private slot to show the bookmarks dialog.
__showContextMenu | Private slot to show the tab context menu.
__showCookiesConfiguration | Private slot to configure the cookies handling.
__showEnginesConfigurationDialog | Private slot to show the search engines configuration dialog.
__showForwardMenu | Private slot showing the forwards navigation menu.
__showHistoryMenu | Private slot called in order to show the history menu.
__showIndexWindow | Private method to show the index window.
__showInstallationError | Private slot to show installation errors.
__showNavigationMenu | Private slot to show the navigation button menu.
__showNetworkMonitor | Private slot to show the network monitor dialog.
__showPageSource | Private slot to show the source of the current page in an editor.
__showPasswordsDialog | Private slot to show the passwords management dialog.
__showPreferences | Private slot to set the preferences.
__showSearchWindow | Private method to show the search window.
__showTocWindow | Private method to show the table of contents window.
__sourceChanged | Private slot called when the displayed text of the combobox is changed.
__stopLoading | Private slot called to handle loading of the current page.
__switchTab | Private slot used to switch between the current and the previous current tab.
__syncTOC | Private slot to synchronize the TOC with the currently shown page.
__tabContextMenuClone | Private method to clone the selected tab.
__tabContextMenuClose | Private method to close the selected tab.
__tabContextMenuCloseOthers | Private slot to close all other tabs.
__tabContextMenuMoveLeft | Private method to move a tab one position to the left.
__tabContextMenuMoveRight | Private method to move a tab one position to the right.
__tabContextMenuPrint | Private method to print the selected tab.
__tabContextMenuPrintPreview | Private method to show a print preview of the selected tab.
__titleChanged | Private slot called to handle a change of the current browsers title.
__viewFullScreen | Private slot called to toggle fullscreen mode.
__warning | Private slot handling warnings from the help engine.
__whatsThis | Private slot called in to enter Whats This mode.
__windowCloseRequested | Private slot to handle the windowCloseRequested signal of a browser.
__zoomIn | Private slot called to handle the zoom in action.
__zoomOut | Private slot called to handle the zoom out action.
__zoomReset | Private slot called to handle the zoom reset action.
__zoomTextOnly | Private slot called to handle the zoom text only action.
adblockManager | Class method to get a reference to the AdBlock manager.
bookmarksManager | Class method to get a reference to the bookmarks manager.
browsers | Public method to get a list of references to all help browsers.
closeEvent | Private event handler for the close event.
cookieJar | Class method to get a reference to the cookie jar.
currentBrowser | Public method to get a reference to the current help browser.
getActions | Public method to get a list of all actions.
getSourceFileList | Public method to get a list of all opened source files.
helpEngine | Class method to get a reference to the help engine.
historyManager | Class method to get a reference to the history manager.
icon | Class method to get the icon for an URL.
iconChanged | Public slot to change the icon shown to the left of the URL entry.
networkAccessManager | Class method to get a reference to the network access manager.
newBrowser | Public method to create a new help browser tab.
newTab | Public slot called to open a new help window tab.
newWindow | Public slot called to open a new help browser dialog.
openSearchManager | Public method to get a reference to the opensearch manager object.
passwordManager | Class method to get a reference to the password manager.
preferencesChanged | Public slot to handle a change of preferences.
progressBar | Public method to get a reference to the load progress bar.
resetLoading | Public method to reset the loading icon.
search | Public method to search for a word.
searchEnginesAction | Public method to get a reference to the search engines configuration action.
setLoading | Public method to set the loading icon.

#### HelpWindow (Constructor)

HelpWindow(home, path, parent, name, fromEric = False, initShortcutsOnly = False, searchWord = None)

Constructor

home
  the URL 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 eric4 (boolean)
initShortcutsOnly=
  flag indicating to just initialize the keyboard shortcuts (boolean)
searchWord=
  word to search for (string or QString)

#### HelpWindow.__about

__about()

Private slot to show the about information.

#### HelpWindow.__aboutQt

__aboutQt()

Private slot to show info about Qt.

#### HelpWindow.__activateCurrentBrowser

__activateCurrentBrowser()

Private slot to activate the current browser.

#### HelpWindow.__activateDock

__activateDock(widget)

Private method to activate the dock widget of the given widget.

widget
  reference to the widget to be activated (QWidget)

#### HelpWindow.__addBookmark

__addBookmark()

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

#### HelpWindow.__addBookmarkFolder

__addBookmarkFolder()

Private slot to add a new bookmarks folder.

#### HelpWindow.__backward

__backward()

Private slot called to handle the backward action.

#### HelpWindow.__bookmarkAll

__bookmarkAll()

Private slot to bookmark all open tabs.

#### HelpWindow.__clearIconsDatabase

__clearIconsDatabase()

Private slot to clear the icons databse.

#### HelpWindow.__clearPrivateData

__clearPrivateData()

Private slot to clear the private data.

#### HelpWindow.__close

__close()

Private slot called to handle the close action.

#### HelpWindow.__closeAll

__closeAll()

Private slot called to handle the close all action.

#### HelpWindow.__closeAt

__closeAt(index)

Private slot to close a window based on it's index.

index
  index of window to close (integer)

#### HelpWindow.__closeNetworkMonitor

__closeNetworkMonitor()

Private slot to close the network monitor dialog.

#### HelpWindow.__copy

__copy()

Private slot called to handle the copy action.

#### HelpWindow.__currentChanged

__currentChanged(index)

Private slot to handle the currentChanged signal.

index
  index of the current tab

#### HelpWindow.__docsInstalled

__docsInstalled(installed)

Private slot handling the end of documentation installation.

installed
  flag indicating that documents were installed (boolean)

#### HelpWindow.__elide

__elide(txt, mode = Qt.ElideRight, length = 40)

Private method to elide some text.

txt
  text to be elided (string or QString)
mode=
  elide mode (Qt.TextElideMode)
length=
  amount of characters to be used (integer)

Returns:
  the elided text (QString)

#### HelpWindow.__filterQtHelpDocumentation

__filterQtHelpDocumentation(customFilter)

Private slot to filter the QtHelp documentation.

customFilter
  name of filter to be applied (QString)

#### HelpWindow.__find

__find()

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

__forward()

Private slot called to handle the forward action.

#### HelpWindow.__getWebIcon

__getWebIcon()

Private static method to fetch the icon for a URL.

url
  URL to get icon for (QUrl)

Returns:
  icon for the URL (QIcon)

#### HelpWindow.__guessUrlFromPath

__guessUrlFromPath(path)

Private method to guess an URL given a path string.

path
  path string to guess an URL for (QString)

Returns:
  guessed URL (QUrl)

#### HelpWindow.__hideIndexWindow

__hideIndexWindow()

Private method to hide the index window.

#### HelpWindow.__hideSearchWindow

__hideSearchWindow()

Private method to hide the search window.

#### HelpWindow.__hideTocWindow

__hideTocWindow()

Private method to hide the table of contents window.

#### HelpWindow.__home

__home()

Private slot called to handle the home action.

#### HelpWindow.__indexingFinished

__indexingFinished()

Private slot to handle the start of the indexing process.

#### HelpWindow.__indexingStarted

__indexingStarted()

Private slot to handle the start of the indexing process.

#### HelpWindow.__initActions

__initActions()

Private method to define the user interface actions.

#### HelpWindow.__initHelpDb

__initHelpDb()

Private slot to initialize the documentation database.

#### HelpWindow.__initMenus

__initMenus()

Private method to create the menus.

#### HelpWindow.__initTabContextMenu

__initTabContextMenu()

Private mezhod to create the tab context menu.

#### HelpWindow.__initToolbars

__initToolbars()

Private method to create the toolbars.

#### HelpWindow.__initWebSettings

__initWebSettings()

Private method to set the global web settings.

#### HelpWindow.__isFullScreen

__isFullScreen()

Private method to determine, if the window is in full screen mode.

Returns:
  flag indicating full screen mode (boolean)

#### HelpWindow.__linkActivated

__linkActivated(url)

Private slot to handle the selection of a link in the TOC window.

url
  URL to be shown (QUrl)

#### HelpWindow.__linksActivated

__linksActivated(links, keyword)

Private slot to select a topic to be shown.

links
  dictionary with help topic as key (QString) and URL as value (QUrl)
keyword
  keyword for the link set (QString)

#### HelpWindow.__lookForNewDocumentation

__lookForNewDocumentation()

Private slot to look for new documentation to be loaded into the help database.

#### HelpWindow.__manageQtHelpDocumentation

__manageQtHelpDocumentation()

Private slot to manage the QtHelp documentation database.

#### HelpWindow.__manageQtHelpFilters

__manageQtHelpFilters()

Private slot to manage the QtHelp filters.

#### HelpWindow.__navigationMenuActionTriggered

__navigationMenuActionTriggered(act)

Private slot to go to the selected page.

act
  reference to the action selected in the navigation menu (QAction)

#### HelpWindow.__navigationMenuTriggered

__navigationMenuTriggered(act)

Private slot called to handle the navigation button menu selection.

act
  reference to the selected action (QAction)

#### HelpWindow.__nextTab

__nextTab()

Private slot used to show the next tab.

#### HelpWindow.__openFile

__openFile()

Private slot called to open a file.

#### HelpWindow.__openFileNewTab

__openFileNewTab()

Private slot called to open a file in a new tab.

#### HelpWindow.__openUrl

__openUrl(url, title)

Private slot to load a URL from the bookmarks menu or bookmarks toolbar in the current tab.

url
  url to be opened (QUrl)
title
  title of the bookmark (QString)

#### HelpWindow.__openUrlNewTab

__openUrlNewTab(url, title)

Private slot to load a URL from the bookmarks menu or bookmarks toolbar in a new tab.

url
  url to be opened (QUrl)
title
  title of the bookmark (QString)

#### HelpWindow.__pathSelected

__pathSelected(path)

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

path
  path to be shown (string or QString)

#### HelpWindow.__prevTab

__prevTab()

Private slot used to show the previous tab.

#### HelpWindow.__printFile

__printFile(browser = None)

Private slot called to print the displayed file.

browser
  reference to the browser to be printed (QTextEdit)

#### HelpWindow.__printPreview

__printPreview(printer)

Public slot to generate a print preview.

printer
  reference to the printer object (QPrinter)

#### HelpWindow.__printPreviewFile

__printPreviewFile(browser = None)

Private slot called to show a print preview of the displayed file.

browser
  reference to the browser to be printed (QTextEdit)

#### HelpWindow.__printRequested

__printRequested(frame)

Private slot to handle a print request.

frame
  reference to the frame to be printed (QWebFrame)

#### HelpWindow.__privateBrowsing

__privateBrowsing()

Private slot to switch private browsing.

#### HelpWindow.__reload

__reload()

Private slot called to handle the reload action.

#### HelpWindow.__removeOldHistory

__removeOldHistory()

Private method to remove the old history from the eric4 preferences file.

#### HelpWindow.__savePageAs

__savePageAs()

Private slot to save the current page.

#### HelpWindow.__searchForWord

__searchForWord()

Private slot to search for a word.

#### HelpWindow.__setBackwardAvailable

__setBackwardAvailable(b)

Private slot called when backward references are available.

b
  flag indicating availability of the backwards action (boolean)

#### HelpWindow.__setForwardAvailable

__setForwardAvailable(b)

Private slot called when forward references are available.

b
  flag indicating the availability of the forwards action (boolean)

#### HelpWindow.__setIconDatabasePath

__setIconDatabasePath(enable = True)

Private method to set the favicons path.

enable
  flag indicating to enabled icon storage

#### HelpWindow.__setLoadingActions

__setLoadingActions(b)

Private slot to set the loading dependent actions.

b
  flag indicating the loading state to consider (boolean)

#### HelpWindow.__setPathComboBackground

__setPathComboBackground()

Private slot to change the path combo background to indicate save URLs.

#### HelpWindow.__setupFilterCombo

__setupFilterCombo()

Private slot to setup the filter combo box.

#### HelpWindow.__showAcceptedLanguages

__showAcceptedLanguages()

Private slot to configure the accepted languages for web pages.

#### HelpWindow.__showAdBlockDialog

__showAdBlockDialog()

Private slot to show the AdBlock configuration dialog.

#### HelpWindow.__showBackMenu

__showBackMenu()

Private slot showing the backwards navigation menu.

#### HelpWindow.__showBookmarksDialog

__showBookmarksDialog()

Private slot to show the bookmarks dialog.

#### HelpWindow.__showContextMenu

__showContextMenu(coord, index)

Private slot to show the tab context menu.

coord
  the position of the mouse pointer (QPoint)
index
  index of the tab the menu is requested for (integer)

#### HelpWindow.__showCookiesConfiguration

__showCookiesConfiguration()

Private slot to configure the cookies handling.

#### HelpWindow.__showEnginesConfigurationDialog

__showEnginesConfigurationDialog()

Private slot to show the search engines configuration dialog.

#### HelpWindow.__showForwardMenu

__showForwardMenu()

Private slot showing the forwards navigation menu.

#### HelpWindow.__showHistoryMenu

__showHistoryMenu()

Private slot called in order to show the history menu.

#### HelpWindow.__showIndexWindow

__showIndexWindow()

Private method to show the index window.

#### HelpWindow.__showInstallationError

__showInstallationError(message)

Private slot to show installation errors.

message
  message to be shown (QString)

#### HelpWindow.__showNavigationMenu

__showNavigationMenu()

Private slot to show the navigation button menu.

#### HelpWindow.__showNetworkMonitor

__showNetworkMonitor()

Private slot to show the network monitor dialog.

#### HelpWindow.__showPageSource

__showPageSource()

Private slot to show the source of the current page in an editor.

#### HelpWindow.__showPasswordsDialog

__showPasswordsDialog()

Private slot to show the passwords management dialog.

#### HelpWindow.__showPreferences

__showPreferences()

Private slot to set the preferences.

#### HelpWindow.__showSearchWindow

__showSearchWindow()

Private method to show the search window.

#### HelpWindow.__showTocWindow

__showTocWindow()

Private method to show the table of contents window.

#### HelpWindow.__sourceChanged

__sourceChanged(url)

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

#### HelpWindow.__stopLoading

__stopLoading()

Private slot called to handle loading of the current page.

#### HelpWindow.__switchTab

__switchTab()

Private slot used to switch between the current and the previous current tab.

#### HelpWindow.__syncTOC

__syncTOC()

Private slot to synchronize the TOC with the currently shown page.

#### HelpWindow.__tabContextMenuClone

__tabContextMenuClone()

Private method to clone the selected tab.

#### HelpWindow.__tabContextMenuClose

__tabContextMenuClose()

Private method to close the selected tab.

#### HelpWindow.__tabContextMenuCloseOthers

__tabContextMenuCloseOthers()

Private slot to close all other tabs.

#### HelpWindow.__tabContextMenuMoveLeft

__tabContextMenuMoveLeft()

Private method to move a tab one position to the left.

#### HelpWindow.__tabContextMenuMoveRight

__tabContextMenuMoveRight()

Private method to move a tab one position to the right.

#### HelpWindow.__tabContextMenuPrint

__tabContextMenuPrint()

Private method to print the selected tab.

#### HelpWindow.__tabContextMenuPrintPreview

__tabContextMenuPrintPreview()

Private method to show a print preview of the selected tab.

#### HelpWindow.__titleChanged

__titleChanged(title)

Private slot called to handle a change of the current browsers title.

title
  new title (QString)

#### HelpWindow.__viewFullScreen

__viewFullScreen()

Private slot called to toggle fullscreen mode.

#### HelpWindow.__warning

__warning(msg)

Private slot handling warnings from the help engine.

msg
  message sent by the help engine (QString)

#### HelpWindow.__whatsThis

__whatsThis()

Private slot called in to enter Whats This mode.

#### HelpWindow.__windowCloseRequested

__windowCloseRequested()

Private slot to handle the windowCloseRequested signal of a browser.

#### HelpWindow.__zoomIn

__zoomIn()

Private slot called to handle the zoom in action.

#### HelpWindow.__zoomOut

__zoomOut()

Private slot called to handle the zoom out action.

#### HelpWindow.__zoomReset

__zoomReset()

Private slot called to handle the zoom reset action.

#### HelpWindow.__zoomTextOnly

__zoomTextOnly(textOnly)

Private slot called to handle the zoom text only action.

textOnly
  flag indicating to zoom text only (boolean)

#### HelpWindow.adblockManager

adblockManager()

Class method to get a reference to the AdBlock manager.

Returns:
  reference to the AdBlock manager (AdBlockManager)

#### HelpWindow.bookmarksManager

bookmarksManager()

Class method to get a reference to the bookmarks manager.

Returns:
  reference to the bookmarks manager (BookmarksManager)

#### HelpWindow.browsers

browsers()

Public method to get a list of references to all help browsers.

Returns:
  list of references to help browsers (list of HelpBrowser)

#### HelpWindow.closeEvent

closeEvent(e)

Private event handler for the close event.

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

#### HelpWindow.cookieJar

cookieJar()

Class method to get a reference to the cookie jar.

Returns:
  reference to the cookie jar (CookieJar)

#### HelpWindow.currentBrowser

currentBrowser()

Public method to get a reference to the current help browser.

Returns:
  reference to the current help browser (HelpBrowser)

#### HelpWindow.getActions

getActions()

Public method to get a list of all actions.

Returns:
  list of all actions (list of E4Action)

#### HelpWindow.getSourceFileList

getSourceFileList()

Public method to get a list of all opened source files.

Returns:
  dictionary with tab id as key and host/namespace as value

#### HelpWindow.helpEngine

helpEngine()

Class method to get a reference to the help engine.

Returns:
  reference to the help engine (QHelpEngine)

#### HelpWindow.historyManager

historyManager()

Class method to get a reference to the history manager.

Returns:
  reference to the history manager (HistoryManager)

#### HelpWindow.icon

icon(url)

Class method to get the icon for an URL.

url
  URL to get icon for (QUrl)

Returns:
  icon for the URL (QIcon)

#### HelpWindow.iconChanged

iconChanged(icon)

Public slot to change the icon shown to the left of the URL entry.

icon
  icon to be shown (QIcon)

#### HelpWindow.networkAccessManager

networkAccessManager()

Class method to get a reference to the network access manager.

Returns:
  reference to the network access manager (NetworkAccessManager)

#### HelpWindow.newBrowser

newBrowser(link)

Public method to create a new help browser tab.

link
  link to be shown (string or QString)

#### HelpWindow.newTab

newTab(link = None)

Public slot called to open a new help window tab.

link
  file to be displayed in the new window (string, QString or QUrl)

#### HelpWindow.newWindow

newWindow(link = None)

Public slot called to open a new help browser dialog.

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

#### HelpWindow.openSearchManager

openSearchManager()

Public method to get a reference to the opensearch manager object.

Returns:
  reference to the opensearch manager object (OpenSearchManager)

#### HelpWindow.passwordManager

passwordManager()

Class method to get a reference to the password manager.

Returns:
  reference to the password manager (PasswordManager)

#### HelpWindow.preferencesChanged

preferencesChanged()

Public slot to handle a change of preferences.

#### HelpWindow.progressBar

progressBar()

Public method to get a reference to the load progress bar.

Returns:
  reference to the load progress bar (QProgressBar)

#### HelpWindow.resetLoading

resetLoading(widget)

Public method to reset the loading icon.

widget
  reference to the widget to reset the icon for (QWidget)

#### HelpWindow.search

search(word)

Public method to search for a word.

word
  word to search for (string or QString)

#### HelpWindow.searchEnginesAction

searchEnginesAction()

Public method to get a reference to the search engines configuration action.

Returns:
  reference to the search engines configuration action (QAction)

#### HelpWindow.setLoading

setLoading(widget)

Public method to set the loading icon.

widget
  reference to the widget to set the icon for (QWidget)

Up