# eric7.Plugins.VcsPlugins.vcsGit.GitStatusDialog

Module implementing a dialog to show the output of the git status command process.

### Global Attributes

None

### Classes

GitStatusDialog | Class implementing a dialog to show the output of the git status command process.

### Functions

None

## GitStatusDialog

Class implementing a dialog to show the output of the git status command process.

### Derived from

QWidget, Ui_GitStatusDialog

### Class Attributes

ConflictRole
ConflictStates

### Class Methods

None

### Methods

GitStatusDialog | Constructor
__add | Private slot to handle the Add context menu entry.
__amend | Private slot to handle the Amend context menu entry.
__commit | Private slot to handle the Commit context menu entry.
__commitDeselectAll | Private slot to deselect all entries from commit.
__commitSelect | Private slot to select or deselect all entries.
__commitSelectAll | Private slot to select all entries for commit.
__committed | Private slot called after the commit has finished.
__diff | Private slot to handle the Diff context menu entry.
__editConflict | Private slot to handle the Edit Conflict context menu entry.
__finish | Private slot called when the process finished or the user pressed the button.
__forget | Private slot to handle the Forget Missing context menu entry.
__generateDiffs | Private slot to generate diff outputs for the selected item.
__generateItem | Private method to generate a status item in the status list.
__generatorFinished | Private slot connected to the finished signal of the diff generator.
__getCommitableItems | Private method to retrieve all entries the user wants to commit.
__getCommitableUnselectedItems | Private method to retrieve all entries the user may commit but hasn't selected.
__getConflictingItems | Private method to retrieve all entries, that have a conflict status.
__getMissingItems | Private method to retrieve all entries, that have a missing status.
__getModifiedItems | Private method to retrieve all entries, that have a modified status.
__getModifiedOnlyItems | Private method to retrieve all entries, that have a modified status.
__getStageableItems | Private method to retrieve all entries, that have a stageable status.
__getUnstageableItems | Private method to retrieve all entries, that have an unstageable status.
__getUnversionedItems | Private method to retrieve all entries, that have an unversioned status.
__initActionsMenu | Private method to initialize the actions menu.
__procFinished | Private slot connected to the finished signal.
__readStderr | Private slot to handle the readyReadStandardError signal.
__readStdout | Private slot to handle the readyReadStandardOutput signal.
__refreshDiff | Private method to refresh the diff output after a refresh.
__resizeColumns | Private method to resize the list columns.
__resort | Private method to resort the tree.
__restoreMissing | Private slot to handle the Restore Missing context menu entry.
__revert | Private slot to handle the Revert context menu entry.
__revertHunkOrLines | Private method to revert the selected lines or hunk.
__sbsDiff | Private slot to handle the Side-By-Side Diff context menu entry.
__selectedLinesIndexes | Private method to extract the indexes of the selected lines.
__showActionsMenu | Private slot to prepare the actions button menu before it is shown.
__showLDiffContextMenu | Private slot to show the context menu of the status list.
__showRDiffContextMenu | Private slot to show the context menu of the status list.
__stage | Private slot to handle the Stage context menu entry.
__stageHunkOrLines | Private method to stage the selected lines or hunk.
__tmpPatchFileName | Private method to generate a temporary patch file.
__unstage | Private slot to handle the Unstage context menu entry.
__unstageHunkOrLines | Private method to unstage the selected lines or hunk.
closeEvent | Protected slot implementing a close event handler.
keyPressEvent | Protected slot to handle a key press event.
on_buttonBox_clicked | Private slot called by a button of the button box clicked.
on_input_returnPressed | Private slot to handle the press of the return key in the input field.
on_passwordCheckBox_toggled | Private slot to handle the password checkbox toggled.
on_refreshButton_clicked | Private slot to refresh the status display.
on_sendButton_clicked | Private slot to send the input to the git process.
on_statusFilterCombo_activated | Private slot to react to the selection of a status filter.
on_statusList_itemSelectionChanged | Private slot to act upon changes of selected items.
show | Public slot to show the dialog.
start | Public slot to start the git status command.

