eric7.WebBrowser.Bookmarks.BookmarksModel
Module implementing the bookmark model class.
Global Attributes
Classes
Functions
BookmarksModel
    Class implementing the bookmark model.
Derived from
QAbstractItemModel
Class Attributes
| MIMETYPE | 
| SeparatorRole | 
| TypeRole | 
| UrlRole | 
| UrlStringRole | 
| VisitCountRole | 
Class Methods
Methods
| BookmarksModel | Constructor | 
| bookmarksManager | Public method to get a reference to the bookmarks manager. | 
| columnCount | Public method to get the number of columns. | 
| data | Public method to get data from the model. | 
| dropMimeData | Public method to accept the mime data of a drop action. | 
| entryAdded | Public slot to add a bookmark node. | 
| entryChanged | Public method to change a node. | 
| entryRemoved | Public slot to remove a bookmark node. | 
| flags | Public method to get flags for a node cell. | 
| hasChildren | Public method to check, if a parent node has some children. | 
| headerData | Public method to get the header data. | 
| index | Public method to get a model index for a node cell. | 
| mimeData | Public method to return the mime data. | 
| mimeTypes | Public method to report the supported mime types. | 
| node | Public method to get a bookmark node given its index. | 
| nodeIndex | Public method to get a model index. | 
| parent | Public method to get the index of the parent node. | 
| removeRows | Public method to remove bookmarks from the model. | 
| rowCount | Public method to determine the number of rows. | 
| setData | Public method to set the data of a node cell. | 
| supportedDropActions | Public method to report the supported drop actions. | 
Static Methods
BookmarksModel (Constructor)
BookmarksModel(manager, parent=None)
        Constructor
- manager (BookmarksManager)
- 
reference to the bookmarks manager object
- parent (QObject)
- 
reference to the parent object
BookmarksModel.bookmarksManager
bookmarksManager()
        Public method to get a reference to the bookmarks manager.
- Return:
- 
reference to the bookmarks manager object
- Return Type:
- 
BookmarksManager
BookmarksModel.columnCount
columnCount(parent=None)
        Public method to get the number of columns.
- parent (QModelIndex)
- 
index of parent
- Return:
- 
number of columns
- Return Type:
- 
int
BookmarksModel.data
data(index, role=Qt.ItemDataRole.DisplayRole)
        Public method to get data from the model.
- index (QModelIndex)
- 
index of bookmark to get data for
- role (int)
- 
data role
- Return:
- 
bookmark data
- Return Type:
- 
Any
BookmarksModel.dropMimeData
dropMimeData(data, action, row, column, parent)
        Public method to accept the mime data of a drop action.
- data (QMimeData)
- 
reference to the mime data
- action (Qt.DropAction)
- 
drop action requested
- row (int)
- 
row number
- column (int)
- 
column number
- parent (QModelIndex)
- 
index of the parent node
- Return:
- 
flag indicating successful acceptance of the data
- Return Type:
- 
bool
BookmarksModel.entryAdded
entryAdded(node)
        Public slot to add a bookmark node.
- node (BookmarkNode)
- 
reference to the bookmark node to add
BookmarksModel.entryChanged
entryChanged(node)
        Public method to change a node.
- node (BookmarkNode)
- 
reference to the bookmark node to change
BookmarksModel.entryRemoved
entryRemoved(parent, row, node)
        Public slot to remove a bookmark node.
- parent (BookmarkNode)
- 
reference to the parent bookmark node
- row (int)
- 
row number of the node
- node (BookmarkNode)
- 
reference to the bookmark node to remove
BookmarksModel.flags
flags(index)
        Public method to get flags for a node cell.
- index (QModelIndex)
- 
index of the node cell
- Return:
- 
flags
- Return Type:
- 
Qt.ItemFlags
BookmarksModel.hasChildren
hasChildren(parent=None)
        Public method to check, if a parent node has some children.
- parent (QModelIndex)
- 
index of the parent node
- Return:
- 
flag indicating the presence of children
- Return Type:
- 
bool
BookmarksModel.headerData
headerData(section, orientation, role=Qt.ItemDataRole.DisplayRole)
        Public method to get the header data.
- section (int)
- 
section number
- orientation (Qt.Orientation)
- 
header orientation
- role (Qt.ItemDataRole)
- 
data role
- Return:
- 
header data
- Return Type:
- 
Any
BookmarksModel.index
index(row, column, parent=None)
        Public method to get a model index for a node cell.
- row (int)
- 
row number
- column (int)
- 
column number
- parent (QModelIndex)
- 
index of the parent
- Return:
- 
index
- Return Type:
- 
QModelIndex
BookmarksModel.mimeData
mimeData(indexes)
        Public method to return the mime data.
- indexes (QModelIndexList)
- 
list of indexes
- Return:
- 
mime data
- Return Type:
- 
QMimeData
BookmarksModel.mimeTypes
mimeTypes()
        Public method to report the supported mime types.
- Return:
- 
supported mime types
- Return Type:
- 
list of str
BookmarksModel.node
node(index)
        Public method to get a bookmark node given its index.
- index (QModelIndex)
- 
index of the node
- Return:
- 
bookmark node
- Return Type:
- 
BookmarkNode
BookmarksModel.nodeIndex
nodeIndex(node)
        Public method to get a model index.
- node (BookmarkNode)
- 
reference to the node to get the index for
- Return:
- 
model index
- Return Type:
- 
QModelIndex
BookmarksModel.parent
parent(index=None)
        Public method to get the index of the parent node.
- index (QModelIndex)
- 
index of the child node
- Return:
- 
index of the parent node
- Return Type:
- 
QModelIndex
BookmarksModel.removeRows
removeRows(row, count, parent=None)
        Public method to remove bookmarks from the model.
- row (int)
- 
row of the first bookmark to remove
- count (int)
- 
number of bookmarks to remove
- parent (QModelIndex)
- 
index of the parent bookmark node
- Return:
- 
flag indicating successful removal
- Return Type:
- 
bool
BookmarksModel.rowCount
rowCount(parent=None)
        Public method to determine the number of rows.
- parent (QModelIndex)
- 
index of parent
- Return:
- 
number of rows
- Return Type:
- 
int
BookmarksModel.setData
setData(index, value, role=Qt.ItemDataRole.EditRole)
        Public method to set the data of a node cell.
- index (QModelIndex)
- 
index of the node cell
- value (Any)
- 
value to be set
- role (int)
- 
role of the data
- Return:
- 
flag indicating success
- Return Type:
- 
bool
BookmarksModel.supportedDropActions
supportedDropActions()
        Public method to report the supported drop actions.
- Return:
- 
supported drop actions
- Return Type:
- 
Qt.DropAction