# eric6.Helpviewer.AdBlock.AdBlockDialog

Module implementing the AdBlock configuration dialog.

### Global Attributes

None

### Classes

AdBlockDialog | Class implementing the AdBlock configuration dialog.

### Functions

None

## AdBlockDialog

Class implementing the AdBlock configuration dialog.

### Derived from

QDialog, Ui_AdBlockDialog

### Class Attributes

None

### Class Methods

None

### Methods

AdBlockDialog | Constructor
__aboutToShowActionMenu | Private slot to show the actions menu.
__addCustomRule | Private slot to add a custom AdBlock rule.
__browseSubscriptions | Private slot to browse the list of available AdBlock subscriptions.
__learnAboutWritingFilters | Private slot to show the web page about how to write filters.
__load | Private slot to populate the tab widget with subscriptions.
__loadSubscriptions | Private slot to load the AdBlock subscription rules.
__removeCustomRule | Private slot to remove a custom AdBlock rule.
__removeSubscription | Private slot to remove the selected subscription.
__setSubscriptionEnabled | Private slot to set the enabled state of a subscription.
__switchSubscriptionEnabled | Private slot to switch the enabled state of the selected subscription.
__updateAllSubscriptions | Private slot to update all subscriptions.
__updateSubscription | Private slot to update the selected subscription.
addCustomRule | Public slot to add a custom AdBlock rule.
addSubscription | Public slot adding a subscription to the list.
on_adBlockGroup_toggled | Private slot handling the enabling/disabling of AdBlock.
on_searchEdit_textChanged | Private slot to set a new filter on the current widget.
on_subscriptionsTabWidget_currentChanged | Private slot handling the selection of another tab.
on_updateSpinBox_valueChanged | Private slot to handle changes of the update period.
showRule | Public slot to show the given rule.

### Static Methods

None

#### AdBlockDialog (Constructor)

AdBlockDialog(parent=None)

Constructor

parent
  reference to the parent object (QWidget)

#### AdBlockDialog.__aboutToShowActionMenu

__aboutToShowActionMenu()

Private slot to show the actions menu.

#### AdBlockDialog.__addCustomRule

__addCustomRule()

Private slot to add a custom AdBlock rule.

#### AdBlockDialog.__browseSubscriptions

__browseSubscriptions()

Private slot to browse the list of available AdBlock subscriptions.

#### AdBlockDialog.__learnAboutWritingFilters

__learnAboutWritingFilters()

Private slot to show the web page about how to write filters.

#### AdBlockDialog.__load

__load()

Private slot to populate the tab widget with subscriptions.

#### AdBlockDialog.__loadSubscriptions

__loadSubscriptions()

Private slot to load the AdBlock subscription rules.

#### AdBlockDialog.__removeCustomRule

__removeCustomRule()

Private slot to remove a custom AdBlock rule.

#### AdBlockDialog.__removeSubscription

__removeSubscription()

Private slot to remove the selected subscription.

#### AdBlockDialog.__setSubscriptionEnabled

__setSubscriptionEnabled(subscription, enable)

Private slot to set the enabled state of a subscription.

subscription
  subscription to set the state for (AdBlockSubscription)
enable
  state to set to (boolean)

#### AdBlockDialog.__switchSubscriptionEnabled

__switchSubscriptionEnabled()

Private slot to switch the enabled state of the selected subscription.

#### AdBlockDialog.__updateAllSubscriptions

__updateAllSubscriptions()

Private slot to update all subscriptions.

#### AdBlockDialog.__updateSubscription

__updateSubscription()

Private slot to update the selected subscription.

#### AdBlockDialog.addCustomRule

addCustomRule(filterRule)

Public slot to add a custom AdBlock rule.

filterRule
  filter to be added (string)

#### AdBlockDialog.addSubscription

addSubscription(subscription, refresh=True)

Public slot adding a subscription to the list.

subscription
  reference to the subscription to be added (AdBlockSubscription)
refresh
  flag indicating to refresh the tree (boolean)

#### AdBlockDialog.on_adBlockGroup_toggled

on_adBlockGroup_toggled(state)

Private slot handling the enabling/disabling of AdBlock.

state
  state of the toggle (boolean)

#### AdBlockDialog.on_searchEdit_textChanged

on_searchEdit_textChanged(filterRule)

Private slot to set a new filter on the current widget.

filterRule
  filter to be set (string)

#### AdBlockDialog.on_subscriptionsTabWidget_currentChanged

on_subscriptionsTabWidget_currentChanged(index)

Private slot handling the selection of another tab.

index
  index of the new current tab (integer)

#### AdBlockDialog.on_updateSpinBox_valueChanged

on_updateSpinBox_valueChanged(value)

Private slot to handle changes of the update period.

value
  update period (integer)

#### AdBlockDialog.showRule

showRule(rule)

Public slot to show the given rule.

rule
  rule to be shown (AdBlockRule)

Up