### Static Methods

None

#### GitStatusDialog (Constructor)

GitStatusDialog(vcs, parent=None)

Constructor

vcs
  reference to the vcs object
parent
  parent widget (QWidget)

#### GitStatusDialog.__add

__add()

Private slot to handle the Add context menu entry.

#### GitStatusDialog.__amend

__amend()

Private slot to handle the Amend context menu entry.

#### GitStatusDialog.__commit

__commit(amend=False)

Private slot to handle the Commit context menu entry.

amend
  flag indicating to perform an amend operation (boolean)

#### GitStatusDialog.__commitDeselectAll

__commitDeselectAll()

Private slot to deselect all entries from commit.

#### GitStatusDialog.__commitSelect

__commitSelect(selected)

Private slot to select or deselect all entries.

selected
  commit selection state to be set (boolean)

#### GitStatusDialog.__commitSelectAll

__commitSelectAll()

Private slot to select all entries for commit.

#### GitStatusDialog.__committed

__committed()

Private slot called after the commit has finished.

#### GitStatusDialog.__diff

__diff()

Private slot to handle the Diff context menu entry.

#### GitStatusDialog.__editConflict

__editConflict()

Private slot to handle the Edit Conflict context menu entry.

#### GitStatusDialog.__finish

__finish()

Private slot called when the process finished or the user pressed the button.

#### GitStatusDialog.__forget

__forget()

Private slot to handle the Forget Missing context menu entry.

#### GitStatusDialog.__generateDiffs

__generateDiffs()

Private slot to generate diff outputs for the selected item.

#### GitStatusDialog.__generateItem

__generateItem(status, path)

Private method to generate a status item in the status list.

status
  status indicator (string)
path
  path of the file or directory (string)

#### GitStatusDialog.__generatorFinished

__generatorFinished()

Private slot connected to the finished signal of the diff generator.

#### GitStatusDialog.__getCommitableItems

__getCommitableItems()

Private method to retrieve all entries the user wants to commit.

Return:
  list of all items, the user has checked

#### GitStatusDialog.__getCommitableUnselectedItems

__getCommitableUnselectedItems()

Private method to retrieve all entries the user may commit but hasn't selected.

Return:
  list of all items, the user has not checked

#### GitStatusDialog.__getConflictingItems

__getConflictingItems()

Private method to retrieve all entries, that have a conflict status.

Return:
  list of all items with a conflict status

#### GitStatusDialog.__getMissingItems

__getMissingItems()

Private method to retrieve all entries, that have a missing status.

Return:
  list of all items with a missing status

#### GitStatusDialog.__getModifiedItems

__getModifiedItems()

Private method to retrieve all entries, that have a modified status.

Return:
  list of all items with a modified status

#### GitStatusDialog.__getModifiedOnlyItems

__getModifiedOnlyItems()

Private method to retrieve all entries, that have a modified status.

Return:
  list of all items with a modified status

#### GitStatusDialog.__getStageableItems

__getStageableItems()

Private method to retrieve all entries, that have a stageable status.

Return:
  list of all items with a stageable status

#### GitStatusDialog.__getUnstageableItems

__getUnstageableItems()

Private method to retrieve all entries, that have an unstageable status.

Return:
  list of all items with an unstageable status

#### GitStatusDialog.__getUnversionedItems

__getUnversionedItems()

Private method to retrieve all entries, that have an unversioned status.

Return:
  list of all items with an unversioned status

#### GitStatusDialog.__initActionsMenu

__initActionsMenu()

Private method to initialize the actions menu.

#### GitStatusDialog.__procFinished

__procFinished(exitCode, exitStatus)

Private slot connected to the finished signal.

exitCode
  exit code of the process (integer)
exitStatus
  exit status of the process (QProcess.ExitStatus)

#### GitStatusDialog.__readStderr

__readStderr()

Private slot to handle the readyReadStandardError signal.

