eric4.Helpviewer.History.HistoryMenu

Module implementing the history menu.

Global Attributes

None

Classes

HistoryMenu Class implementing the history menu.
HistoryMenuModel Class implementing a model for the history menu.

Functions

None


HistoryMenu

Class implementing the history menu.

Signals

newUrl(const QUrl&, const QString&)
emitted to open a URL in a new tab
openUrl(const QUrl&, const QString&)
emitted to open a URL in the current tab

Derived from

E4ModelMenu

Class Attributes

None

Methods

HistoryMenu Constructor
__activated Private slot handling the activated signal.
__clearHistoryDialog Private slot to clear the history.
__showHistoryDialog Private slot to show the history dialog.
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.

HistoryMenu (Constructor)

HistoryMenu(parent = None)

Constructor

parent
reference to the parent widget (QWidget)

HistoryMenu.__activated

__activated(idx)

Private slot handling the activated signal.

idx
index of the activated item (QModelIndex)

HistoryMenu.__clearHistoryDialog

__clearHistoryDialog()

Private slot to clear the history.

HistoryMenu.__showHistoryDialog

__showHistoryDialog()

Private slot to show the history dialog.

HistoryMenu.postPopulated

postPopulated()

Public method to add any actions after the tree.

HistoryMenu.prePopulated

prePopulated()

Public method to add any actions before the tree.

Returns:
flag indicating if any actions were added

HistoryMenu.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


HistoryMenuModel

Class implementing a model for the history menu.

It maps the first bunch of items of the source model to the root.

Derived from

QAbstractProxyModel

Class Attributes

MOVEDROWS

Methods

HistoryMenuModel Constructor
bumpedRows Public method to determine the number of rows moved to the root.
columnCount Public method to get the number of columns.
index Public method to create an index.
mapFromSource Public method to map an index to the proxy model index.
mapToSource Public method to map an index to the source model index.
mimeData Public method to return the mime data.
parent Public method to get the parent index.
rowCount Public method to determine the number of rows.

HistoryMenuModel (Constructor)

HistoryMenuModel(sourceModel, parent = None)

Constructor

sourceModel
reference to the source model (QAbstractItemModel)
parent
reference to the parent object (QObject)

HistoryMenuModel.bumpedRows

bumpedRows()

Public method to determine the number of rows moved to the root.

Returns:
number of rows moved to the root (integer)

HistoryMenuModel.columnCount

columnCount(parent = QModelIndex())

Public method to get the number of columns.

parent
index of parent (QModelIndex)
Returns:
number of columns (integer)

HistoryMenuModel.index

index(row, column, parent = QModelIndex())

Public method to create an index.

row
row number for the index (integer)
column
column number for the index (integer)
parent
index of the parent item (QModelIndex)
Returns:
requested index (QModelIndex)

HistoryMenuModel.mapFromSource

mapFromSource(sourceIndex)

Public method to map an index to the proxy model index.

sourceIndex
reference to a source model index (QModelIndex)
Returns:
proxy model index (QModelIndex)

HistoryMenuModel.mapToSource

mapToSource(proxyIndex)

Public method to map an index to the source model index.

proxyIndex
reference to a proxy model index (QModelIndex)
Returns:
source model index (QModelIndex)

HistoryMenuModel.mimeData

mimeData(indexes)

Public method to return the mime data.

indexes
list of indexes (QModelIndexList)
Returns:
mime data (QMimeData)

HistoryMenuModel.parent

parent(index)

Public method to get the parent index.

index
index of item to get parent (QModelIndex)
Returns:
index of parent (QModelIndex)

HistoryMenuModel.rowCount

rowCount(parent = QModelIndex())

Public method to determine the number of rows.

parent
index of parent (QModelIndex)
Returns:
number of rows (integer)
Up