src/eric7/QScintilla/ShellWindow.py

branch
eric7
changeset 9413
80c06d472826
parent 9221
bf71ee032bb4
child 9448
ea215f7afab3
diff -r 45e7bb09c120 -r 80c06d472826 src/eric7/QScintilla/ShellWindow.py
--- a/src/eric7/QScintilla/ShellWindow.py	Tue Oct 18 16:05:20 2022 +0200
+++ b/src/eric7/QScintilla/ShellWindow.py	Tue Oct 18 16:06:21 2022 +0200
@@ -14,24 +14,24 @@
 from PyQt6.QtWidgets import QWidget, QVBoxLayout, QApplication, QWhatsThis, QDialog
 from PyQt6.Qsci import QsciScintilla
 
-from EricWidgets.EricMainWindow import EricMainWindow
-from EricGui.EricAction import EricAction, createActionGroup
-from EricWidgets.EricApplication import ericApp
-from EricWidgets.EricZoomWidget import EricZoomWidget
-from EricWidgets import EricMessageBox
+from eric7.EricWidgets.EricMainWindow import EricMainWindow
+from eric7.EricGui.EricAction import EricAction, createActionGroup
+from eric7.EricWidgets.EricApplication import ericApp
+from eric7.EricWidgets.EricZoomWidget import EricZoomWidget
+from eric7.EricWidgets import EricMessageBox
 
-import UI.Config
-import UI.PixmapCache
-import Preferences
+from eric7.EricGui import EricPixmapCache
+from eric7.UI import Config
+from eric7 import Preferences
 
-from Globals import isMacPlatform, getPythonExecutable
+from eric7.Globals import isMacPlatform, getPythonExecutable
 
 from .Shell import Shell
 from .APIsManager import APIsManager
 
-from Debugger.DebugServer import DebugServer
-from UI.SearchWidget import SearchWidget
-from VirtualEnv.VirtualenvManager import VirtualenvManager
+from eric7.Debugger.DebugServer import DebugServer
+from eric7.UI.SearchWidget import SearchWidget
+from eric7.VirtualEnv.VirtualenvManager import VirtualenvManager
 
 from eric7config import getConfig
 
@@ -55,7 +55,7 @@
         super().__init__(parent)
         if name is not None:
             self.setObjectName(name)
-        self.setWindowIcon(UI.PixmapCache.getIcon("shell"))
+        self.setWindowIcon(EricPixmapCache.getIcon("shell"))
         self.setWindowTitle(self.tr("eric Shell"))
 
         self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet"))
