154 """ |
154 """ |
155 Method defining the user interface actions. |
155 Method defining the user interface actions. |
156 """ |
156 """ |
157 self.actions = [] |
157 self.actions = [] |
158 |
158 |
159 self.runAct = E4Action(self.trUtf8('Run Script'), |
159 self.runAct = E5Action(self.trUtf8('Run Script'), |
160 UI.PixmapCache.getIcon("runScript.png"), |
160 UI.PixmapCache.getIcon("runScript.png"), |
161 self.trUtf8('&Run Script...'),Qt.Key_F2,0,self,'dbg_run_script') |
161 self.trUtf8('&Run Script...'),Qt.Key_F2,0,self,'dbg_run_script') |
162 self.runAct.setStatusTip(self.trUtf8('Run the current Script')) |
162 self.runAct.setStatusTip(self.trUtf8('Run the current Script')) |
163 self.runAct.setWhatsThis(self.trUtf8( |
163 self.runAct.setWhatsThis(self.trUtf8( |
164 """<b>Run Script</b>""" |
164 """<b>Run Script</b>""" |
166 """ debugger. If the file has unsaved changes it may be saved first.</p>""" |
166 """ debugger. If the file has unsaved changes it may be saved first.</p>""" |
167 )) |
167 )) |
168 self.connect(self.runAct, SIGNAL('triggered()'), self.__runScript) |
168 self.connect(self.runAct, SIGNAL('triggered()'), self.__runScript) |
169 self.actions.append(self.runAct) |
169 self.actions.append(self.runAct) |
170 |
170 |
171 self.runProjectAct = E4Action(self.trUtf8('Run Project'), |
171 self.runProjectAct = E5Action(self.trUtf8('Run Project'), |
172 UI.PixmapCache.getIcon("runProject.png"), |
172 UI.PixmapCache.getIcon("runProject.png"), |
173 self.trUtf8('Run &Project...'),Qt.SHIFT + Qt.Key_F2,0,self, |
173 self.trUtf8('Run &Project...'),Qt.SHIFT + Qt.Key_F2,0,self, |
174 'dbg_run_project') |
174 'dbg_run_project') |
175 self.runProjectAct.setStatusTip(self.trUtf8('Run the current Project')) |
175 self.runProjectAct.setStatusTip(self.trUtf8('Run the current Project')) |
176 self.runProjectAct.setWhatsThis(self.trUtf8( |
176 self.runProjectAct.setWhatsThis(self.trUtf8( |
181 """ be saved first.</p>""" |
181 """ be saved first.</p>""" |
182 )) |
182 )) |
183 self.connect(self.runProjectAct, SIGNAL('triggered()'), self.__runProject) |
183 self.connect(self.runProjectAct, SIGNAL('triggered()'), self.__runProject) |
184 self.actions.append(self.runProjectAct) |
184 self.actions.append(self.runProjectAct) |
185 |
185 |
186 self.coverageAct = E4Action(self.trUtf8('Coverage run of Script'), |
186 self.coverageAct = E5Action(self.trUtf8('Coverage run of Script'), |
187 UI.PixmapCache.getIcon("coverageScript.png"), |
187 UI.PixmapCache.getIcon("coverageScript.png"), |
188 self.trUtf8('Coverage run of Script...'),0,0,self,'dbg_coverage_script') |
188 self.trUtf8('Coverage run of Script...'),0,0,self,'dbg_coverage_script') |
189 self.coverageAct.setStatusTip(\ |
189 self.coverageAct.setStatusTip(\ |
190 self.trUtf8('Perform a coverage run of the current Script')) |
190 self.trUtf8('Perform a coverage run of the current Script')) |
191 self.coverageAct.setWhatsThis(self.trUtf8( |
191 self.coverageAct.setWhatsThis(self.trUtf8( |
195 """ saved first.</p>""" |
195 """ saved first.</p>""" |
196 )) |
196 )) |
197 self.connect(self.coverageAct, SIGNAL('triggered()'), self.__coverageScript) |
197 self.connect(self.coverageAct, SIGNAL('triggered()'), self.__coverageScript) |
198 self.actions.append(self.coverageAct) |
198 self.actions.append(self.coverageAct) |
199 |
199 |
200 self.coverageProjectAct = E4Action(self.trUtf8('Coverage run of Project'), |
200 self.coverageProjectAct = E5Action(self.trUtf8('Coverage run of Project'), |
201 UI.PixmapCache.getIcon("coverageProject.png"), |
201 UI.PixmapCache.getIcon("coverageProject.png"), |
202 self.trUtf8('Coverage run of Project...'),0,0,self,'dbg_coverage_project') |
202 self.trUtf8('Coverage run of Project...'),0,0,self,'dbg_coverage_project') |
203 self.coverageProjectAct.setStatusTip(\ |
203 self.coverageProjectAct.setStatusTip(\ |
204 self.trUtf8('Perform a coverage run of the current Project')) |
204 self.trUtf8('Perform a coverage run of the current Project')) |
205 self.coverageProjectAct.setWhatsThis(self.trUtf8( |
205 self.coverageProjectAct.setWhatsThis(self.trUtf8( |
210 """ be saved first.</p>""" |
210 """ be saved first.</p>""" |
211 )) |
211 )) |
212 self.connect(self.coverageProjectAct, SIGNAL('triggered()'), self.__coverageProject) |
212 self.connect(self.coverageProjectAct, SIGNAL('triggered()'), self.__coverageProject) |
213 self.actions.append(self.coverageProjectAct) |
213 self.actions.append(self.coverageProjectAct) |
214 |
214 |
215 self.profileAct = E4Action(self.trUtf8('Profile Script'), |
215 self.profileAct = E5Action(self.trUtf8('Profile Script'), |
216 UI.PixmapCache.getIcon("profileScript.png"), |
216 UI.PixmapCache.getIcon("profileScript.png"), |
217 self.trUtf8('Profile Script...'),0,0,self,'dbg_profile_script') |
217 self.trUtf8('Profile Script...'),0,0,self,'dbg_profile_script') |
218 self.profileAct.setStatusTip(self.trUtf8('Profile the current Script')) |
218 self.profileAct.setStatusTip(self.trUtf8('Profile the current Script')) |
219 self.profileAct.setWhatsThis(self.trUtf8( |
219 self.profileAct.setWhatsThis(self.trUtf8( |
220 """<b>Profile Script</b>""" |
220 """<b>Profile Script</b>""" |
222 """ If the file has unsaved changes it may be saved first.</p>""" |
222 """ If the file has unsaved changes it may be saved first.</p>""" |
223 )) |
223 )) |
224 self.connect(self.profileAct, SIGNAL('triggered()'), self.__profileScript) |
224 self.connect(self.profileAct, SIGNAL('triggered()'), self.__profileScript) |
225 self.actions.append(self.profileAct) |
225 self.actions.append(self.profileAct) |
226 |
226 |
227 self.profileProjectAct = E4Action(self.trUtf8('Profile Project'), |
227 self.profileProjectAct = E5Action(self.trUtf8('Profile Project'), |
228 UI.PixmapCache.getIcon("profileProject.png"), |
228 UI.PixmapCache.getIcon("profileProject.png"), |
229 self.trUtf8('Profile Project...'),0,0,self,'dbg_profile_project') |
229 self.trUtf8('Profile Project...'),0,0,self,'dbg_profile_project') |
230 self.profileProjectAct.setStatusTip(self.trUtf8('Profile the current Project')) |
230 self.profileProjectAct.setStatusTip(self.trUtf8('Profile the current Project')) |
231 self.profileProjectAct.setWhatsThis(self.trUtf8( |
231 self.profileProjectAct.setWhatsThis(self.trUtf8( |
232 """<b>Profile Project</b>""" |
232 """<b>Profile Project</b>""" |
235 """ be saved first.</p>""" |
235 """ be saved first.</p>""" |
236 )) |
236 )) |
237 self.connect(self.profileProjectAct, SIGNAL('triggered()'), self.__profileProject) |
237 self.connect(self.profileProjectAct, SIGNAL('triggered()'), self.__profileProject) |
238 self.actions.append(self.profileProjectAct) |
238 self.actions.append(self.profileProjectAct) |
239 |
239 |
240 self.debugAct = E4Action(self.trUtf8('Debug Script'), |
240 self.debugAct = E5Action(self.trUtf8('Debug Script'), |
241 UI.PixmapCache.getIcon("debugScript.png"), |
241 UI.PixmapCache.getIcon("debugScript.png"), |
242 self.trUtf8('&Debug Script...'),Qt.Key_F5,0,self,'dbg_debug_script') |
242 self.trUtf8('&Debug Script...'),Qt.Key_F5,0,self,'dbg_debug_script') |
243 self.debugAct.setStatusTip(self.trUtf8('Debug the current Script')) |
243 self.debugAct.setStatusTip(self.trUtf8('Debug the current Script')) |
244 self.debugAct.setWhatsThis(self.trUtf8( |
244 self.debugAct.setWhatsThis(self.trUtf8( |
245 """<b>Debug Script</b>""" |
245 """<b>Debug Script</b>""" |
248 """ If the file has unsaved changes it may be saved first.</p>""" |
248 """ If the file has unsaved changes it may be saved first.</p>""" |
249 )) |
249 )) |
250 self.connect(self.debugAct, SIGNAL('triggered()'), self.__debugScript) |
250 self.connect(self.debugAct, SIGNAL('triggered()'), self.__debugScript) |
251 self.actions.append(self.debugAct) |
251 self.actions.append(self.debugAct) |
252 |
252 |
253 self.debugProjectAct = E4Action(self.trUtf8('Debug Project'), |
253 self.debugProjectAct = E5Action(self.trUtf8('Debug Project'), |
254 UI.PixmapCache.getIcon("debugProject.png"), |
254 UI.PixmapCache.getIcon("debugProject.png"), |
255 self.trUtf8('Debug &Project...'),Qt.SHIFT + Qt.Key_F5,0,self, |
255 self.trUtf8('Debug &Project...'),Qt.SHIFT + Qt.Key_F5,0,self, |
256 'dbg_debug_project') |
256 'dbg_debug_project') |
257 self.debugProjectAct.setStatusTip(self.trUtf8('Debug the current Project')) |
257 self.debugProjectAct.setStatusTip(self.trUtf8('Debug the current Project')) |
258 self.debugProjectAct.setWhatsThis(self.trUtf8( |
258 self.debugProjectAct.setWhatsThis(self.trUtf8( |
263 """ be saved first.</p>""" |
263 """ be saved first.</p>""" |
264 )) |
264 )) |
265 self.connect(self.debugProjectAct, SIGNAL('triggered()'), self.__debugProject) |
265 self.connect(self.debugProjectAct, SIGNAL('triggered()'), self.__debugProject) |
266 self.actions.append(self.debugProjectAct) |
266 self.actions.append(self.debugProjectAct) |
267 |
267 |
268 self.restartAct = E4Action(self.trUtf8('Restart Script'), |
268 self.restartAct = E5Action(self.trUtf8('Restart Script'), |
269 UI.PixmapCache.getIcon("restart.png"), |
269 UI.PixmapCache.getIcon("restart.png"), |
270 self.trUtf8('Restart Script'),Qt.Key_F4,0,self,'dbg_restart_script') |
270 self.trUtf8('Restart Script'),Qt.Key_F4,0,self,'dbg_restart_script') |
271 self.restartAct.setStatusTip(self.trUtf8('Restart the last debugged script')) |
271 self.restartAct.setStatusTip(self.trUtf8('Restart the last debugged script')) |
272 self.restartAct.setWhatsThis(self.trUtf8( |
272 self.restartAct.setWhatsThis(self.trUtf8( |
273 """<b>Restart Script</b>""" |
273 """<b>Restart Script</b>""" |
276 """ If there are unsaved changes, they may be saved first.</p>""" |
276 """ If there are unsaved changes, they may be saved first.</p>""" |
277 )) |
277 )) |
278 self.connect(self.restartAct, SIGNAL('triggered()'), self.__doRestart) |
278 self.connect(self.restartAct, SIGNAL('triggered()'), self.__doRestart) |
279 self.actions.append(self.restartAct) |
279 self.actions.append(self.restartAct) |
280 |
280 |
281 self.stopAct = E4Action(self.trUtf8('Stop Script'), |
281 self.stopAct = E5Action(self.trUtf8('Stop Script'), |
282 UI.PixmapCache.getIcon("stopScript.png"), |
282 UI.PixmapCache.getIcon("stopScript.png"), |
283 self.trUtf8('Stop Script'),Qt.SHIFT + Qt.Key_F10,0, |
283 self.trUtf8('Stop Script'),Qt.SHIFT + Qt.Key_F10,0, |
284 self,'dbg_stop_script') |
284 self,'dbg_stop_script') |
285 self.stopAct.setStatusTip(self.trUtf8("""Stop the running script.""")) |
285 self.stopAct.setStatusTip(self.trUtf8("""Stop the running script.""")) |
286 self.stopAct.setWhatsThis(self.trUtf8( |
286 self.stopAct.setWhatsThis(self.trUtf8( |
290 self.connect(self.stopAct, SIGNAL('triggered()'), self.__stopScript) |
290 self.connect(self.stopAct, SIGNAL('triggered()'), self.__stopScript) |
291 self.actions.append(self.stopAct) |
291 self.actions.append(self.stopAct) |
292 |
292 |
293 self.debugActGrp = createActionGroup(self) |
293 self.debugActGrp = createActionGroup(self) |
294 |
294 |
295 act = E4Action(self.trUtf8('Continue'), |
295 act = E5Action(self.trUtf8('Continue'), |
296 UI.PixmapCache.getIcon("continue.png"), |
296 UI.PixmapCache.getIcon("continue.png"), |
297 self.trUtf8('&Continue'),Qt.Key_F6,0, |
297 self.trUtf8('&Continue'),Qt.Key_F6,0, |
298 self.debugActGrp,'dbg_continue') |
298 self.debugActGrp,'dbg_continue') |
299 act.setStatusTip(\ |
299 act.setStatusTip(\ |
300 self.trUtf8('Continue running the program from the current line')) |
300 self.trUtf8('Continue running the program from the current line')) |
304 """ stop when it terminates or when a breakpoint is reached.</p>""" |
304 """ stop when it terminates or when a breakpoint is reached.</p>""" |
305 )) |
305 )) |
306 self.connect(act, SIGNAL('triggered()'), self.__continue) |
306 self.connect(act, SIGNAL('triggered()'), self.__continue) |
307 self.actions.append(act) |
307 self.actions.append(act) |
308 |
308 |
309 act = E4Action(self.trUtf8('Continue to Cursor'), |
309 act = E5Action(self.trUtf8('Continue to Cursor'), |
310 UI.PixmapCache.getIcon("continueToCursor.png"), |
310 UI.PixmapCache.getIcon("continueToCursor.png"), |
311 self.trUtf8('Continue &To Cursor'),Qt.SHIFT + Qt.Key_F6,0, |
311 self.trUtf8('Continue &To Cursor'),Qt.SHIFT + Qt.Key_F6,0, |
312 self.debugActGrp,'dbg_continue_to_cursor') |
312 self.debugActGrp,'dbg_continue_to_cursor') |
313 act.setStatusTip(self.trUtf8("""Continue running the program from the""" |
313 act.setStatusTip(self.trUtf8("""Continue running the program from the""" |
314 """ current line to the current cursor position""")) |
314 """ current line to the current cursor position""")) |
318 """ current cursor position.</p>""" |
318 """ current cursor position.</p>""" |
319 )) |
319 )) |
320 self.connect(act, SIGNAL('triggered()'), self.__runToCursor) |
320 self.connect(act, SIGNAL('triggered()'), self.__runToCursor) |
321 self.actions.append(act) |
321 self.actions.append(act) |
322 |
322 |
323 act = E4Action(self.trUtf8('Single Step'), |
323 act = E5Action(self.trUtf8('Single Step'), |
324 UI.PixmapCache.getIcon("step.png"), |
324 UI.PixmapCache.getIcon("step.png"), |
325 self.trUtf8('Sin&gle Step'),Qt.Key_F7,0, |
325 self.trUtf8('Sin&gle Step'),Qt.Key_F7,0, |
326 self.debugActGrp,'dbg_single_step') |
326 self.debugActGrp,'dbg_single_step') |
327 act.setStatusTip(self.trUtf8('Execute a single Python statement')) |
327 act.setStatusTip(self.trUtf8('Execute a single Python statement')) |
328 act.setWhatsThis(self.trUtf8( |
328 act.setWhatsThis(self.trUtf8( |
333 """ the next statement.</p>""" |
333 """ the next statement.</p>""" |
334 )) |
334 )) |
335 self.connect(act, SIGNAL('triggered()'), self.__step) |
335 self.connect(act, SIGNAL('triggered()'), self.__step) |
336 self.actions.append(act) |
336 self.actions.append(act) |
337 |
337 |
338 act = E4Action(self.trUtf8('Step Over'), |
338 act = E5Action(self.trUtf8('Step Over'), |
339 UI.PixmapCache.getIcon("stepOver.png"), |
339 UI.PixmapCache.getIcon("stepOver.png"), |
340 self.trUtf8('Step &Over'),Qt.Key_F8,0, |
340 self.trUtf8('Step &Over'),Qt.Key_F8,0, |
341 self.debugActGrp,'dbg_step_over') |
341 self.debugActGrp,'dbg_step_over') |
342 act.setStatusTip(self.trUtf8("""Execute a single Python statement staying""" |
342 act.setStatusTip(self.trUtf8("""Execute a single Python statement staying""" |
343 """ in the current frame""")) |
343 """ in the current frame""")) |
349 """ after the statement has completed.</p>""" |
349 """ after the statement has completed.</p>""" |
350 )) |
350 )) |
351 self.connect(act, SIGNAL('triggered()'), self.__stepOver) |
351 self.connect(act, SIGNAL('triggered()'), self.__stepOver) |
352 self.actions.append(act) |
352 self.actions.append(act) |
353 |
353 |
354 act = E4Action(self.trUtf8('Step Out'), |
354 act = E5Action(self.trUtf8('Step Out'), |
355 UI.PixmapCache.getIcon("stepOut.png"), |
355 UI.PixmapCache.getIcon("stepOut.png"), |
356 self.trUtf8('Step Ou&t'),Qt.Key_F9,0, |
356 self.trUtf8('Step Ou&t'),Qt.Key_F9,0, |
357 self.debugActGrp,'dbg_step_out') |
357 self.debugActGrp,'dbg_step_out') |
358 act.setStatusTip(self.trUtf8("""Execute Python statements until leaving""" |
358 act.setStatusTip(self.trUtf8("""Execute Python statements until leaving""" |
359 """ the current frame""")) |
359 """ the current frame""")) |
365 """ to the debugger after the current frame has been left.</p>""" |
365 """ to the debugger after the current frame has been left.</p>""" |
366 )) |
366 )) |
367 self.connect(act, SIGNAL('triggered()'), self.__stepOut) |
367 self.connect(act, SIGNAL('triggered()'), self.__stepOut) |
368 self.actions.append(act) |
368 self.actions.append(act) |
369 |
369 |
370 act = E4Action(self.trUtf8('Stop'), |
370 act = E5Action(self.trUtf8('Stop'), |
371 UI.PixmapCache.getIcon("stepQuit.png"), |
371 UI.PixmapCache.getIcon("stepQuit.png"), |
372 self.trUtf8('&Stop'),Qt.Key_F10,0, |
372 self.trUtf8('&Stop'),Qt.Key_F10,0, |
373 self.debugActGrp,'dbg_stop') |
373 self.debugActGrp,'dbg_stop') |
374 act.setStatusTip(self.trUtf8('Stop debugging')) |
374 act.setStatusTip(self.trUtf8('Stop debugging')) |
375 act.setWhatsThis(self.trUtf8( |
375 act.setWhatsThis(self.trUtf8( |
379 self.connect(act, SIGNAL('triggered()'), self.__stepQuit) |
379 self.connect(act, SIGNAL('triggered()'), self.__stepQuit) |
380 self.actions.append(act) |
380 self.actions.append(act) |
381 |
381 |
382 self.debugActGrp2 = createActionGroup(self) |
382 self.debugActGrp2 = createActionGroup(self) |
383 |
383 |
384 act = E4Action(self.trUtf8('Evaluate'), |
384 act = E5Action(self.trUtf8('Evaluate'), |
385 self.trUtf8('E&valuate...'), |
385 self.trUtf8('E&valuate...'), |
386 0,0,self.debugActGrp2,'dbg_evaluate') |
386 0,0,self.debugActGrp2,'dbg_evaluate') |
387 act.setStatusTip(self.trUtf8('Evaluate in current context')) |
387 act.setStatusTip(self.trUtf8('Evaluate in current context')) |
388 act.setWhatsThis(self.trUtf8( |
388 act.setWhatsThis(self.trUtf8( |
389 """<b>Evaluate</b>""" |
389 """<b>Evaluate</b>""" |
392 """ shell window.</p>""" |
392 """ shell window.</p>""" |
393 )) |
393 )) |
394 self.connect(act, SIGNAL('triggered()'), self.__eval) |
394 self.connect(act, SIGNAL('triggered()'), self.__eval) |
395 self.actions.append(act) |
395 self.actions.append(act) |
396 |
396 |
397 act = E4Action(self.trUtf8('Execute'), |
397 act = E5Action(self.trUtf8('Execute'), |
398 self.trUtf8('E&xecute...'), |
398 self.trUtf8('E&xecute...'), |
399 0,0,self.debugActGrp2,'dbg_execute') |
399 0,0,self.debugActGrp2,'dbg_execute') |
400 act.setStatusTip(\ |
400 act.setStatusTip(\ |
401 self.trUtf8('Execute a one line statement in the current context')) |
401 self.trUtf8('Execute a one line statement in the current context')) |
402 act.setWhatsThis(self.trUtf8( |
402 act.setWhatsThis(self.trUtf8( |
405 """ of the debugged program.</p>""" |
405 """ of the debugged program.</p>""" |
406 )) |
406 )) |
407 self.connect(act, SIGNAL('triggered()'), self.__exec) |
407 self.connect(act, SIGNAL('triggered()'), self.__exec) |
408 self.actions.append(act) |
408 self.actions.append(act) |
409 |
409 |
410 self.dbgFilterAct = E4Action(self.trUtf8('Variables Type Filter'), |
410 self.dbgFilterAct = E5Action(self.trUtf8('Variables Type Filter'), |
411 self.trUtf8('Varia&bles Type Filter...'), 0, 0, self, |
411 self.trUtf8('Varia&bles Type Filter...'), 0, 0, self, |
412 'dbg_variables_filter') |
412 'dbg_variables_filter') |
413 self.dbgFilterAct.setStatusTip(self.trUtf8('Configure variables type filter')) |
413 self.dbgFilterAct.setStatusTip(self.trUtf8('Configure variables type filter')) |
414 self.dbgFilterAct.setWhatsThis(self.trUtf8( |
414 self.dbgFilterAct.setWhatsThis(self.trUtf8( |
415 """<b>Variables Type Filter</b>""" |
415 """<b>Variables Type Filter</b>""" |
419 )) |
419 )) |
420 self.connect(self.dbgFilterAct, SIGNAL('triggered()'), |
420 self.connect(self.dbgFilterAct, SIGNAL('triggered()'), |
421 self.__configureVariablesFilters) |
421 self.__configureVariablesFilters) |
422 self.actions.append(self.dbgFilterAct) |
422 self.actions.append(self.dbgFilterAct) |
423 |
423 |
424 self.excFilterAct = E4Action(self.trUtf8('Exceptions Filter'), |
424 self.excFilterAct = E5Action(self.trUtf8('Exceptions Filter'), |
425 self.trUtf8('&Exceptions Filter...'), 0, 0, self, 'dbg_exceptions_filter') |
425 self.trUtf8('&Exceptions Filter...'), 0, 0, self, 'dbg_exceptions_filter') |
426 self.excFilterAct.setStatusTip(self.trUtf8('Configure exceptions filter')) |
426 self.excFilterAct.setStatusTip(self.trUtf8('Configure exceptions filter')) |
427 self.excFilterAct.setWhatsThis(self.trUtf8( |
427 self.excFilterAct.setWhatsThis(self.trUtf8( |
428 """<b>Exceptions Filter</b>""" |
428 """<b>Exceptions Filter</b>""" |
429 """<p>Configure the exceptions filter. Only exception types that are""" |
429 """<p>Configure the exceptions filter. Only exception types that are""" |
433 )) |
433 )) |
434 self.connect(self.excFilterAct, SIGNAL('triggered()'), |
434 self.connect(self.excFilterAct, SIGNAL('triggered()'), |
435 self.__configureExceptionsFilter) |
435 self.__configureExceptionsFilter) |
436 self.actions.append(self.excFilterAct) |
436 self.actions.append(self.excFilterAct) |
437 |
437 |
438 self.excIgnoreFilterAct = E4Action(self.trUtf8('Ignored Exceptions'), |
438 self.excIgnoreFilterAct = E5Action(self.trUtf8('Ignored Exceptions'), |
439 self.trUtf8('&Ignored Exceptions...'), 0, 0, |
439 self.trUtf8('&Ignored Exceptions...'), 0, 0, |
440 self, 'dbg_ignored_exceptions') |
440 self, 'dbg_ignored_exceptions') |
441 self.excIgnoreFilterAct.setStatusTip(self.trUtf8('Configure ignored exceptions')) |
441 self.excIgnoreFilterAct.setStatusTip(self.trUtf8('Configure ignored exceptions')) |
442 self.excIgnoreFilterAct.setWhatsThis(self.trUtf8( |
442 self.excIgnoreFilterAct.setWhatsThis(self.trUtf8( |
443 """<b>Ignored Exceptions</b>""" |
443 """<b>Ignored Exceptions</b>""" |
449 self.__configureIgnoredExceptions) |
449 self.__configureIgnoredExceptions) |
450 self.actions.append(self.excIgnoreFilterAct) |
450 self.actions.append(self.excIgnoreFilterAct) |
451 |
451 |
452 self.dbgSetBpActGrp = createActionGroup(self) |
452 self.dbgSetBpActGrp = createActionGroup(self) |
453 |
453 |
454 self.dbgToggleBpAct = E4Action(self.trUtf8('Toggle Breakpoint'), |
454 self.dbgToggleBpAct = E5Action(self.trUtf8('Toggle Breakpoint'), |
455 UI.PixmapCache.getIcon("breakpointToggle.png"), |
455 UI.PixmapCache.getIcon("breakpointToggle.png"), |
456 self.trUtf8('Toggle Breakpoint'), |
456 self.trUtf8('Toggle Breakpoint'), |
457 QKeySequence(self.trUtf8("Shift+F11","Debug|Toggle Breakpoint")), 0, |
457 QKeySequence(self.trUtf8("Shift+F11","Debug|Toggle Breakpoint")), 0, |
458 self.dbgSetBpActGrp, 'dbg_toggle_breakpoint') |
458 self.dbgSetBpActGrp, 'dbg_toggle_breakpoint') |
459 self.dbgToggleBpAct.setStatusTip(self.trUtf8('Toggle Breakpoint')) |
459 self.dbgToggleBpAct.setStatusTip(self.trUtf8('Toggle Breakpoint')) |
463 """ current editor.</p>""" |
463 """ current editor.</p>""" |
464 )) |
464 )) |
465 self.connect(self.dbgToggleBpAct, SIGNAL('triggered()'), self.__toggleBreakpoint) |
465 self.connect(self.dbgToggleBpAct, SIGNAL('triggered()'), self.__toggleBreakpoint) |
466 self.actions.append(self.dbgToggleBpAct) |
466 self.actions.append(self.dbgToggleBpAct) |
467 |
467 |
468 self.dbgEditBpAct = E4Action(self.trUtf8('Edit Breakpoint'), |
468 self.dbgEditBpAct = E5Action(self.trUtf8('Edit Breakpoint'), |
469 UI.PixmapCache.getIcon("cBreakpointToggle.png"), |
469 UI.PixmapCache.getIcon("cBreakpointToggle.png"), |
470 self.trUtf8('Edit Breakpoint...'), |
470 self.trUtf8('Edit Breakpoint...'), |
471 QKeySequence(self.trUtf8("Shift+F12","Debug|Edit Breakpoint")), 0, |
471 QKeySequence(self.trUtf8("Shift+F12","Debug|Edit Breakpoint")), 0, |
472 self.dbgSetBpActGrp, 'dbg_edit_breakpoint') |
472 self.dbgSetBpActGrp, 'dbg_edit_breakpoint') |
473 self.dbgEditBpAct.setStatusTip(self.trUtf8('Edit Breakpoint')) |
473 self.dbgEditBpAct.setStatusTip(self.trUtf8('Edit Breakpoint')) |
477 """ It works at the current line of the current editor.</p>""" |
477 """ It works at the current line of the current editor.</p>""" |
478 )) |
478 )) |
479 self.connect(self.dbgEditBpAct, SIGNAL('triggered()'), self.__editBreakpoint) |
479 self.connect(self.dbgEditBpAct, SIGNAL('triggered()'), self.__editBreakpoint) |
480 self.actions.append(self.dbgEditBpAct) |
480 self.actions.append(self.dbgEditBpAct) |
481 |
481 |
482 self.dbgNextBpAct = E4Action(self.trUtf8('Next Breakpoint'), |
482 self.dbgNextBpAct = E5Action(self.trUtf8('Next Breakpoint'), |
483 UI.PixmapCache.getIcon("breakpointNext.png"), |
483 UI.PixmapCache.getIcon("breakpointNext.png"), |
484 self.trUtf8('Next Breakpoint'), |
484 self.trUtf8('Next Breakpoint'), |
485 QKeySequence(self.trUtf8("Ctrl+Shift+PgDown","Debug|Next Breakpoint")), 0, |
485 QKeySequence(self.trUtf8("Ctrl+Shift+PgDown","Debug|Next Breakpoint")), 0, |
486 self.dbgSetBpActGrp, 'dbg_next_breakpoint') |
486 self.dbgSetBpActGrp, 'dbg_next_breakpoint') |
487 self.dbgNextBpAct.setStatusTip(self.trUtf8('Next Breakpoint')) |
487 self.dbgNextBpAct.setStatusTip(self.trUtf8('Next Breakpoint')) |
490 """<p>Go to next breakpoint of the current editor.</p>""" |
490 """<p>Go to next breakpoint of the current editor.</p>""" |
491 )) |
491 )) |
492 self.connect(self.dbgNextBpAct, SIGNAL('triggered()'), self.__nextBreakpoint) |
492 self.connect(self.dbgNextBpAct, SIGNAL('triggered()'), self.__nextBreakpoint) |
493 self.actions.append(self.dbgNextBpAct) |
493 self.actions.append(self.dbgNextBpAct) |
494 |
494 |
495 self.dbgPrevBpAct = E4Action(self.trUtf8('Previous Breakpoint'), |
495 self.dbgPrevBpAct = E5Action(self.trUtf8('Previous Breakpoint'), |
496 UI.PixmapCache.getIcon("breakpointPrevious.png"), |
496 UI.PixmapCache.getIcon("breakpointPrevious.png"), |
497 self.trUtf8('Previous Breakpoint'), |
497 self.trUtf8('Previous Breakpoint'), |
498 QKeySequence(self.trUtf8("Ctrl+Shift+PgUp","Debug|Previous Breakpoint")), |
498 QKeySequence(self.trUtf8("Ctrl+Shift+PgUp","Debug|Previous Breakpoint")), |
499 0, self.dbgSetBpActGrp, 'dbg_previous_breakpoint') |
499 0, self.dbgSetBpActGrp, 'dbg_previous_breakpoint') |
500 self.dbgPrevBpAct.setStatusTip(self.trUtf8('Previous Breakpoint')) |
500 self.dbgPrevBpAct.setStatusTip(self.trUtf8('Previous Breakpoint')) |
503 """<p>Go to previous breakpoint of the current editor.</p>""" |
503 """<p>Go to previous breakpoint of the current editor.</p>""" |
504 )) |
504 )) |
505 self.connect(self.dbgPrevBpAct, SIGNAL('triggered()'), self.__previousBreakpoint) |
505 self.connect(self.dbgPrevBpAct, SIGNAL('triggered()'), self.__previousBreakpoint) |
506 self.actions.append(self.dbgPrevBpAct) |
506 self.actions.append(self.dbgPrevBpAct) |
507 |
507 |
508 act = E4Action(self.trUtf8('Clear Breakpoints'), |
508 act = E5Action(self.trUtf8('Clear Breakpoints'), |
509 self.trUtf8('Clear Breakpoints'), |
509 self.trUtf8('Clear Breakpoints'), |
510 QKeySequence(self.trUtf8("Ctrl+Shift+C","Debug|Clear Breakpoints")), 0, |
510 QKeySequence(self.trUtf8("Ctrl+Shift+C","Debug|Clear Breakpoints")), 0, |
511 self.dbgSetBpActGrp, 'dbg_clear_breakpoint') |
511 self.dbgSetBpActGrp, 'dbg_clear_breakpoint') |
512 act.setStatusTip(self.trUtf8('Clear Breakpoints')) |
512 act.setStatusTip(self.trUtf8('Clear Breakpoints')) |
513 act.setWhatsThis(self.trUtf8( |
513 act.setWhatsThis(self.trUtf8( |
579 |
579 |
580 def initToolbars(self, toolbarManager): |
580 def initToolbars(self, toolbarManager): |
581 """ |
581 """ |
582 Public slot to initialize the debug toolbars. |
582 Public slot to initialize the debug toolbars. |
583 |
583 |
584 @param toolbarManager reference to a toolbar manager object (E4ToolBarManager) |
584 @param toolbarManager reference to a toolbar manager object (E5ToolBarManager) |
585 @return the generated toolbars (list of QToolBar) |
585 @return the generated toolbars (list of QToolBar) |
586 """ |
586 """ |
587 starttb = QToolBar(self.trUtf8("Start"), self.parent()) |
587 starttb = QToolBar(self.trUtf8("Start"), self.parent()) |
588 starttb.setIconSize(UI.Config.ToolBarIconSize) |
588 starttb.setIconSize(UI.Config.ToolBarIconSize) |
589 starttb.setObjectName("StartToolbar") |
589 starttb.setObjectName("StartToolbar") |