451 |
451 |
452 def _contextMenuRequested(self, coord): |
452 def _contextMenuRequested(self, coord): |
453 """ |
453 """ |
454 Protected slot to show the context menu. |
454 Protected slot to show the context menu. |
455 |
455 |
456 @param coord the position of the mouse pointer (QPoint) |
456 @param coord the position of the mouse pointer |
|
457 @type QPoint |
457 """ |
458 """ |
458 if not self.project.isOpen(): |
459 if not self.project.isOpen(): |
459 return |
460 return |
460 |
461 |
461 enable = self.project.getProjectType() in ("PyQt5", "PyQt6", "E7Plugin") |
462 enable = self.project.getProjectType() in ("PyQt5", "PyQt6", "E7Plugin") |
638 def __newUiForm(self, path): |
639 def __newUiForm(self, path): |
639 """ |
640 """ |
640 Private slot to handle the New Form menu action for Qt-related |
641 Private slot to handle the New Form menu action for Qt-related |
641 projects. |
642 projects. |
642 |
643 |
643 @param path full directory path for the new form file (string) |
644 @param path full directory path for the new form file |
|
645 @type str |
644 """ |
646 """ |
645 selectedForm, ok = QInputDialog.getItem( |
647 selectedForm, ok = QInputDialog.getItem( |
646 None, |
648 None, |
647 self.tr("New Form"), |
649 self.tr("New Form"), |
648 self.tr("Select a form type:"), |
650 self.tr("Select a form type:"), |
807 |
809 |
808 def __compileUIDone(self, exitCode, exitStatus): |
810 def __compileUIDone(self, exitCode, exitStatus): |
809 """ |
811 """ |
810 Private slot to handle the finished signal of the pyuic/rbuic process. |
812 Private slot to handle the finished signal of the pyuic/rbuic process. |
811 |
813 |
812 @param exitCode exit code of the process (integer) |
814 @param exitCode exit code of the process |
813 @param exitStatus exit status of the process (QProcess.ExitStatus) |
815 @type int |
|
816 @param exitStatus exit status of the process |
|
817 @type QProcess.ExitStatus |
814 """ |
818 """ |
815 self.compileRunning = False |
819 self.compileRunning = False |
816 ericApp().getObject("ViewManager").enableEditorsCheckFocusIn(True) |
820 ericApp().getObject("ViewManager").enableEditorsCheckFocusIn(True) |
817 ui = ericApp().getObject("UserInterface") |
821 ui = ericApp().getObject("UserInterface") |
818 if ( |
822 if ( |
861 def __compileUI(self, fn, noDialog=False, progress=None): |
865 def __compileUI(self, fn, noDialog=False, progress=None): |
862 """ |
866 """ |
863 Private method to compile a .ui file to a .py/.rb file. |
867 Private method to compile a .ui file to a .py/.rb file. |
864 |
868 |
865 @param fn filename of the .ui file to be compiled |
869 @param fn filename of the .ui file to be compiled |
|
870 @type str |
866 @param noDialog flag indicating silent operations |
871 @param noDialog flag indicating silent operations |
|
872 @type bool |
867 @param progress reference to the progress dialog |
873 @param progress reference to the progress dialog |
868 @return reference to the compile process (QProcess) |
874 @type QProgressDialog |
|
875 @return reference to the compile process |
|
876 @rtype QProcess |
869 """ |
877 """ |
870 self.compileProc = QProcess() |
878 self.compileProc = QProcess() |
871 args = [] |
879 args = [] |
872 self.__buf = [] |
880 self.__buf = [] |
873 |
881 |