10 |
10 |
11 import os |
11 import os |
12 import glob |
12 import glob |
13 |
13 |
14 from PyQt4.QtCore import QThread, pyqtSignal, QProcess |
14 from PyQt4.QtCore import QThread, pyqtSignal, QProcess |
15 from PyQt4.QtGui import QDialog, QApplication, QMenu, QProgressDialog |
15 from PyQt4.QtGui import QDialog, QApplication, QMenu |
16 |
16 |
17 from E5Gui.E5Application import e5App |
17 from E5Gui.E5Application import e5App |
18 from E5Gui import E5MessageBox |
18 from E5Gui import E5MessageBox |
|
19 from E5Gui.E5ProgressDialog import E5ProgressDialog |
19 |
20 |
20 from .ProjectBrowserModel import ProjectBrowserFileItem, \ |
21 from .ProjectBrowserModel import ProjectBrowserFileItem, \ |
21 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \ |
22 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \ |
22 ProjectBrowserInterfaceType |
23 ProjectBrowserInterfaceType |
23 from .ProjectBaseBrowser import ProjectBaseBrowser |
24 from .ProjectBaseBrowser import ProjectBaseBrowser |
516 """ |
517 """ |
517 Privat method to compile a .idl file to python. |
518 Privat method to compile a .idl file to python. |
518 |
519 |
519 @param fn filename of the .idl file to be compiled (string) |
520 @param fn filename of the .idl file to be compiled (string) |
520 @param noDialog flag indicating silent operations (boolean) |
521 @param noDialog flag indicating silent operations (boolean) |
521 @param progress reference to the progress dialog (QProgressDialog) |
522 @param progress reference to the progress dialog (E5ProgressDialog) |
522 @return reference to the compile process (QProcess) |
523 @return reference to the compile process (QProcess) |
523 """ |
524 """ |
524 self.compileProc = QProcess() |
525 self.compileProc = QProcess() |
525 args = [] |
526 args = [] |
526 |
527 |
569 """ |
570 """ |
570 Private method to compile all interfaces to python. |
571 Private method to compile all interfaces to python. |
571 """ |
572 """ |
572 if self.omniidl is not None: |
573 if self.omniidl is not None: |
573 numIDLs = len(self.project.pdata["INTERFACES"]) |
574 numIDLs = len(self.project.pdata["INTERFACES"]) |
574 progress = QProgressDialog( |
575 progress = E5ProgressDialog( |
575 self.trUtf8("Compiling interfaces..."), |
576 self.trUtf8("Compiling interfaces..."), |
576 self.trUtf8("Abort"), 0, numIDLs, self) |
577 self.trUtf8("Abort"), 0, numIDLs, |
|
578 self.trUtf8("%v/%m Interfaces"), self) |
577 progress.setModal(True) |
579 progress.setModal(True) |
578 progress.setMinimumDuration(0) |
580 progress.setMinimumDuration(0) |
579 i = 0 |
581 i = 0 |
580 |
582 |
581 for fn in self.project.pdata["INTERFACES"]: |
583 for fn in self.project.pdata["INTERFACES"]: |
602 items = self.getSelectedItems() |
604 items = self.getSelectedItems() |
603 |
605 |
604 files = [self.project.getRelativePath(itm.fileName()) |
606 files = [self.project.getRelativePath(itm.fileName()) |
605 for itm in items] |
607 for itm in items] |
606 numIDLs = len(files) |
608 numIDLs = len(files) |
607 progress = QProgressDialog( |
609 progress = E5ProgressDialog( |
608 self.trUtf8("Compiling interfaces..."), |
610 self.trUtf8("Compiling interfaces..."), |
609 self.trUtf8("Abort"), 0, numIDLs, self) |
611 self.trUtf8("Abort"), 0, numIDLs, |
|
612 self.trUtf8("%v/%m Interfaces"), self) |
610 progress.setModal(True) |
613 progress.setModal(True) |
611 progress.setMinimumDuration(0) |
614 progress.setMinimumDuration(0) |
612 i = 0 |
615 i = 0 |
613 |
616 |
614 for fn in files: |
617 for fn in files: |