32 QLabel, |
32 QLabel, |
33 QAbstractScrollArea, |
33 QAbstractScrollArea, |
34 QLineEdit, |
34 QLineEdit, |
35 ) |
35 ) |
36 |
36 |
37 from EricWidgets.EricApplication import ericApp |
37 from eric7.EricWidgets.EricApplication import ericApp |
38 from EricWidgets import EricMessageBox |
38 from eric7.EricWidgets import EricMessageBox |
39 from EricWidgets.EricMainWindow import EricMainWindow |
39 from eric7.EricWidgets.EricMainWindow import EricMainWindow |
40 |
40 |
41 from Globals import isMacPlatform, getWebBrowserSupport |
41 from eric7.Globals import isMacPlatform, getWebBrowserSupport |
42 |
42 |
43 import Preferences |
43 from eric7 import Preferences |
44 |
44 |
45 import UI.PixmapCache |
45 from eric7.EricGui import EricPixmapCache |
46 |
46 |
47 from eric7config import getConfig |
47 from eric7config import getConfig |
48 |
48 |
49 |
49 |
50 class ConfigurationPageItem(QTreeWidgetItem): |
50 class ConfigurationPageItem(QTreeWidgetItem): |
61 @param text text to be displayed (string) |
61 @param text text to be displayed (string) |
62 @param pageName name of the configuration page (string) |
62 @param pageName name of the configuration page (string) |
63 @param iconFile file name of the icon to be shown (string) |
63 @param iconFile file name of the icon to be shown (string) |
64 """ |
64 """ |
65 super().__init__(parent, [text]) |
65 super().__init__(parent, [text]) |
66 self.setIcon(0, UI.PixmapCache.getIcon(iconFile)) |
66 self.setIcon(0, EricPixmapCache.getIcon(iconFile)) |
67 |
67 |
68 self.__pageName = pageName |
68 self.__pageName = pageName |
69 |
69 |
70 def getPageName(self): |
70 def getPageName(self): |
71 """ |
71 """ |
134 self.__setupUi() |
134 self.__setupUi() |
135 |
135 |
136 self.itmDict = {} |
136 self.itmDict = {} |
137 |
137 |
138 if not fromEric: |
138 if not fromEric: |
139 from PluginManager.PluginManager import PluginManager |
139 from eric7.PluginManager.PluginManager import PluginManager |
140 |
140 |
141 try: |
141 try: |
142 self.pluginManager = ericApp().getObject("PluginManager") |
142 self.pluginManager = ericApp().getObject("PluginManager") |
143 except KeyError: |
143 except KeyError: |
144 self.pluginManager = PluginManager(self) |
144 self.pluginManager = PluginManager(self) |
145 ericApp().registerObject("PluginManager", self.pluginManager) |
145 ericApp().registerObject("PluginManager", self.pluginManager) |
146 |
146 |
147 from VirtualEnv.VirtualenvManager import VirtualenvManager |
147 from eric7.VirtualEnv.VirtualenvManager import VirtualenvManager |
148 |
148 |
149 try: |
149 try: |
150 self.virtualenvManager = ericApp().getObject("VirtualEnvManager") |
150 self.virtualenvManager = ericApp().getObject("VirtualEnvManager") |
151 except KeyError: |
151 except KeyError: |
152 self.virtualenvManager = VirtualenvManager(self) |
152 self.virtualenvManager = VirtualenvManager(self) |
1099 |
1099 |
1100 def __initLexers(self): |
1100 def __initLexers(self): |
1101 """ |
1101 """ |
1102 Private method to initialize the dictionary of preferences lexers. |
1102 Private method to initialize the dictionary of preferences lexers. |
1103 """ |
1103 """ |
1104 import QScintilla.Lexers |
1104 from eric7.QScintilla import Lexers |
1105 from .PreferencesLexer import PreferencesLexer, PreferencesLexerLanguageError |
1105 from .PreferencesLexer import PreferencesLexer, PreferencesLexerLanguageError |
1106 |
1106 |
1107 self.lexers = {} |
1107 self.lexers = {} |
1108 for language in QScintilla.Lexers.getSupportedLanguages(): |
1108 for language in Lexers.getSupportedLanguages(): |
1109 if language not in self.lexers: |
1109 if language not in self.lexers: |
1110 with contextlib.suppress(PreferencesLexerLanguageError): |
1110 with contextlib.suppress(PreferencesLexerLanguageError): |
1111 self.lexers[language] = PreferencesLexer(language, self) |
1111 self.lexers[language] = PreferencesLexer(language, self) |
1112 |
1112 |
1113 def __importConfigurationPage(self, name): |
1113 def __importConfigurationPage(self, name): |