eric7/QScintilla/ShellWindow.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
--- a/eric7/QScintilla/ShellWindow.py	Sat May 22 17:01:51 2021 +0200
+++ b/eric7/QScintilla/ShellWindow.py	Sat May 22 18:51:46 2021 +0200
@@ -19,11 +19,11 @@
 )
 from PyQt6.Qsci import QsciScintilla
 
-from E5Gui.E5MainWindow import E5MainWindow
-from E5Gui.E5Action import E5Action, createActionGroup
-from E5Gui.E5Application import e5App
-from E5Gui.E5ZoomWidget import E5ZoomWidget
-from E5Gui import E5MessageBox
+from E5Gui.EricMainWindow import EricMainWindow
+from E5Gui.EricAction import EricAction, createActionGroup
+from E5Gui.EricApplication import ericApp
+from E5Gui.EricZoomWidget import EricZoomWidget
+from E5Gui import EricMessageBox
 
 import UI.Config
 import UI.PixmapCache
@@ -41,7 +41,7 @@
 from eric7config import getConfig
 
 
-class ShellWindow(E5MainWindow):
+class ShellWindow(EricMainWindow):
     """
     Class implementing a stand alone shell window.
     """
@@ -108,7 +108,7 @@
         
         # Generate the virtual environment manager and register it
         self.virtualenvManager = VirtualenvManager(self)
-        e5App().registerObject("VirtualEnvManager", self.virtualenvManager)
+        ericApp().registerObject("VirtualEnvManager", self.virtualenvManager)
         
         self.__shell.virtualEnvironmentChanged.connect(
             self.__virtualEnvironmentChanged)
@@ -177,7 +177,7 @@
         Private function to read a single keyboard shortcut from the settings.
         
         @param act reference to the action object
-        @type E5Action
+        @type EricAction
         @param category category the action belongs to
         @type str
         """
@@ -227,7 +227,7 @@
         Private method defining the user interface actions for the file
         commands.
         """
