eric7/Tools/UIPreviewer.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
--- a/eric7/Tools/UIPreviewer.py	Sat May 22 17:01:51 2021 +0200
+++ b/eric7/Tools/UIPreviewer.py	Sat May 22 18:51:46 2021 +0200
@@ -20,17 +20,17 @@
 from PyQt6 import uic
 
 
-from E5Gui import E5MessageBox, E5FileDialog
-from E5Gui.E5MainWindow import E5MainWindow
-from E5Gui.E5Application import e5App
-from E5Gui.E5OverrideCursor import E5OverrideCursor
+from E5Gui import EricMessageBox, EricFileDialog
+from E5Gui.EricMainWindow import EricMainWindow
+from E5Gui.EricApplication import ericApp
+from E5Gui.EricOverrideCursor import EricOverrideCursor
 
 import Preferences
 import UI.PixmapCache
 import UI.Config
 
 
-class UIPreviewer(E5MainWindow):
+class UIPreviewer(EricMainWindow):
     """
     Class implementing the UI Previewer main window.
     """
@@ -187,7 +187,7 @@
             """<b>Quit</b>"""
             """<p>Quit the application.</p>"""
         ))
-        self.exitAct.triggered.connect(e5App().closeAllWindows)
+        self.exitAct.triggered.connect(ericApp().closeAllWindows)
         
         self.copyAct = QAction(
             UI.PixmapCache.getIcon("editCopy"), self.tr('&Copy'), self)
@@ -306,7 +306,7 @@
         """
         Private slot to show the about information.
         """
-        E5MessageBox.about(
+        EricMessageBox.about(
             self,
             self.tr("UI Previewer"),
             self.tr(
@@ -321,13 +321,13 @@
         """
         Private slot to show info about Qt.
         """
-        E5MessageBox.aboutQt(self, self.tr("UI Previewer"))
+        EricMessageBox.aboutQt(self, self.tr("UI Previewer"))
 
     def __openFile(self):
         """
         Private slot to load a new file.
         """
-        fn = E5FileDialog.getOpenFileName(
+        fn = EricFileDialog.getOpenFileName(
             self,
             self.tr("Select UI file"),
             self.currentFile,
@@ -362,7 +362,7 @@
                 self.previewSV.setWidget(self.mainWidget)
                 self.mainWidget.show()
         else:
-            E5MessageBox.warning(
+            EricMessageBox.warning(
                 self,
                 self.tr("Load UI File"),
                 self.tr(
@@ -376,7 +376,7 @@
         
         @param sstyle name of the selected style (string)
         """
-        with E5OverrideCursor():
+        with EricOverrideCursor():
             qstyle = QStyleFactory.create(sstyle)
             self.mainWidget.setStyle(qstyle)
             
@@ -448,7 +448,7 @@
         Private slot to handle the Save Image menu action.
         """
         if self.mainWidget is None:
-            E5MessageBox.critical(
+            EricMessageBox.critical(
                 self,
                 self.tr("Save Image"),
                 self.tr("""There is no UI file loaded."""))
@@ -462,7 +462,7 @@
                 filters, bytes(imageFormat).decode().lower())
         fileFilter = self.tr("Images ({0})").format(filters[:-1])
         
-        fname = E5FileDialog.getSaveFileName(
+        fname = EricFileDialog.getSaveFileName(
             self,
             self.tr("Save Image"),
             "",
@@ -478,7 +478,7 @@
         pix = self.mainWidget.grab()
         self.__updateChildren(self.lastStyle)
         if not pix.save(fname, str(ext)):
-            E5MessageBox.critical(
+            EricMessageBox.critical(
                 self,
                 self.tr("Save Image"),
                 self.tr(
@@ -490,7 +490,7 @@
         Private slot to handle the Copy Image menu action.
         """
         if self.mainWidget is None:
-            E5MessageBox.critical(
+            EricMessageBox.critical(
                 self,
                 self.tr("Save Image"),
                 self.tr("""There is no UI file loaded."""))
@@ -505,7 +505,7 @@
         Private slot to handle the Print Image menu action.
         """
         if self.mainWidget is None:
-            E5MessageBox.critical(
+            EricMessageBox.critical(
                 self,
                 self.tr("Print Image"),
                 self.tr("""There is no UI file loaded."""))
@@ -548,7 +548,7 @@
         from PyQt6.QtPrintSupport import QPrintPreviewDialog
         
         if self.mainWidget is None:
-            E5MessageBox.critical(
+            EricMessageBox.critical(
                 self,
                 self.tr("Print Preview"),
                 self.tr("""There is no UI file loaded."""))

eric ide

mercurial