@@ -223,7 +223,7 @@
         """
         self.exitAct = EricAction(
             self.tr("Quit"),
-            UI.PixmapCache.getIcon("exit"),
+            EricPixmapCache.getIcon("exit"),
             self.tr("&Quit"),
             QKeySequence(self.tr("Ctrl+Q", "File|Quit")),
             0,
@@ -242,7 +242,7 @@
 
         self.newWindowAct = EricAction(
             self.tr("New Window"),
-            UI.PixmapCache.getIcon("newWindow"),
+            EricPixmapCache.getIcon("newWindow"),
             self.tr("New &Window"),
             QKeySequence(self.tr("Ctrl+Shift+N", "File|New Window")),
             0,
@@ -261,7 +261,7 @@
 
         self.restartAct = EricAction(
             self.tr("Restart"),
-            UI.PixmapCache.getIcon("restart"),
+            EricPixmapCache.getIcon("restart"),
             self.tr("Restart"),
             0,
             0,
@@ -281,7 +281,7 @@
 
         self.clearRestartAct = EricAction(
             self.tr("Restart and Clear"),
-            UI.PixmapCache.getIcon("restartDelete"),
+            EricPixmapCache.getIcon("restartDelete"),
             self.tr("Restart and Clear"),
             Qt.Key.Key_F4,
             0,
@@ -303,7 +303,7 @@
 
         self.saveContentsAct = EricAction(
             self.tr("Save Contents"),
-            UI.PixmapCache.getIcon("fileSave"),
+            EricPixmapCache.getIcon("fileSave"),
             self.tr("Save Contents..."),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+S", "File|Save")
@@ -334,7 +334,7 @@
 
         self.cutAct = EricAction(
             QCoreApplication.translate("ViewManager", "Cut"),
-            UI.PixmapCache.getIcon("editCut"),
+            EricPixmapCache.getIcon("editCut"),
             QCoreApplication.translate("ViewManager", "Cu&t"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+X", "Edit|Cut")
@@ -358,7 +358,7 @@
 
         self.copyAct = EricAction(
             QCoreApplication.translate("ViewManager", "Copy"),
-            UI.PixmapCache.getIcon("editCopy"),
+            EricPixmapCache.getIcon("editCopy"),
             QCoreApplication.translate("ViewManager", "&Copy"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+C", "Edit|Copy")
@@ -382,7 +382,7 @@
 
         self.pasteAct = EricAction(
             QCoreApplication.translate("ViewManager", "Paste"),
-            UI.PixmapCache.getIcon("editPaste"),
+            EricPixmapCache.getIcon("editPaste"),
             QCoreApplication.translate("ViewManager", "&Paste"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+V", "Edit|Paste")
@@ -407,7 +407,7 @@
 
         self.clearAct = EricAction(
             QCoreApplication.translate("ViewManager", "Clear"),
-            UI.PixmapCache.getIcon("editDelete"),
+            EricPixmapCache.getIcon("editDelete"),
             QCoreApplication.translate("ViewManager", "Clear"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Alt+Shift+C", "Edit|Clear")
@@ -928,7 +928,7 @@
 
         self.searchAct = EricAction(
             QCoreApplication.translate("ViewManager", "Search"),
-            UI.PixmapCache.getIcon("find"),
+            EricPixmapCache.getIcon("find"),
             QCoreApplication.translate("ViewManager", "&Search..."),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+F", "Search|Search")
@@ -954,7 +954,7 @@
 
         self.searchNextAct = EricAction(
             QCoreApplication.translate("ViewManager", "Search next"),
-            UI.PixmapCache.getIcon("findNext"),
+            EricPixmapCache.getIcon("findNext"),
             QCoreApplication.translate("ViewManager", "Search &next"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "F3", "Search|Search next")
@@ -982,7 +982,7 @@
 
         self.searchPrevAct = EricAction(
             QCoreApplication.translate("ViewManager", "Search previous"),
-            UI.PixmapCache.getIcon("findPrev"),
+            EricPixmapCache.getIcon("findPrev"),
             QCoreApplication.translate("ViewManager", "Search &previous"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -1021,7 +1021,7 @@
 
         self.zoomInAct = EricAction(
             QCoreApplication.translate("ViewManager", "Zoom in"),
-            UI.PixmapCache.getIcon("zoomIn"),
+            EricPixmapCache.getIcon("zoomIn"),
             QCoreApplication.translate("ViewManager", "Zoom &in"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl++", "View|Zoom in")
@@ -1047,7 +1047,7 @@
 
         self.zoomOutAct = EricAction(
             QCoreApplication.translate("ViewManager", "Zoom out"),
-            UI.PixmapCache.getIcon("zoomOut"),
+            EricPixmapCache.getIcon("zoomOut"),
             QCoreApplication.translate("ViewManager", "Zoom &out"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+-", "View|Zoom out")
@@ -1073,7 +1073,7 @@
 
         self.zoomResetAct = EricAction(
             QCoreApplication.translate("ViewManager", "Zoom reset"),
-            UI.PixmapCache.getIcon("zoomReset"),
+            EricPixmapCache.getIcon("zoomReset"),
             QCoreApplication.translate("ViewManager", "Zoom &reset"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+0", "View|Zoom reset")
@@ -1098,7 +1098,7 @@
 
         self.zoomToAct = EricAction(
             QCoreApplication.translate("ViewManager", "Zoom"),
-            UI.PixmapCache.getIcon("zoomTo"),
+            EricPixmapCache.getIcon("zoomTo"),
             QCoreApplication.translate("ViewManager", "&Zoom"),
             0,
             0,
@@ -1126,7 +1126,7 @@
         """
         self.showHistoryAct = EricAction(
             self.tr("Show History"),
-            UI.PixmapCache.getIcon("history"),
+            EricPixmapCache.getIcon("history"),
             self.tr("&Show History..."),
             0,
             0,
@@ -1138,7 +1138,7 @@
 
         self.clearHistoryAct = EricAction(
             self.tr("Clear History"),
-            UI.PixmapCache.getIcon("historyClear"),
+            EricPixmapCache.getIcon("historyClear"),
             self.tr("&Clear History..."),
             0,
             0,
@@ -1195,7 +1195,7 @@
 
         self.whatsThisAct = EricAction(
             self.tr("What's This?"),
-            UI.PixmapCache.getIcon("whatsThis"),
+            EricPixmapCache.getIcon("whatsThis"),
             self.tr("&What's This?"),
             QKeySequence(self.tr("Shift+F1", "Help|What's This?'")),
             0,
@@ -1316,7 +1316,7 @@
         """
         Private method to handle the zoom action.
         """
-        from QScintilla.ZoomDialog import ZoomDialog
+        from eric7.QScintilla.ZoomDialog import ZoomDialog
 
         dlg = ZoomDialog(self.__shell.getZoom(), self, None, True)
         if dlg.exec() == QDialog.DialogCode.Accepted:
@@ -1456,7 +1456,7 @@
         Private method to create the various toolbars.
         """
         filetb = self.addToolBar(self.tr("File"))
-        filetb.setIconSize(UI.Config.ToolBarIconSize)
+        filetb.setIconSize(Config.ToolBarIconSize)
         filetb.addAction(self.newWindowAct)
         filetb.addSeparator()
         filetb.addAction(self.restartAct)
@@ -1467,33 +1467,33 @@
         filetb.addAction(self.exitAct)
 
         edittb = self.addToolBar(self.tr("Edit"))
-        edittb.setIconSize(UI.Config.ToolBarIconSize)
+        edittb.setIconSize(Config.ToolBarIconSize)
         edittb.addAction(self.cutAct)
         edittb.addAction(self.copyAct)
         edittb.addAction(self.pasteAct)
         edittb.addAction(self.clearAct)
 
         findtb = self.addToolBar(self.tr("Find"))
-        findtb.setIconSize(UI.Config.ToolBarIconSize)
+        findtb.setIconSize(Config.ToolBarIconSize)
         findtb.addAction(self.searchAct)
         findtb.addAction(self.searchNextAct)
         findtb.addAction(self.searchPrevAct)
 
         viewtb = self.addToolBar(self.tr("View"))
-        viewtb.setIconSize(UI.Config.ToolBarIconSize)
+        viewtb.setIconSize(Config.ToolBarIconSize)
         viewtb.addAction(self.zoomInAct)
         viewtb.addAction(self.zoomOutAct)
         viewtb.addAction(self.zoomResetAct)
         viewtb.addAction(self.zoomToAct)
 
         self.__historyToolbar = self.addToolBar(self.tr("History"))
-        self.__historyToolbar.setIconSize(UI.Config.ToolBarIconSize)
+        self.__historyToolbar.setIconSize(Config.ToolBarIconSize)
         self.__historyToolbar.addAction(self.showHistoryAct)
         self.__historyToolbar.addAction(self.clearHistoryAct)
         self.__historyToolbar.setEnabled(self.__shell.isHistoryEnabled())
 
         helptb = self.addToolBar(self.tr("Help"))
-        helptb.setIconSize(UI.Config.ToolBarIconSize)
+        helptb.setIconSize(Config.ToolBarIconSize)
         helptb.addAction(self.whatsThisAct)
 
     ##################################################################
@@ -1508,9 +1508,9 @@
         self.__statusBar.setSizeGripEnabled(True)
 
         self.__sbZoom = EricZoomWidget(
-            UI.PixmapCache.getPixmap("zoomOut"),
-            UI.PixmapCache.getPixmap("zoomIn"),
-            UI.PixmapCache.getPixmap("zoomReset"),
+            EricPixmapCache.getPixmap("zoomOut"),
+            EricPixmapCache.getPixmap("zoomIn"),
+            EricPixmapCache.getPixmap("zoomReset"),
             self.__statusBar,
         )
         self.__statusBar.addPermanentWidget(self.__sbZoom)

eric ide

mercurial