Project/ProjectInterfacesBrowser.py

branch
Py2 comp.
changeset 3080
6c0a430b19df
parent 3060
5883ce99ee12
parent 3071
83d066710d60
child 3145
a9de05d4a22f
equal deleted inserted replaced
3079:0233bbe9a9c4 3080:6c0a430b19df
16 16
17 import os 17 import os
18 import glob 18 import glob
19 19
20 from PyQt4.QtCore import QThread, pyqtSignal, QProcess 20 from PyQt4.QtCore import QThread, pyqtSignal, QProcess
21 from PyQt4.QtGui import QDialog, QApplication, QMenu, QProgressDialog 21 from PyQt4.QtGui import QDialog, QApplication, QMenu
22 22
23 from E5Gui.E5Application import e5App 23 from E5Gui.E5Application import e5App
24 from E5Gui import E5MessageBox 24 from E5Gui import E5MessageBox
25 from E5Gui.E5ProgressDialog import E5ProgressDialog
25 26
26 from .ProjectBrowserModel import ProjectBrowserFileItem, \ 27 from .ProjectBrowserModel import ProjectBrowserFileItem, \
27 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \ 28 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \
28 ProjectBrowserInterfaceType 29 ProjectBrowserInterfaceType
29 from .ProjectBaseBrowser import ProjectBaseBrowser 30 from .ProjectBaseBrowser import ProjectBaseBrowser
522 """ 523 """
523 Privat method to compile a .idl file to python. 524 Privat method to compile a .idl file to python.
524 525
525 @param fn filename of the .idl file to be compiled (string) 526 @param fn filename of the .idl file to be compiled (string)
526 @param noDialog flag indicating silent operations (boolean) 527 @param noDialog flag indicating silent operations (boolean)
527 @param progress reference to the progress dialog (QProgressDialog) 528 @param progress reference to the progress dialog (E5ProgressDialog)
528 @return reference to the compile process (QProcess) 529 @return reference to the compile process (QProcess)
529 """ 530 """
530 self.compileProc = QProcess() 531 self.compileProc = QProcess()
531 args = [] 532 args = []
532 533
575 """ 576 """
576 Private method to compile all interfaces to python. 577 Private method to compile all interfaces to python.
577 """ 578 """
578 if self.omniidl is not None: 579 if self.omniidl is not None:
579 numIDLs = len(self.project.pdata["INTERFACES"]) 580 numIDLs = len(self.project.pdata["INTERFACES"])
580 progress = QProgressDialog( 581 progress = E5ProgressDialog(
581 self.trUtf8("Compiling interfaces..."), 582 self.trUtf8("Compiling interfaces..."),
582 self.trUtf8("Abort"), 0, numIDLs, self) 583 self.trUtf8("Abort"), 0, numIDLs,
584 self.trUtf8("%v/%m Interfaces"), self)
583 progress.setModal(True) 585 progress.setModal(True)
584 progress.setMinimumDuration(0) 586 progress.setMinimumDuration(0)
585 i = 0 587 i = 0
586 588
587 for fn in self.project.pdata["INTERFACES"]: 589 for fn in self.project.pdata["INTERFACES"]:
608 items = self.getSelectedItems() 610 items = self.getSelectedItems()
609 611
610 files = [self.project.getRelativePath(itm.fileName()) 612 files = [self.project.getRelativePath(itm.fileName())
611 for itm in items] 613 for itm in items]
612 numIDLs = len(files) 614 numIDLs = len(files)
613 progress = QProgressDialog( 615 progress = E5ProgressDialog(
614 self.trUtf8("Compiling interfaces..."), 616 self.trUtf8("Compiling interfaces..."),
615 self.trUtf8("Abort"), 0, numIDLs, self) 617 self.trUtf8("Abort"), 0, numIDLs,
618 self.trUtf8("%v/%m Interfaces"), self)
616 progress.setModal(True) 619 progress.setModal(True)
617 progress.setMinimumDuration(0) 620 progress.setMinimumDuration(0)
618 i = 0 621 i = 0
619 622
620 for fn in files: 623 for fn in files:

eric ide

mercurial