Debugger/StartDialog.py

changeset 945
8cd4d08fa9f6
parent 882
34b86be88bf0
child 1112
8a7d1b9d18db
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
13 from E5Gui.E5Completers import E5DirCompleter 13 from E5Gui.E5Completers import E5DirCompleter
14 from E5Gui import E5FileDialog 14 from E5Gui import E5FileDialog
15 15
16 import Utilities 16 import Utilities
17 import Preferences 17 import Preferences
18
18 19
19 class StartDialog(QDialog): 20 class StartDialog(QDialog):
20 """ 21 """
21 Class implementing the Start Program dialog. 22 Class implementing the Start Program dialog.
22 23
23 It implements a dialog that is used to start an 24 It implements a dialog that is used to start an
24 application for debugging. It asks the user to enter 25 application for debugging. It asks the user to enter
25 the commandline parameters, the working directory and 26 the commandline parameters, the working directory and
26 whether exception reporting should be disabled. 27 whether exception reporting should be disabled.
27 """ 28 """
28 def __init__(self, caption, argvList, wdList, envList, exceptions, parent = None, 29 def __init__(self, caption, argvList, wdList, envList, exceptions, parent=None,
29 type = 0, modfuncList = None, tracePython = False, autoClearShell = True, 30 type=0, modfuncList=None, tracePython=False, autoClearShell=True,
30 autoContinue = True, autoFork = False, forkChild = False): 31 autoContinue=True, autoFork=False, forkChild=False):
31 """ 32 """
32 Constructor 33 Constructor
33 34
34 @param caption the caption to be displayed (string) 35 @param caption the caption to be displayed (string)
35 @param argvList history list of commandline arguments (list of strings) 36 @param argvList history list of commandline arguments (list of strings)
43 <li>1 = start run dialog</li> 44 <li>1 = start run dialog</li>
44 <li>2 = start coverage dialog</li> 45 <li>2 = start coverage dialog</li>
45 <li>3 = start profile dialog</li> 46 <li>3 = start profile dialog</li>
46 </ul> 47 </ul>
47 @keyparam modfuncList history list of module functions (list of strings) 48 @keyparam modfuncList history list of module functions (list of strings)
48 @keyparam tracePython flag indicating if the Python library should 49 @keyparam tracePython flag indicating if the Python library should
49 be traced as well (boolean) 50 be traced as well (boolean)
50 @keyparam autoClearShell flag indicating, that the interpreter window should 51 @keyparam autoClearShell flag indicating, that the interpreter window should
51 be cleared automatically (boolean) 52 be cleared automatically (boolean)
52 @keyparam autoContinue flag indicating, that the debugger should not stop at 53 @keyparam autoContinue flag indicating, that the debugger should not stop at
53 the first executable line (boolean) 54 the first executable line (boolean)
142 """ 143 """
143 cmdLine = self.ui.cmdlineCombo.currentText() 144 cmdLine = self.ui.cmdlineCombo.currentText()
144 workdir = self.ui.workdirCombo.currentText() 145 workdir = self.ui.workdirCombo.currentText()
145 environment = self.ui.environmentCombo.currentText() 146 environment = self.ui.environmentCombo.currentText()
146 147
147 return (cmdLine, 148 return (cmdLine,
148 workdir, 149 workdir,
149 environment, 150 environment,
150 self.ui.exceptionCheckBox.isChecked(), 151 self.ui.exceptionCheckBox.isChecked(),
151 self.ui.clearShellCheckBox.isChecked(), 152 self.ui.clearShellCheckBox.isChecked(),
152 self.__clearHistoryLists, 153 self.__clearHistoryLists,
153 self.ui.consoleCheckBox.isChecked()) 154 self.ui.consoleCheckBox.isChecked())
154 155
155 def getDebugData(self): 156 def getDebugData(self):
156 """ 157 """
157 Public method to retrieve the debug related data entered into this dialog. 158 Public method to retrieve the debug related data entered into this dialog.
158 159
159 @return a tuple of a flag indicating, if the Python library should be traced 160 @return a tuple of a flag indicating, if the Python library should be traced
160 as well, a flag indicating, that the debugger should not stop at the 161 as well, a flag indicating, that the debugger should not stop at the
161 first executable line (boolean), a flag indicating, that the debugger 162 first executable line (boolean), a flag indicating, that the debugger
162 should fork automatically (boolean) and a flag indicating, that the 163 should fork automatically (boolean) and a flag indicating, that the
163 debugger should debug the child process after forking automatically (boolean) 164 debugger should debug the child process after forking automatically (boolean)
164 """ 165 """
165 if self.type == 0: 166 if self.type == 0:
166 return (self.ui.tracePythonCheckBox.isChecked(), 167 return (self.ui.tracePythonCheckBox.isChecked(),
167 self.ui.autoContinueCheckBox.isChecked(), 168 self.ui.autoContinueCheckBox.isChecked(),
168 self.ui.forkModeCheckBox.isChecked(), 169 self.ui.forkModeCheckBox.isChecked(),
169 self.ui.forkChildCheckBox.isChecked()) 170 self.ui.forkChildCheckBox.isChecked())
170 171
171 def getRunData(self): 172 def getRunData(self):
172 """ 173 """
173 Public method to retrieve the debug related data entered into this dialog. 174 Public method to retrieve the debug related data entered into this dialog.
174 175
175 @return a tuple of a flag indicating, that the debugger should fork automatically 176 @return a tuple of a flag indicating, that the debugger should fork automatically
176 (boolean) and a flag indicating, that the debugger should debug the child 177 (boolean) and a flag indicating, that the debugger should debug the child
177 process after forking automatically (boolean) 178 process after forking automatically (boolean)
178 """ 179 """
179 if self.type == 1: 180 if self.type == 1:
180 return (self.ui.forkModeCheckBox.isChecked(), 181 return (self.ui.forkModeCheckBox.isChecked(),
181 self.ui.forkChildCheckBox.isChecked()) 182 self.ui.forkChildCheckBox.isChecked())
182 183
183 def getCoverageData(self): 184 def getCoverageData(self):
184 """ 185 """
185 Public method to retrieve the coverage related data entered into this dialog. 186 Public method to retrieve the coverage related data entered into this dialog.

eric ide

mercurial