11064:c2cb561a39b0 | 11118:967a88a16a21 |
---|---|
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 | 2 |
3 # Copyright (c) 2002 - 2024 Detlev Offenbach <detlev@die-offenbachs.de> | 3 # Copyright (c) 2002 - 2025 Detlev Offenbach <detlev@die-offenbachs.de> |
4 # | 4 # |
5 | 5 |
6 """ | 6 """ |
7 Module implementing the main user interface. | 7 Module implementing the main user interface. |
8 """ | 8 """ |
6713 Private slot to start an external tool process. | 6713 Private slot to start an external tool process. |
6714 | 6714 |
6715 @param tool dictionary of tool entries | 6715 @param tool dictionary of tool entries |
6716 @type dict | 6716 @type dict |
6717 """ | 6717 """ |
6718 proc = QProcess() | 6718 proc = QProcess(self) |
6719 procData = (None,) | 6719 procData = (None,) |
6720 program = tool["executable"] | 6720 program = tool["executable"] |
6721 args = [] | 6721 args = [] |
6722 argv = Utilities.parseOptionString(tool["arguments"]) | 6722 argv = Utilities.parseOptionString(tool["arguments"]) |
6723 args.extend(argv) | 6723 args.extend(argv) |
6813 if toolProcData[1] == "replaceSelection": | 6813 if toolProcData[1] == "replaceSelection": |
6814 text = "".join(toolProcData[2]) | 6814 text = "".join(toolProcData[2]) |
6815 toolProcData[0].replace(text) | 6815 toolProcData[0].replace(text) |
6816 toolProcData[0].endUndoAction() | 6816 toolProcData[0].endUndoAction() |
6817 | 6817 |
6818 # now delete the exited procs from the list of running processes | 6818 # now delete the exited processes from the list of running processes |
6819 for proc in exitedProcs: | 6819 for proc in exitedProcs: |
6820 self.toolProcs.remove(proc) | 6820 self.toolProcs.remove(proc) |
6821 t = self.tr("Process '{0}' has exited.\n").format(proc[0]) | 6821 t = self.tr("Process '{0}' has exited.\n").format(proc[0]) |
6822 self.appendToStdout(t) | 6822 self.appendToStdout(t) |
6823 proc.deleteLater() | |
6823 | 6824 |
6824 def __showPythonDoc(self): | 6825 def __showPythonDoc(self): |
6825 """ | 6826 """ |
6826 Private slot to show the Python 3 documentation. | 6827 Private slot to show the Python 3 documentation. |
6827 """ | 6828 """ |