7 Module implementing the Qt configuration page. |
7 Module implementing the Qt 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_QtPage import Ui_QtPage |
16 from .Ui_QtPage import Ui_QtPage |
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 QtPage(ConfigurationPageBase, Ui_QtPage): |
22 class QtPage(ConfigurationPageBase, Ui_QtPage): |
23 """ |
23 """ |
24 Class implementing the Qt configuration page. |
24 Class implementing the Qt 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 for button in ( |
44 for button in ( |
45 self.pyqt5VenvDlgButton, |
45 self.pyqt5VenvDlgButton, |
46 self.pyqt6VenvDlgButton, |
46 self.pyqt6VenvDlgButton, |
47 self.pyside2VenvDlgButton, |
47 self.pyside2VenvDlgButton, |
48 self.pyside6VenvDlgButton, |
48 self.pyside6VenvDlgButton, |
49 ): |
49 ): |
50 button.setIcon(UI.PixmapCache.getIcon("virtualenv")) |
50 button.setIcon(EricPixmapCache.getIcon("virtualenv")) |
51 button.clicked.connect(self.__showVirtualEnvManager) |
51 button.clicked.connect(self.__showVirtualEnvManager) |
52 button.setVisible(self.__standalone) |
52 button.setVisible(self.__standalone) |
53 |
53 |
54 for button in ( |
54 for button in ( |
55 self.pyqt5VenvRefreshButton, |
55 self.pyqt5VenvRefreshButton, |
56 self.pyqt6VenvRefreshButton, |
56 self.pyqt6VenvRefreshButton, |
57 self.pyside2VenvRefreshButton, |
57 self.pyside2VenvRefreshButton, |
58 self.pyside6VenvRefreshButton, |
58 self.pyside6VenvRefreshButton, |
59 ): |
59 ): |
60 button.setIcon(UI.PixmapCache.getIcon("reload")) |
60 button.setIcon(EricPixmapCache.getIcon("reload")) |
61 button.clicked.connect(self.__populateAndSetVenvComboBoxes) |
61 button.clicked.connect(self.__populateAndSetVenvComboBoxes) |
62 button.setVisible(not self.__standalone) |
62 button.setVisible(not self.__standalone) |
63 |
63 |
64 self.qtTransPicker.setMode(EricPathPickerModes.DIRECTORY_MODE) |
64 self.qtTransPicker.setMode(EricPathPickerModes.DIRECTORY_MODE) |
65 for picker in ( |
65 for picker in ( |