# eric6.Plugins.VcsPlugins.vcsMercurial.HisteditExtension.HgHisteditPlanEditor

Module implementing a dialog to edit the history modification plan.

### Global Attributes

None

### Classes

HgHisteditPlanActionComboBox | Class implementing a combo box to select the action in the plan tree.
HgHisteditPlanEditor | Class implementing a dialog to edit the history modification plan.

### Functions

None

## HgHisteditPlanActionComboBox

Class implementing a combo box to select the action in the plan tree.

### Derived from

QComboBox

### Class Attributes

None

### Class Methods

None

### Methods

HgHisteditPlanActionComboBox | Constructor
__changeItem | Private slot to handle the selection of a plan action.
showPopup | Public method to show the list of items of the combo box.

### Static Methods

None

#### HgHisteditPlanActionComboBox (Constructor)

HgHisteditPlanActionComboBox(item, column)

Constructor

item (QTreeWidgetItem)
  reference to the item
column (int)
  column number inside the tree widget item

#### HgHisteditPlanActionComboBox.__changeItem

__changeItem(index)

Private slot to handle the selection of a plan action.

This method sets the text of the associated item for the specified cell in order to be able to retrieve it with a call of the text() method of the item.

index (int)
  index of the selected action

#### HgHisteditPlanActionComboBox.showPopup

showPopup()

Public method to show the list of items of the combo box.

This is reimplemented in order to set the associated item as the current item of the tree widget.

Up

## HgHisteditPlanEditor

Class implementing a dialog to edit the history modification plan.

### Derived from

QDialog, Ui_HgHisteditPlanEditor

### Class Attributes

None

### Class Methods

None

### Methods

HgHisteditPlanEditor | Constructor
__addActionCombo | Private method to add an edit action combo to an item.
__assembleEditPlan | Private method to assemble the edit plan into text suitable for the histedit file.
__createPlanItem | Private method to create an edit plan tree item.
__readFile | Private method to read the file containing the edit plan and populate the dialog.
__resizeSections | Private method to resize the tree widget sections.
__updateButtons | Private method to set the enabled state of the up and down buttons.
on_buttonBox_accepted | Private slot called by the buttonBox accepted signal.
on_buttonBox_rejected | Private slot called by the buttonBox rejected signal.
on_downButton_clicked | Private slot to move the current entry down one line.
on_planTreeWidget_currentItemChanged | Private slot handling the change of the current edit plan item.
on_upButton_clicked | Private slot to move the current entry up one line.

### Static Methods

None

#### HgHisteditPlanEditor (Constructor)

HgHisteditPlanEditor(fileName, parent=None)

Constructor

fileName (str)
  name of the file containing the history edit plan to be edited
parent (QWidget)
  reference to the parent widget

#### HgHisteditPlanEditor.__addActionCombo

__addActionCombo(item)

Private method to add an edit action combo to an item.

item (QTreeWidgetItem)
  reference to the tree widget item

#### HgHisteditPlanEditor.__assembleEditPlan

__assembleEditPlan()

Private method to assemble the edit plan into text suitable for the histedit file.

Returns:
  assembled edit plan text

Return Type:
  str

#### HgHisteditPlanEditor.__createPlanItem

__createPlanItem(text)

Private method to create an edit plan tree item.

text (str)
  line of text to be parsed

#### HgHisteditPlanEditor.__readFile

__readFile()

Private method to read the file containing the edit plan and populate the dialog.

#### HgHisteditPlanEditor.__resizeSections

__resizeSections()

Private method to resize the tree widget sections.

#### HgHisteditPlanEditor.__updateButtons

__updateButtons()

Private method to set the enabled state of the up and down buttons.

#### HgHisteditPlanEditor.on_buttonBox_accepted

on_buttonBox_accepted()

Private slot called by the buttonBox accepted signal.

#### HgHisteditPlanEditor.on_buttonBox_rejected

on_buttonBox_rejected()

Private slot called by the buttonBox rejected signal.

#### HgHisteditPlanEditor.on_downButton_clicked

on_downButton_clicked()

Private slot to move the current entry down one line.

#### HgHisteditPlanEditor.on_planTreeWidget_currentItemChanged

on_planTreeWidget_currentItemChanged(current, previous)

Private slot handling the change of the current edit plan item.

current (QTreeWidgetItem)
  reference to the current edit plan item
previous (QTreeWidgetItem)
  reference to the previous current edit plan item

#### HgHisteditPlanEditor.on_upButton_clicked

on_upButton_clicked()

Private slot to move the current entry up one line.

Up