10 import os |
10 import os |
11 |
11 |
12 from PyQt6.QtCore import pyqtSlot |
12 from PyQt6.QtCore import pyqtSlot |
13 from PyQt6.QtWidgets import QDialog, QComboBox |
13 from PyQt6.QtWidgets import QDialog, QComboBox |
14 |
14 |
15 from E5Gui.E5Completers import E5DirCompleter |
15 from E5Gui.EricCompleters import EricDirCompleter |
16 from E5Gui.E5PathPicker import E5PathPickerModes |
16 from E5Gui.EricPathPicker import EricPathPickerModes |
17 from E5Gui.E5Application import e5App |
17 from E5Gui.EricApplication import ericApp |
18 |
18 |
19 from .Ui_DebuggerPropertiesDialog import Ui_DebuggerPropertiesDialog |
19 from .Ui_DebuggerPropertiesDialog import Ui_DebuggerPropertiesDialog |
20 |
20 |
21 |
21 |
22 from eric7config import getConfig |
22 from eric7config import getConfig |
43 self.setObjectName(name) |
43 self.setObjectName(name) |
44 self.setupUi(self) |
44 self.setupUi(self) |
45 |
45 |
46 debugClientsHistory = Preferences.getProject( |
46 debugClientsHistory = Preferences.getProject( |
47 "DebugClientsHistory") |
47 "DebugClientsHistory") |
48 self.debugClientPicker.setMode(E5PathPickerModes.OPEN_FILE_MODE) |
48 self.debugClientPicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) |
49 self.debugClientPicker.setInsertPolicy( |
49 self.debugClientPicker.setInsertPolicy( |
50 QComboBox.InsertPolicy.InsertAtTop) |
50 QComboBox.InsertPolicy.InsertAtTop) |
51 self.debugClientPicker.setSizeAdjustPolicy( |
51 self.debugClientPicker.setSizeAdjustPolicy( |
52 QComboBox.SizeAdjustPolicy.AdjustToMinimumContentsLengthWithIcon) |
52 QComboBox.SizeAdjustPolicy.AdjustToMinimumContentsLengthWithIcon) |
53 self.debugClientPicker.setPathsList(debugClientsHistory) |
53 self.debugClientPicker.setPathsList(debugClientsHistory) |
54 self.debugClientClearHistoryButton.setIcon( |
54 self.debugClientClearHistoryButton.setIcon( |
55 UI.PixmapCache.getIcon("editDelete")) |
55 UI.PixmapCache.getIcon("editDelete")) |
56 |
56 |
57 venvManager = e5App().getObject("VirtualEnvManager") |
57 venvManager = ericApp().getObject("VirtualEnvManager") |
58 |
58 |
59 self.venvComboBox.addItem("") |
59 self.venvComboBox.addItem("") |
60 self.venvComboBox.addItems(sorted(venvManager.getVirtualenvNames())) |
60 self.venvComboBox.addItems(sorted(venvManager.getVirtualenvNames())) |
61 |
61 |
62 self.translationLocalCompleter = E5DirCompleter( |
62 self.translationLocalCompleter = EricDirCompleter( |
63 self.translationLocalEdit) |
63 self.translationLocalEdit) |
64 |
64 |
65 self.project = project |
65 self.project = project |
66 |
66 |
67 if self.project.debugProperties["VIRTUALENV"]: |
67 if self.project.debugProperties["VIRTUALENV"]: |
212 def __clearHistory(self, picker): |
212 def __clearHistory(self, picker): |
213 """ |
213 """ |
214 Private method to clear a path picker history. |
214 Private method to clear a path picker history. |
215 |
215 |
216 @param picker reference to the path picker |
216 @param picker reference to the path picker |
217 @type E5ComboPathPicker |
217 @type EricComboPathPicker |
218 """ |
218 """ |
219 currentText = picker.text() |
219 currentText = picker.text() |
220 picker.clear() |
220 picker.clear() |
221 picker.setText(currentText) |
221 picker.setText(currentText) |
222 |
222 |