ProjectDjango/Documentation/source/Plugin_Project_Django.ProjectDjango.DjangoDialog.html

Sat, 29 May 2021 18:33:03 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 29 May 2021 18:33:03 +0200
branch
eric7
changeset 172
ea7980ded4f3
parent 169
b8f263e05c39
child 176
1395e0583f4e
permissions
-rw-r--r--

Ported the plug-in to PyQt6 for eric7.

<!DOCTYPE html>
<html><head>
<title>Plugin_Project_Django.ProjectDjango.DjangoDialog</title>
<meta charset="UTF-8">
<style>
body {
    background: #EDECE6;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #85774A; }
h2 { color: white; background: #85774A; }
h3 { color: white; background: #9D936E; }
h4 { color: white; background: #9D936E; }
    
a { color: #BA6D36; }

</style>
</head>
<body>
<a NAME="top" ID="top"></a>
<h1>Plugin_Project_Django.ProjectDjango.DjangoDialog</h1>

<p>
Module implementing a dialog starting a process and showing its output.
</p>
<h3>Global Attributes</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>

<table>

<tr>
<td><a href="#DjangoDialog">DjangoDialog</a></td>
<td>Class implementing a dialog starting a process and showing its output.</td>
</tr>
</table>
<h3>Functions</h3>

<table>
<tr><td>None</td></tr>
</table>
<hr />
<hr />
<a NAME="DjangoDialog" ID="DjangoDialog"></a>
<h2>DjangoDialog</h2>

<p>
    Class implementing a dialog starting a process and showing its output.
</p>
<p>
    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.
</p>
<h3>Derived from</h3>
QDialog, Ui_DjangoDialog
<h3>Class Attributes</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Class Methods</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>

<table>

<tr>
<td><a href="#DjangoDialog.__init__">DjangoDialog</a></td>
<td>Constructor</td>
</tr>
<tr>
<td><a href="#DjangoDialog.__finish">__finish</a></td>
<td>Private slot called when the process finished or the user pressed the button.</td>
</tr>
<tr>
<td><a href="#DjangoDialog.__procFinished">__procFinished</a></td>
<td>Private slot connected to the finished signal.</td>
</tr>
<tr>
<td><a href="#DjangoDialog.__readStderr">__readStderr</a></td>
<td>Private slot to handle the readyReadStderr signal.</td>
</tr>
<tr>
<td><a href="#DjangoDialog.__readStdout">__readStdout</a></td>
<td>Private slot to handle the readyReadStdout signal.</td>
</tr>
<tr>
<td><a href="#DjangoDialog.__saveData">__saveData</a></td>
<td>Private slot to save the output to a file.</td>
</tr>
<tr>
<td><a href="#DjangoDialog.keyPressEvent">keyPressEvent</a></td>
<td>Protected slot to handle a key press event.</td>
</tr>
<tr>
<td><a href="#DjangoDialog.normalExit">normalExit</a></td>
<td>Public method to check for a normal process termination.</td>
</tr>
<tr>
<td><a href="#DjangoDialog.normalExitWithoutErrors">normalExitWithoutErrors</a></td>
<td>Public method to check for a normal process termination without error messages.</td>
</tr>
<tr>
<td><a href="#DjangoDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
<td>Private slot called by a button of the button box clicked.</td>
</tr>
<tr>
<td><a href="#DjangoDialog.on_input_returnPressed">on_input_returnPressed</a></td>
<td>Private slot to handle the press of the return key in the input field.</td>
</tr>
<tr>
<td><a href="#DjangoDialog.on_passwordCheckBox_toggled">on_passwordCheckBox_toggled</a></td>
<td>Private slot to handle the password checkbox toggled.</td>
</tr>
<tr>
<td><a href="#DjangoDialog.on_sendButton_clicked">on_sendButton_clicked</a></td>
<td>Private slot to send the input to the manage.py process.</td>
</tr>
<tr>
<td><a href="#DjangoDialog.startBatchProcesses">startBatchProcesses</a></td>
<td>Public slot used to start a batch of processes.</td>
</tr>
<tr>
<td><a href="#DjangoDialog.startProcess">startProcess</a></td>
<td>Public slot used to start the process.</td>
</tr>
</table>
<h3>Static Methods</h3>

<table>
<tr><td>None</td></tr>
</table>

<a NAME="DjangoDialog.__init__" ID="DjangoDialog.__init__"></a>
<h4>DjangoDialog (Constructor)</h4>
<b>DjangoDialog</b>(<i>text, fixed=False, linewrap=True, msgSuccess=None, msgError=None, saveFilters=None, showInput=False, parent=None</i>)

<p>
        Constructor
</p>
<dl>

<dt><i>text</i> (str)</dt>
<dd>
text to be shown by the label
</dd>
<dt><i>fixed</i> (bool)</dt>
<dd>
flag indicating a fixed font should be used
</dd>
<dt><i>linewrap</i> (bool)</dt>
<dd>
flag indicating to wrap long lines
</dd>
<dt><i>msgSuccess</i> (str)</dt>
<dd>
optional string to show upon successful execution
</dd>
<dt><i>msgError</i> (str)</dt>
<dd>
optional string to show upon unsuccessful execution
</dd>
<dt><i>saveFilters</i> (str)</dt>
<dd>
filename filter string
</dd>
<dt><i>showInput</i> (bool)</dt>
<dd>
flag indicating to show the input widgets
</dd>
<dt><i>parent</i> (QWidget)</dt>
<dd>
parent widget
</dd>
</dl>
<a NAME="DjangoDialog.__finish" ID="DjangoDialog.__finish"></a>
<h4>DjangoDialog.__finish</h4>
<b>__finish</b>(<i></i>)

<p>
        Private slot called when the process finished or the user pressed the
        button.
</p>
<a NAME="DjangoDialog.__procFinished" ID="DjangoDialog.__procFinished"></a>
<h4>DjangoDialog.__procFinished</h4>
<b>__procFinished</b>(<i>exitCode, exitStatus</i>)

<p>
        Private slot connected to the finished signal.
</p>
<dl>

<dt><i>exitCode</i> (int)</dt>
<dd>
exit code of the process
</dd>
<dt><i>exitStatus</i> (QProcess.ExitStatus)</dt>
<dd>
exit status of the process
</dd>
</dl>
<a NAME="DjangoDialog.__readStderr" ID="DjangoDialog.__readStderr"></a>
<h4>DjangoDialog.__readStderr</h4>
<b>__readStderr</b>(<i></i>)

<p>
        Private slot to handle the readyReadStderr signal.
</p>
<p>
        It reads the error output of the process and inserts it into the
        error pane.
</p>
<a NAME="DjangoDialog.__readStdout" ID="DjangoDialog.__readStdout"></a>
<h4>DjangoDialog.__readStdout</h4>
<b>__readStdout</b>(<i></i>)

<p>
        Private slot to handle the readyReadStdout signal.
</p>
<p>
        It reads the output of the process, formats it and inserts it into
        the contents pane.
</p>
<a NAME="DjangoDialog.__saveData" ID="DjangoDialog.__saveData"></a>
<h4>DjangoDialog.__saveData</h4>
<b>__saveData</b>(<i></i>)

<p>
        Private slot to save the output to a file.
</p>
<a NAME="DjangoDialog.keyPressEvent" ID="DjangoDialog.keyPressEvent"></a>
<h4>DjangoDialog.keyPressEvent</h4>
<b>keyPressEvent</b>(<i>evt</i>)

<p>
        Protected slot to handle a key press event.
</p>
<dl>

<dt><i>evt</i> (QKeyEvent)</dt>
<dd>
the key press event
</dd>
</dl>
<a NAME="DjangoDialog.normalExit" ID="DjangoDialog.normalExit"></a>
<h4>DjangoDialog.normalExit</h4>
<b>normalExit</b>(<i></i>)

<p>
        Public method to check for a normal process termination.
</p>
<dl>
<dt>Return:</dt>
<dd>
flag indicating normal process termination
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<a NAME="DjangoDialog.normalExitWithoutErrors" ID="DjangoDialog.normalExitWithoutErrors"></a>
<h4>DjangoDialog.normalExitWithoutErrors</h4>
<b>normalExitWithoutErrors</b>(<i></i>)

<p>
        Public method to check for a normal process termination without
        error messages.
</p>
<dl>
<dt>Return:</dt>
<dd>
flag indicating normal process termination
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<a NAME="DjangoDialog.on_buttonBox_clicked" ID="DjangoDialog.on_buttonBox_clicked"></a>
<h4>DjangoDialog.on_buttonBox_clicked</h4>
<b>on_buttonBox_clicked</b>(<i>button</i>)

<p>
        Private slot called by a button of the button box clicked.
</p>
<dl>

<dt><i>button</i> (QAbstractButton)</dt>
<dd>
button that was clicked
</dd>
</dl>
<a NAME="DjangoDialog.on_input_returnPressed" ID="DjangoDialog.on_input_returnPressed"></a>
<h4>DjangoDialog.on_input_returnPressed</h4>
<b>on_input_returnPressed</b>(<i></i>)

<p>
        Private slot to handle the press of the return key in the input field.
</p>
<a NAME="DjangoDialog.on_passwordCheckBox_toggled" ID="DjangoDialog.on_passwordCheckBox_toggled"></a>
<h4>DjangoDialog.on_passwordCheckBox_toggled</h4>
<b>on_passwordCheckBox_toggled</b>(<i>isOn</i>)

<p>
        Private slot to handle the password checkbox toggled.
</p>
<dl>

<dt><i>isOn</i> (bool)</dt>
<dd>
flag indicating the status of the check box
</dd>
</dl>
<a NAME="DjangoDialog.on_sendButton_clicked" ID="DjangoDialog.on_sendButton_clicked"></a>
<h4>DjangoDialog.on_sendButton_clicked</h4>
<b>on_sendButton_clicked</b>(<i></i>)

<p>
        Private slot to send the input to the manage.py process.
</p>
<a NAME="DjangoDialog.startBatchProcesses" ID="DjangoDialog.startBatchProcesses"></a>
<h4>DjangoDialog.startBatchProcesses</h4>
<b>startBatchProcesses</b>(<i>argsLists, workingDir=None, mergedOutput=False</i>)

<p>
        Public slot used to start a batch of processes.
</p>
<dl>

<dt><i>argsLists</i> (list of list of str)</dt>
<dd>
list of lists of arguments for the processes
</dd>
<dt><i>workingDir</i> (str)</dt>
<dd>
working directory for the process
</dd>
<dt><i>mergedOutput</i> (bool)</dt>
<dd>
flag indicating to merge the output of the process
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flag indicating a successful start of the first process
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<a NAME="DjangoDialog.startProcess" ID="DjangoDialog.startProcess"></a>
<h4>DjangoDialog.startProcess</h4>
<b>startProcess</b>(<i>args, workingDir=None, showCommand=True, mergedOutput=False</i>)

<p>
        Public slot used to start the process.
</p>
<dl>

<dt><i>args</i> (list of str)</dt>
<dd>
list of arguments for the process
</dd>
<dt><i>workingDir</i> (str)</dt>
<dd>
working directory for the process
</dd>
<dt><i>showCommand</i> (bool)</dt>
<dd>
flag indicating to show the command executed
</dd>
<dt><i>mergedOutput</i> (bool)</dt>
<dd>
flag indicating to merge the output of the process
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flag indicating a successful start of the process
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial