# eric6.WebBrowser.AdBlock.AdBlockIcon

Module implementing the AdBlock icon for the main window status bar.

### Global Attributes

None

### Classes

AdBlockIcon | Class implementing the AdBlock icon for the main window status bar.

### Functions

None

## AdBlockIcon

Class implementing the AdBlock icon for the main window status bar.

### Derived from

E5ClickableLabel

### Class Attributes

None

### Class Methods

None

### Methods

AdBlockIcon | Constructor
__createMenu | Private slot to create the context menu.
__enableAdBlock | Private slot to enable or disable AdBlock.
__isCurrentHostExcepted | Private method to check, if the host of the current browser is excepted.
__setException | Private slot to add or remove the current host from the list of exceptions.
__showMenu | Private slot to show the context menu.
currentChanged | Public slot to handle a change of the current browser tab.
menuAction | Public method to get a reference to the menu action.
setEnabled | Public slot to set the enabled state.
sourceChanged | Public slot to handle URL changes.

### Static Methods

None

#### AdBlockIcon (Constructor)

AdBlockIcon(parent)

Constructor

parent (WebBrowserWindow)
  reference to the parent widget

#### AdBlockIcon.__createMenu

__createMenu(menu)

Private slot to create the context menu.

menu (QMenu)
  parent menu

#### AdBlockIcon.__enableAdBlock

__enableAdBlock(enable)

Private slot to enable or disable AdBlock.

enable (bool)
  flag indicating the desired enable state

#### AdBlockIcon.__isCurrentHostExcepted

__isCurrentHostExcepted()

Private method to check, if the host of the current browser is excepted.

Returns:
  flag indicating an exception

Return Type:
  bool

#### AdBlockIcon.__setException

__setException(enable)

Private slot to add or remove the current host from the list of exceptions.

enable (bool)
  flag indicating to set or remove an exception

#### AdBlockIcon.__showMenu

__showMenu(pos)

Private slot to show the context menu.

pos (QPoint)
  position the context menu should be shown

#### AdBlockIcon.currentChanged

currentChanged()

Public slot to handle a change of the current browser tab.

#### AdBlockIcon.menuAction

menuAction()

Public method to get a reference to the menu action.

Returns:
  reference to the menu action

Return Type:
  QAction

#### AdBlockIcon.setEnabled

setEnabled(enabled)

Public slot to set the enabled state.

enabled (bool)
  enabled state

#### AdBlockIcon.sourceChanged

sourceChanged(browser, url)

Public slot to handle URL changes.

browser (WebBrowserView)
  reference to the browser
url (QUrl)
  new URL

Up