src/eric7/ViewManager/ViewManager.py

branch
eric7
changeset 9413
80c06d472826
parent 9221
bf71ee032bb4
child 9473
3f23dbf37dbe
diff -r 45e7bb09c120 -r 80c06d472826 src/eric7/ViewManager/ViewManager.py
--- a/src/eric7/ViewManager/ViewManager.py	Tue Oct 18 16:05:20 2022 +0200
+++ b/src/eric7/ViewManager/ViewManager.py	Tue Oct 18 16:06:21 2022 +0200
@@ -25,21 +25,19 @@
 from PyQt6.QtWidgets import QToolBar, QDialog, QApplication, QMenu, QWidget
 from PyQt6.Qsci import QsciScintilla
 
-from EricWidgets.EricApplication import ericApp
-from EricWidgets import EricFileDialog, EricMessageBox
-
-from Globals import recentNameFiles, isMacPlatform
-
-import Preferences
-
-from QScintilla.Editor import Editor
-
-import Utilities
-
-import UI.PixmapCache
-import UI.Config
-
-from EricGui.EricAction import EricAction, createActionGroup
+from eric7.EricWidgets.EricApplication import ericApp
+from eric7.EricWidgets import EricFileDialog, EricMessageBox
+
+from eric7.Globals import recentNameFiles, isMacPlatform
+
+from eric7 import Preferences, Utilities
+
+from eric7.QScintilla.Editor import Editor
+
+from eric7.EricGui import EricPixmapCache
+from eric7.UI import Config
+
+from eric7.EricGui.EricAction import EricAction, createActionGroup
 
 
 class ViewManager(QWidget):
@@ -142,7 +140,7 @@
         self.autosaveTimer.timeout.connect(self.__autosave)
 
         # initialize the APIs manager
-        from QScintilla.APIsManager import APIsManager
+        from eric7.QScintilla.APIsManager import APIsManager
 
         self.apisManager = APIsManager(parent=self)
 
