# eric7.Plugins.VcsPlugins.vcsGit.GitDialog

Module implementing a dialog starting a process and showing its output.

### Global Attributes

None

### Classes

GitDialog | Class implementing a dialog starting a process and showing its output.

### Functions

None

## GitDialog

Class implementing a dialog starting a process and showing its output.

It starts a QProcess and displays a dialog that shows the output of the process. The dialog is modal, which causes a synchronized execution of the process.

### Derived from

QDialog, Ui_GitDialog

### Class Attributes

None

### Class Methods

None

### Methods

GitDialog | Constructor
__finish | Private slot called when the process finished or the user pressed the button.
__procFinished | Private slot connected to the finished signal.
__readStderr | Private slot to handle the readyReadStandardError signal.
__readStdout | Private slot to handle the readyReadStandardOutput signal.
__showError | Private slot to show some error.
__showOutput | Private slot to show some output.
hasAddOrDelete | Public method to check, if the last action contained an add or delete.
keyPressEvent | Protected slot to handle a key press event.
normalExit | Public method to check for a normal process termination.
normalExitWithoutErrors | Public method to check for a normal process termination without error messages.
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_sendButton_clicked | Private slot to send the input to the git process.
startProcess | Public slot used to start the process.

### Static Methods

None

#### GitDialog (Constructor)

GitDialog(text, git=None, parent=None)

Constructor

text
  text to be shown by the label (string)
git
  reference to the Git interface object (Git)
parent
  parent widget (QWidget)

#### GitDialog.__finish

__finish()

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

#### GitDialog.__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)

#### GitDialog.__readStderr

__readStderr()

Private slot to handle the readyReadStandardError signal.

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

#### GitDialog.__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.

#### GitDialog.__showError

__showError(out)

Private slot to show some error.

out
  error to be shown (string)

#### GitDialog.__showOutput

__showOutput(out)

Private slot to show some output.

out
  output to be shown (string)

#### GitDialog.hasAddOrDelete

hasAddOrDelete()

Public method to check, if the last action contained an add or delete.

Return:
  flag indicating the presence of an add or delete (boolean)

#### GitDialog.keyPressEvent

keyPressEvent(evt)

Protected slot to handle a key press event.

evt
  the key press event (QKeyEvent)

#### GitDialog.normalExit

normalExit()

Public method to check for a normal process termination.

Return:
  flag indicating normal process termination (boolean)

#### GitDialog.normalExitWithoutErrors

normalExitWithoutErrors()

Public method to check for a normal process termination without error messages.

Return:
  flag indicating normal process termination (boolean)

#### GitDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

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

button
  button that was clicked (QAbstractButton)

#### GitDialog.on_input_returnPressed

on_input_returnPressed()

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

#### GitDialog.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)

#### GitDialog.on_sendButton_clicked

on_sendButton_clicked()

Private slot to send the input to the git process.

#### GitDialog.startProcess

startProcess(args, workingDir=None, showArgs=True, environment=None)

Public slot used to start the process.

args
  list of arguments for the process (list of strings)
workingDir
  working directory for the process (string)
showArgs
  flag indicating to show the arguments (boolean)
environment
  dictionary of environment settings to add or change for the git process (dict of string and string)

Return:
  flag indicating a successful start of the process (boolean)

Up