28 """ |
28 """ |
29 def __init__(self, caption, lastUsedVenvName, argvList, wdList, envList, |
29 def __init__(self, caption, lastUsedVenvName, argvList, wdList, envList, |
30 exceptions, |
30 exceptions, |
31 parent=None, dialogType=0, modfuncList=None, |
31 parent=None, dialogType=0, modfuncList=None, |
32 tracePython=False, autoClearShell=True, autoContinue=True, |
32 tracePython=False, autoClearShell=True, autoContinue=True, |
33 enableMultiprocess=False, multiprocessNoDebugHistory=None): |
33 enableMultiprocess=False, multiprocessNoDebugHistory=None, |
|
34 enableConfigOverride=False, enableRedirect=True): |
34 """ |
35 """ |
35 Constructor |
36 Constructor |
36 |
37 |
37 @param caption the caption to be displayed |
38 @param caption the caption to be displayed |
38 @type str |
39 @type str |
72 debugging |
73 debugging |
73 @type bool |
74 @type bool |
74 @param multiprocessNoDebugHistory list of lists with programs not to be |
75 @param multiprocessNoDebugHistory list of lists with programs not to be |
75 debugged |
76 debugged |
76 @type list of str |
77 @type list of str |
|
78 @param enableConfigOverride flag indicating to enable global config |
|
79 override |
|
80 @type bool |
|
81 @param enableRedirect flag indicating to redirect stdin/stdout/stderr |
|
82 @type bool |
77 """ |
83 """ |
78 super(StartDialog, self).__init__(parent) |
84 super(StartDialog, self).__init__(parent) |
79 self.setModal(True) |
85 self.setModal(True) |
80 |
86 |
81 self.dialogType = dialogType |
87 self.dialogType = dialogType |
127 self.ui.consoleCheckBox.setEnabled( |
133 self.ui.consoleCheckBox.setEnabled( |
128 Preferences.getDebugger("ConsoleDbgCommand") != "") |
134 Preferences.getDebugger("ConsoleDbgCommand") != "") |
129 self.ui.consoleCheckBox.setChecked(False) |
135 self.ui.consoleCheckBox.setChecked(False) |
130 venvIndex = max(0, self.ui.venvComboBox.findText(lastUsedVenvName)) |
136 venvIndex = max(0, self.ui.venvComboBox.findText(lastUsedVenvName)) |
131 self.ui.venvComboBox.setCurrentIndex(venvIndex) |
137 self.ui.venvComboBox.setCurrentIndex(venvIndex) |
|
138 self.ui.globalOverrideGroup.setChecked(enableConfigOverride) |
|
139 self.ui.redirectCheckBox.setChecked(enableRedirect) |
132 |
140 |
133 if dialogType == 0: # start debug dialog |
141 if dialogType == 0: # start debug dialog |
134 enableMultiprocessGlobal = Preferences.getDebugger( |
142 enableMultiprocessGlobal = Preferences.getDebugger( |
135 "MultiProcessEnabled") |
143 "MultiProcessEnabled") |
136 self.ui.tracePythonCheckBox.setChecked(tracePython) |
144 self.ui.tracePythonCheckBox.setChecked(tracePython) |
185 environment, |
193 environment, |
186 self.ui.exceptionCheckBox.isChecked(), |
194 self.ui.exceptionCheckBox.isChecked(), |
187 self.ui.clearShellCheckBox.isChecked(), |
195 self.ui.clearShellCheckBox.isChecked(), |
188 self.ui.consoleCheckBox.isChecked(), |
196 self.ui.consoleCheckBox.isChecked(), |
189 ) |
197 ) |
190 |
198 |
|
199 def getGlobalOverrideData(self): |
|
200 """ |
|
201 Public method to retrieve the global configuration override data |
|
202 entered into this dialog. |
|
203 |
|
204 @return tuple containing a flag indicating to activate the global |
|
205 override and a flag indicating a redirect of stdin/stdout/stderr |
|
206 @rtype tuple of (bool, bool) |
|
207 """ |
|
208 return ( |
|
209 self.ui.globalOverrideGroup.isChecked(), |
|
210 self.ui.redirectCheckBox.isChecked(), |
|
211 ) |
|
212 |
191 def getDebugData(self): |
213 def getDebugData(self): |
192 """ |
214 """ |
193 Public method to retrieve the debug related data entered into this |
215 Public method to retrieve the debug related data entered into this |
194 dialog. |
216 dialog. |
195 |
217 |