# eric6.Helpviewer.UserAgent.UserAgentMenu

Module implementing a menu to select the user agent string.

### Global Attributes

None

### Classes

UserAgentMenu | Class implementing a menu to select the user agent string.

### Functions

None

## UserAgentMenu

Class implementing a menu to select the user agent string.

### Derived from

QMenu

### Class Attributes

None

### Class Methods

None

### Methods

UserAgentMenu | Constructor
__addDefaultActions | Private slot to add the default user agent entries.
__changeUserAgent | Private slot to change the user agent.
__populateMenu | Private slot to populate the menu.
__switchToDefaultUserAgent | Private slot to set the default user agent.
__switchToOtherUserAgent | Private slot to set a custom user agent string.

### Static Methods

None

#### UserAgentMenu (Constructor)

UserAgentMenu(title, url=None, parent=None)

Constructor

title
  title of the menu (string)
url
  URL to set user agent for (QUrl)
parent
  reference to the parent widget (QWidget)

#### UserAgentMenu.__addDefaultActions

__addDefaultActions()

Private slot to add the default user agent entries.

Returns:
  flag indicating that a user agent entry is checked (boolean)

#### UserAgentMenu.__changeUserAgent

__changeUserAgent(act)

Private slot to change the user agent.

act (QAction)
  reference to the action that triggered

#### UserAgentMenu.__populateMenu

__populateMenu()

Private slot to populate the menu.

#### UserAgentMenu.__switchToDefaultUserAgent

__switchToDefaultUserAgent()

Private slot to set the default user agent.

#### UserAgentMenu.__switchToOtherUserAgent

__switchToOtherUserAgent()

Private slot to set a custom user agent string.

Up