It reads the error output of the process and inserts it into the error pane.

#### GitStatusDialog.__readStdout

__readStdout()

Private slot to handle the readyReadStandardOutput signal.

It reads the output of the process, formats it and inserts it into the contents pane.

#### GitStatusDialog.__refreshDiff

__refreshDiff()

Private method to refresh the diff output after a refresh.

#### GitStatusDialog.__resizeColumns

__resizeColumns()

Private method to resize the list columns.

#### GitStatusDialog.__resort

__resort()

Private method to resort the tree.

#### GitStatusDialog.__restoreMissing

__restoreMissing()

Private slot to handle the Restore Missing context menu entry.

#### GitStatusDialog.__revert

__revert()

Private slot to handle the Revert context menu entry.

#### GitStatusDialog.__revertHunkOrLines

__revertHunkOrLines()

Private method to revert the selected lines or hunk.

#### GitStatusDialog.__sbsDiff

__sbsDiff()

Private slot to handle the Side-By-Side Diff context menu entry.

#### GitStatusDialog.__selectedLinesIndexes

__selectedLinesIndexes(diffEdit)

Private method to extract the indexes of the selected lines.

diffEdit
  reference to the edit widget (QTextEdit)

Return:
  tuple of start and end indexes (integer, integer)

#### GitStatusDialog.__showActionsMenu

__showActionsMenu()

Private slot to prepare the actions button menu before it is shown.

#### GitStatusDialog.__showLDiffContextMenu

__showLDiffContextMenu(coord)

Private slot to show the context menu of the status list.

coord
  position of the mouse pointer (QPoint)

#### GitStatusDialog.__showRDiffContextMenu

__showRDiffContextMenu(coord)

Private slot to show the context menu of the status list.

coord
  position of the mouse pointer (QPoint)

#### GitStatusDialog.__stage

__stage()

Private slot to handle the Stage context menu entry.

#### GitStatusDialog.__stageHunkOrLines

__stageHunkOrLines()

Private method to stage the selected lines or hunk.

#### GitStatusDialog.__tmpPatchFileName

__tmpPatchFileName()

Private method to generate a temporary patch file.

Return:
  name of the temporary file (string)

#### GitStatusDialog.__unstage

__unstage()

Private slot to handle the Unstage context menu entry.

#### GitStatusDialog.__unstageHunkOrLines

__unstageHunkOrLines()

Private method to unstage the selected lines or hunk.

#### GitStatusDialog.closeEvent

closeEvent(e)

Protected slot implementing a close event handler.

e
  close event (QCloseEvent)

#### GitStatusDialog.keyPressEvent

keyPressEvent(evt)

Protected slot to handle a key press event.

evt
  the key press event (QKeyEvent)

#### GitStatusDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot called by a button of the button box clicked.

button
  button that was clicked (QAbstractButton)

#### GitStatusDialog.on_input_returnPressed

on_input_returnPressed()

Private slot to handle the press of the return key in the input field.

#### GitStatusDialog.on_passwordCheckBox_toggled

on_passwordCheckBox_toggled(isOn)

Private slot to handle the password checkbox toggled.

isOn
  flag indicating the status of the check box (boolean)

#### GitStatusDialog.on_refreshButton_clicked

on_refreshButton_clicked()

Private slot to refresh the status display.

#### GitStatusDialog.on_sendButton_clicked

on_sendButton_clicked()

Private slot to send the input to the git process.

#### GitStatusDialog.on_statusFilterCombo_activated

on_statusFilterCombo_activated(index)

Private slot to react to the selection of a status filter.

index (int)
  index of the selected entry

#### GitStatusDialog.on_statusList_itemSelectionChanged

on_statusList_itemSelectionChanged()

Private slot to act upon changes of selected items.

#### GitStatusDialog.show

show()

Public slot to show the dialog.

#### GitStatusDialog.start

start(fn)

Public slot to start the git status command.

fn
  filename(s)/directoryname(s) to show the status of (string or list of strings)

Up