eric7/Project/ProjectFormsBrowser.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8336
d566c2970f39
child 8358
144a6b854f70
--- a/eric7/Project/ProjectFormsBrowser.py	Sat May 22 17:01:51 2021 +0200
+++ b/eric7/Project/ProjectFormsBrowser.py	Sat May 22 18:51:46 2021 +0200
@@ -15,9 +15,9 @@
 from PyQt6.QtCore import QThread, QFileInfo, pyqtSignal, QProcess
 from PyQt6.QtWidgets import QDialog, QInputDialog, QApplication, QMenu
 
-from E5Gui.E5Application import e5App
-from E5Gui import E5MessageBox, E5FileDialog
-from E5Gui.E5ProgressDialog import E5ProgressDialog
+from E5Gui.EricApplication import ericApp
+from E5Gui import EricMessageBox, EricFileDialog
+from E5Gui.EricProgressDialog import EricProgressDialog
 
 from .ProjectBrowserModel import (
     ProjectBrowserFileItem, ProjectBrowserSimpleDirectoryItem,
@@ -593,13 +593,13 @@
         templateFile = os.path.join(
             getConfig('ericTemplatesDir'), self.templates4[templateIndex])
         
-        fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter(
+        fname, selectedFilter = EricFileDialog.getSaveFileNameAndFilter(
             self,
             self.tr("New Form"),
             path,
             self.tr("Qt User-Interface Files (*.ui);;All Files (*)"),
             "",
-            E5FileDialog.DontConfirmOverwrite)
+            EricFileDialog.DontConfirmOverwrite)
         
         if not fname:
             # user aborted or didn't enter a filename
@@ -612,11 +612,11 @@
                 fname += ex
         
         if os.path.exists(fname):
-            res = E5MessageBox.yesNo(
+            res = EricMessageBox.yesNo(
                 self,
                 self.tr("New Form"),
                 self.tr("The file already exists! Overwrite it?"),
-                icon=E5MessageBox.Warning)
+                icon=EricMessageBox.Warning)
             if not res:
                 # user selected to not overwrite
                 return
@@ -624,7 +624,7 @@
         try:
             shutil.copy(templateFile, fname)
         except OSError as e:
-            E5MessageBox.critical(
+            EricMessageBox.critical(
                 self,
                 self.tr("New Form"),
                 self.tr(
@@ -745,8 +745,8 @@
         @param exitStatus exit status of the process (QProcess.ExitStatus)
         """
         self.compileRunning = False
-        e5App().getObject("ViewManager").enableEditorsCheckFocusIn(True)
-        ui = e5App().getObject("UserInterface")
+        ericApp().getObject("ViewManager").enableEditorsCheckFocusIn(True)
+        ui = ericApp().getObject("UserInterface")
         if (
             exitStatus == QProcess.ExitStatus.NormalExit and
             exitCode == 0 and
@@ -857,13 +857,13 @@
         procStarted = self.compileProc.waitForStarted(5000)
         if procStarted:
             self.compileRunning = True
-            e5App().getObject("ViewManager").enableEditorsCheckFocusIn(False)
+            ericApp().getObject("ViewManager").enableEditorsCheckFocusIn(False)
             return self.compileProc
         else:
             self.compileRunning = False
             if progress is not None:
                 progress.cancel()
-            E5MessageBox.critical(
+            EricMessageBox.critical(
                 self,
                 self.tr('Process Generation Error'),
                 self.tr(
@@ -917,7 +917,7 @@
             self.hooks["compileAllForms"](self.project.pdata["FORMS"])
         else:
             numForms = len(self.project.pdata["FORMS"])
-            progress = E5ProgressDialog(
+            progress = EricProgressDialog(
                 self.tr("Compiling forms..."),
                 self.tr("Abort"), 0, numForms,
                 self.tr("%v/%m Forms"), self)
@@ -952,7 +952,7 @@
             self.hooks["compileSelectedForms"](files)
         else:
             numForms = len(files)
-            progress = E5ProgressDialog(
+            progress = EricProgressDialog(
                 self.tr("Compiling forms..."),
                 self.tr("Abort"), 0, numForms,
                 self.tr("%v/%m Forms"), self)
@@ -988,7 +988,7 @@
                 # ignore the request for non Qt GUI projects
                 return
             
-            progress = E5ProgressDialog(
+            progress = EricProgressDialog(
                 self.tr("Determining changed forms..."),
                 self.tr("Abort"), 0, 100, self.tr("%v/%m Forms"))
             progress.setMinimumDuration(0)

eric ide

mercurial