80 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( |
80 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( |
81 bool(self.targetDirectoryPicker.text()) and bool(self.nameEdit.text()) |
81 bool(self.targetDirectoryPicker.text()) and bool(self.nameEdit.text()) |
82 ) |
82 ) |
83 |
83 |
84 @pyqtSlot(str) |
84 @pyqtSlot(str) |
85 def on_nameEdit_textChanged(self, txt): |
85 def on_nameEdit_textChanged(self, txt): # noqa: U100 |
86 """ |
86 """ |
87 Private slot handling a change of the virtual environment name. |
87 Private slot handling a change of the virtual environment name. |
88 |
88 |
89 @param txt name of the virtual environment |
89 @param txt name of the virtual environment |
90 @type str |
90 @type str |
91 """ |
91 """ |
92 self.__updateOK() |
92 self.__updateOK() |
93 |
93 |
94 @pyqtSlot(str) |
94 @pyqtSlot(str) |
95 def on_targetDirectoryPicker_textChanged(self, txt): |
95 def on_targetDirectoryPicker_textChanged(self, txt): # noqa: U100 |
96 """ |
96 """ |
97 Private slot handling a change of the target directory. |
97 Private slot handling a change of the target directory. |
98 |
98 |
99 @param txt target directory |
99 @param txt target directory |
100 @type str |
100 @type str |
106 Private method to generate a valid target directory path. |
106 Private method to generate a valid target directory path. |
107 |
107 |
108 @return target directory path |
108 @return target directory path |
109 @rtype str |
109 @rtype str |
110 """ |
110 """ |
111 targetDirectory = toNativeSeparators( |
111 targetDirectory = toNativeSeparators(self.targetDirectoryPicker.text()) |
112 self.targetDirectoryPicker.text() |
|
113 ) |
|
114 if not os.path.isabs(targetDirectory): |
112 if not os.path.isabs(targetDirectory): |
115 targetDirectory = os.path.join(os.path.expanduser("~"), targetDirectory) |
113 targetDirectory = os.path.join(os.path.expanduser("~"), targetDirectory) |
116 return targetDirectory |
114 return targetDirectory |
117 |
115 |
118 def getData(self): |
116 def getData(self): |