# eric6.Helpviewer.Bookmarks.AddBookmarkDialog

Module implementing a dialog to add a bookmark or a bookmark folder.

### Global Attributes

None

### Classes

AddBookmarkDialog | Class implementing a dialog to add a bookmark or a bookmark folder.
AddBookmarkProxyModel | Class implementing a proxy model used by the AddBookmarkDialog dialog.

### Functions

None

## AddBookmarkDialog

Class implementing a dialog to add a bookmark or a bookmark folder.

### Derived from

QDialog, Ui_AddBookmarkDialog

### Class Attributes

None

### Class Methods

None

### Methods

AddBookmarkDialog | Constructor
accept | Public slot handling the acceptance of the dialog.
addedNode | Public method to get a reference to the added bookmark node.
currentIndex | Public method to get the current index.
description | Public method to get the description of the bookmark.
isFolder | Public method to test, if the dialog is in "Add Folder" mode.
setCurrentIndex | Public method to set the current index.
setDescription | Public method to set the description of the new bookmark.
setFolder | Public method to set the dialog to "Add Folder" mode.
setTitle | Public method to set the title of the new bookmark.
setUrl | Public slot to set the URL of the new bookmark.
title | Public method to get the title of the bookmark.
url | Public method to get the URL of the bookmark.

### Static Methods

None

#### AddBookmarkDialog (Constructor)

AddBookmarkDialog(parent=None, bookmarksManager=None)

Constructor

parent
  reference to the parent widget (QWidget)
bookmarksManager
  reference to the bookmarks manager object (BookmarksManager)

#### AddBookmarkDialog.accept

accept()

Public slot handling the acceptance of the dialog.

#### AddBookmarkDialog.addedNode

addedNode()

Public method to get a reference to the added bookmark node.

Returns:
  reference to the added bookmark node (BookmarkNode)

#### AddBookmarkDialog.currentIndex

currentIndex()

Public method to get the current index.

Returns:
  current index (QModelIndex)

#### AddBookmarkDialog.description

description()

Public method to get the description of the bookmark.

Returns:
  description of the bookamrk (string)

#### AddBookmarkDialog.isFolder

isFolder()

Public method to test, if the dialog is in "Add Folder" mode.

Returns:
  flag indicating "Add Folder" mode (boolean)

#### AddBookmarkDialog.setCurrentIndex

setCurrentIndex(idx)

Public method to set the current index.

idx
  current index to be set (QModelIndex)

#### AddBookmarkDialog.setDescription

setDescription(description)

Public method to set the description of the new bookmark.

description
  description of the bookamrk (string)

#### AddBookmarkDialog.setFolder

setFolder(folder)

Public method to set the dialog to "Add Folder" mode.

folder
  flag indicating "Add Folder" mode (boolean)

#### AddBookmarkDialog.setTitle

setTitle(title)

Public method to set the title of the new bookmark.

title
  title of the bookmark (string)

#### AddBookmarkDialog.setUrl

setUrl(url)

Public slot to set the URL of the new bookmark.

url
  URL of the bookmark (string)

#### AddBookmarkDialog.title

title()

Public method to get the title of the bookmark.

Returns:
  title of the bookmark (string)

#### AddBookmarkDialog.url

url()

Public method to get the URL of the bookmark.

Returns:
  URL of the bookmark (string)

Up

## AddBookmarkProxyModel

Class implementing a proxy model used by the AddBookmarkDialog dialog.

### Derived from

QSortFilterProxyModel

### Class Attributes

None

### Class Methods

None

### Methods

AddBookmarkProxyModel | Constructor
columnCount | Public method to return the number of columns.
filterAcceptsColumn | Public method to determine, if the column is acceptable.
filterAcceptsRow | Public method to determine, if the row is acceptable.
hasChildren | Public method to check, if a parent node has some children.

### Static Methods

None

#### AddBookmarkProxyModel (Constructor)

AddBookmarkProxyModel(parent=None)

Constructor

parent
  reference to the parent object (QObject)

#### AddBookmarkProxyModel.columnCount

columnCount(parent)

Public method to return the number of columns.

parent
  index of the parent (QModelIndex)

Returns:
  number of columns (integer)

#### AddBookmarkProxyModel.filterAcceptsColumn

filterAcceptsColumn(sourceColumn, sourceParent)

Public method to determine, if the column is acceptable.

sourceColumn
  column number in the source model (integer)
sourceParent
  index of the source item (QModelIndex)

Returns:
  flag indicating acceptance (boolean)

#### AddBookmarkProxyModel.filterAcceptsRow

filterAcceptsRow(sourceRow, sourceParent)

Public method to determine, if the row is acceptable.

sourceRow
  row number in the source model (integer)
sourceParent
  index of the source item (QModelIndex)

Returns:
  flag indicating acceptance (boolean)

#### AddBookmarkProxyModel.hasChildren

hasChildren(parent=QModelIndex())

Public method to check, if a parent node has some children.

parent
  index of the parent node (QModelIndex)

Returns:
  flag indicating the presence of children (boolean)

Up