7 Module implementing the Debugger Python3 configuration page. |
7 Module implementing the Debugger Python3 configuration page. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtCore import pyqtSlot |
10 from PyQt6.QtCore import pyqtSlot |
11 |
11 |
12 from EricWidgets.EricApplication import ericApp |
12 from eric7.EricWidgets.EricApplication import ericApp |
13 from EricWidgets.EricPathPicker import EricPathPickerModes |
13 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes |
14 |
14 |
15 from .ConfigurationPageBase import ConfigurationPageBase |
15 from .ConfigurationPageBase import ConfigurationPageBase |
16 from .Ui_DebuggerPython3Page import Ui_DebuggerPython3Page |
16 from .Ui_DebuggerPython3Page import Ui_DebuggerPython3Page |
17 |
17 |
18 import Preferences |
18 from eric7 import Preferences |
19 import UI.PixmapCache |
19 from eric7.EricGui import EricPixmapCache |
20 |
20 |
21 |
21 |
22 class DebuggerPython3Page(ConfigurationPageBase, Ui_DebuggerPython3Page): |
22 class DebuggerPython3Page(ConfigurationPageBase, Ui_DebuggerPython3Page): |
23 """ |
23 """ |
24 Class implementing the Debugger Python3 configuration page. |
24 Class implementing the Debugger Python3 configuration page. |
34 |
34 |
35 try: |
35 try: |
36 self.__virtualenvManager = ericApp().getObject("VirtualEnvManager") |
36 self.__virtualenvManager = ericApp().getObject("VirtualEnvManager") |
37 self.__standalone = False |
37 self.__standalone = False |
38 except KeyError: |
38 except KeyError: |
39 from VirtualEnv.VirtualenvManager import VirtualenvManager |
39 from eric7.VirtualEnv.VirtualenvManager import VirtualenvManager |
40 |
40 |
41 self.__virtualenvManager = VirtualenvManager() |
41 self.__virtualenvManager = VirtualenvManager() |
42 self.__standalone = True |
42 self.__standalone = True |
43 |
43 |
44 self.venvDlgButton.setVisible(self.__standalone) |
44 self.venvDlgButton.setVisible(self.__standalone) |
45 self.venvDlgButton.setIcon(UI.PixmapCache.getIcon("virtualenv")) |
45 self.venvDlgButton.setIcon(EricPixmapCache.getIcon("virtualenv")) |
46 |
46 |
47 self.venvRefreshButton.setVisible(not self.__standalone) |
47 self.venvRefreshButton.setVisible(not self.__standalone) |
48 self.venvRefreshButton.setIcon(UI.PixmapCache.getIcon("reload")) |
48 self.venvRefreshButton.setIcon(EricPixmapCache.getIcon("reload")) |
49 |
49 |
50 self.debugClientPicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) |
50 self.debugClientPicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) |
51 self.debugClientPicker.setToolTip( |
51 self.debugClientPicker.setToolTip( |
52 self.tr("Press to select the Debug Client via a file selection dialog") |
52 self.tr("Press to select the Debug Client via a file selection dialog") |
53 ) |
53 ) |