# eric6.E5Gui.E5ProcessDialog

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

### Global Attributes

None

### Classes

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

### Functions

None

## E5ProcessDialog

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_E5ProcessDialog

### Class Attributes

None

### Class Methods

None

### Methods

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

#### E5ProcessDialog (Constructor)

E5ProcessDialog(outputTitle="", windowTitle="", showProgress=False, parent=None)

Constructor

outputTitle (str)
  title for the output group
windowTitle (str)
  title of the dialog
showProgress (bool)
  flag indicating to show a progress bar
parent (QWidget)
  reference to the parent widget

#### E5ProcessDialog.__finish

__finish()

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

#### E5ProcessDialog.__procFinished

__procFinished(exitCode, exitStatus)

Private slot connected to the finished signal.

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

#### E5ProcessDialog.__readStderr

__readStderr()

Private slot to handle the readyReadStandardError signal.

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

#### E5ProcessDialog.__readStdout

__readStdout()

Private slot to handle the readyReadStandardOutput signal.

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

#### E5ProcessDialog.keyPressEvent

keyPressEvent(evt)

Protected slot to handle a key press event.

evt
  the key press event (QKeyEvent)

#### E5ProcessDialog.normalExit

normalExit()

Public method to check for a normal process termination.

Returns:
  flag indicating normal process termination

Return Type:
  bool

#### E5ProcessDialog.normalExitWithoutErrors

normalExitWithoutErrors()

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

Returns:
  flag indicating normal process termination

Return Type:
  bool

#### E5ProcessDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

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

button (QAbstractButton)
  button that was clicked

#### E5ProcessDialog.on_input_returnPressed

on_input_returnPressed()

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

#### E5ProcessDialog.on_passwordCheckBox_toggled

on_passwordCheckBox_toggled(isOn)

Private slot to handle the password checkbox toggled.

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

#### E5ProcessDialog.on_sendButton_clicked

on_sendButton_clicked()

Private slot to send the input to the git process.

#### E5ProcessDialog.startProcess

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

Public slot used to start the process.

program (str)
  path of the program to be executed
args (list of str)
  list of arguments for the process
workingDir (str)
  working directory for the process
showArgs (bool)
  flag indicating to show the arguments
environment (dict)
  dictionary of environment settings to add or change for the process

Returns:
  flag indicating a successful start of the process

Return Type:
  bool

Up