|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.VirtualEnv.VirtualenvConfigurationDialog</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.VirtualEnv.VirtualenvConfigurationDialog</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a dialog to enter the parameters for the |
|
13 virtual environment. |
|
14 </p> |
|
15 <h3>Global Attributes</h3> |
|
16 |
|
17 <table> |
|
18 <tr><td>None</td></tr> |
|
19 </table> |
|
20 <h3>Classes</h3> |
|
21 |
|
22 <table> |
|
23 |
|
24 <tr> |
|
25 <td><a href="#VirtualenvConfigurationDialog">VirtualenvConfigurationDialog</a></td> |
|
26 <td>Class implementing a dialog to enter the parameters for the virtual environment.</td> |
|
27 </tr> |
|
28 </table> |
|
29 <h3>Functions</h3> |
|
30 |
|
31 <table> |
|
32 <tr><td>None</td></tr> |
|
33 </table> |
|
34 <hr /> |
|
35 <hr /> |
|
36 <a NAME="VirtualenvConfigurationDialog" ID="VirtualenvConfigurationDialog"></a> |
|
37 <h2>VirtualenvConfigurationDialog</h2> |
|
38 |
|
39 <p> |
|
40 Class implementing a dialog to enter the parameters for the |
|
41 virtual environment. |
|
42 </p> |
|
43 <h3>Derived from</h3> |
|
44 QDialog, Ui_VirtualenvConfigurationDialog |
|
45 <h3>Class Attributes</h3> |
|
46 |
|
47 <table> |
|
48 <tr><td>None</td></tr> |
|
49 </table> |
|
50 <h3>Class Methods</h3> |
|
51 |
|
52 <table> |
|
53 <tr><td>None</td></tr> |
|
54 </table> |
|
55 <h3>Methods</h3> |
|
56 |
|
57 <table> |
|
58 |
|
59 <tr> |
|
60 <td><a href="#VirtualenvConfigurationDialog.__init__">VirtualenvConfigurationDialog</a></td> |
|
61 <td>Constructor</td> |
|
62 </tr> |
|
63 <tr> |
|
64 <td><a href="#VirtualenvConfigurationDialog.__generateArguments">__generateArguments</a></td> |
|
65 <td>Private method to generate the process arguments.</td> |
|
66 </tr> |
|
67 <tr> |
|
68 <td><a href="#VirtualenvConfigurationDialog.__generateTargetDir">__generateTargetDir</a></td> |
|
69 <td>Private method to generate a valid target directory path.</td> |
|
70 </tr> |
|
71 <tr> |
|
72 <td><a href="#VirtualenvConfigurationDialog.__setCondaVersion">__setCondaVersion</a></td> |
|
73 <td>Private method to determine the conda version and set the respective label.</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#VirtualenvConfigurationDialog.__setPyvenvVersion">__setPyvenvVersion</a></td> |
|
77 <td>Private method to determine the pyvenv version and set the respective label.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#VirtualenvConfigurationDialog.__setVirtualenvVersion">__setVirtualenvVersion</a></td> |
|
81 <td>Private method to determine the virtualenv version and set the respective label.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#VirtualenvConfigurationDialog.__updateOK">__updateOK</a></td> |
|
85 <td>Private method to update the enabled status of the OK button.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#VirtualenvConfigurationDialog.__updateUi">__updateUi</a></td> |
|
89 <td>Private method to update the UI depending on the selected virtual environment creator (virtualenv or pyvenv).</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#VirtualenvConfigurationDialog.getData">getData</a></td> |
|
93 <td>Public method to retrieve the dialog data.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#VirtualenvConfigurationDialog.on_condaButton_toggled">on_condaButton_toggled</a></td> |
|
97 <td>Private slot to react to the selection of 'conda'.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#VirtualenvConfigurationDialog.on_condaCloneButton_clicked">on_condaCloneButton_clicked</a></td> |
|
101 <td>Private slot handling the selection of the clone button.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#VirtualenvConfigurationDialog.on_condaCloneDirectoryPicker_textChanged">on_condaCloneDirectoryPicker_textChanged</a></td> |
|
105 <td>Private slot handling a change of the cloned from directory.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#VirtualenvConfigurationDialog.on_condaCloneNameEdit_textChanged">on_condaCloneNameEdit_textChanged</a></td> |
|
109 <td>Private slot handling a change of the conda source environment name.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#VirtualenvConfigurationDialog.on_condaNameEdit_textChanged">on_condaNameEdit_textChanged</a></td> |
|
113 <td>Private slot handling a change of the conda environment name.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#VirtualenvConfigurationDialog.on_condaRequirementsButton_clicked">on_condaRequirementsButton_clicked</a></td> |
|
117 <td>Private slot handling the selection of the requirements button.</td> |
|
118 </tr> |
|
119 <tr> |
|
120 <td><a href="#VirtualenvConfigurationDialog.on_condaRequirementsFilePicker_textChanged">on_condaRequirementsFilePicker_textChanged</a></td> |
|
121 <td>Private slot handling a change of the requirements file entry.</td> |
|
122 </tr> |
|
123 <tr> |
|
124 <td><a href="#VirtualenvConfigurationDialog.on_condaSpecialsGroup_clicked">on_condaSpecialsGroup_clicked</a></td> |
|
125 <td>Private slot handling the selection of the specials group.</td> |
|
126 </tr> |
|
127 <tr> |
|
128 <td><a href="#VirtualenvConfigurationDialog.on_condaTargetDirectoryPicker_textChanged">on_condaTargetDirectoryPicker_textChanged</a></td> |
|
129 <td>Private slot handling a change of the conda target directory.</td> |
|
130 </tr> |
|
131 <tr> |
|
132 <td><a href="#VirtualenvConfigurationDialog.on_nameEdit_textChanged">on_nameEdit_textChanged</a></td> |
|
133 <td>Private slot handling a change of the virtual environment name.</td> |
|
134 </tr> |
|
135 <tr> |
|
136 <td><a href="#VirtualenvConfigurationDialog.on_pythonExecPicker_textChanged">on_pythonExecPicker_textChanged</a></td> |
|
137 <td>Private slot to react to a change of the Python executable.</td> |
|
138 </tr> |
|
139 <tr> |
|
140 <td><a href="#VirtualenvConfigurationDialog.on_pyvenvButton_toggled">on_pyvenvButton_toggled</a></td> |
|
141 <td>Private slot to react to the selection of 'pyvenv'.</td> |
|
142 </tr> |
|
143 <tr> |
|
144 <td><a href="#VirtualenvConfigurationDialog.on_targetDirectoryPicker_textChanged">on_targetDirectoryPicker_textChanged</a></td> |
|
145 <td>Private slot handling a change of the target directory.</td> |
|
146 </tr> |
|
147 <tr> |
|
148 <td><a href="#VirtualenvConfigurationDialog.on_virtualenvButton_toggled">on_virtualenvButton_toggled</a></td> |
|
149 <td>Private slot to react to the selection of 'virtualenv'.</td> |
|
150 </tr> |
|
151 </table> |
|
152 <h3>Static Methods</h3> |
|
153 |
|
154 <table> |
|
155 <tr><td>None</td></tr> |
|
156 </table> |
|
157 |
|
158 <a NAME="VirtualenvConfigurationDialog.__init__" ID="VirtualenvConfigurationDialog.__init__"></a> |
|
159 <h4>VirtualenvConfigurationDialog (Constructor)</h4> |
|
160 <b>VirtualenvConfigurationDialog</b>(<i>baseDir="", parent=None</i>) |
|
161 |
|
162 <p> |
|
163 Constructor |
|
164 </p> |
|
165 <dl> |
|
166 |
|
167 <dt><i>baseDir</i> (str)</dt> |
|
168 <dd> |
|
169 base directory for the virtual environments |
|
170 </dd> |
|
171 <dt><i>parent</i> (QWidget)</dt> |
|
172 <dd> |
|
173 reference to the parent widget |
|
174 </dd> |
|
175 </dl> |
|
176 <a NAME="VirtualenvConfigurationDialog.__generateArguments" ID="VirtualenvConfigurationDialog.__generateArguments"></a> |
|
177 <h4>VirtualenvConfigurationDialog.__generateArguments</h4> |
|
178 <b>__generateArguments</b>(<i></i>) |
|
179 |
|
180 <p> |
|
181 Private method to generate the process arguments. |
|
182 </p> |
|
183 <dl> |
|
184 <dt>Return:</dt> |
|
185 <dd> |
|
186 process arguments |
|
187 </dd> |
|
188 </dl> |
|
189 <dl> |
|
190 <dt>Return Type:</dt> |
|
191 <dd> |
|
192 list of str |
|
193 </dd> |
|
194 </dl> |
|
195 <a NAME="VirtualenvConfigurationDialog.__generateTargetDir" ID="VirtualenvConfigurationDialog.__generateTargetDir"></a> |
|
196 <h4>VirtualenvConfigurationDialog.__generateTargetDir</h4> |
|
197 <b>__generateTargetDir</b>(<i></i>) |
|
198 |
|
199 <p> |
|
200 Private method to generate a valid target directory path. |
|
201 </p> |
|
202 <dl> |
|
203 <dt>Return:</dt> |
|
204 <dd> |
|
205 target directory path |
|
206 </dd> |
|
207 </dl> |
|
208 <dl> |
|
209 <dt>Return Type:</dt> |
|
210 <dd> |
|
211 str |
|
212 </dd> |
|
213 </dl> |
|
214 <a NAME="VirtualenvConfigurationDialog.__setCondaVersion" ID="VirtualenvConfigurationDialog.__setCondaVersion"></a> |
|
215 <h4>VirtualenvConfigurationDialog.__setCondaVersion</h4> |
|
216 <b>__setCondaVersion</b>(<i></i>) |
|
217 |
|
218 <p> |
|
219 Private method to determine the conda version and set the respective |
|
220 label. |
|
221 </p> |
|
222 <a NAME="VirtualenvConfigurationDialog.__setPyvenvVersion" ID="VirtualenvConfigurationDialog.__setPyvenvVersion"></a> |
|
223 <h4>VirtualenvConfigurationDialog.__setPyvenvVersion</h4> |
|
224 <b>__setPyvenvVersion</b>(<i></i>) |
|
225 |
|
226 <p> |
|
227 Private method to determine the pyvenv version and set the respective |
|
228 label. |
|
229 </p> |
|
230 <a NAME="VirtualenvConfigurationDialog.__setVirtualenvVersion" ID="VirtualenvConfigurationDialog.__setVirtualenvVersion"></a> |
|
231 <h4>VirtualenvConfigurationDialog.__setVirtualenvVersion</h4> |
|
232 <b>__setVirtualenvVersion</b>(<i></i>) |
|
233 |
|
234 <p> |
|
235 Private method to determine the virtualenv version and set the |
|
236 respective label. |
|
237 </p> |
|
238 <a NAME="VirtualenvConfigurationDialog.__updateOK" ID="VirtualenvConfigurationDialog.__updateOK"></a> |
|
239 <h4>VirtualenvConfigurationDialog.__updateOK</h4> |
|
240 <b>__updateOK</b>(<i></i>) |
|
241 |
|
242 <p> |
|
243 Private method to update the enabled status of the OK button. |
|
244 </p> |
|
245 <a NAME="VirtualenvConfigurationDialog.__updateUi" ID="VirtualenvConfigurationDialog.__updateUi"></a> |
|
246 <h4>VirtualenvConfigurationDialog.__updateUi</h4> |
|
247 <b>__updateUi</b>(<i></i>) |
|
248 |
|
249 <p> |
|
250 Private method to update the UI depending on the selected |
|
251 virtual environment creator (virtualenv or pyvenv). |
|
252 </p> |
|
253 <a NAME="VirtualenvConfigurationDialog.getData" ID="VirtualenvConfigurationDialog.getData"></a> |
|
254 <h4>VirtualenvConfigurationDialog.getData</h4> |
|
255 <b>getData</b>(<i></i>) |
|
256 |
|
257 <p> |
|
258 Public method to retrieve the dialog data. |
|
259 </p> |
|
260 <dl> |
|
261 <dt>Return:</dt> |
|
262 <dd> |
|
263 dictionary containing the data for the two environment |
|
264 variants. The keys for both variants are 'arguments' containing the |
|
265 command line arguments, 'logicalName' containing the environment |
|
266 name to be used with the virtual env manager and 'envType' |
|
267 containing the environment type (virtualenv, pyvenv or conda). The |
|
268 virtualenv/pyvenv specific keys are 'openTarget' containg a flag to |
|
269 open the target directory after creation, 'createLog' containing a |
|
270 flag to write a log file, 'createScript' containing a flag to write |
|
271 a script, 'targetDirectory' containing the target directory and |
|
272 'pythonExe' containing the Python interpreter to be used. The |
|
273 conda specific key is 'command' giving the conda command to be |
|
274 executed (always 'create'). |
|
275 </dd> |
|
276 </dl> |
|
277 <dl> |
|
278 <dt>Return Type:</dt> |
|
279 <dd> |
|
280 dict |
|
281 </dd> |
|
282 </dl> |
|
283 <a NAME="VirtualenvConfigurationDialog.on_condaButton_toggled" ID="VirtualenvConfigurationDialog.on_condaButton_toggled"></a> |
|
284 <h4>VirtualenvConfigurationDialog.on_condaButton_toggled</h4> |
|
285 <b>on_condaButton_toggled</b>(<i>checked</i>) |
|
286 |
|
287 <p> |
|
288 Private slot to react to the selection of 'conda'. |
|
289 </p> |
|
290 <dl> |
|
291 |
|
292 <dt><i>checked</i> (bool)</dt> |
|
293 <dd> |
|
294 state of the checkbox |
|
295 </dd> |
|
296 </dl> |
|
297 <a NAME="VirtualenvConfigurationDialog.on_condaCloneButton_clicked" ID="VirtualenvConfigurationDialog.on_condaCloneButton_clicked"></a> |
|
298 <h4>VirtualenvConfigurationDialog.on_condaCloneButton_clicked</h4> |
|
299 <b>on_condaCloneButton_clicked</b>(<i></i>) |
|
300 |
|
301 <p> |
|
302 Private slot handling the selection of the clone button. |
|
303 </p> |
|
304 <a NAME="VirtualenvConfigurationDialog.on_condaCloneDirectoryPicker_textChanged" ID="VirtualenvConfigurationDialog.on_condaCloneDirectoryPicker_textChanged"></a> |
|
305 <h4>VirtualenvConfigurationDialog.on_condaCloneDirectoryPicker_textChanged</h4> |
|
306 <b>on_condaCloneDirectoryPicker_textChanged</b>(<i>txt</i>) |
|
307 |
|
308 <p> |
|
309 Private slot handling a change of the cloned from directory. |
|
310 </p> |
|
311 <dl> |
|
312 |
|
313 <dt><i>txt</i> (str)</dt> |
|
314 <dd> |
|
315 target directory |
|
316 </dd> |
|
317 </dl> |
|
318 <a NAME="VirtualenvConfigurationDialog.on_condaCloneNameEdit_textChanged" ID="VirtualenvConfigurationDialog.on_condaCloneNameEdit_textChanged"></a> |
|
319 <h4>VirtualenvConfigurationDialog.on_condaCloneNameEdit_textChanged</h4> |
|
320 <b>on_condaCloneNameEdit_textChanged</b>(<i>txt</i>) |
|
321 |
|
322 <p> |
|
323 Private slot handling a change of the conda source environment name. |
|
324 </p> |
|
325 <dl> |
|
326 |
|
327 <dt><i>txt</i> (str)</dt> |
|
328 <dd> |
|
329 name of the environment to be cloned |
|
330 </dd> |
|
331 </dl> |
|
332 <a NAME="VirtualenvConfigurationDialog.on_condaNameEdit_textChanged" ID="VirtualenvConfigurationDialog.on_condaNameEdit_textChanged"></a> |
|
333 <h4>VirtualenvConfigurationDialog.on_condaNameEdit_textChanged</h4> |
|
334 <b>on_condaNameEdit_textChanged</b>(<i>txt</i>) |
|
335 |
|
336 <p> |
|
337 Private slot handling a change of the conda environment name. |
|
338 </p> |
|
339 <dl> |
|
340 |
|
341 <dt><i>txt</i> (str)</dt> |
|
342 <dd> |
|
343 environment name |
|
344 </dd> |
|
345 </dl> |
|
346 <a NAME="VirtualenvConfigurationDialog.on_condaRequirementsButton_clicked" ID="VirtualenvConfigurationDialog.on_condaRequirementsButton_clicked"></a> |
|
347 <h4>VirtualenvConfigurationDialog.on_condaRequirementsButton_clicked</h4> |
|
348 <b>on_condaRequirementsButton_clicked</b>(<i></i>) |
|
349 |
|
350 <p> |
|
351 Private slot handling the selection of the requirements button. |
|
352 </p> |
|
353 <a NAME="VirtualenvConfigurationDialog.on_condaRequirementsFilePicker_textChanged" ID="VirtualenvConfigurationDialog.on_condaRequirementsFilePicker_textChanged"></a> |
|
354 <h4>VirtualenvConfigurationDialog.on_condaRequirementsFilePicker_textChanged</h4> |
|
355 <b>on_condaRequirementsFilePicker_textChanged</b>(<i>txt</i>) |
|
356 |
|
357 <p> |
|
358 Private slot handling a change of the requirements file entry. |
|
359 </p> |
|
360 <dl> |
|
361 |
|
362 <dt><i>txt</i> (str)</dt> |
|
363 <dd> |
|
364 current text of the requirements file entry |
|
365 </dd> |
|
366 </dl> |
|
367 <a NAME="VirtualenvConfigurationDialog.on_condaSpecialsGroup_clicked" ID="VirtualenvConfigurationDialog.on_condaSpecialsGroup_clicked"></a> |
|
368 <h4>VirtualenvConfigurationDialog.on_condaSpecialsGroup_clicked</h4> |
|
369 <b>on_condaSpecialsGroup_clicked</b>(<i></i>) |
|
370 |
|
371 <p> |
|
372 Private slot handling the selection of the specials group. |
|
373 </p> |
|
374 <a NAME="VirtualenvConfigurationDialog.on_condaTargetDirectoryPicker_textChanged" ID="VirtualenvConfigurationDialog.on_condaTargetDirectoryPicker_textChanged"></a> |
|
375 <h4>VirtualenvConfigurationDialog.on_condaTargetDirectoryPicker_textChanged</h4> |
|
376 <b>on_condaTargetDirectoryPicker_textChanged</b>(<i>txt</i>) |
|
377 |
|
378 <p> |
|
379 Private slot handling a change of the conda target directory. |
|
380 </p> |
|
381 <dl> |
|
382 |
|
383 <dt><i>txt</i> (str)</dt> |
|
384 <dd> |
|
385 target directory |
|
386 </dd> |
|
387 </dl> |
|
388 <a NAME="VirtualenvConfigurationDialog.on_nameEdit_textChanged" ID="VirtualenvConfigurationDialog.on_nameEdit_textChanged"></a> |
|
389 <h4>VirtualenvConfigurationDialog.on_nameEdit_textChanged</h4> |
|
390 <b>on_nameEdit_textChanged</b>(<i>txt</i>) |
|
391 |
|
392 <p> |
|
393 Private slot handling a change of the virtual environment name. |
|
394 </p> |
|
395 <dl> |
|
396 |
|
397 <dt><i>txt</i> (str)</dt> |
|
398 <dd> |
|
399 name of the virtual environment |
|
400 </dd> |
|
401 </dl> |
|
402 <a NAME="VirtualenvConfigurationDialog.on_pythonExecPicker_textChanged" ID="VirtualenvConfigurationDialog.on_pythonExecPicker_textChanged"></a> |
|
403 <h4>VirtualenvConfigurationDialog.on_pythonExecPicker_textChanged</h4> |
|
404 <b>on_pythonExecPicker_textChanged</b>(<i>txt</i>) |
|
405 |
|
406 <p> |
|
407 Private slot to react to a change of the Python executable. |
|
408 </p> |
|
409 <dl> |
|
410 |
|
411 <dt><i>txt</i> (str)</dt> |
|
412 <dd> |
|
413 contents of the picker's line edit |
|
414 </dd> |
|
415 </dl> |
|
416 <a NAME="VirtualenvConfigurationDialog.on_pyvenvButton_toggled" ID="VirtualenvConfigurationDialog.on_pyvenvButton_toggled"></a> |
|
417 <h4>VirtualenvConfigurationDialog.on_pyvenvButton_toggled</h4> |
|
418 <b>on_pyvenvButton_toggled</b>(<i>checked</i>) |
|
419 |
|
420 <p> |
|
421 Private slot to react to the selection of 'pyvenv'. |
|
422 </p> |
|
423 <dl> |
|
424 |
|
425 <dt><i>checked</i> (bool)</dt> |
|
426 <dd> |
|
427 state of the checkbox |
|
428 </dd> |
|
429 </dl> |
|
430 <a NAME="VirtualenvConfigurationDialog.on_targetDirectoryPicker_textChanged" ID="VirtualenvConfigurationDialog.on_targetDirectoryPicker_textChanged"></a> |
|
431 <h4>VirtualenvConfigurationDialog.on_targetDirectoryPicker_textChanged</h4> |
|
432 <b>on_targetDirectoryPicker_textChanged</b>(<i>txt</i>) |
|
433 |
|
434 <p> |
|
435 Private slot handling a change of the target directory. |
|
436 </p> |
|
437 <dl> |
|
438 |
|
439 <dt><i>txt</i> (str)</dt> |
|
440 <dd> |
|
441 target directory |
|
442 </dd> |
|
443 </dl> |
|
444 <a NAME="VirtualenvConfigurationDialog.on_virtualenvButton_toggled" ID="VirtualenvConfigurationDialog.on_virtualenvButton_toggled"></a> |
|
445 <h4>VirtualenvConfigurationDialog.on_virtualenvButton_toggled</h4> |
|
446 <b>on_virtualenvButton_toggled</b>(<i>checked</i>) |
|
447 |
|
448 <p> |
|
449 Private slot to react to the selection of 'virtualenv'. |
|
450 </p> |
|
451 <dl> |
|
452 |
|
453 <dt><i>checked</i> (bool)</dt> |
|
454 <dd> |
|
455 state of the checkbox |
|
456 </dd> |
|
457 </dl> |
|
458 <div align="right"><a href="#top">Up</a></div> |
|
459 <hr /> |
|
460 </body></html> |