eric7/Plugins/ViewManagerPlugins/Tabview/Tabview.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8341
e470de1e6628
child 8358
144a6b854f70
--- a/eric7/Plugins/ViewManagerPlugins/Tabview/Tabview.py	Sat May 22 17:01:51 2021 +0200
+++ b/eric7/Plugins/ViewManagerPlugins/Tabview/Tabview.py	Sat May 22 18:51:46 2021 +0200
@@ -19,7 +19,7 @@
     QMenu, QLabel
 )
 
-from E5Gui.E5Application import e5App
+from E5Gui.EricApplication import ericApp
 
 from ViewManager.ViewManager import ViewManager
 
@@ -29,8 +29,8 @@
 
 import UI.PixmapCache
 
-from E5Gui.E5TabWidget import E5TabWidget, E5WheelTabBar
-from E5Gui.E5Led import E5Led
+from E5Gui.EricTabWidget import EricTabWidget, EricWheelTabBar
+from E5Gui.EricLed import EricLed
 
 import Preferences
 from Globals import isMacPlatform
@@ -38,7 +38,7 @@
 from eric7config import getConfig
 
 
-class TabBar(E5WheelTabBar):
+class TabBar(EricWheelTabBar):
     """
     Class implementing a customized tab bar supporting drag & drop.
     
@@ -162,7 +162,7 @@
         super().dropEvent(event)
 
 
-class TabWidget(E5TabWidget):
+class TabWidget(EricTabWidget):
     """
     Class implementing a custimized tab widget.
     """
@@ -195,7 +195,7 @@
         self.vm = vm
         self.editors = []
         
-        self.indicator = E5Led(self)
+        self.indicator = EricLed(self)
         self.setCornerWidget(self.indicator, Qt.Corner.TopLeftCorner)
         
         self.rightCornerWidget = QWidget(self)
@@ -429,7 +429,7 @@
             if Preferences.getUI("TabViewManagerFilenameOnly"):
                 txt = os.path.basename(fn)
             else:
-                txt = e5App().getObject("Project").getRelativePath(fn)
+                txt = ericApp().getObject("Project").getRelativePath(fn)
             
             maxFileNameChars = Preferences.getUI(
                 "TabViewManagerFilenameLength")
@@ -953,7 +953,7 @@
             if self.filenameOnly:
                 txt = os.path.basename(fn)
             else:
-                txt = e5App().getObject("Project").getRelativePath(fn)
+                txt = ericApp().getObject("Project").getRelativePath(fn)
             if len(txt) > self.maxFileNameChars:
                 txt = "...{0}".format(txt[-self.maxFileNameChars:])
             if not QFileInfo(fn).isWritable():
@@ -1008,7 +1008,7 @@
             if self.filenameOnly:
                 txt = os.path.basename(fn)
             else:
-                txt = e5App().getObject("Project").getRelativePath(fn)
+                txt = ericApp().getObject("Project").getRelativePath(fn)
             if len(txt) > self.maxFileNameChars:
                 txt = "...{0}".format(txt[-self.maxFileNameChars:])
             if not QFileInfo(fn).isWritable():
@@ -1091,7 +1091,7 @@
             if self.filenameOnly:
                 tabName = os.path.basename(newName)
             else:
-                tabName = e5App().getObject("Project").getRelativePath(newName)
+                tabName = ericApp().getObject("Project").getRelativePath(newName)
             if len(tabName) > self.maxFileNameChars:
                 tabName = "...{0}".format(tabName[-self.maxFileNameChars:])
             index = self.currentTabWidget.indexOf(editor)
@@ -1346,7 +1346,7 @@
         ):
             switched = True
             self.currentTabWidget.showIndicator(False)
-            if isinstance(watched, E5TabWidget):
+            if isinstance(watched, EricTabWidget):
                 switched = watched is not self.currentTabWidget
                 self.currentTabWidget = watched
             elif isinstance(watched, QTabBar):
@@ -1402,7 +1402,7 @@
                         if self.filenameOnly:
                             txt = os.path.basename(fn)
                         else:
-                            txt = e5App().getObject(
+                            txt = ericApp().getObject(
                                 "Project").getRelativePath(fn)
                         if len(txt) > self.maxFileNameChars:
                             txt = "...{0}".format(txt[-self.maxFileNameChars:])

eric ide

mercurial