@@ -157,7 +155,7 @@
         @param ui reference to the main user interface
         @param dbs reference to the debug server object
         """
-        from QScintilla.SearchReplaceWidget import SearchReplaceSlidingWidget
+        from eric7.QScintilla.SearchReplaceWidget import SearchReplaceSlidingWidget
 
         self.ui = ui
         self.dbs = dbs
@@ -589,7 +587,7 @@
         """
         self.newAct = EricAction(
             QCoreApplication.translate("ViewManager", "New"),
-            UI.PixmapCache.getIcon("new"),
+            EricPixmapCache.getIcon("new"),
             QCoreApplication.translate("ViewManager", "&New"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+N", "File|New")
@@ -612,7 +610,7 @@
 
         self.openAct = EricAction(
             QCoreApplication.translate("ViewManager", "Open"),
-            UI.PixmapCache.getIcon("open"),
+            EricPixmapCache.getIcon("open"),
             QCoreApplication.translate("ViewManager", "&Open..."),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+O", "File|Open")
@@ -639,7 +637,7 @@
 
         self.closeAct = EricAction(
             QCoreApplication.translate("ViewManager", "Close"),
-            UI.PixmapCache.getIcon("closeEditor"),
+            EricPixmapCache.getIcon("closeEditor"),
             QCoreApplication.translate("ViewManager", "&Close"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+W", "File|Close")
@@ -686,7 +684,7 @@
 
         self.saveAct = EricAction(
             QCoreApplication.translate("ViewManager", "Save"),
-            UI.PixmapCache.getIcon("fileSave"),
+            EricPixmapCache.getIcon("fileSave"),
             QCoreApplication.translate("ViewManager", "&Save"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+S", "File|Save")
@@ -710,7 +708,7 @@
 
         self.saveAsAct = EricAction(
             QCoreApplication.translate("ViewManager", "Save as"),
-            UI.PixmapCache.getIcon("fileSaveAs"),
+            EricPixmapCache.getIcon("fileSaveAs"),
             QCoreApplication.translate("ViewManager", "Save &as..."),
             QKeySequence(
                 QCoreApplication.translate(
@@ -739,7 +737,7 @@
 
         self.saveCopyAct = EricAction(
             QCoreApplication.translate("ViewManager", "Save Copy"),
-            UI.PixmapCache.getIcon("fileSaveCopy"),
+            EricPixmapCache.getIcon("fileSaveCopy"),
             QCoreApplication.translate("ViewManager", "Save &Copy..."),
             0,
             0,
@@ -762,7 +760,7 @@
 
         self.saveAllAct = EricAction(
             QCoreApplication.translate("ViewManager", "Save all"),
-            UI.PixmapCache.getIcon("fileSaveAll"),
+            EricPixmapCache.getIcon("fileSaveAll"),
             QCoreApplication.translate("ViewManager", "Save a&ll"),
             0,
             0,
@@ -786,7 +784,7 @@
 
         self.printAct = EricAction(
             QCoreApplication.translate("ViewManager", "Print"),
-            UI.PixmapCache.getIcon("print"),
+            EricPixmapCache.getIcon("print"),
             QCoreApplication.translate("ViewManager", "&Print"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+P", "File|Print")
@@ -811,7 +809,7 @@
 
         self.printPreviewAct = EricAction(
             QCoreApplication.translate("ViewManager", "Print Preview"),
-            UI.PixmapCache.getIcon("printPreview"),
+            EricPixmapCache.getIcon("printPreview"),
             QCoreApplication.translate("ViewManager", "Print Preview"),
             0,
             0,
@@ -836,7 +834,7 @@
 
         self.findLocationAct = EricAction(
             QCoreApplication.translate("ViewManager", "Find File"),
-            UI.PixmapCache.getIcon("findLocation"),
+            EricPixmapCache.getIcon("findLocation"),
             QCoreApplication.translate("ViewManager", "Find &File..."),
             QKeySequence(
                 QCoreApplication.translate(
@@ -916,7 +914,7 @@
         @return the generated toolbar
         """
         tb = QToolBar(QCoreApplication.translate("ViewManager", "File"), self.ui)
-        tb.setIconSize(UI.Config.ToolBarIconSize)
+        tb.setIconSize(Config.ToolBarIconSize)
         tb.setObjectName("FileToolbar")
         tb.setToolTip(QCoreApplication.translate("ViewManager", "File"))
 
@@ -943,9 +941,9 @@
         """
         menu = QMenu(QCoreApplication.translate("ViewManager", "Export as"))
 
-        import QScintilla.Exporters
-
-        supportedExporters = QScintilla.Exporters.getSupportedFormats()
+        from eric7.QScintilla import Exporters
+
+        supportedExporters = Exporters.getSupportedFormats()
         exporters = sorted(supportedExporters.keys())
         for exporter in exporters:
             act = menu.addAction(supportedExporters[exporter])
@@ -968,7 +966,7 @@
 
         self.undoAct = EricAction(
             QCoreApplication.translate("ViewManager", "Undo"),
-            UI.PixmapCache.getIcon("editUndo"),
+            EricPixmapCache.getIcon("editUndo"),
             QCoreApplication.translate("ViewManager", "&Undo"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+Z", "Edit|Undo")
@@ -994,7 +992,7 @@
 
         self.redoAct = EricAction(
             QCoreApplication.translate("ViewManager", "Redo"),
-            UI.PixmapCache.getIcon("editRedo"),
+            EricPixmapCache.getIcon("editRedo"),
             QCoreApplication.translate("ViewManager", "&Redo"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+Shift+Z", "Edit|Redo")
@@ -1044,7 +1042,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")
@@ -1071,7 +1069,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")
@@ -1098,7 +1096,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")
@@ -1125,7 +1123,7 @@
 
         self.deleteAct = 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")
@@ -1171,7 +1169,7 @@
 
         self.indentAct = EricAction(
             QCoreApplication.translate("ViewManager", "Indent"),
-            UI.PixmapCache.getIcon("editIndent"),
+            EricPixmapCache.getIcon("editIndent"),
             QCoreApplication.translate("ViewManager", "&Indent"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+I", "Edit|Indent")
@@ -1196,7 +1194,7 @@
 
         self.unindentAct = EricAction(
             QCoreApplication.translate("ViewManager", "Unindent"),
-            UI.PixmapCache.getIcon("editUnindent"),
+            EricPixmapCache.getIcon("editUnindent"),
             QCoreApplication.translate("ViewManager", "U&nindent"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -1223,7 +1221,7 @@
 
         self.smartIndentAct = EricAction(
             QCoreApplication.translate("ViewManager", "Smart indent"),
-            UI.PixmapCache.getIcon("editSmartIndent"),
+            EricPixmapCache.getIcon("editSmartIndent"),
             QCoreApplication.translate("ViewManager", "Smart indent"),
             0,
             0,
@@ -1246,7 +1244,7 @@
 
         self.commentAct = EricAction(
             QCoreApplication.translate("ViewManager", "Comment"),
-            UI.PixmapCache.getIcon("editComment"),
+            EricPixmapCache.getIcon("editComment"),
             QCoreApplication.translate("ViewManager", "C&omment"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+M", "Edit|Comment")
@@ -1271,7 +1269,7 @@
 
         self.uncommentAct = EricAction(
             QCoreApplication.translate("ViewManager", "Uncomment"),
-            UI.PixmapCache.getIcon("editUncomment"),
+            EricPixmapCache.getIcon("editUncomment"),
             QCoreApplication.translate("ViewManager", "Unco&mment"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -1298,7 +1296,7 @@
 
         self.toggleCommentAct = EricAction(
             QCoreApplication.translate("ViewManager", "Toggle Comment"),
-            UI.PixmapCache.getIcon("editToggleComment"),
+            EricPixmapCache.getIcon("editToggleComment"),
             QCoreApplication.translate("ViewManager", "Toggle Comment"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -1403,7 +1401,7 @@
 
         self.selectAllAct = EricAction(
             QCoreApplication.translate("ViewManager", "Select all"),
-            UI.PixmapCache.getIcon("editSelectAll"),
+            EricPixmapCache.getIcon("editSelectAll"),
             QCoreApplication.translate("ViewManager", "&Select all"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+A", "Edit|Select all")
@@ -1634,7 +1632,7 @@
 
         self.codeInfoAct = EricAction(
             QCoreApplication.translate("ViewManager", "Code Info"),
-            UI.PixmapCache.getIcon("codeDocuViewer"),
+            EricPixmapCache.getIcon("codeDocuViewer"),
             QCoreApplication.translate("ViewManager", "Code Info"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -3431,7 +3429,7 @@
         @return the generated toolbar
         """
         tb = QToolBar(QCoreApplication.translate("ViewManager", "Edit"), self.ui)
-        tb.setIconSize(UI.Config.ToolBarIconSize)
+        tb.setIconSize(Config.ToolBarIconSize)
         tb.setObjectName("EditToolbar")
         tb.setToolTip(QCoreApplication.translate("ViewManager", "Edit"))
 
@@ -3468,7 +3466,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")
@@ -3494,7 +3492,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")
@@ -3520,7 +3518,7 @@
 
         self.searchPrevAct = EricAction(
             QCoreApplication.translate("ViewManager", "Search previous"),
-            UI.PixmapCache.getIcon("findPrev"),
+            EricPixmapCache.getIcon("findPrev"),
             QCoreApplication.translate("ViewManager", "Search &previous"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -3550,7 +3548,7 @@
 
         self.searchClearMarkersAct = EricAction(
             QCoreApplication.translate("ViewManager", "Clear search markers"),
-            UI.PixmapCache.getIcon("findClear"),
+            EricPixmapCache.getIcon("findClear"),
             QCoreApplication.translate("ViewManager", "Clear search markers"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -3578,7 +3576,7 @@
 
         self.searchNextWordAct = EricAction(
             QCoreApplication.translate("ViewManager", "Search current word forward"),
-            UI.PixmapCache.getIcon("findWordNext"),
+            EricPixmapCache.getIcon("findWordNext"),
             QCoreApplication.translate("ViewManager", "Search current word forward"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -3607,7 +3605,7 @@
 
         self.searchPrevWordAct = EricAction(
             QCoreApplication.translate("ViewManager", "Search current word backward"),
-            UI.PixmapCache.getIcon("findWordPrev"),
+            EricPixmapCache.getIcon("findWordPrev"),
             QCoreApplication.translate("ViewManager", "Search current word backward"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -3661,7 +3659,7 @@
 
         self.replaceAndSearchAct = EricAction(
             QCoreApplication.translate("ViewManager", "Replace and Search"),
-            UI.PixmapCache.getIcon("editReplaceSearch"),
+            EricPixmapCache.getIcon("editReplaceSearch"),
             QCoreApplication.translate("ViewManager", "Replace and Search"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -3691,7 +3689,7 @@
 
         self.replaceSelectionAct = EricAction(
             QCoreApplication.translate("ViewManager", "Replace Occurrence"),
-            UI.PixmapCache.getIcon("editReplace"),
+            EricPixmapCache.getIcon("editReplace"),
             QCoreApplication.translate("ViewManager", "Replace Occurrence"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -3718,7 +3716,7 @@
 
         self.replaceAllAct = EricAction(
             QCoreApplication.translate("ViewManager", "Replace All"),
-            UI.PixmapCache.getIcon("editReplaceAll"),
+            EricPixmapCache.getIcon("editReplaceAll"),
             QCoreApplication.translate("ViewManager", "Replace All"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -3745,7 +3743,7 @@
 
         self.gotoAct = EricAction(
             QCoreApplication.translate("ViewManager", "Goto Line"),
-            UI.PixmapCache.getIcon("goto"),
+            EricPixmapCache.getIcon("goto"),
             QCoreApplication.translate("ViewManager", "&Goto Line..."),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+G", "Search|Goto Line")
@@ -3770,7 +3768,7 @@
 
         self.gotoBraceAct = EricAction(
             QCoreApplication.translate("ViewManager", "Goto Brace"),
-            UI.PixmapCache.getIcon("gotoBrace"),
+            EricPixmapCache.getIcon("gotoBrace"),
             QCoreApplication.translate("ViewManager", "Goto &Brace"),
             QKeySequence(
                 QCoreApplication.translate("ViewManager", "Ctrl+L", "Search|Goto Brace")
@@ -3794,7 +3792,7 @@
 
         self.gotoLastEditAct = EricAction(
             QCoreApplication.translate("ViewManager", "Goto Last Edit Location"),
-            UI.PixmapCache.getIcon("gotoLastEditPosition"),
+            EricPixmapCache.getIcon("gotoLastEditPosition"),
             QCoreApplication.translate("ViewManager", "Goto Last &Edit Location"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -3881,7 +3879,7 @@
 
         self.searchFilesAct = EricAction(
             QCoreApplication.translate("ViewManager", "Search in Files"),
-            UI.PixmapCache.getIcon("projectFind"),
+            EricPixmapCache.getIcon("projectFind"),
             QCoreApplication.translate("ViewManager", "Search in &Files..."),
             QKeySequence(
                 QCoreApplication.translate(
@@ -3939,7 +3937,7 @@
 
         self.searchOpenFilesAct = EricAction(
             QCoreApplication.translate("ViewManager", "Search in Open Files"),
-            UI.PixmapCache.getIcon("documentFind"),
+            EricPixmapCache.getIcon("documentFind"),
             QCoreApplication.translate("ViewManager", "Search in Open Files..."),
             QKeySequence(
                 QCoreApplication.translate(
@@ -4033,7 +4031,7 @@
         @rtype QToolBar
         """
         tb = QToolBar(QCoreApplication.translate("ViewManager", "Search"), self.ui)
-        tb.setIconSize(UI.Config.ToolBarIconSize)
+        tb.setIconSize(Config.ToolBarIconSize)
         tb.setObjectName("SearchToolbar")
         tb.setToolTip(QCoreApplication.translate("ViewManager", "Search"))
 
@@ -4077,7 +4075,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")
@@ -4103,7 +4101,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")
@@ -4129,7 +4127,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")
@@ -4154,7 +4152,7 @@
 
         self.zoomToAct = EricAction(
             QCoreApplication.translate("ViewManager", "Zoom"),
-            UI.PixmapCache.getIcon("zoomTo"),
+            EricPixmapCache.getIcon("zoomTo"),
             QCoreApplication.translate("ViewManager", "&Zoom"),
             0,
             0,
@@ -4270,7 +4268,7 @@
 
         self.unhighlightAct = EricAction(
             QCoreApplication.translate("ViewManager", "Remove all highlights"),
-            UI.PixmapCache.getIcon("unhighlight"),
+            EricPixmapCache.getIcon("unhighlight"),
             QCoreApplication.translate("ViewManager", "Remove all highlights"),
             0,
             0,
@@ -4292,7 +4290,7 @@
 
         self.newDocumentViewAct = EricAction(
             QCoreApplication.translate("ViewManager", "New Document View"),
-            UI.PixmapCache.getIcon("documentNewView"),
+            EricPixmapCache.getIcon("documentNewView"),
             QCoreApplication.translate("ViewManager", "New &Document View"),
             0,
             0,
@@ -4320,7 +4318,7 @@
             QCoreApplication.translate(
                 "ViewManager", "New Document View (with new split)"
             ),
-            UI.PixmapCache.getIcon("splitVertical"),
+            EricPixmapCache.getIcon("splitVertical"),
             QCoreApplication.translate(
                 "ViewManager", "New Document View (with new split)"
             ),
@@ -4348,7 +4346,7 @@
 
         self.splitViewAct = EricAction(
             QCoreApplication.translate("ViewManager", "Split view"),
-            UI.PixmapCache.getIcon("splitVertical"),
+            EricPixmapCache.getIcon("splitVertical"),
             QCoreApplication.translate("ViewManager", "&Split view"),
             0,
             0,
@@ -4394,7 +4392,7 @@
 
         self.splitRemoveAct = EricAction(
             QCoreApplication.translate("ViewManager", "Remove split"),
-            UI.PixmapCache.getIcon("remsplitVertical"),
+            EricPixmapCache.getIcon("remsplitVertical"),
             QCoreApplication.translate("ViewManager", "&Remove split"),
             0,
             0,
@@ -4463,7 +4461,7 @@
 
         self.previewAct = EricAction(
             QCoreApplication.translate("ViewManager", "Preview"),
-            UI.PixmapCache.getIcon("previewer"),
+            EricPixmapCache.getIcon("previewer"),
             QCoreApplication.translate("ViewManager", "Preview"),
             0,
             0,
@@ -4490,7 +4488,7 @@
 
         self.astViewerAct = EricAction(
             QCoreApplication.translate("ViewManager", "Python AST Viewer"),
-            UI.PixmapCache.getIcon("astTree"),
+            EricPixmapCache.getIcon("astTree"),
             QCoreApplication.translate("ViewManager", "Python AST Viewer"),
             0,
             0,
@@ -4517,7 +4515,7 @@
 
         self.disViewerAct = EricAction(
             QCoreApplication.translate("ViewManager", "Python Disassembly Viewer"),
-            UI.PixmapCache.getIcon("disassembly"),
+            EricPixmapCache.getIcon("disassembly"),
             QCoreApplication.translate("ViewManager", "Python Disassembly Viewer"),
             0,
             0,
@@ -4599,7 +4597,7 @@
         @return the generated toolbar
         """
         tb = QToolBar(QCoreApplication.translate("ViewManager", "View"), self.ui)
-        tb.setIconSize(UI.Config.ToolBarIconSize)
+        tb.setIconSize(Config.ToolBarIconSize)
         tb.setObjectName("ViewToolbar")
         tb.setToolTip(QCoreApplication.translate("ViewManager", "View"))
 
@@ -4783,7 +4781,7 @@
 
         self.bookmarkToggleAct = EricAction(
             QCoreApplication.translate("ViewManager", "Toggle Bookmark"),
-            UI.PixmapCache.getIcon("bookmarkToggle"),
+            EricPixmapCache.getIcon("bookmarkToggle"),
             QCoreApplication.translate("ViewManager", "&Toggle Bookmark"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -4810,7 +4808,7 @@
 
         self.bookmarkNextAct = EricAction(
             QCoreApplication.translate("ViewManager", "Next Bookmark"),
-            UI.PixmapCache.getIcon("bookmarkNext"),
+            EricPixmapCache.getIcon("bookmarkNext"),
             QCoreApplication.translate("ViewManager", "&Next Bookmark"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -4836,7 +4834,7 @@
 
         self.bookmarkPreviousAct = EricAction(
             QCoreApplication.translate("ViewManager", "Previous Bookmark"),
-            UI.PixmapCache.getIcon("bookmarkPrevious"),
+            EricPixmapCache.getIcon("bookmarkPrevious"),
             QCoreApplication.translate("ViewManager", "&Previous Bookmark"),
             QKeySequence(
                 QCoreApplication.translate(
@@ -4887,7 +4885,7 @@
 
         self.syntaxErrorGotoAct = EricAction(
             QCoreApplication.translate("ViewManager", "Goto Syntax Error"),
-            UI.PixmapCache.getIcon("syntaxErrorGoto"),
+            EricPixmapCache.getIcon("syntaxErrorGoto"),
             QCoreApplication.translate("ViewManager", "&Goto Syntax Error"),
             0,
             0,
@@ -4930,7 +4928,7 @@
 
         self.warningsNextAct = EricAction(
             QCoreApplication.translate("ViewManager", "Next warning message"),
-            UI.PixmapCache.getIcon("warningNext"),
+            EricPixmapCache.getIcon("warningNext"),
             QCoreApplication.translate("ViewManager", "&Next warning message"),
             0,
             0,
@@ -4953,7 +4951,7 @@
 
         self.warningsPreviousAct = EricAction(
             QCoreApplication.translate("ViewManager", "Previous warning message"),
-            UI.PixmapCache.getIcon("warningPrev"),
+            EricPixmapCache.getIcon("warningPrev"),
             QCoreApplication.translate("ViewManager", "&Previous warning message"),
             0,
             0,
@@ -4997,7 +4995,7 @@
 
         self.notcoveredNextAct = EricAction(
             QCoreApplication.translate("ViewManager", "Next uncovered line"),
-            UI.PixmapCache.getIcon("notcoveredNext"),
+            EricPixmapCache.getIcon("notcoveredNext"),
             QCoreApplication.translate("ViewManager", "&Next uncovered line"),
             0,
             0,
@@ -5020,7 +5018,7 @@
 
         self.notcoveredPreviousAct = EricAction(
             QCoreApplication.translate("ViewManager", "Previous uncovered line"),
-            UI.PixmapCache.getIcon("notcoveredPrev"),
+            EricPixmapCache.getIcon("notcoveredPrev"),
             QCoreApplication.translate("ViewManager", "&Previous uncovered line"),
             0,
             0,
@@ -5043,7 +5041,7 @@
 
         self.taskNextAct = EricAction(
             QCoreApplication.translate("ViewManager", "Next Task"),
-            UI.PixmapCache.getIcon("taskNext"),
+            EricPixmapCache.getIcon("taskNext"),
             QCoreApplication.translate("ViewManager", "&Next Task"),
             0,
             0,
@@ -5065,7 +5063,7 @@
 
         self.taskPreviousAct = EricAction(
             QCoreApplication.translate("ViewManager", "Previous Task"),
-            UI.PixmapCache.getIcon("taskPrev"),
+            EricPixmapCache.getIcon("taskPrev"),
             QCoreApplication.translate("ViewManager", "&Previous Task"),
             0,
             0,
@@ -5088,7 +5086,7 @@
 
         self.changeNextAct = EricAction(
             QCoreApplication.translate("ViewManager", "Next Change"),
-            UI.PixmapCache.getIcon("changeNext"),
+            EricPixmapCache.getIcon("changeNext"),
             QCoreApplication.translate("ViewManager", "&Next Change"),
             0,
             0,
@@ -5111,7 +5109,7 @@
 
         self.changePreviousAct = EricAction(
             QCoreApplication.translate("ViewManager", "Previous Change"),
-            UI.PixmapCache.getIcon("changePrev"),
+            EricPixmapCache.getIcon("changePrev"),
             QCoreApplication.translate("ViewManager", "&Previous Change"),
             0,
             0,
@@ -5184,7 +5182,7 @@
         @return the generated toolbar
         """
         tb = QToolBar(QCoreApplication.translate("ViewManager", "Bookmarks"), self.ui)
-        tb.setIconSize(UI.Config.ToolBarIconSize)
+        tb.setIconSize(Config.ToolBarIconSize)
         tb.setObjectName("BookmarksToolbar")
         tb.setToolTip(QCoreApplication.translate("ViewManager", "Bookmarks"))
 
@@ -5221,7 +5219,7 @@
 
         self.spellCheckAct = EricAction(
             QCoreApplication.translate("ViewManager", "Check spelling"),
-            UI.PixmapCache.getIcon("spellchecking"),
+            EricPixmapCache.getIcon("spellchecking"),
             QCoreApplication.translate("ViewManager", "Check &spelling..."),
             QKeySequence(
                 QCoreApplication.translate(
@@ -5249,7 +5247,7 @@
 
         self.autoSpellCheckAct = EricAction(
             QCoreApplication.translate("ViewManager", "Automatic spell checking"),
-            UI.PixmapCache.getIcon("autospellchecking"),
+            EricPixmapCache.getIcon("autospellchecking"),
             QCoreApplication.translate("ViewManager", "&Automatic spell checking"),
             0,
             0,
@@ -5282,7 +5280,7 @@
         """
         Private method to set the enabled state of the spelling actions.
         """
-        from QScintilla.SpellChecker import SpellChecker
+        from eric7.QScintilla.SpellChecker import SpellChecker
 
         spellingAvailable = SpellChecker.isAvailable()
 
@@ -5331,7 +5329,7 @@
         @return the generated toolbar
         """
         tb = QToolBar(QCoreApplication.translate("ViewManager", "Spelling"), self.ui)
-        tb.setIconSize(UI.Config.ToolBarIconSize)
+        tb.setIconSize(Config.ToolBarIconSize)
         tb.setObjectName("SpellingToolbar")
         tb.setToolTip(QCoreApplication.translate("ViewManager", "Spelling"))
 
@@ -5354,14 +5352,14 @@
         #     1: Directory of currently active editor
         #     2: Directory of currently active project
         #     3: CWD
-        import QScintilla.Lexers
+        from eric7.QScintilla import Lexers
 
         fileFilter = self._getOpenFileFilter()
         progs = EricFileDialog.getOpenFileNamesAndFilter(
             self.ui,
             QCoreApplication.translate("ViewManager", "Open files"),
             self._getOpenStartDir(),
-            QScintilla.Lexers.getOpenFileFiltersList(True, True),
+            Lexers.getOpenFileFiltersList(True, True),
             fileFilter,
         )[0]
         for prog in progs:
@@ -5720,7 +5718,7 @@
         @return reference to the new editor object (Editor.Editor) and the new
             editor assembly object (EditorAssembly.EditorAssembly)
         """
-        from QScintilla.EditorAssembly import EditorAssembly
+        from eric7.QScintilla.EditorAssembly import EditorAssembly
 
         assembly = EditorAssembly(
             self.dbs,
@@ -5843,11 +5841,11 @@
         if language is None:
             pixmap = QPixmap()
         elif language == "":
-            pixmap = UI.PixmapCache.getPixmap("fileText")
+            pixmap = EricPixmapCache.getPixmap("fileText")
         else:
-            import QScintilla.Lexers
-
-            pixmap = QScintilla.Lexers.getLanguageIcon(language, True)
+            from eric7.QScintilla import Lexers
+
+            pixmap = Lexers.getLanguageIcon(language, True)
         self.sbLang.setPixmap(pixmap)
         if pixmap.isNull():
             self.sbLang.setText(language)
@@ -5885,11 +5883,11 @@
         @return pixmap for the eol indicator (QPixmap)
         """
         if eolIndicator == "LF":
-            pixmap = UI.PixmapCache.getPixmap("eolLinux")
+            pixmap = EricPixmapCache.getPixmap("eolLinux")
         elif eolIndicator == "CR":
-            pixmap = UI.PixmapCache.getPixmap("eolMac")
+            pixmap = EricPixmapCache.getPixmap("eolMac")
         elif eolIndicator == "CRLF":
-            pixmap = UI.PixmapCache.getPixmap("eolWindows")
+            pixmap = EricPixmapCache.getPixmap("eolWindows")
         else:
             pixmap = QPixmap()
         return pixmap
@@ -5958,7 +5956,7 @@
                 if Utilities.samepath(fn, editor.getFileName()):
                     break
             else:
-                from QScintilla.EditorAssembly import EditorAssembly
+                from eric7.QScintilla.EditorAssembly import EditorAssembly
 
                 assembly = EditorAssembly(
                     self.dbs,
@@ -6171,7 +6169,7 @@
         """
         Public slot to generate a new empty editor.
         """
-        from QScintilla.EditorAssembly import EditorAssembly
+        from eric7.QScintilla.EditorAssembly import EditorAssembly
 
         assembly = EditorAssembly(
             self.dbs, "", self, tv=ericApp().getObject("TaskViewer")
@@ -6391,7 +6389,7 @@
         if now is None:
             return
 
-        from QScintilla.Shell import Shell
+        from eric7.QScintilla.Shell import Shell
 
         if not isinstance(now, (Editor, Shell)):
             self.editActGrp.setEnabled(False)
@@ -6687,7 +6685,7 @@
         """
         Private method to handle the goto action.
         """
-        from QScintilla.GotoDialog import GotoDialog
+        from eric7.QScintilla.GotoDialog import GotoDialog
 
         aw = self.activeWindow()
         lines = aw.lines()
@@ -6796,7 +6794,7 @@
             else self.activeWindow()
         )
         if aw:
-            from QScintilla.ZoomDialog import ZoomDialog
+            from eric7.QScintilla.ZoomDialog import ZoomDialog
 
             dlg = ZoomDialog(aw.getZoom(), self.ui, None, True)
             if dlg.exec() == QDialog.DialogCode.Accepted:
@@ -6900,17 +6898,17 @@
         """
         if checked:
             self.setSplitOrientation(Qt.Orientation.Horizontal)
-            self.splitViewAct.setIcon(UI.PixmapCache.getIcon("splitHorizontal"))
-            self.splitRemoveAct.setIcon(UI.PixmapCache.getIcon("remsplitHorizontal"))
+            self.splitViewAct.setIcon(EricPixmapCache.getIcon("splitHorizontal"))
+            self.splitRemoveAct.setIcon(EricPixmapCache.getIcon("remsplitHorizontal"))
             self.newDocumentSplitViewAct.setIcon(
-                UI.PixmapCache.getIcon("splitHorizontal")
+                EricPixmapCache.getIcon("splitHorizontal")
             )
         else:
             self.setSplitOrientation(Qt.Orientation.Vertical)
-            self.splitViewAct.setIcon(UI.PixmapCache.getIcon("splitVertical"))
-            self.splitRemoveAct.setIcon(UI.PixmapCache.getIcon("remsplitVertical"))
+            self.splitViewAct.setIcon(EricPixmapCache.getIcon("splitVertical"))
+            self.splitRemoveAct.setIcon(EricPixmapCache.getIcon("remsplitVertical"))
             self.newDocumentSplitViewAct.setIcon(
-                UI.PixmapCache.getIcon("splitVertical")
+                EricPixmapCache.getIcon("splitVertical")
             )
         Preferences.setUI("SplitOrientationVertical", checked)
 
@@ -7222,7 +7220,7 @@
         pel = ericApp().getObject("Project").getProjectDictionaries()[1]
         self.__editProjectPelAct.setEnabled(projetOpen and bool(pel))
 
-        from QScintilla.SpellChecker import SpellChecker
+        from eric7.QScintilla.SpellChecker import SpellChecker
 
         pwl = SpellChecker.getUserDictionaryPath()
         self.__editUserPwlAct.setEnabled(bool(pwl))
@@ -7264,7 +7262,7 @@
         """
         Private slot to edit the user word list.
         """
-        from QScintilla.SpellChecker import SpellChecker
+        from eric7.QScintilla.SpellChecker import SpellChecker
 
         pwl = SpellChecker.getUserDictionaryPath()
         self.__editSpellingDictionary(pwl)
@@ -7273,7 +7271,7 @@
         """
         Private slot to edit the user exception list.
         """
-        from QScintilla.SpellChecker import SpellChecker
+        from eric7.QScintilla.SpellChecker import SpellChecker
 
         pel = SpellChecker.getUserDictionaryPath(True)
         self.__editSpellingDictionary(pel)
@@ -7307,7 +7305,7 @@
                 if len(dictionaryFile) < 40
                 else "...{0}".format(dictionaryFile[-40:])
             )
-            from QScintilla.SpellingDictionaryEditDialog import (
+            from eric7.QScintilla.SpellingDictionaryEditDialog import (
                 SpellingDictionaryEditDialog,
             )
 
@@ -7339,7 +7337,7 @@
                     return
 
                 self.ui.showNotification(
-                    UI.PixmapCache.getPixmap("spellchecking48"),
+                    EricPixmapCache.getPixmap("spellchecking48"),
                     QCoreApplication.translate(
                         "ViewManager", "Edit Spelling Dictionary"
                     ),
@@ -7878,9 +7876,9 @@
         if self.activeWindow() is not None and self.activeWindow().getFileName():
             ext = os.path.splitext(self.activeWindow().getFileName())[1]
             rx = re.compile(r".*\*\.{0}[ )].*".format(ext[1:]))
-            import QScintilla.Lexers
-
-            filters = QScintilla.Lexers.getOpenFileFiltersList()
+            from eric7.QScintilla import Lexers
+
+            filters = Lexers.getOpenFileFiltersList()
             index = -1
             for i in range(len(filters)):
                 if rx.fullmatch(filters[i]):

eric ide

mercurial