# eric7.VirtualEnv.VirtualenvAddEditDialog

Module implementing a dialog to enter the data of a virtual environment.

### Global Attributes

None

### Classes

VirtualenvAddEditDialog | Class implementing a dialog to enter the data of a virtual environment.

### Functions

None

## VirtualenvAddEditDialog

Class implementing a dialog to enter the data of a virtual environment.

### Derived from

QDialog, Ui_VirtualenvAddEditDialog

### Class Attributes

None

### Class Methods

None

### Methods

VirtualenvAddEditDialog | Constructor
__detectPythonInterpreter | Private method to search for a suitable Python interpreter inside an environment.
__updateOk | Private slot to update the state of the OK button.
getData | Public method to retrieve the entered data.
on_anacondaCheckBox_clicked | Private slot handling a user click on this check box.
on_globalCheckBox_toggled | Private slot handling a change of the global check box state.
on_nameEdit_textChanged | Private slot to handle changes of the logical name.
on_pythonExecPicker_textChanged | Private slot to handle changes of the virtual environment interpreter.
on_remoteCheckBox_toggled | Private slot handling a change of the remote check box state.
on_targetDirectoryPicker_textChanged | Private slot to handle changes of the virtual environment directory.

### Static Methods

None

#### VirtualenvAddEditDialog (Constructor)

VirtualenvAddEditDialog(manager, venvName="", venvDirectory="", venvInterpreter="", isGlobal=False, isConda=False, isRemote=False, execPath="", baseDir="", parent=None)

Constructor

manager (VirtualenvManager)
  reference to the virtual environment manager
venvName (str)
  logical name of a virtual environment for editing
venvDirectory (str)
  directory of the virtual environment
venvInterpreter (str)
  Python interpreter of the virtual environment
isGlobal (bool)
  flag indicating a global environment
isConda (bool)
  flag indicating an Anaconda virtual environment
isRemote (bool)
  flag indicating a remotely accessed environment
execPath (str)
  search path string to be prepended to the PATH environment variable
baseDir (str)
  base directory for the virtual environments
parent (QWidget)
  reference to the parent widget

#### VirtualenvAddEditDialog.__detectPythonInterpreter

__detectPythonInterpreter(venvDirectory)

Private method to search for a suitable Python interpreter inside an environment.

venvDirectory (str)
  directory for the virtual environment

Return:
  detected Python interpreter or empty string

Return Type:
  str

#### VirtualenvAddEditDialog.__updateOk

__updateOk()

Private slot to update the state of the OK button.

#### VirtualenvAddEditDialog.getData

getData()

Public method to retrieve the entered data.

Return:
  tuple containing the logical name, the directory, the interpreter of the virtual environment, a flag indicating a global environment, a flag indicating an Anaconda environment, a flag indicating a remotely accessed environment and a string to be prepended to the PATH environment variable

Return Type:
  tuple of (str, str, str, bool, bool, bool, str)

#### VirtualenvAddEditDialog.on_anacondaCheckBox_clicked

on_anacondaCheckBox_clicked(checked)

Private slot handling a user click on this check box.

checked (bool)
  state of the check box

#### VirtualenvAddEditDialog.on_globalCheckBox_toggled

on_globalCheckBox_toggled(checked)

Private slot handling a change of the global check box state.

checked (bool)
  state of the check box

#### VirtualenvAddEditDialog.on_nameEdit_textChanged

on_nameEdit_textChanged(txt)

Private slot to handle changes of the logical name.

txt (str)
  current logical name

#### VirtualenvAddEditDialog.on_pythonExecPicker_textChanged

on_pythonExecPicker_textChanged(txt)

Private slot to handle changes of the virtual environment interpreter.

txt (str)
  virtual environment interpreter

#### VirtualenvAddEditDialog.on_remoteCheckBox_toggled

on_remoteCheckBox_toggled(checked)

Private slot handling a change of the remote check box state.

checked (bool)
  state of the check box

#### VirtualenvAddEditDialog.on_targetDirectoryPicker_textChanged

on_targetDirectoryPicker_textChanged(txt)

Private slot to handle changes of the virtual environment directory.

txt (str)
  virtual environment directory

Up