Mon, 09 Jan 2023 11:22:56 +0100
Moved the 'QtHelp' subpackage out of the WebBrowser package because it is used in the HelpViewer as well.
<!DOCTYPE html> <html><head> <title>eric7.VirtualEnv.VirtualenvConfigurationDialog</title> <meta charset="UTF-8"> <link rel="stylesheet" href="styles.css"> </head> <body> <a NAME="top" ID="top"></a> <h1>eric7.VirtualEnv.VirtualenvConfigurationDialog</h1> <p> Module implementing a dialog to enter the parameters for the virtual environment. </p> <h3>Global Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#VirtualenvConfigurationDialog">VirtualenvConfigurationDialog</a></td> <td>Class implementing a dialog to enter the parameters for the virtual environment.</td> </tr> </table> <h3>Functions</h3> <table> <tr><td>None</td></tr> </table> <hr /> <hr /> <a NAME="VirtualenvConfigurationDialog" ID="VirtualenvConfigurationDialog"></a> <h2>VirtualenvConfigurationDialog</h2> <p> Class implementing a dialog to enter the parameters for the virtual environment. </p> <h3>Derived from</h3> QDialog, Ui_VirtualenvConfigurationDialog <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="#VirtualenvConfigurationDialog.__init__">VirtualenvConfigurationDialog</a></td> <td>Constructor</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.__generateArguments">__generateArguments</a></td> <td>Private method to generate the process arguments.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.__generateTargetDir">__generateTargetDir</a></td> <td>Private method to generate a valid target directory path.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.__setCondaVersion">__setCondaVersion</a></td> <td>Private method to determine the conda version and set the respective label.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.__setPyvenvVersion">__setPyvenvVersion</a></td> <td>Private method to determine the pyvenv version and set the respective label.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.__setVirtualenvVersion">__setVirtualenvVersion</a></td> <td>Private method to determine the virtualenv version and set the respective label.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.__updateOK">__updateOK</a></td> <td>Private method to update the enabled status of the OK button.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.__updateUi">__updateUi</a></td> <td>Private method to update the UI depending on the selected virtual environment creator (virtualenv or pyvenv).</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.getData">getData</a></td> <td>Public method to retrieve the dialog data.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_condaButton_toggled">on_condaButton_toggled</a></td> <td>Private slot to react to the selection of 'conda'.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_condaCloneButton_clicked">on_condaCloneButton_clicked</a></td> <td>Private slot handling the selection of the clone button.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_condaCloneDirectoryPicker_textChanged">on_condaCloneDirectoryPicker_textChanged</a></td> <td>Private slot handling a change of the cloned from directory.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_condaCloneNameEdit_textChanged">on_condaCloneNameEdit_textChanged</a></td> <td>Private slot handling a change of the conda source environment name.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_condaNameEdit_textChanged">on_condaNameEdit_textChanged</a></td> <td>Private slot handling a change of the conda environment name.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_condaRequirementsButton_clicked">on_condaRequirementsButton_clicked</a></td> <td>Private slot handling the selection of the requirements button.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_condaRequirementsFilePicker_textChanged">on_condaRequirementsFilePicker_textChanged</a></td> <td>Private slot handling a change of the requirements file entry.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_condaSpecialsGroup_clicked">on_condaSpecialsGroup_clicked</a></td> <td>Private slot handling the selection of the specials group.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_condaTargetDirectoryPicker_textChanged">on_condaTargetDirectoryPicker_textChanged</a></td> <td>Private slot handling a change of the conda target directory.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_nameEdit_textChanged">on_nameEdit_textChanged</a></td> <td>Private slot handling a change of the virtual environment name.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_pythonExecPicker_textChanged">on_pythonExecPicker_textChanged</a></td> <td>Private slot to react to a change of the Python executable.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_pyvenvButton_toggled">on_pyvenvButton_toggled</a></td> <td>Private slot to react to the selection of 'pyvenv'.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_targetDirectoryPicker_textChanged">on_targetDirectoryPicker_textChanged</a></td> <td>Private slot handling a change of the target directory.</td> </tr> <tr> <td><a href="#VirtualenvConfigurationDialog.on_virtualenvButton_toggled">on_virtualenvButton_toggled</a></td> <td>Private slot to react to the selection of 'virtualenv'.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="VirtualenvConfigurationDialog.__init__" ID="VirtualenvConfigurationDialog.__init__"></a> <h4>VirtualenvConfigurationDialog (Constructor)</h4> <b>VirtualenvConfigurationDialog</b>(<i>baseDir="", parent=None</i>) <p> Constructor </p> <dl> <dt><i>baseDir</i> (str)</dt> <dd> base directory for the virtual environments </dd> <dt><i>parent</i> (QWidget)</dt> <dd> reference to the parent widget </dd> </dl> <a NAME="VirtualenvConfigurationDialog.__generateArguments" ID="VirtualenvConfigurationDialog.__generateArguments"></a> <h4>VirtualenvConfigurationDialog.__generateArguments</h4> <b>__generateArguments</b>(<i></i>) <p> Private method to generate the process arguments. </p> <dl> <dt>Return:</dt> <dd> process arguments </dd> </dl> <dl> <dt>Return Type:</dt> <dd> list of str </dd> </dl> <a NAME="VirtualenvConfigurationDialog.__generateTargetDir" ID="VirtualenvConfigurationDialog.__generateTargetDir"></a> <h4>VirtualenvConfigurationDialog.__generateTargetDir</h4> <b>__generateTargetDir</b>(<i></i>) <p> Private method to generate a valid target directory path. </p> <dl> <dt>Return:</dt> <dd> target directory path </dd> </dl> <dl> <dt>Return Type:</dt> <dd> str </dd> </dl> <a NAME="VirtualenvConfigurationDialog.__setCondaVersion" ID="VirtualenvConfigurationDialog.__setCondaVersion"></a> <h4>VirtualenvConfigurationDialog.__setCondaVersion</h4> <b>__setCondaVersion</b>(<i></i>) <p> Private method to determine the conda version and set the respective label. </p> <a NAME="VirtualenvConfigurationDialog.__setPyvenvVersion" ID="VirtualenvConfigurationDialog.__setPyvenvVersion"></a> <h4>VirtualenvConfigurationDialog.__setPyvenvVersion</h4> <b>__setPyvenvVersion</b>(<i></i>) <p> Private method to determine the pyvenv version and set the respective label. </p> <a NAME="VirtualenvConfigurationDialog.__setVirtualenvVersion" ID="VirtualenvConfigurationDialog.__setVirtualenvVersion"></a> <h4>VirtualenvConfigurationDialog.__setVirtualenvVersion</h4> <b>__setVirtualenvVersion</b>(<i></i>) <p> Private method to determine the virtualenv version and set the respective label. </p> <a NAME="VirtualenvConfigurationDialog.__updateOK" ID="VirtualenvConfigurationDialog.__updateOK"></a> <h4>VirtualenvConfigurationDialog.__updateOK</h4> <b>__updateOK</b>(<i></i>) <p> Private method to update the enabled status of the OK button. </p> <a NAME="VirtualenvConfigurationDialog.__updateUi" ID="VirtualenvConfigurationDialog.__updateUi"></a> <h4>VirtualenvConfigurationDialog.__updateUi</h4> <b>__updateUi</b>(<i></i>) <p> Private method to update the UI depending on the selected virtual environment creator (virtualenv or pyvenv). </p> <a NAME="VirtualenvConfigurationDialog.getData" ID="VirtualenvConfigurationDialog.getData"></a> <h4>VirtualenvConfigurationDialog.getData</h4> <b>getData</b>(<i></i>) <p> Public method to retrieve the dialog data. </p> <dl> <dt>Return:</dt> <dd> dictionary containing the data for the two environment variants. The keys for both variants are 'arguments' containing the command line arguments, 'logicalName' containing the environment name to be used with the virtual env manager and 'envType' containing the environment type (virtualenv, pyvenv or conda). The virtualenv/pyvenv specific keys are 'openTarget' containg a flag to open the target directory after creation, 'createLog' containing a flag to write a log file, 'createScript' containing a flag to write a script, 'targetDirectory' containing the target directory and 'pythonExe' containing the Python interpreter to be used. The conda specific key is 'command' giving the conda command to be executed (always 'create'). </dd> </dl> <dl> <dt>Return Type:</dt> <dd> dict </dd> </dl> <a NAME="VirtualenvConfigurationDialog.on_condaButton_toggled" ID="VirtualenvConfigurationDialog.on_condaButton_toggled"></a> <h4>VirtualenvConfigurationDialog.on_condaButton_toggled</h4> <b>on_condaButton_toggled</b>(<i>checked</i>) <p> Private slot to react to the selection of 'conda'. </p> <dl> <dt><i>checked</i> (bool)</dt> <dd> state of the checkbox </dd> </dl> <a NAME="VirtualenvConfigurationDialog.on_condaCloneButton_clicked" ID="VirtualenvConfigurationDialog.on_condaCloneButton_clicked"></a> <h4>VirtualenvConfigurationDialog.on_condaCloneButton_clicked</h4> <b>on_condaCloneButton_clicked</b>(<i></i>) <p> Private slot handling the selection of the clone button. </p> <a NAME="VirtualenvConfigurationDialog.on_condaCloneDirectoryPicker_textChanged" ID="VirtualenvConfigurationDialog.on_condaCloneDirectoryPicker_textChanged"></a> <h4>VirtualenvConfigurationDialog.on_condaCloneDirectoryPicker_textChanged</h4> <b>on_condaCloneDirectoryPicker_textChanged</b>(<i>txt</i>) <p> Private slot handling a change of the cloned from directory. </p> <dl> <dt><i>txt</i> (str)</dt> <dd> target directory </dd> </dl> <a NAME="VirtualenvConfigurationDialog.on_condaCloneNameEdit_textChanged" ID="VirtualenvConfigurationDialog.on_condaCloneNameEdit_textChanged"></a> <h4>VirtualenvConfigurationDialog.on_condaCloneNameEdit_textChanged</h4> <b>on_condaCloneNameEdit_textChanged</b>(<i>txt</i>) <p> Private slot handling a change of the conda source environment name. </p> <dl> <dt><i>txt</i> (str)</dt> <dd> name of the environment to be cloned </dd> </dl> <a NAME="VirtualenvConfigurationDialog.on_condaNameEdit_textChanged" ID="VirtualenvConfigurationDialog.on_condaNameEdit_textChanged"></a> <h4>VirtualenvConfigurationDialog.on_condaNameEdit_textChanged</h4> <b>on_condaNameEdit_textChanged</b>(<i>txt</i>) <p> Private slot handling a change of the conda environment name. </p> <dl> <dt><i>txt</i> (str)</dt> <dd> environment name </dd> </dl> <a NAME="VirtualenvConfigurationDialog.on_condaRequirementsButton_clicked" ID="VirtualenvConfigurationDialog.on_condaRequirementsButton_clicked"></a> <h4>VirtualenvConfigurationDialog.on_condaRequirementsButton_clicked</h4> <b>on_condaRequirementsButton_clicked</b>(<i></i>) <p> Private slot handling the selection of the requirements button. </p> <a NAME="VirtualenvConfigurationDialog.on_condaRequirementsFilePicker_textChanged" ID="VirtualenvConfigurationDialog.on_condaRequirementsFilePicker_textChanged"></a> <h4>VirtualenvConfigurationDialog.on_condaRequirementsFilePicker_textChanged</h4> <b>on_condaRequirementsFilePicker_textChanged</b>(<i>txt</i>) <p> Private slot handling a change of the requirements file entry. </p> <dl> <dt><i>txt</i> (str)</dt> <dd> current text of the requirements file entry </dd> </dl> <a NAME="VirtualenvConfigurationDialog.on_condaSpecialsGroup_clicked" ID="VirtualenvConfigurationDialog.on_condaSpecialsGroup_clicked"></a> <h4>VirtualenvConfigurationDialog.on_condaSpecialsGroup_clicked</h4> <b>on_condaSpecialsGroup_clicked</b>(<i></i>) <p> Private slot handling the selection of the specials group. </p> <a NAME="VirtualenvConfigurationDialog.on_condaTargetDirectoryPicker_textChanged" ID="VirtualenvConfigurationDialog.on_condaTargetDirectoryPicker_textChanged"></a> <h4>VirtualenvConfigurationDialog.on_condaTargetDirectoryPicker_textChanged</h4> <b>on_condaTargetDirectoryPicker_textChanged</b>(<i>txt</i>) <p> Private slot handling a change of the conda target directory. </p> <dl> <dt><i>txt</i> (str)</dt> <dd> target directory </dd> </dl> <a NAME="VirtualenvConfigurationDialog.on_nameEdit_textChanged" ID="VirtualenvConfigurationDialog.on_nameEdit_textChanged"></a> <h4>VirtualenvConfigurationDialog.on_nameEdit_textChanged</h4> <b>on_nameEdit_textChanged</b>(<i>txt</i>) <p> Private slot handling a change of the virtual environment name. </p> <dl> <dt><i>txt</i> (str)</dt> <dd> name of the virtual environment </dd> </dl> <a NAME="VirtualenvConfigurationDialog.on_pythonExecPicker_textChanged" ID="VirtualenvConfigurationDialog.on_pythonExecPicker_textChanged"></a> <h4>VirtualenvConfigurationDialog.on_pythonExecPicker_textChanged</h4> <b>on_pythonExecPicker_textChanged</b>(<i>txt</i>) <p> Private slot to react to a change of the Python executable. </p> <dl> <dt><i>txt</i> (str)</dt> <dd> contents of the picker's line edit </dd> </dl> <a NAME="VirtualenvConfigurationDialog.on_pyvenvButton_toggled" ID="VirtualenvConfigurationDialog.on_pyvenvButton_toggled"></a> <h4>VirtualenvConfigurationDialog.on_pyvenvButton_toggled</h4> <b>on_pyvenvButton_toggled</b>(<i>checked</i>) <p> Private slot to react to the selection of 'pyvenv'. </p> <dl> <dt><i>checked</i> (bool)</dt> <dd> state of the checkbox </dd> </dl> <a NAME="VirtualenvConfigurationDialog.on_targetDirectoryPicker_textChanged" ID="VirtualenvConfigurationDialog.on_targetDirectoryPicker_textChanged"></a> <h4>VirtualenvConfigurationDialog.on_targetDirectoryPicker_textChanged</h4> <b>on_targetDirectoryPicker_textChanged</b>(<i>txt</i>) <p> Private slot handling a change of the target directory. </p> <dl> <dt><i>txt</i> (str)</dt> <dd> target directory </dd> </dl> <a NAME="VirtualenvConfigurationDialog.on_virtualenvButton_toggled" ID="VirtualenvConfigurationDialog.on_virtualenvButton_toggled"></a> <h4>VirtualenvConfigurationDialog.on_virtualenvButton_toggled</h4> <b>on_virtualenvButton_toggled</b>(<i>checked</i>) <p> Private slot to react to the selection of 'virtualenv'. </p> <dl> <dt><i>checked</i> (bool)</dt> <dd> state of the checkbox </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>