Project/ProjectResourcesBrowser.py

branch
maintenance
changeset 5730
6422afc7adc4
parent 5726
e1dbd217214a
child 6048
82ad8ec9548c
equal deleted inserted replaced
5695:9a71bd9e2e37 5730:6422afc7adc4
37 """ 37 """
38 A class used to display the resources part of the project. 38 A class used to display the resources part of the project.
39 39
40 @signal appendStderr(str) emitted after something was received from 40 @signal appendStderr(str) emitted after something was received from
41 a QProcess on stderr 41 a QProcess on stderr
42 @signal sourceFile(str) emitted to open a resources file in an editor
43 @signal closeSourceWindow(str) emitted after a file has been
44 removed/deleted from the project
45 @signal showMenu(str, QMenu) emitted when a menu is about to be shown. 42 @signal showMenu(str, QMenu) emitted when a menu is about to be shown.
46 The name of the menu and a reference to the menu are given. 43 The name of the menu and a reference to the menu are given.
47 """ 44 """
48 appendStderr = pyqtSignal(str) 45 appendStderr = pyqtSignal(str)
49 showMenu = pyqtSignal(str, QMenu) 46 showMenu = pyqtSignal(str, QMenu)
528 ########################################################################### 525 ###########################################################################
529 526
530 def __readStdout(self): 527 def __readStdout(self):
531 """ 528 """
532 Private slot to handle the readyReadStandardOutput signal of the 529 Private slot to handle the readyReadStandardOutput signal of the
533 pyrcc4/rbrcc process. 530 pyrcc4/pyrcc5/pyside-rcc/rbrcc process.
534 """ 531 """
535 if self.compileProc is None: 532 if self.compileProc is None:
536 return 533 return
537 self.compileProc.setReadChannel(QProcess.StandardOutput) 534 self.compileProc.setReadChannel(QProcess.StandardOutput)
538 535
542 'replace') 539 'replace')
543 540
544 def __readStderr(self): 541 def __readStderr(self):
545 """ 542 """
546 Private slot to handle the readyReadStandardError signal of the 543 Private slot to handle the readyReadStandardError signal of the
547 pyrcc4/rbrcc process. 544 pyrcc4/pyrcc5/pyside-rcc/rbrcc process.
548 """ 545 """
549 if self.compileProc is None: 546 if self.compileProc is None:
550 return 547 return
551 548
552 ioEncoding = Preferences.getSystem("IOEncoding") 549 ioEncoding = Preferences.getSystem("IOEncoding")
631 self.buf = "" 628 self.buf = ""
632 629
633 if self.project.getProjectLanguage() in \ 630 if self.project.getProjectLanguage() in \
634 ["Python", "Python2", "Python3"]: 631 ["Python", "Python2", "Python3"]:
635 if self.project.getProjectType() in ["Qt4", "Qt4C"]: 632 if self.project.getProjectType() in ["Qt4", "Qt4C"]:
636 self.rccCompiler = 'pyrcc4' 633 self.rccCompiler = Utilities.generatePyQtToolPath('pyrcc4')
637 if Utilities.isWindowsPlatform():
638 self.rccCompiler = \
639 Utilities.getWindowsExecutablePath(self.rccCompiler)
640 if PYQT_VERSION >= 0x040500: 634 if PYQT_VERSION >= 0x040500:
641 if self.project.getProjectLanguage() in \ 635 if self.project.getProjectLanguage() in \
642 ["Python", "Python2"]: 636 ["Python", "Python2"]:
643 args.append("-py2") 637 args.append("-py2")
644 else: 638 else:
645 args.append("-py3") 639 args.append("-py3")
646 elif self.project.getProjectType() in ["PyQt5", "PyQt5C"]: 640 elif self.project.getProjectType() in ["PyQt5", "PyQt5C"]:
647 self.rccCompiler = 'pyrcc5' 641 self.rccCompiler = Utilities.generatePyQtToolPath('pyrcc5')
648 if Utilities.isWindowsPlatform():
649 self.rccCompiler = \
650 Utilities.getWindowsExecutablePath(self.rccCompiler)
651 elif self.project.getProjectType() in ["E6Plugin"]: 642 elif self.project.getProjectType() in ["E6Plugin"]:
652 if PYQT_VERSION < 0x050000: 643 if PYQT_VERSION < 0x050000:
653 self.rccCompiler = 'pyrcc4' 644 self.rccCompiler = Utilities.generatePyQtToolPath('pyrcc4')
654 if self.project.getProjectLanguage() in \ 645 if self.project.getProjectLanguage() in \
655 ["Python", "Python2"]: 646 ["Python", "Python2"]:
656 args.append("-py2") 647 args.append("-py2")
657 else: 648 else:
658 args.append("-py3") 649 args.append("-py3")
659 else: 650 else:
660 self.rccCompiler = 'pyrcc5' 651 self.rccCompiler = Utilities.generatePyQtToolPath('pyrcc5')
661 if Utilities.isWindowsPlatform():
662 self.rccCompiler = \
663 Utilities.getWindowsExecutablePath(self.rccCompiler)
664 elif self.project.getProjectType() in ["PySide", "PySideC"]: 652 elif self.project.getProjectType() in ["PySide", "PySideC"]:
665 self.rccCompiler = Utilities.generatePySideToolPath( 653 self.rccCompiler = Utilities.generatePySideToolPath(
666 'pyside-rcc') 654 'pyside-rcc')
667 if self.project.getProjectLanguage() in \ 655 if self.project.getProjectLanguage() in \
668 ["Python", "Python2"]: 656 ["Python", "Python2"]:

eric ide

mercurial