# eric6.Helpviewer.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

newUrl(QUrl, str)
  emitted to open a URL with the given title in a new tab
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.
__removeBookmark | Private slot to remove 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(act)

Private slot to edit a bookmarks properties.

act (QAction)
  reference to the triggering action

#### BookmarksMenu.__openBookmark

__openBookmark(act)

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

act (QAction)
  reference to the triggering action

#### BookmarksMenu.__openBookmarkInNewTab

__openBookmarkInNewTab(act)

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

act (QAction)
  reference to the triggering action

#### BookmarksMenu.__removeBookmark

__removeBookmark(act)

Private slot to remove a bookmark.

act (QAction)
  reference to the triggering action

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

Public slot to open all the menu's items.

act (QAction)
  reference to the action object

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

Private slot handling the default bookmark menu entries.

act (QAction)
  reference to the action object

#### 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