# eric4.Helpviewer.HelpBrowserWV

Module implementing the helpbrowser using QWebView.

### Classes

HelpBrowser | Class implementing the helpbrowser widget.

### Functions

None

## HelpBrowser

Class implementing the helpbrowser widget.

This is a subclass of the Qt QWebView to implement an interface compatible with the QTextBrowser based variant.

#### Signals

backwardAvailable(bool)
  emitted after the current URL has changed
forwardAvailable(bool)
  emitted after the current URL has changed
highlighted(const QString&)
  emitted, when the mouse hovers over a link
sourceChanged(const QUrl &)
  emitted after the current URL has changed

### Derived from

QWebView

### Methods

HelpBrowser | Constructor
__downloadDone | Private slot to handle the done signal of the download dialogs.
__downloadRequested | Private slot to handle a download request.
__linkHovered | Private slot to handle the linkHovered signal.
__loadFinished | Private method to handle the loadFinished signal.
__loadProgress | Private method to handle the loadProgress signal.
__loadStarted | Private method to handle the loadStarted signal.
__openLinkInNewTab | Private method called by the context menu to open a link in a new window.
__statusBarMessage | Private slot to handle the statusBarMessage signal.
__unsupportedContent | Private slot to handle the unsupportedContent signal.
__urlChanged | Private slot to handle the urlChanged signal.
__webInspector | Private slot to show the web inspector window.
backward | Public slot to move backwards in history.
clearHistory | Public slot to clear the history.
contextMenuEvent | Protected method called to create a context menu.
copy | Public slot to copy the selected text.
createWindow | Protected method called, when a new window should be created.
documentTitle | Public method to return the title of the loaded page.
findNextPrev | Public slot to find the next occurrence of a text.
forward | Public slot to move forward in history.
hasSelection | Public method to determine, if there is some text selected.
home | Public slot to move to the first page loaded.
isBackwardAvailable | Public method to determine, if a backwards move in history is possible.
isForwardAvailable | Public method to determine, if a forward move in history is possible.
keyPressEvent | Protected method called by a key press.
keyReleaseEvent | Protected method called by a key release.
reload | Public slot to reload the current page.
setSource | Public method used to set the source to be displayed.
source | Public method to return the URL of the loaded page.
supportsSearchWholeWord | Public method to determine, if a word based search is supported.
zoomIn | Public slot to zoom into the page.
zoomOut | Public slot to zoom out of the page.

#### HelpBrowser (Constructor)

HelpBrowser(parent = None, name = QString(""))

Constructor

parent
  parent widget of this window (QWidget)
name
  name of this window (string or QString)

#### HelpBrowser.__downloadDone

__downloadDone()

Private slot to handle the done signal of the download dialogs.

#### HelpBrowser.__downloadRequested

__downloadRequested(request)

Private slot to handle a download request.

request
  reference to the request object (QNetworkRequest)

#### HelpBrowser.__linkHovered

__linkHovered(link, title, textContent)

Private slot to handle the linkHovered signal.

link
  the URL of the link (QString)
title
  the link title (QString)
textContent
  text content of the link (QString)

#### HelpBrowser.__loadFinished

__loadFinished(ok)

Private method to handle the loadFinished signal.

ok
  flag indicating the result (boolean)

#### HelpBrowser.__loadProgress

__loadProgress(progress)

Private method to handle the loadProgress signal.

progress
  progress value (integer)

#### HelpBrowser.__loadStarted

__loadStarted()

Private method to handle the loadStarted signal.

#### HelpBrowser.__openLinkInNewTab

__openLinkInNewTab()

Private method called by the context menu to open a link in a new window.

#### HelpBrowser.__statusBarMessage

__statusBarMessage(text)

Private slot to handle the statusBarMessage signal.

text
  text to be shown in the status bar (QString)

#### HelpBrowser.__unsupportedContent

__unsupportedContent(reply)

Private slot to handle the unsupportedContent signal.

reply
  reference to the reply object (QNetworkReply)

#### HelpBrowser.__urlChanged

__urlChanged(url)

Private slot to handle the urlChanged signal.

url
  the new url (QUrl)

#### HelpBrowser.__webInspector

__webInspector()

Private slot to show the web inspector window.

#### HelpBrowser.backward

backward()

Public slot to move backwards in history.

#### HelpBrowser.clearHistory

clearHistory()

Public slot to clear the history.

#### HelpBrowser.contextMenuEvent

contextMenuEvent(evt)

Protected method called to create a context menu.

This method is overridden from QWebView.

evt
  reference to the context menu event object (QContextMenuEvent)

#### HelpBrowser.copy

copy()

Public slot to copy the selected text.

#### HelpBrowser.createWindow

createWindow(windowType)

Protected method called, when a new window should be created.

windowType
  type of the requested window (QWebPage.WebWindowType)

#### HelpBrowser.documentTitle

documentTitle()

Public method to return the title of the loaded page.

Returns:
  title (QString)

#### HelpBrowser.findNextPrev

findNextPrev(txt, case, word, backwards)

Public slot to find the next occurrence of a text.

txt
  text to search for (QString)
case
  flag indicating a case sensitive search (boolean)
word
  flag indicating a word based search (boolean) (ignored)
backwards
  flag indicating a backwards search (boolean)

#### HelpBrowser.forward

forward()

Public slot to move forward in history.

#### HelpBrowser.hasSelection

hasSelection()

Public method to determine, if there is some text selected.

Returns:
  flag indicating text has been selected (boolean)

#### HelpBrowser.home

home()

Public slot to move to the first page loaded.

#### HelpBrowser.isBackwardAvailable

isBackwardAvailable()

Public method to determine, if a backwards move in history is possible.

Returns:
  flag indicating move backwards is possible (boolean)

#### HelpBrowser.isForwardAvailable

isForwardAvailable()

Public method to determine, if a forward move in history is possible.

Returns:
  flag indicating move forward is possible (boolean)

#### HelpBrowser.keyPressEvent

keyPressEvent(evt)

Protected method called by a key press.

This method is overridden from QTextBrowser.

evt
  the key event (QKeyEvent)

#### HelpBrowser.keyReleaseEvent

keyReleaseEvent(evt)

Protected method called by a key release.

This method is overridden from QTextBrowser.

evt
  the key event (QKeyEvent)

#### HelpBrowser.reload

reload()

Public slot to reload the current page.

#### HelpBrowser.setSource

setSource(name)

Public method used to set the source to be displayed.

This method is overridden from QTextBrowser.

name
  filename to be shown (QUrl)

#### HelpBrowser.source

source()

Public method to return the URL of the loaded page.

Returns:
  URL loaded in the help browser (QUrl)

#### HelpBrowser.supportsSearchWholeWord

supportsSearchWholeWord()

Public method to determine, if a word based search is supported.

Returns:
  flag indicating support for word based search (boolean)

#### HelpBrowser.zoomIn

zoomIn(range = 1)

Public slot to zoom into the page.

range
  zoom factor (integer)

#### HelpBrowser.zoomOut

zoomOut(range = 1)

Public slot to zoom out of the page.

range
  zoom factor (integer)

Up