68 self.filePicker.setFilters(self.tr("All Files (*)")) |
68 self.filePicker.setFilters(self.tr("All Files (*)")) |
69 self.filePicker.setDefaultDirectory(os.path.expanduser("~")) |
69 self.filePicker.setDefaultDirectory(os.path.expanduser("~")) |
70 |
70 |
71 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
71 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
72 |
72 |
73 self.venvComboBox.addItem(pip.getDefaultEnvironmentString()) |
|
74 projectVenv = pip.getProjectEnvironmentString() |
|
75 if projectVenv: |
|
76 self.venvComboBox.addItem(projectVenv) |
|
77 self.venvComboBox.addItems(pip.getVirtualenvNames()) |
|
78 |
|
79 self.userCheckBox.setVisible(install) |
73 self.userCheckBox.setVisible(install) |
80 |
74 |
81 msh = self.minimumSizeHint() |
75 msh = self.minimumSizeHint() |
82 self.resize(max(self.width(), msh.width()), msh.height()) |
76 self.resize(max(self.width(), msh.width()), msh.height()) |
83 |
77 |
96 |
90 |
97 def getData(self): |
91 def getData(self): |
98 """ |
92 """ |
99 Public method to get the entered data. |
93 Public method to get the entered data. |
100 |
94 |
101 @return tuple with the environment name, the name of the |
95 @return tuple with the name of the selected file and a flag indicating |
102 selected file and a flag indicating to install to the |
96 to install to the user install directory |
103 user install directory |
97 @rtype tuple of (str, bool) |
104 @rtype tuple of (str, str, bool) |
|
105 """ |
98 """ |
106 return ( |
99 return ( |
107 self.venvComboBox.currentText(), |
|
108 self.filePicker.text(), |
100 self.filePicker.text(), |
109 self.userCheckBox.isChecked() |
101 self.userCheckBox.isChecked() |
110 ) |
102 ) |