# 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.
getMetaData | Public method to retrieve the entered metadata.
on_anacondaRadioButton_clicked | Private slot handling a user click on this radio button.
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_remoteRadioButton_toggled | Private slot handling a change of the remote radio button state.
on_serverRadioButton_toggled | Private slot handling a change of the eric-ide server radio button state.
on_targetDirectoryPicker_textChanged | Private slot to handle changes of the virtual environment directory.

### Static Methods

None

#### VirtualenvAddEditDialog (Constructor)

VirtualenvAddEditDialog(manager, metadata=None, baseDir="", parent=None, )

Constructor

manager (VirtualenvManager)
  reference to the virtual environment manager
metadata (VirtualenvMetaData (optional))
  object containing the metadata of the virtual environment (defaults to None)
baseDir (str (optional))
  base directory for the virtual environments (defaults to "")
parent (QWidget (optional))
  reference to the parent widget (defaults to None)

#### 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.getMetaData

getMetaData()

Public method to retrieve the entered metadata.

Return:
  metadata for the virtual environment

Return Type:
  VirtualenvMetaData

#### VirtualenvAddEditDialog.on_anacondaRadioButton_clicked

on_anacondaRadioButton_clicked(checked)

Private slot handling a user click on this radio button.

checked (bool)
  state of the radio button

#### 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_remoteRadioButton_toggled

on_remoteRadioButton_toggled(checked)

Private slot handling a change of the remote radio button state.

checked (bool)
  state of the radio button

#### VirtualenvAddEditDialog.on_serverRadioButton_toggled

on_serverRadioButton_toggled(checked)

Private slot handling a change of the eric-ide server radio button state.

checked (bool)
  state of the radio button

#### VirtualenvAddEditDialog.on_targetDirectoryPicker_textChanged

on_targetDirectoryPicker_textChanged(txt)

Private slot to handle changes of the virtual environment directory.

txt (str)
  virtual environment directory

Up