# eric7.VirtualEnv.VirtualenvConfigurationDialog

Module implementing a dialog to enter the parameters for the virtual environment.

### Global Attributes

None

### Classes

VirtualenvConfigurationDialog | Class implementing a dialog to enter the parameters for the virtual environment.

### Functions

None

## VirtualenvConfigurationDialog

Class implementing a dialog to enter the parameters for the virtual environment.

### Derived from

QDialog, Ui_VirtualenvConfigurationDialog

### Class Attributes

None

### Class Methods

None

### Methods

VirtualenvConfigurationDialog | Constructor
__generateArguments | Private method to generate the process arguments.
__generateTargetDir | Private method to generate a valid target directory path.
__setCondaVersion | Private method to determine the conda version and set the respective label.
__setPyvenvVersion | Private method to determine the pyvenv version and set the respective label.
__setVirtualenvVersion | Private method to determine the virtualenv version and set the respective label.
__updateOK | Private method to update the enabled status of the OK button.
__updateUi | Private method to update the UI depending on the selected virtual environment creator (virtualenv or pyvenv).
getData | Public method to retrieve the dialog data.
on_condaButton_toggled | Private slot to react to the selection of 'conda'.
on_condaCloneButton_clicked | Private slot handling the selection of the clone button.
on_condaCloneDirectoryPicker_textChanged | Private slot handling a change of the cloned from directory.
on_condaCloneNameEdit_textChanged | Private slot handling a change of the conda source environment name.
on_condaNameEdit_textChanged | Private slot handling a change of the conda environment name.
on_condaRequirementsButton_clicked | Private slot handling the selection of the requirements button.
on_condaRequirementsFilePicker_textChanged | Private slot handling a change of the requirements file entry.
on_condaSpecialsGroup_clicked | Private slot handling the selection of the specials group.
on_condaTargetDirectoryPicker_textChanged | Private slot handling a change of the conda target directory.
on_nameEdit_textChanged | Private slot handling a change of the virtual environment name.
on_pythonExecPicker_textChanged | Private slot to react to a change of the Python executable.
on_pyvenvButton_toggled | Private slot to react to the selection of 'pyvenv'.
on_targetDirectoryPicker_textChanged | Private slot handling a change of the target directory.
on_virtualenvButton_toggled | Private slot to react to the selection of 'virtualenv'.

### Static Methods

None

#### VirtualenvConfigurationDialog (Constructor)

VirtualenvConfigurationDialog(baseDir="", parent=None)

Constructor

baseDir (str)
  base directory for the virtual environments
parent (QWidget)
  reference to the parent widget

#### VirtualenvConfigurationDialog.__generateArguments

__generateArguments()

Private method to generate the process arguments.

Return:
  process arguments

Return Type:
  list of str

#### VirtualenvConfigurationDialog.__generateTargetDir

__generateTargetDir()

Private method to generate a valid target directory path.

Return:
  target directory path

Return Type:
  str

#### VirtualenvConfigurationDialog.__setCondaVersion

__setCondaVersion()

Private method to determine the conda version and set the respective label.

#### VirtualenvConfigurationDialog.__setPyvenvVersion

__setPyvenvVersion()

Private method to determine the pyvenv version and set the respective label.

#### VirtualenvConfigurationDialog.__setVirtualenvVersion

__setVirtualenvVersion()

Private method to determine the virtualenv version and set the respective label.

#### VirtualenvConfigurationDialog.__updateOK

__updateOK()

Private method to update the enabled status of the OK button.

#### VirtualenvConfigurationDialog.__updateUi

__updateUi()

Private method to update the UI depending on the selected virtual environment creator (virtualenv or pyvenv).

#### VirtualenvConfigurationDialog.getData

getData()

Public method to retrieve the dialog data.

Return:
  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').

Return Type:
  dict

#### VirtualenvConfigurationDialog.on_condaButton_toggled

on_condaButton_toggled(checked)

Private slot to react to the selection of 'conda'.

checked (bool)
  state of the checkbox

#### VirtualenvConfigurationDialog.on_condaCloneButton_clicked

on_condaCloneButton_clicked()

Private slot handling the selection of the clone button.

#### VirtualenvConfigurationDialog.on_condaCloneDirectoryPicker_textChanged

on_condaCloneDirectoryPicker_textChanged(txt)

Private slot handling a change of the cloned from directory.

txt (str)
  target directory

#### VirtualenvConfigurationDialog.on_condaCloneNameEdit_textChanged

on_condaCloneNameEdit_textChanged(txt)

Private slot handling a change of the conda source environment name.

txt (str)
  name of the environment to be cloned

#### VirtualenvConfigurationDialog.on_condaNameEdit_textChanged

on_condaNameEdit_textChanged(txt)

Private slot handling a change of the conda environment name.

txt (str)
  environment name

#### VirtualenvConfigurationDialog.on_condaRequirementsButton_clicked

on_condaRequirementsButton_clicked()

Private slot handling the selection of the requirements button.

#### VirtualenvConfigurationDialog.on_condaRequirementsFilePicker_textChanged

on_condaRequirementsFilePicker_textChanged(txt)

Private slot handling a change of the requirements file entry.

txt (str)
  current text of the requirements file entry

#### VirtualenvConfigurationDialog.on_condaSpecialsGroup_clicked

on_condaSpecialsGroup_clicked()

Private slot handling the selection of the specials group.

#### VirtualenvConfigurationDialog.on_condaTargetDirectoryPicker_textChanged

on_condaTargetDirectoryPicker_textChanged(txt)

Private slot handling a change of the conda target directory.

txt (str)
  target directory

#### VirtualenvConfigurationDialog.on_nameEdit_textChanged

on_nameEdit_textChanged(txt)

Private slot handling a change of the virtual environment name.

txt (str)
  name of the virtual environment

#### VirtualenvConfigurationDialog.on_pythonExecPicker_textChanged

on_pythonExecPicker_textChanged(txt)

Private slot to react to a change of the Python executable.

txt (str)
  contents of the picker's line edit

#### VirtualenvConfigurationDialog.on_pyvenvButton_toggled

on_pyvenvButton_toggled(checked)

Private slot to react to the selection of 'pyvenv'.

checked (bool)
  state of the checkbox

#### VirtualenvConfigurationDialog.on_targetDirectoryPicker_textChanged

on_targetDirectoryPicker_textChanged(txt)

Private slot handling a change of the target directory.

txt (str)
  target directory

#### VirtualenvConfigurationDialog.on_virtualenvButton_toggled

on_virtualenvButton_toggled(checked)

Private slot to react to the selection of 'virtualenv'.

checked (bool)
  state of the checkbox

Up