Plugin_Project_Django.ProjectDjango.DjangoDialog

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

Global Attributes

None

Classes

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

Functions

None


DjangoDialog

Module 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_DjangoDialog

Class Attributes

None

Methods

DjangoDialog 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 readyReadStderr signal.
__readStdout Private slot to handle the readyReadStdout signal.
__saveData Private slot to save the output to a file.
normalExit Public method to check for a normal process termination.
on_buttonBox_clicked Private slot called by a button of the button box clicked.
startBatchProcesses Public slot used to start a batch of processes.
startProcess Public slot used to start the process.

DjangoDialog (Constructor)

DjangoDialog(text, fixed = False, linewrap = True, msgSuccess = None, msgError = None, saveFilters = None, parent = None)

Constructor

text
text to be shown by the label (string or QString)
fixed=
flag indicating a fixed font should be used (boolean)
linewrap=
flag indicating to wrap long lines (boolean)
msgSuccess=
optional string to show upon successful execution (string or QString)
msgError=
optional string to show upon unsuccessful execution (string or QString)
saveFilters=
filename filter string (QString)
parent=
parent widget (QWidget)

DjangoDialog.__finish

__finish()

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

DjangoDialog.__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)

DjangoDialog.__readStderr

__readStderr()

Private slot to handle the readyReadStderr signal.

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

DjangoDialog.__readStdout

__readStdout()

Private slot to handle the readyReadStdout signal.

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

DjangoDialog.__saveData

__saveData()

Private slot to save the output to a file.

DjangoDialog.normalExit

normalExit()

Public method to check for a normal process termination.

Returns:
flag indicating normal process termination (boolean)

DjangoDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

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

button
button that was clicked (QAbstractButton)

DjangoDialog.startBatchProcesses

startBatchProcesses(argsLists, workingDir = None, mergedOutput = False)

Public slot used to start a batch of processes.

argsLists
list of lists of arguments for the processes (list of QStringList)
workingDir
working directory for the process (string or QString)
mergedOutput
flag indicating to merge the output of the process (boolean)
Returns:
flag indicating a successful start of the first process (boolean)

DjangoDialog.startProcess

startProcess(args, workingDir = None, showCommand = True, mergedOutput = False)

Public slot used to start the process.

args
list of arguments for the process (QStringList)
workingDir
working directory for the process (string or QString)
showCommand
flag indicating to show the command executed (boolean)
mergedOutput
flag indicating to merge the output of the process (boolean)
Returns:
flag indicating a successful start of the process
Up