Project/ProjectFormsBrowser.py

changeset 536
6d8d39753c82
parent 501
5c615a85241a
child 537
72b32daeb8d6
equal deleted inserted replaced
535:4b00d7336e19 536:6d8d39753c82
13 13
14 from PyQt4.QtCore import * 14 from PyQt4.QtCore import *
15 from PyQt4.QtGui import * 15 from PyQt4.QtGui import *
16 16
17 from E5Gui.E5Application import e5App 17 from E5Gui.E5Application import e5App
18 from E5Gui import E5MessageBox
18 19
19 from .ProjectBrowserModel import ProjectBrowserFileItem, \ 20 from .ProjectBrowserModel import ProjectBrowserFileItem, \
20 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \ 21 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \
21 ProjectBrowserFormType 22 ProjectBrowserFormType
22 from .ProjectBaseBrowser import ProjectBaseBrowser 23 from .ProjectBaseBrowser import ProjectBaseBrowser
614 f.write(line + "\n") 615 f.write(line + "\n")
615 f.close() 616 f.close()
616 if self.compiledFile not in self.project.pdata["SOURCES"]: 617 if self.compiledFile not in self.project.pdata["SOURCES"]:
617 self.project.appendFile(ofn) 618 self.project.appendFile(ofn)
618 if not self.noDialog: 619 if not self.noDialog:
619 QMessageBox.information(None, 620 E5MessageBox.information(self,
620 self.trUtf8("Form Compilation"), 621 self.trUtf8("Form Compilation"),
621 self.trUtf8("The compilation of the form file" 622 self.trUtf8("The compilation of the form file"
622 " was successful.")) 623 " was successful."))
623 except IOError as msg: 624 except IOError as msg:
624 if not self.noDialog: 625 if not self.noDialog:
625 QMessageBox.information(None, 626 E5MessageBox.information(self,
626 self.trUtf8("Form Compilation"), 627 self.trUtf8("Form Compilation"),
627 self.trUtf8("<p>The compilation of the form file failed.</p>" 628 self.trUtf8("<p>The compilation of the form file failed.</p>"
628 "<p>Reason: {0}</p>").format(str(msg))) 629 "<p>Reason: {0}</p>").format(str(msg)))
629 else: 630 else:
630 if not self.noDialog: 631 if not self.noDialog:
631 QMessageBox.information(None, 632 E5MessageBox.information(self,
632 self.trUtf8("Form Compilation"), 633 self.trUtf8("Form Compilation"),
633 self.trUtf8("The compilation of the form file failed.")) 634 self.trUtf8("The compilation of the form file failed."))
634 self.compileProc = None 635 self.compileProc = None
635 636
636 def __compileUI(self, fn, noDialog = False, progress = None): 637 def __compileUI(self, fn, noDialog = False, progress = None):

eric ide

mercurial