src/eric7/VirtualEnv/VirtualenvAddEditDialog.py

branch
eric7
changeset 9434
ef86a77942f2
parent 9413
80c06d472826
child 9473
3f23dbf37dbe
equal deleted inserted replaced
9433:6df1aeaa4529 9434:ef86a77942f2
32 venvInterpreter="", 32 venvInterpreter="",
33 isGlobal=False, 33 isGlobal=False,
34 isConda=False, 34 isConda=False,
35 isRemote=False, 35 isRemote=False,
36 execPath="", 36 execPath="",
37 description="",
37 baseDir="", 38 baseDir="",
38 parent=None, 39 parent=None,
39 ): 40 ):
40 """ 41 """
41 Constructor 42 Constructor
54 @type bool 55 @type bool
55 @param isRemote flag indicating a remotely accessed environment 56 @param isRemote flag indicating a remotely accessed environment
56 @type bool 57 @type bool
57 @param execPath search path string to be prepended to the PATH 58 @param execPath search path string to be prepended to the PATH
58 environment variable 59 environment variable
60 @type str
61 @param description descriptive text for the environment
59 @type str 62 @type str
60 @param baseDir base directory for the virtual environments 63 @param baseDir base directory for the virtual environments
61 @type str 64 @type str
62 @param parent reference to the parent widget 65 @param parent reference to the parent widget
63 @type QWidget 66 @type QWidget
108 111
109 self.globalCheckBox.setChecked(isGlobal) 112 self.globalCheckBox.setChecked(isGlobal)
110 self.anacondaCheckBox.setChecked(isConda) 113 self.anacondaCheckBox.setChecked(isConda)
111 self.remoteCheckBox.setChecked(isRemote) 114 self.remoteCheckBox.setChecked(isRemote)
112 self.execPathEdit.setText(execPath) 115 self.execPathEdit.setText(execPath)
116 self.descriptionEdit.setPlainText(description)
113 117
114 self.__updateOk() 118 self.__updateOk()
115 119
116 self.nameEdit.setFocus(Qt.FocusReason.OtherFocusReason) 120 self.nameEdit.setFocus(Qt.FocusReason.OtherFocusReason)
117 121
264 268
265 def getData(self): 269 def getData(self):
266 """ 270 """
267 Public method to retrieve the entered data. 271 Public method to retrieve the entered data.
268 272
269 @return tuple containing the logical name, the directory, the 273 @return tuple containing the logical name, the directory, the interpreter of the
270 interpreter of the virtual environment, a flag indicating a 274 virtual environment, a flag indicating a global environment, a flag
271 global environment, a flag indicating an Anaconda environment, 275 indicating an Anaconda environment, a flag indicating a remotely accessed
272 a flag indicating a remotely accessed environment and a string 276 environment, a string to be prepended to the PATH environment variable and
273 to be prepended to the PATH environment variable 277 a descriptive text
274 @rtype tuple of (str, str, str, bool, bool, bool, str) 278 @rtype tuple of (str, str, str, bool, bool, bool, str, str)
275 """ 279 """
276 nativePaths = not self.remoteCheckBox.isChecked() 280 nativePaths = not self.remoteCheckBox.isChecked()
277 return ( 281 return (
278 self.nameEdit.text(), 282 self.nameEdit.text(),
279 self.targetDirectoryPicker.text(toNative=nativePaths), 283 self.targetDirectoryPicker.text(toNative=nativePaths),
280 self.pythonExecPicker.text(toNative=nativePaths), 284 self.pythonExecPicker.text(toNative=nativePaths),
281 self.globalCheckBox.isChecked(), 285 self.globalCheckBox.isChecked(),
282 self.anacondaCheckBox.isChecked(), 286 self.anacondaCheckBox.isChecked(),
283 self.remoteCheckBox.isChecked(), 287 self.remoteCheckBox.isChecked(),
284 self.execPathEdit.text(), 288 self.execPathEdit.text(),
285 ) 289 self.descriptionEdit.toPlainText(),
290 )

eric ide

mercurial