# eric6.WebBrowser.Bookmarks.BookmarksMenu

Module implementing the bookmarks menu.

### Global Attributes

None

### Classes

BookmarksMenu | Class implementing the bookmarks menu base class.
BookmarksMenuBarMenu | Class implementing a dynamically populated menu for bookmarks.

### Functions

None

## BookmarksMenu

Class implementing the bookmarks menu base class.

### Signals

newTab(QUrl, str)
  emitted to open a URL with the given title in a new tab
newWindow(QUrl, str)
  emitted to open a URL with the given title in a new window
openUrl(QUrl, str)
  emitted to open a URL with the given title in the current tab

### Derived from

E5ModelMenu

### Class Attributes

None

### Class Methods

None

### Methods

BookmarksMenu | Constructor
__activated | Private slot handling the activated signal.
__contextMenuRequested | Private slot to handle the context menu request.
__edit | Private slot to edit a bookmarks properties.
__openBookmark | Private slot to open a bookmark in the current browser tab.
__openBookmarkInNewTab | Private slot to open a bookmark in a new browser tab.
__openBookmarkInNewWindow | Private slot to open a bookmark in a new window.
__openBookmarkInPrivateWindow | Private slot to open a bookmark in a new private window.
__removeBookmark | Private slot to remove a bookmark.
__updateVisitCount | Private method to update the visit count of a bookmark.
createBaseMenu | Public method to get the menu that is used to populate sub menu's.
openAll | Public slot to open all the menu's items.
postPopulated | Public method to add any actions after the tree.

### Static Methods

None

#### BookmarksMenu (Constructor)

BookmarksMenu(parent=None)

Constructor

parent
  reference to the parent widget (QWidget)

#### BookmarksMenu.__activated

__activated(idx)

Private slot handling the activated signal.

idx
  index of the activated item (QModelIndex)

#### BookmarksMenu.__contextMenuRequested

__contextMenuRequested(pos)

Private slot to handle the context menu request.

pos
  position the context menu shall be shown (QPoint)

#### BookmarksMenu.__edit

__edit()

Private slot to edit a bookmarks properties.

#### BookmarksMenu.__openBookmark

__openBookmark()

Private slot to open a bookmark in the current browser tab.

#### BookmarksMenu.__openBookmarkInNewTab

__openBookmarkInNewTab()

Private slot to open a bookmark in a new browser tab.

#### BookmarksMenu.__openBookmarkInNewWindow

__openBookmarkInNewWindow()

Private slot to open a bookmark in a new window.

#### BookmarksMenu.__openBookmarkInPrivateWindow

__openBookmarkInPrivateWindow()

Private slot to open a bookmark in a new private window.

#### BookmarksMenu.__removeBookmark

__removeBookmark()

Private slot to remove a bookmark.

#### BookmarksMenu.__updateVisitCount

__updateVisitCount(idx)

Private method to update the visit count of a bookmark.

idx
  index of the bookmark item (QModelIndex)

#### BookmarksMenu.createBaseMenu

createBaseMenu()

Public method to get the menu that is used to populate sub menu's.

Returns:
  reference to the menu (BookmarksMenu)

#### BookmarksMenu.openAll

openAll()

Public slot to open all the menu's items.

#### BookmarksMenu.postPopulated

postPopulated()

Public method to add any actions after the tree.

Up

## BookmarksMenuBarMenu

Class implementing a dynamically populated menu for bookmarks.

### Signals

openUrl(QUrl, str)
  emitted to open a URL with the given title in the current tab

### Derived from

BookmarksMenu

### Class Attributes

None

### Class Methods

None

### Methods

BookmarksMenuBarMenu | Constructor
__defaultBookmarkTriggered | Private slot handling the default bookmark menu entries.
postPopulated | Public method to add any actions after the tree.
prePopulated | Public method to add any actions before the tree.
setInitialActions | Public method to set the list of actions that should appear first in the menu.

### Static Methods

None

#### BookmarksMenuBarMenu (Constructor)

BookmarksMenuBarMenu(parent=None)

Constructor

parent
  reference to the parent widget (QWidget)

#### BookmarksMenuBarMenu.__defaultBookmarkTriggered

__defaultBookmarkTriggered()

Private slot handling the default bookmark menu entries.

#### BookmarksMenuBarMenu.postPopulated

postPopulated()

Public method to add any actions after the tree.

#### BookmarksMenuBarMenu.prePopulated

prePopulated()

Public method to add any actions before the tree.

Returns:
  flag indicating if any actions were added (boolean)

#### BookmarksMenuBarMenu.setInitialActions

setInitialActions(actions)

Public method to set the list of actions that should appear first in the menu.

actions
  list of initial actions (list of QAction)

Up