-        self.exitAct = E5Action(
+        self.exitAct = EricAction(
             self.tr('Quit'),
             UI.PixmapCache.getIcon("exit"),
             self.tr('&Quit'),
@@ -242,7 +242,7 @@
         self.exitAct.setMenuRole(QAction.MenuRole.QuitRole)
         self.fileActions.append(self.exitAct)
 
-        self.newWindowAct = E5Action(
+        self.newWindowAct = EricAction(
             self.tr('New Window'),
             UI.PixmapCache.getIcon("newWindow"),
             self.tr('New &Window'),
@@ -257,7 +257,7 @@
         self.newWindowAct.triggered.connect(self.__newWindow)
         self.fileActions.append(self.newWindowAct)
 
-        self.restartAct = E5Action(
+        self.restartAct = EricAction(
             self.tr('Restart'),
             UI.PixmapCache.getIcon("restart"),
             self.tr('Restart'),
@@ -272,7 +272,7 @@
         self.restartAct.triggered.connect(self.__shell.doRestart)
         self.fileActions.append(self.restartAct)
 
-        self.clearRestartAct = E5Action(
+        self.clearRestartAct = EricAction(
             self.tr('Restart and Clear'),
             UI.PixmapCache.getIcon("restartDelete"),
             self.tr('Restart and Clear'),
@@ -295,7 +295,7 @@
         self.editActGrp = createActionGroup(self)
         self.copyActGrp = createActionGroup(self.editActGrp)
         
-        self.cutAct = E5Action(
+        self.cutAct = EricAction(
             QCoreApplication.translate('ViewManager', 'Cut'),
             UI.PixmapCache.getIcon("editCut"),
             QCoreApplication.translate('ViewManager', 'Cu&t'),
@@ -313,7 +313,7 @@
         self.cutAct.triggered.connect(self.__shell.cut)
         self.editActions.append(self.cutAct)
         
-        self.copyAct = E5Action(
+        self.copyAct = EricAction(
             QCoreApplication.translate('ViewManager', 'Copy'),
             UI.PixmapCache.getIcon("editCopy"),
             QCoreApplication.translate('ViewManager', '&Copy'),
@@ -331,7 +331,7 @@
         self.copyAct.triggered.connect(self.__shell.copy)
         self.editActions.append(self.copyAct)
         
-        self.pasteAct = E5Action(
+        self.pasteAct = EricAction(
             QCoreApplication.translate('ViewManager', 'Paste'),
             UI.PixmapCache.getIcon("editPaste"),
             QCoreApplication.translate('ViewManager', '&Paste'),
@@ -349,7 +349,7 @@
         self.pasteAct.triggered.connect(self.__shell.paste)
         self.editActions.append(self.pasteAct)
         
-        self.clearAct = E5Action(
+        self.clearAct = EricAction(
             QCoreApplication.translate('ViewManager', 'Clear'),
             UI.PixmapCache.getIcon("editDelete"),
             QCoreApplication.translate('ViewManager', 'Clear'),
@@ -384,7 +384,7 @@
         
         self.editorActGrp = createActionGroup(self)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Delete current line'),
             QCoreApplication.translate('ViewManager', 'Delete current line'),
             QKeySequence(QCoreApplication.translate(
@@ -395,7 +395,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Indent one level'),
             QCoreApplication.translate('ViewManager', 'Indent one level'),
             QKeySequence(QCoreApplication.translate('ViewManager', 'Tab')), 0,
@@ -404,7 +404,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Insert new line'),
             QCoreApplication.translate('ViewManager', 'Insert new line'),
             QKeySequence(QCoreApplication.translate('ViewManager', 'Return')),
@@ -414,7 +414,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager',
                                        'Delete previous character'),
             QCoreApplication.translate('ViewManager',
@@ -432,7 +432,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager',
                                        'Delete current character'),
             QCoreApplication.translate('ViewManager',
@@ -446,7 +446,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Delete word to left'),
             QCoreApplication.translate('ViewManager', 'Delete word to left'),
             QKeySequence(QCoreApplication.translate(
@@ -457,7 +457,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Delete word to right'),
             QCoreApplication.translate('ViewManager', 'Delete word to right'),
             QKeySequence(QCoreApplication.translate('ViewManager',
@@ -467,7 +467,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Delete line to left'),
             QCoreApplication.translate('ViewManager', 'Delete line to left'),
             QKeySequence(QCoreApplication.translate(
@@ -478,7 +478,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Delete line to right'),
             QCoreApplication.translate('ViewManager', 'Delete line to right'),
             0, 0,
@@ -493,7 +493,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager',
                                        'Move left one character'),
             QCoreApplication.translate('ViewManager',
@@ -507,7 +507,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager',
                                        'Move right one character'),
             QCoreApplication.translate('ViewManager',
@@ -521,7 +521,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Move left one word'),
             QCoreApplication.translate('ViewManager', 'Move left one word'),
             0, 0,
@@ -536,7 +536,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Move right one word'),
             QCoreApplication.translate('ViewManager', 'Move right one word'),
             0, 0,
@@ -548,7 +548,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate(
                 'ViewManager',
                 'Move to first visible character in document line'),
@@ -564,7 +564,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate(
                 'ViewManager', 'Move to end of document line'),
             QCoreApplication.translate(
@@ -581,7 +581,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Move up one line'),
             QCoreApplication.translate('ViewManager', 'Move up one line'),
             QKeySequence(QCoreApplication.translate('ViewManager', 'Up')), 0,
@@ -593,7 +593,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Move down one line'),
             QCoreApplication.translate('ViewManager', 'Move down one line'),
             QKeySequence(QCoreApplication.translate('ViewManager', 'Down')), 0,
@@ -605,7 +605,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             self.tr('Move forward one history entry'),
             self.tr('Move forward one history entry'),
             QKeySequence(QCoreApplication.translate('ViewManager',
@@ -615,7 +615,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             self.tr('Move back one history entry'),
             self.tr('Move back one history entry'),
             QKeySequence(QCoreApplication.translate('ViewManager', 'Ctrl+Up')),
@@ -624,7 +624,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Move up one page'),
             QCoreApplication.translate('ViewManager', 'Move up one page'),
             QKeySequence(QCoreApplication.translate('ViewManager', 'PgUp')), 0,
@@ -633,7 +633,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Move down one page'),
             QCoreApplication.translate('ViewManager', 'Move down one page'),
             QKeySequence(QCoreApplication.translate('ViewManager', 'PgDown')),
@@ -645,7 +645,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate('ViewManager', 'Escape'),
             QCoreApplication.translate('ViewManager', 'Escape'),
             QKeySequence(QCoreApplication.translate('ViewManager', 'Esc')), 0,
@@ -654,7 +654,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate(
                 'ViewManager', 'Extend selection left one character'),
             QCoreApplication.translate(
@@ -669,7 +669,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate(
                 'ViewManager', 'Extend selection right one character'),
             QCoreApplication.translate(
@@ -684,7 +684,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate(
                 'ViewManager', 'Extend selection left one word'),
             QCoreApplication.translate(
@@ -701,7 +701,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate(
                 'ViewManager', 'Extend selection right one word'),
             QCoreApplication.translate(
@@ -718,7 +718,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate(
                 'ViewManager',
                 'Extend selection to first visible character in document'
@@ -736,7 +736,7 @@
         act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
-        act = E5Action(
+        act = EricAction(
             QCoreApplication.translate(
                 'ViewManager', 'Extend selection to end of document line'),
             QCoreApplication.translate(
@@ -760,7 +760,7 @@
         """
         self.searchActGrp = createActionGroup(self)
         
-        self.searchAct = E5Action(
+        self.searchAct = EricAction(
             QCoreApplication.translate('ViewManager', 'Search'),
             UI.PixmapCache.getIcon("find"),
             QCoreApplication.translate('ViewManager', '&Search...'),
@@ -780,7 +780,7 @@
         self.searchAct.triggered.connect(self.__showFind)
         self.searchActions.append(self.searchAct)
         
-        self.searchNextAct = E5Action(
+        self.searchNextAct = EricAction(
             QCoreApplication.translate(
                 'ViewManager', 'Search next'),
             UI.PixmapCache.getIcon("findNext"),
@@ -802,7 +802,7 @@
             self.__searchWidget.on_findNextButton_clicked)
         self.searchActions.append(self.searchNextAct)
         
-        self.searchPrevAct = E5Action(
+        self.searchPrevAct = EricAction(
             QCoreApplication.translate('ViewManager', 'Search previous'),
             UI.PixmapCache.getIcon("findPrev"),
             QCoreApplication.translate('ViewManager', 'Search &previous'),
@@ -830,7 +830,7 @@
         """
         self.viewActGrp = createActionGroup(self)
         
-        self.zoomInAct = E5Action(
+        self.zoomInAct = EricAction(
             QCoreApplication.translate('ViewManager', 'Zoom in'),
             UI.PixmapCache.getIcon("zoomIn"),
             QCoreApplication.translate('ViewManager', 'Zoom &in'),
@@ -849,7 +849,7 @@
         self.zoomInAct.triggered.connect(self.__zoomIn)
         self.viewActions.append(self.zoomInAct)
         
-        self.zoomOutAct = E5Action(
+        self.zoomOutAct = EricAction(
             QCoreApplication.translate('ViewManager', 'Zoom out'),
             UI.PixmapCache.getIcon("zoomOut"),
             QCoreApplication.translate('ViewManager', 'Zoom &out'),
@@ -868,7 +868,7 @@
         self.zoomOutAct.triggered.connect(self.__zoomOut)
         self.viewActions.append(self.zoomOutAct)
         
-        self.zoomResetAct = E5Action(
+        self.zoomResetAct = EricAction(
             QCoreApplication.translate('ViewManager', 'Zoom reset'),
             UI.PixmapCache.getIcon("zoomReset"),
             QCoreApplication.translate('ViewManager', 'Zoom &reset'),
@@ -887,7 +887,7 @@
         self.zoomResetAct.triggered.connect(self.__zoomReset)
         self.viewActions.append(self.zoomResetAct)
         
-        self.zoomToAct = E5Action(
+        self.zoomToAct = EricAction(
             QCoreApplication.translate('ViewManager', 'Zoom'),
             UI.PixmapCache.getIcon("zoomTo"),
             QCoreApplication.translate('ViewManager', '&Zoom'),
@@ -911,7 +911,7 @@
         Private method defining the user interface actions for the history
         commands.
         """
-        self.showHistoryAct = E5Action(
+        self.showHistoryAct = EricAction(
             self.tr('Show History'),
             UI.PixmapCache.getIcon("history"),
             self.tr('&Show History...'),
@@ -921,7 +921,7 @@
             "Show the shell history in a dialog"))
         self.showHistoryAct.triggered.connect(self.__shell.showHistory)
         
-        self.clearHistoryAct = E5Action(
+        self.clearHistoryAct = EricAction(
             self.tr('Clear History'),
             UI.PixmapCache.getIcon("historyClear"),
             self.tr('&Clear History...'),
@@ -931,7 +931,7 @@
             "Clear the shell history"))
         self.clearHistoryAct.triggered.connect(self.__shell.clearHistory)
         
-        self.selectHistoryAct = E5Action(
+        self.selectHistoryAct = EricAction(
             self.tr('Select History Entry'),
             self.tr('Select History &Entry'),
             0, 0,
@@ -944,7 +944,7 @@
         """
         Private method to create the Help actions.
         """
-        self.aboutAct = E5Action(
+        self.aboutAct = EricAction(
             self.tr('About'),
             self.tr('&About'),
             0, 0, self, 'about_eric')
@@ -956,7 +956,7 @@
         self.aboutAct.triggered.connect(self.__about)
         self.helpActions.append(self.aboutAct)
         
-        self.aboutQtAct = E5Action(
+        self.aboutQtAct = EricAction(
             self.tr('About Qt'),
             self.tr('About &Qt'),
             0, 0, self, 'about_qt')
@@ -969,7 +969,7 @@
         self.aboutQtAct.triggered.connect(self.__aboutQt)
         self.helpActions.append(self.aboutQtAct)
         
-        self.whatsThisAct = E5Action(
+        self.whatsThisAct = EricAction(
             self.tr('What\'s This?'),
             UI.PixmapCache.getIcon("whatsThis"),
             self.tr('&What\'s This?'),
@@ -1035,7 +1035,7 @@
         """
         Public method to quit the application.
         """
-        e5App().closeAllWindows()
+        ericApp().closeAllWindows()
     
     def __newWindow(self):
         """
@@ -1120,7 +1120,7 @@
         """
         Private slot to show a little About message.
         """
-        E5MessageBox.about(
+        EricMessageBox.about(
             self,
             self.tr("About eric Shell Window"),
             self.tr(
@@ -1132,7 +1132,7 @@
         """
         Private slot to handle the About Qt dialog.
         """
-        E5MessageBox.aboutQt(self, "eric Shell Window")
+        EricMessageBox.aboutQt(self, "eric Shell Window")
     
     def __whatsThis(self):
         """
@@ -1271,7 +1271,7 @@
         self.__statusBar = self.statusBar()
         self.__statusBar.setSizeGripEnabled(True)
 
-        self.__sbZoom = E5ZoomWidget(
+        self.__sbZoom = EricZoomWidget(
             UI.PixmapCache.getPixmap("zoomOut"),
             UI.PixmapCache.getPixmap("zoomIn"),
             UI.PixmapCache.getPixmap("zoomReset"),

eric ide

mercurial