# eric6.WebBrowser.UrlBar.UrlBar

Module implementing the URL bar widget.

### Global Attributes

None

### Classes

UrlBar | Class implementing a line edit for entering URLs.

### Functions

None

## UrlBar

Class implementing a line edit for entering URLs.

### Derived from

E5LineEdit

### Class Attributes

None

### Class Methods

None

### Methods

UrlBar | Constructor
__bookmarkChanged | Private slot to handle bookmark or speed dial changes.
__browserUrlChanged | Private slot to handle a URL change of the associated browser.
__checkBookmark | Private slot to check the current URL for the bookmarked state.
__loadFinished | Private slot to set some data after the page was loaded.
__loadStarted | Private slot to perform actions before the page is loaded.
__rssClicked | Private slot to handle clicking the RSS icon.
__setRssButton | Private slot to show the RSS button.
__showBookmarkInfo | Private slot to show a dialog with some bookmark info.
__showThreatInfo | Private slot to show the threat info widget.
__textChanged | Private slot to handle changes of the text.
browser | Public method to get the associated browser.
dragEnterEvent | Protected method to handle drag enter events.
dropEvent | Protected method to handle drop events.
focusOutEvent | Protected method to handle focus out event.
keyPressEvent | Protected method to handle key presses.
mouseDoubleClickEvent | Protected method to handle mouse double click events.
mousePressEvent | Protected method called by a mouse press event.
paintEvent | Protected method handling a paint event.
preferencesChanged | Public slot to handle a change of preferences.
setBrowser | Public method to set the browser connection.

### Static Methods

None

#### UrlBar (Constructor)

UrlBar(mainWindow, parent=None)

Constructor

mainWindow
  reference to the main window (HelpWindow)
parent
  reference to the parent widget (HelpBrowser)

#### UrlBar.__bookmarkChanged

__bookmarkChanged()

Private slot to handle bookmark or speed dial changes.

#### UrlBar.__browserUrlChanged

__browserUrlChanged(url)

Private slot to handle a URL change of the associated browser.

url
  new URL of the browser (QUrl)

#### UrlBar.__checkBookmark

__checkBookmark()

Private slot to check the current URL for the bookmarked state.

#### UrlBar.__loadFinished

__loadFinished(ok)

Private slot to set some data after the page was loaded.

ok
  flag indicating a successful load (boolean)

#### UrlBar.__loadStarted

__loadStarted()

Private slot to perform actions before the page is loaded.

#### UrlBar.__rssClicked

__rssClicked()

Private slot to handle clicking the RSS icon.

#### UrlBar.__setRssButton

__setRssButton()

Private slot to show the RSS button.

#### UrlBar.__showBookmarkInfo

__showBookmarkInfo()

Private slot to show a dialog with some bookmark info.

#### UrlBar.__showThreatInfo

__showThreatInfo(pos)

Private slot to show the threat info widget.

pos (QPoint)
  position to show the info at

#### UrlBar.__textChanged

__textChanged(txt)

Private slot to handle changes of the text.

txt
  current text (string)

#### UrlBar.browser

browser()

Public method to get the associated browser.

Returns:
  reference to the associated browser (HelpBrowser)

#### UrlBar.dragEnterEvent

dragEnterEvent(evt)

Protected method to handle drag enter events.

evt
  reference to the drag enter event (QDragEnterEvent)

#### UrlBar.dropEvent

dropEvent(evt)

Protected method to handle drop events.

evt
  reference to the drop event (QDropEvent)

#### UrlBar.focusOutEvent

focusOutEvent(evt)

Protected method to handle focus out event.

evt
  reference to the focus event (QFocusEvent)

#### UrlBar.keyPressEvent

keyPressEvent(evt)

Protected method to handle key presses.

evt
  reference to the key press event (QKeyEvent)

#### UrlBar.mouseDoubleClickEvent

mouseDoubleClickEvent(evt)

Protected method to handle mouse double click events.

evt
  reference to the mouse event (QMouseEvent)

#### UrlBar.mousePressEvent

mousePressEvent(evt)

Protected method called by a mouse press event.

evt
  reference to the mouse event (QMouseEvent)

#### UrlBar.paintEvent

paintEvent(evt)

Protected method handling a paint event.

evt
  reference to the paint event (QPaintEvent)

#### UrlBar.preferencesChanged

preferencesChanged()

Public slot to handle a change of preferences.

#### UrlBar.setBrowser

setBrowser(browser)

Public method to set the browser connection.

browser
  reference to the browser widget (WebBrowserView)

Up