# eric5.Helpviewer.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
  reference to the parent widget (HelpWindow)

#### AdBlockIcon.__createMenu

__createMenu(menu=None)

Private slot to create the context menu.

menu
  parent menu (QMenu)

#### AdBlockIcon.__enableAdBlock

__enableAdBlock()

Private slot to enable or disable AdBlock.

#### AdBlockIcon.__isCurrentHostExcepted

__isCurrentHostExcepted()

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

Returns:
  flag indicating an exception (boolean)

#### AdBlockIcon.__setException

__setException()

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

#### AdBlockIcon.__showMenu

__showMenu(pos)

Private slot to show the context menu.

pos
  position the context menu should be shown (QPoint)

#### 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 (QAction)

#### AdBlockIcon.setEnabled

setEnabled(enabled)

Public slot to set the enabled state.

enabled
  enabled state (boolean)

#### AdBlockIcon.sourceChanged

sourceChanged(browser, url)

Public slot to handle URL changes.

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

Up