99 .getVirtualenvNames())) |
99 .getVirtualenvNames())) |
100 |
100 |
101 self.ui.workdirPicker.setMode(E5PathPickerModes.DirectoryMode) |
101 self.ui.workdirPicker.setMode(E5PathPickerModes.DirectoryMode) |
102 self.ui.workdirPicker.setDefaultDirectory( |
102 self.ui.workdirPicker.setDefaultDirectory( |
103 Preferences.getMultiProject("Workspace")) |
103 Preferences.getMultiProject("Workspace")) |
104 self.ui.workdirPicker.setInsertPolicy(QComboBox.InsertAtTop) |
104 self.ui.workdirPicker.setInsertPolicy( |
|
105 QComboBox.InsertPolicy.InsertAtTop) |
105 self.ui.workdirPicker.setSizeAdjustPolicy( |
106 self.ui.workdirPicker.setSizeAdjustPolicy( |
106 QComboBox.AdjustToMinimumContentsLength) |
107 QComboBox.SizeAdjustPolicy.AdjustToContents) |
107 |
108 |
108 self.clearButton = self.ui.buttonBox.addButton( |
109 self.clearButton = self.ui.buttonBox.addButton( |
109 self.tr("Clear Histories"), QDialogButtonBox.ActionRole) |
110 self.tr("Clear Histories"), QDialogButtonBox.ButtonRole.ActionRole) |
110 self.editButton = self.ui.buttonBox.addButton( |
111 self.editButton = self.ui.buttonBox.addButton( |
111 self.tr("Edit History"), QDialogButtonBox.ActionRole) |
112 self.tr("Edit History"), QDialogButtonBox.ButtonRole.ActionRole) |
112 |
113 |
113 self.setWindowTitle(caption) |
114 self.setWindowTitle(caption) |
114 self.ui.cmdlineCombo.clear() |
115 self.ui.cmdlineCombo.clear() |
115 self.ui.cmdlineCombo.addItems(argvList) |
116 self.ui.cmdlineCombo.addItems(argvList) |
116 if len(argvList) > 0: |
117 if len(argvList) > 0: |
159 |
160 |
160 def on_modFuncCombo_editTextChanged(self): |
161 def on_modFuncCombo_editTextChanged(self): |
161 """ |
162 """ |
162 Private slot to enable/disable the OK button. |
163 Private slot to enable/disable the OK button. |
163 """ |
164 """ |
164 self.ui.buttonBox.button(QDialogButtonBox.Ok).setDisabled( |
165 self.ui.buttonBox.button( |
165 self.ui.modFuncCombo.currentText() == "") |
166 QDialogButtonBox.StandardButton.Ok).setDisabled( |
|
167 self.ui.modFuncCombo.currentText() == "") |
166 |
168 |
167 def getData(self): |
169 def getData(self): |
168 """ |
170 """ |
169 Public method to retrieve the data entered into this dialog. |
171 Public method to retrieve the data entered into this dialog. |
170 |
172 |
294 history.append(combo.itemText(index)) |
296 history.append(combo.itemText(index)) |
295 |
297 |
296 if history: |
298 if history: |
297 from .StartHistoryEditDialog import StartHistoryEditDialog |
299 from .StartHistoryEditDialog import StartHistoryEditDialog |
298 dlg = StartHistoryEditDialog(history, self) |
300 dlg = StartHistoryEditDialog(history, self) |
299 if dlg.exec() == QDialog.Accepted: |
301 if dlg.exec() == QDialog.DialogCode.Accepted: |
300 history = dlg.getHistory() |
302 history = dlg.getHistory() |
301 combo = combos[historiesIndex] |
303 combo = combos[historiesIndex] |
302 if combo: |
304 if combo: |
303 combo.clear() |
305 combo.clear() |
304 combo.addItems(history) |
306 combo.addItems(history) |