167 Method defining the user interface actions. |
167 Method defining the user interface actions. |
168 """ |
168 """ |
169 self.actions = [] |
169 self.actions = [] |
170 |
170 |
171 self.runAct = E5Action( |
171 self.runAct = E5Action( |
172 self.trUtf8('Run Script'), |
172 self.tr('Run Script'), |
173 UI.PixmapCache.getIcon("runScript.png"), |
173 UI.PixmapCache.getIcon("runScript.png"), |
174 self.trUtf8('&Run Script...'), |
174 self.tr('&Run Script...'), |
175 Qt.Key_F2, 0, self, 'dbg_run_script') |
175 Qt.Key_F2, 0, self, 'dbg_run_script') |
176 self.runAct.setStatusTip(self.trUtf8('Run the current Script')) |
176 self.runAct.setStatusTip(self.tr('Run the current Script')) |
177 self.runAct.setWhatsThis(self.trUtf8( |
177 self.runAct.setWhatsThis(self.tr( |
178 """<b>Run Script</b>""" |
178 """<b>Run Script</b>""" |
179 """<p>Set the command line arguments and run the script outside""" |
179 """<p>Set the command line arguments and run the script outside""" |
180 """ the debugger. If the file has unsaved changes it may be""" |
180 """ the debugger. If the file has unsaved changes it may be""" |
181 """ saved first.</p>""" |
181 """ saved first.</p>""" |
182 )) |
182 )) |
183 self.runAct.triggered[()].connect(self.__runScript) |
183 self.runAct.triggered[()].connect(self.__runScript) |
184 self.actions.append(self.runAct) |
184 self.actions.append(self.runAct) |
185 |
185 |
186 self.runProjectAct = E5Action( |
186 self.runProjectAct = E5Action( |
187 self.trUtf8('Run Project'), |
187 self.tr('Run Project'), |
188 UI.PixmapCache.getIcon("runProject.png"), |
188 UI.PixmapCache.getIcon("runProject.png"), |
189 self.trUtf8('Run &Project...'), Qt.SHIFT + Qt.Key_F2, 0, self, |
189 self.tr('Run &Project...'), Qt.SHIFT + Qt.Key_F2, 0, self, |
190 'dbg_run_project') |
190 'dbg_run_project') |
191 self.runProjectAct.setStatusTip(self.trUtf8('Run the current Project')) |
191 self.runProjectAct.setStatusTip(self.tr('Run the current Project')) |
192 self.runProjectAct.setWhatsThis(self.trUtf8( |
192 self.runProjectAct.setWhatsThis(self.tr( |
193 """<b>Run Project</b>""" |
193 """<b>Run Project</b>""" |
194 """<p>Set the command line arguments and run the current project""" |
194 """<p>Set the command line arguments and run the current project""" |
195 """ outside the debugger.""" |
195 """ outside the debugger.""" |
196 """ If files of the current project have unsaved changes they""" |
196 """ If files of the current project have unsaved changes they""" |
197 """ may be saved first.</p>""" |
197 """ may be saved first.</p>""" |
198 )) |
198 )) |
199 self.runProjectAct.triggered[()].connect(self.__runProject) |
199 self.runProjectAct.triggered[()].connect(self.__runProject) |
200 self.actions.append(self.runProjectAct) |
200 self.actions.append(self.runProjectAct) |
201 |
201 |
202 self.coverageAct = E5Action( |
202 self.coverageAct = E5Action( |
203 self.trUtf8('Coverage run of Script'), |
203 self.tr('Coverage run of Script'), |
204 UI.PixmapCache.getIcon("coverageScript.png"), |
204 UI.PixmapCache.getIcon("coverageScript.png"), |
205 self.trUtf8('Coverage run of Script...'), 0, 0, self, |
205 self.tr('Coverage run of Script...'), 0, 0, self, |
206 'dbg_coverage_script') |
206 'dbg_coverage_script') |
207 self.coverageAct.setStatusTip( |
207 self.coverageAct.setStatusTip( |
208 self.trUtf8('Perform a coverage run of the current Script')) |
208 self.tr('Perform a coverage run of the current Script')) |
209 self.coverageAct.setWhatsThis(self.trUtf8( |
209 self.coverageAct.setWhatsThis(self.tr( |
210 """<b>Coverage run of Script</b>""" |
210 """<b>Coverage run of Script</b>""" |
211 """<p>Set the command line arguments and run the script under""" |
211 """<p>Set the command line arguments and run the script under""" |
212 """ the control of a coverage analysis tool. If the file has""" |
212 """ the control of a coverage analysis tool. If the file has""" |
213 """ unsaved changes it may be saved first.</p>""" |
213 """ unsaved changes it may be saved first.</p>""" |
214 )) |
214 )) |
215 self.coverageAct.triggered[()].connect(self.__coverageScript) |
215 self.coverageAct.triggered[()].connect(self.__coverageScript) |
216 self.actions.append(self.coverageAct) |
216 self.actions.append(self.coverageAct) |
217 |
217 |
218 self.coverageProjectAct = E5Action( |
218 self.coverageProjectAct = E5Action( |
219 self.trUtf8('Coverage run of Project'), |
219 self.tr('Coverage run of Project'), |
220 UI.PixmapCache.getIcon("coverageProject.png"), |
220 UI.PixmapCache.getIcon("coverageProject.png"), |
221 self.trUtf8('Coverage run of Project...'), 0, 0, self, |
221 self.tr('Coverage run of Project...'), 0, 0, self, |
222 'dbg_coverage_project') |
222 'dbg_coverage_project') |
223 self.coverageProjectAct.setStatusTip( |
223 self.coverageProjectAct.setStatusTip( |
224 self.trUtf8('Perform a coverage run of the current Project')) |
224 self.tr('Perform a coverage run of the current Project')) |
225 self.coverageProjectAct.setWhatsThis(self.trUtf8( |
225 self.coverageProjectAct.setWhatsThis(self.tr( |
226 """<b>Coverage run of Project</b>""" |
226 """<b>Coverage run of Project</b>""" |
227 """<p>Set the command line arguments and run the current project""" |
227 """<p>Set the command line arguments and run the current project""" |
228 """ under the control of a coverage analysis tool.""" |
228 """ under the control of a coverage analysis tool.""" |
229 """ If files of the current project have unsaved changes""" |
229 """ If files of the current project have unsaved changes""" |
230 """ they may be saved first.</p>""" |
230 """ they may be saved first.</p>""" |
231 )) |
231 )) |
232 self.coverageProjectAct.triggered[()].connect(self.__coverageProject) |
232 self.coverageProjectAct.triggered[()].connect(self.__coverageProject) |
233 self.actions.append(self.coverageProjectAct) |
233 self.actions.append(self.coverageProjectAct) |
234 |
234 |
235 self.profileAct = E5Action( |
235 self.profileAct = E5Action( |
236 self.trUtf8('Profile Script'), |
236 self.tr('Profile Script'), |
237 UI.PixmapCache.getIcon("profileScript.png"), |
237 UI.PixmapCache.getIcon("profileScript.png"), |
238 self.trUtf8('Profile Script...'), 0, 0, self, 'dbg_profile_script') |
238 self.tr('Profile Script...'), 0, 0, self, 'dbg_profile_script') |
239 self.profileAct.setStatusTip(self.trUtf8('Profile the current Script')) |
239 self.profileAct.setStatusTip(self.tr('Profile the current Script')) |
240 self.profileAct.setWhatsThis(self.trUtf8( |
240 self.profileAct.setWhatsThis(self.tr( |
241 """<b>Profile Script</b>""" |
241 """<b>Profile Script</b>""" |
242 """<p>Set the command line arguments and profile the script.""" |
242 """<p>Set the command line arguments and profile the script.""" |
243 """ If the file has unsaved changes it may be saved first.</p>""" |
243 """ If the file has unsaved changes it may be saved first.</p>""" |
244 )) |
244 )) |
245 self.profileAct.triggered[()].connect(self.__profileScript) |
245 self.profileAct.triggered[()].connect(self.__profileScript) |
246 self.actions.append(self.profileAct) |
246 self.actions.append(self.profileAct) |
247 |
247 |
248 self.profileProjectAct = E5Action( |
248 self.profileProjectAct = E5Action( |
249 self.trUtf8('Profile Project'), |
249 self.tr('Profile Project'), |
250 UI.PixmapCache.getIcon("profileProject.png"), |
250 UI.PixmapCache.getIcon("profileProject.png"), |
251 self.trUtf8('Profile Project...'), 0, 0, self, |
251 self.tr('Profile Project...'), 0, 0, self, |
252 'dbg_profile_project') |
252 'dbg_profile_project') |
253 self.profileProjectAct.setStatusTip( |
253 self.profileProjectAct.setStatusTip( |
254 self.trUtf8('Profile the current Project')) |
254 self.tr('Profile the current Project')) |
255 self.profileProjectAct.setWhatsThis(self.trUtf8( |
255 self.profileProjectAct.setWhatsThis(self.tr( |
256 """<b>Profile Project</b>""" |
256 """<b>Profile Project</b>""" |
257 """<p>Set the command line arguments and profile the current""" |
257 """<p>Set the command line arguments and profile the current""" |
258 """ project. If files of the current project have unsaved""" |
258 """ project. If files of the current project have unsaved""" |
259 """ changes they may be saved first.</p>""" |
259 """ changes they may be saved first.</p>""" |
260 )) |
260 )) |
261 self.profileProjectAct.triggered[()].connect(self.__profileProject) |
261 self.profileProjectAct.triggered[()].connect(self.__profileProject) |
262 self.actions.append(self.profileProjectAct) |
262 self.actions.append(self.profileProjectAct) |
263 |
263 |
264 self.debugAct = E5Action( |
264 self.debugAct = E5Action( |
265 self.trUtf8('Debug Script'), |
265 self.tr('Debug Script'), |
266 UI.PixmapCache.getIcon("debugScript.png"), |
266 UI.PixmapCache.getIcon("debugScript.png"), |
267 self.trUtf8('&Debug Script...'), Qt.Key_F5, 0, self, |
267 self.tr('&Debug Script...'), Qt.Key_F5, 0, self, |
268 'dbg_debug_script') |
268 'dbg_debug_script') |
269 self.debugAct.setStatusTip(self.trUtf8('Debug the current Script')) |
269 self.debugAct.setStatusTip(self.tr('Debug the current Script')) |
270 self.debugAct.setWhatsThis(self.trUtf8( |
270 self.debugAct.setWhatsThis(self.tr( |
271 """<b>Debug Script</b>""" |
271 """<b>Debug Script</b>""" |
272 """<p>Set the command line arguments and set the current line""" |
272 """<p>Set the command line arguments and set the current line""" |
273 """ to be the first executable Python statement of the current""" |
273 """ to be the first executable Python statement of the current""" |
274 """ editor window. If the file has unsaved changes it may be""" |
274 """ editor window. If the file has unsaved changes it may be""" |
275 """ saved first.</p>""" |
275 """ saved first.</p>""" |
276 )) |
276 )) |
277 self.debugAct.triggered[()].connect(self.__debugScript) |
277 self.debugAct.triggered[()].connect(self.__debugScript) |
278 self.actions.append(self.debugAct) |
278 self.actions.append(self.debugAct) |
279 |
279 |
280 self.debugProjectAct = E5Action( |
280 self.debugProjectAct = E5Action( |
281 self.trUtf8('Debug Project'), |
281 self.tr('Debug Project'), |
282 UI.PixmapCache.getIcon("debugProject.png"), |
282 UI.PixmapCache.getIcon("debugProject.png"), |
283 self.trUtf8('Debug &Project...'), Qt.SHIFT + Qt.Key_F5, 0, self, |
283 self.tr('Debug &Project...'), Qt.SHIFT + Qt.Key_F5, 0, self, |
284 'dbg_debug_project') |
284 'dbg_debug_project') |
285 self.debugProjectAct.setStatusTip(self.trUtf8( |
285 self.debugProjectAct.setStatusTip(self.tr( |
286 'Debug the current Project')) |
286 'Debug the current Project')) |
287 self.debugProjectAct.setWhatsThis(self.trUtf8( |
287 self.debugProjectAct.setWhatsThis(self.tr( |
288 """<b>Debug Project</b>""" |
288 """<b>Debug Project</b>""" |
289 """<p>Set the command line arguments and set the current line""" |
289 """<p>Set the command line arguments and set the current line""" |
290 """ to be the first executable Python statement of the main""" |
290 """ to be the first executable Python statement of the main""" |
291 """ script of the current project. If files of the current""" |
291 """ script of the current project. If files of the current""" |
292 """ project have unsaved changes they may be saved first.</p>""" |
292 """ project have unsaved changes they may be saved first.</p>""" |
293 )) |
293 )) |
294 self.debugProjectAct.triggered[()].connect(self.__debugProject) |
294 self.debugProjectAct.triggered[()].connect(self.__debugProject) |
295 self.actions.append(self.debugProjectAct) |
295 self.actions.append(self.debugProjectAct) |
296 |
296 |
297 self.restartAct = E5Action( |
297 self.restartAct = E5Action( |
298 self.trUtf8('Restart'), |
298 self.tr('Restart'), |
299 UI.PixmapCache.getIcon("restart.png"), |
299 UI.PixmapCache.getIcon("restart.png"), |
300 self.trUtf8('Restart'), Qt.Key_F4, 0, self, 'dbg_restart_script') |
300 self.tr('Restart'), Qt.Key_F4, 0, self, 'dbg_restart_script') |
301 self.restartAct.setStatusTip(self.trUtf8( |
301 self.restartAct.setStatusTip(self.tr( |
302 'Restart the last debugged script')) |
302 'Restart the last debugged script')) |
303 self.restartAct.setWhatsThis(self.trUtf8( |
303 self.restartAct.setWhatsThis(self.tr( |
304 """<b>Restart</b>""" |
304 """<b>Restart</b>""" |
305 """<p>Set the command line arguments and set the current line""" |
305 """<p>Set the command line arguments and set the current line""" |
306 """ to be the first executable Python statement of the script""" |
306 """ to be the first executable Python statement of the script""" |
307 """ that was debugged last. If there are unsaved changes, they""" |
307 """ that was debugged last. If there are unsaved changes, they""" |
308 """ may be saved first.</p>""" |
308 """ may be saved first.</p>""" |
309 )) |
309 )) |
310 self.restartAct.triggered[()].connect(self.__doRestart) |
310 self.restartAct.triggered[()].connect(self.__doRestart) |
311 self.actions.append(self.restartAct) |
311 self.actions.append(self.restartAct) |
312 |
312 |
313 self.stopAct = E5Action( |
313 self.stopAct = E5Action( |
314 self.trUtf8('Stop'), |
314 self.tr('Stop'), |
315 UI.PixmapCache.getIcon("stopScript.png"), |
315 UI.PixmapCache.getIcon("stopScript.png"), |
316 self.trUtf8('Stop'), Qt.SHIFT + Qt.Key_F10, 0, |
316 self.tr('Stop'), Qt.SHIFT + Qt.Key_F10, 0, |
317 self, 'dbg_stop_script') |
317 self, 'dbg_stop_script') |
318 self.stopAct.setStatusTip(self.trUtf8("""Stop the running script.""")) |
318 self.stopAct.setStatusTip(self.tr("""Stop the running script.""")) |
319 self.stopAct.setWhatsThis(self.trUtf8( |
319 self.stopAct.setWhatsThis(self.tr( |
320 """<b>Stop</b>""" |
320 """<b>Stop</b>""" |
321 """<p>This stops the script running in the debugger backend.</p>""" |
321 """<p>This stops the script running in the debugger backend.</p>""" |
322 )) |
322 )) |
323 self.stopAct.triggered[()].connect(self.__stopScript) |
323 self.stopAct.triggered[()].connect(self.__stopScript) |
324 self.actions.append(self.stopAct) |
324 self.actions.append(self.stopAct) |
325 |
325 |
326 self.debugActGrp = createActionGroup(self) |
326 self.debugActGrp = createActionGroup(self) |
327 |
327 |
328 act = E5Action( |
328 act = E5Action( |
329 self.trUtf8('Continue'), |
329 self.tr('Continue'), |
330 UI.PixmapCache.getIcon("continue.png"), |
330 UI.PixmapCache.getIcon("continue.png"), |
331 self.trUtf8('&Continue'), Qt.Key_F6, 0, |
331 self.tr('&Continue'), Qt.Key_F6, 0, |
332 self.debugActGrp, 'dbg_continue') |
332 self.debugActGrp, 'dbg_continue') |
333 act.setStatusTip( |
333 act.setStatusTip( |
334 self.trUtf8('Continue running the program from the current line')) |
334 self.tr('Continue running the program from the current line')) |
335 act.setWhatsThis(self.trUtf8( |
335 act.setWhatsThis(self.tr( |
336 """<b>Continue</b>""" |
336 """<b>Continue</b>""" |
337 """<p>Continue running the program from the current line. The""" |
337 """<p>Continue running the program from the current line. The""" |
338 """ program will stop when it terminates or when a breakpoint""" |
338 """ program will stop when it terminates or when a breakpoint""" |
339 """ is reached.</p>""" |
339 """ is reached.</p>""" |
340 )) |
340 )) |
341 act.triggered[()].connect(self.__continue) |
341 act.triggered[()].connect(self.__continue) |
342 self.actions.append(act) |
342 self.actions.append(act) |
343 |
343 |
344 act = E5Action( |
344 act = E5Action( |
345 self.trUtf8('Continue to Cursor'), |
345 self.tr('Continue to Cursor'), |
346 UI.PixmapCache.getIcon("continueToCursor.png"), |
346 UI.PixmapCache.getIcon("continueToCursor.png"), |
347 self.trUtf8('Continue &To Cursor'), Qt.SHIFT + Qt.Key_F6, 0, |
347 self.tr('Continue &To Cursor'), Qt.SHIFT + Qt.Key_F6, 0, |
348 self.debugActGrp, 'dbg_continue_to_cursor') |
348 self.debugActGrp, 'dbg_continue_to_cursor') |
349 act.setStatusTip(self.trUtf8( |
349 act.setStatusTip(self.tr( |
350 """Continue running the program from the""" |
350 """Continue running the program from the""" |
351 """ current line to the current cursor position""")) |
351 """ current line to the current cursor position""")) |
352 act.setWhatsThis(self.trUtf8( |
352 act.setWhatsThis(self.tr( |
353 """<b>Continue To Cursor</b>""" |
353 """<b>Continue To Cursor</b>""" |
354 """<p>Continue running the program from the current line to the""" |
354 """<p>Continue running the program from the current line to the""" |
355 """ current cursor position.</p>""" |
355 """ current cursor position.</p>""" |
356 )) |
356 )) |
357 act.triggered[()].connect(self.__runToCursor) |
357 act.triggered[()].connect(self.__runToCursor) |
358 self.actions.append(act) |
358 self.actions.append(act) |
359 |
359 |
360 act = E5Action( |
360 act = E5Action( |
361 self.trUtf8('Single Step'), |
361 self.tr('Single Step'), |
362 UI.PixmapCache.getIcon("step.png"), |
362 UI.PixmapCache.getIcon("step.png"), |
363 self.trUtf8('Sin&gle Step'), Qt.Key_F7, 0, |
363 self.tr('Sin&gle Step'), Qt.Key_F7, 0, |
364 self.debugActGrp, 'dbg_single_step') |
364 self.debugActGrp, 'dbg_single_step') |
365 act.setStatusTip(self.trUtf8('Execute a single Python statement')) |
365 act.setStatusTip(self.tr('Execute a single Python statement')) |
366 act.setWhatsThis(self.trUtf8( |
366 act.setWhatsThis(self.tr( |
367 """<b>Single Step</b>""" |
367 """<b>Single Step</b>""" |
368 """<p>Execute a single Python statement. If the statement""" |
368 """<p>Execute a single Python statement. If the statement""" |
369 """ is an <tt>import</tt> statement, a class constructor, or a""" |
369 """ is an <tt>import</tt> statement, a class constructor, or a""" |
370 """ method or function call then control is returned to the""" |
370 """ method or function call then control is returned to the""" |
371 """ debugger at the next statement.</p>""" |
371 """ debugger at the next statement.</p>""" |
372 )) |
372 )) |
373 act.triggered[()].connect(self.__step) |
373 act.triggered[()].connect(self.__step) |
374 self.actions.append(act) |
374 self.actions.append(act) |
375 |
375 |
376 act = E5Action( |
376 act = E5Action( |
377 self.trUtf8('Step Over'), |
377 self.tr('Step Over'), |
378 UI.PixmapCache.getIcon("stepOver.png"), |
378 UI.PixmapCache.getIcon("stepOver.png"), |
379 self.trUtf8('Step &Over'), Qt.Key_F8, 0, |
379 self.tr('Step &Over'), Qt.Key_F8, 0, |
380 self.debugActGrp, 'dbg_step_over') |
380 self.debugActGrp, 'dbg_step_over') |
381 act.setStatusTip(self.trUtf8( |
381 act.setStatusTip(self.tr( |
382 """Execute a single Python statement staying""" |
382 """Execute a single Python statement staying""" |
383 """ in the current frame""")) |
383 """ in the current frame""")) |
384 act.setWhatsThis(self.trUtf8( |
384 act.setWhatsThis(self.tr( |
385 """<b>Step Over</b>""" |
385 """<b>Step Over</b>""" |
386 """<p>Execute a single Python statement staying in the same""" |
386 """<p>Execute a single Python statement staying in the same""" |
387 """ frame. If the statement is an <tt>import</tt> statement,""" |
387 """ frame. If the statement is an <tt>import</tt> statement,""" |
388 """ a class constructor, or a method or function call then""" |
388 """ a class constructor, or a method or function call then""" |
389 """ control is returned to the debugger after the statement""" |
389 """ control is returned to the debugger after the statement""" |
410 )) |
410 )) |
411 act.triggered[()].connect(self.__stepOut) |
411 act.triggered[()].connect(self.__stepOut) |
412 self.actions.append(act) |
412 self.actions.append(act) |
413 |
413 |
414 act = E5Action( |
414 act = E5Action( |
415 self.trUtf8('Stop'), |
415 self.tr('Stop'), |
416 UI.PixmapCache.getIcon("stepQuit.png"), |
416 UI.PixmapCache.getIcon("stepQuit.png"), |
417 self.trUtf8('&Stop'), Qt.Key_F10, 0, |
417 self.tr('&Stop'), Qt.Key_F10, 0, |
418 self.debugActGrp, 'dbg_stop') |
418 self.debugActGrp, 'dbg_stop') |
419 act.setStatusTip(self.trUtf8('Stop debugging')) |
419 act.setStatusTip(self.tr('Stop debugging')) |
420 act.setWhatsThis(self.trUtf8( |
420 act.setWhatsThis(self.tr( |
421 """<b>Stop</b>""" |
421 """<b>Stop</b>""" |
422 """<p>Stop the running debugging session.</p>""" |
422 """<p>Stop the running debugging session.</p>""" |
423 )) |
423 )) |
424 act.triggered[()].connect(self.__stepQuit) |
424 act.triggered[()].connect(self.__stepQuit) |
425 self.actions.append(act) |
425 self.actions.append(act) |
426 |
426 |
427 self.debugActGrp2 = createActionGroup(self) |
427 self.debugActGrp2 = createActionGroup(self) |
428 |
428 |
429 act = E5Action( |
429 act = E5Action( |
430 self.trUtf8('Evaluate'), |
430 self.tr('Evaluate'), |
431 self.trUtf8('E&valuate...'), |
431 self.tr('E&valuate...'), |
432 0, 0, self.debugActGrp2, 'dbg_evaluate') |
432 0, 0, self.debugActGrp2, 'dbg_evaluate') |
433 act.setStatusTip(self.trUtf8('Evaluate in current context')) |
433 act.setStatusTip(self.tr('Evaluate in current context')) |
434 act.setWhatsThis(self.trUtf8( |
434 act.setWhatsThis(self.tr( |
435 """<b>Evaluate</b>""" |
435 """<b>Evaluate</b>""" |
436 """<p>Evaluate an expression in the current context of the""" |
436 """<p>Evaluate an expression in the current context of the""" |
437 """ debugged program. The result is displayed in the""" |
437 """ debugged program. The result is displayed in the""" |
438 """ shell window.</p>""" |
438 """ shell window.</p>""" |
439 )) |
439 )) |
440 act.triggered[()].connect(self.__eval) |
440 act.triggered[()].connect(self.__eval) |
441 self.actions.append(act) |
441 self.actions.append(act) |
442 |
442 |
443 act = E5Action( |
443 act = E5Action( |
444 self.trUtf8('Execute'), |
444 self.tr('Execute'), |
445 self.trUtf8('E&xecute...'), |
445 self.tr('E&xecute...'), |
446 0, 0, self.debugActGrp2, 'dbg_execute') |
446 0, 0, self.debugActGrp2, 'dbg_execute') |
447 act.setStatusTip( |
447 act.setStatusTip( |
448 self.trUtf8('Execute a one line statement in the current context')) |
448 self.tr('Execute a one line statement in the current context')) |
449 act.setWhatsThis(self.trUtf8( |
449 act.setWhatsThis(self.tr( |
450 """<b>Execute</b>""" |
450 """<b>Execute</b>""" |
451 """<p>Execute a one line statement in the current context""" |
451 """<p>Execute a one line statement in the current context""" |
452 """ of the debugged program.</p>""" |
452 """ of the debugged program.</p>""" |
453 )) |
453 )) |
454 act.triggered[()].connect(self.__exec) |
454 act.triggered[()].connect(self.__exec) |
455 self.actions.append(act) |
455 self.actions.append(act) |
456 |
456 |
457 self.dbgFilterAct = E5Action( |
457 self.dbgFilterAct = E5Action( |
458 self.trUtf8('Variables Type Filter'), |
458 self.tr('Variables Type Filter'), |
459 self.trUtf8('Varia&bles Type Filter...'), 0, 0, self, |
459 self.tr('Varia&bles Type Filter...'), 0, 0, self, |
460 'dbg_variables_filter') |
460 'dbg_variables_filter') |
461 self.dbgFilterAct.setStatusTip(self.trUtf8( |
461 self.dbgFilterAct.setStatusTip(self.tr( |
462 'Configure variables type filter')) |
462 'Configure variables type filter')) |
463 self.dbgFilterAct.setWhatsThis(self.trUtf8( |
463 self.dbgFilterAct.setWhatsThis(self.tr( |
464 """<b>Variables Type Filter</b>""" |
464 """<b>Variables Type Filter</b>""" |
465 """<p>Configure the variables type filter. Only variable types""" |
465 """<p>Configure the variables type filter. Only variable types""" |
466 """ that are not selected are displayed in the global or local""" |
466 """ that are not selected are displayed in the global or local""" |
467 """ variables window during a debugging session.</p>""" |
467 """ variables window during a debugging session.</p>""" |
468 )) |
468 )) |
469 self.dbgFilterAct.triggered[()].connect( |
469 self.dbgFilterAct.triggered[()].connect( |
470 self.__configureVariablesFilters) |
470 self.__configureVariablesFilters) |
471 self.actions.append(self.dbgFilterAct) |
471 self.actions.append(self.dbgFilterAct) |
472 |
472 |
473 self.excFilterAct = E5Action( |
473 self.excFilterAct = E5Action( |
474 self.trUtf8('Exceptions Filter'), |
474 self.tr('Exceptions Filter'), |
475 self.trUtf8('&Exceptions Filter...'), 0, 0, self, |
475 self.tr('&Exceptions Filter...'), 0, 0, self, |
476 'dbg_exceptions_filter') |
476 'dbg_exceptions_filter') |
477 self.excFilterAct.setStatusTip(self.trUtf8( |
477 self.excFilterAct.setStatusTip(self.tr( |
478 'Configure exceptions filter')) |
478 'Configure exceptions filter')) |
479 self.excFilterAct.setWhatsThis(self.trUtf8( |
479 self.excFilterAct.setWhatsThis(self.tr( |
480 """<b>Exceptions Filter</b>""" |
480 """<b>Exceptions Filter</b>""" |
481 """<p>Configure the exceptions filter. Only exception types""" |
481 """<p>Configure the exceptions filter. Only exception types""" |
482 """ that are listed are highlighted during a debugging""" |
482 """ that are listed are highlighted during a debugging""" |
483 """ session.</p><p>Please note, that all unhandled exceptions""" |
483 """ session.</p><p>Please note, that all unhandled exceptions""" |
484 """ are highlighted indepent from the filter list.</p>""" |
484 """ are highlighted indepent from the filter list.</p>""" |
505 self.actions.append(self.excIgnoreFilterAct) |
505 self.actions.append(self.excIgnoreFilterAct) |
506 |
506 |
507 self.dbgSetBpActGrp = createActionGroup(self) |
507 self.dbgSetBpActGrp = createActionGroup(self) |
508 |
508 |
509 self.dbgToggleBpAct = E5Action( |
509 self.dbgToggleBpAct = E5Action( |
510 self.trUtf8('Toggle Breakpoint'), |
510 self.tr('Toggle Breakpoint'), |
511 UI.PixmapCache.getIcon("breakpointToggle.png"), |
511 UI.PixmapCache.getIcon("breakpointToggle.png"), |
512 self.trUtf8('Toggle Breakpoint'), |
512 self.tr('Toggle Breakpoint'), |
513 QKeySequence(self.trUtf8("Shift+F11", "Debug|Toggle Breakpoint")), |
513 QKeySequence(self.tr("Shift+F11", "Debug|Toggle Breakpoint")), |
514 0, self.dbgSetBpActGrp, 'dbg_toggle_breakpoint') |
514 0, self.dbgSetBpActGrp, 'dbg_toggle_breakpoint') |
515 self.dbgToggleBpAct.setStatusTip(self.trUtf8('Toggle Breakpoint')) |
515 self.dbgToggleBpAct.setStatusTip(self.tr('Toggle Breakpoint')) |
516 self.dbgToggleBpAct.setWhatsThis(self.trUtf8( |
516 self.dbgToggleBpAct.setWhatsThis(self.tr( |
517 """<b>Toggle Breakpoint</b>""" |
517 """<b>Toggle Breakpoint</b>""" |
518 """<p>Toggles a breakpoint at the current line of the""" |
518 """<p>Toggles a breakpoint at the current line of the""" |
519 """ current editor.</p>""" |
519 """ current editor.</p>""" |
520 )) |
520 )) |
521 self.dbgToggleBpAct.triggered[()].connect(self.__toggleBreakpoint) |
521 self.dbgToggleBpAct.triggered[()].connect(self.__toggleBreakpoint) |
522 self.actions.append(self.dbgToggleBpAct) |
522 self.actions.append(self.dbgToggleBpAct) |
523 |
523 |
524 self.dbgEditBpAct = E5Action( |
524 self.dbgEditBpAct = E5Action( |
525 self.trUtf8('Edit Breakpoint'), |
525 self.tr('Edit Breakpoint'), |
526 UI.PixmapCache.getIcon("cBreakpointToggle.png"), |
526 UI.PixmapCache.getIcon("cBreakpointToggle.png"), |
527 self.trUtf8('Edit Breakpoint...'), |
527 self.tr('Edit Breakpoint...'), |
528 QKeySequence(self.trUtf8("Shift+F12", "Debug|Edit Breakpoint")), 0, |
528 QKeySequence(self.tr("Shift+F12", "Debug|Edit Breakpoint")), 0, |
529 self.dbgSetBpActGrp, 'dbg_edit_breakpoint') |
529 self.dbgSetBpActGrp, 'dbg_edit_breakpoint') |
530 self.dbgEditBpAct.setStatusTip(self.trUtf8('Edit Breakpoint')) |
530 self.dbgEditBpAct.setStatusTip(self.tr('Edit Breakpoint')) |
531 self.dbgEditBpAct.setWhatsThis(self.trUtf8( |
531 self.dbgEditBpAct.setWhatsThis(self.tr( |
532 """<b>Edit Breakpoint</b>""" |
532 """<b>Edit Breakpoint</b>""" |
533 """<p>Opens a dialog to edit the breakpoints properties.""" |
533 """<p>Opens a dialog to edit the breakpoints properties.""" |
534 """ It works at the current line of the current editor.</p>""" |
534 """ It works at the current line of the current editor.</p>""" |
535 )) |
535 )) |
536 self.dbgEditBpAct.triggered[()].connect(self.__editBreakpoint) |
536 self.dbgEditBpAct.triggered[()].connect(self.__editBreakpoint) |
537 self.actions.append(self.dbgEditBpAct) |
537 self.actions.append(self.dbgEditBpAct) |
538 |
538 |
539 self.dbgNextBpAct = E5Action( |
539 self.dbgNextBpAct = E5Action( |
540 self.trUtf8('Next Breakpoint'), |
540 self.tr('Next Breakpoint'), |
541 UI.PixmapCache.getIcon("breakpointNext.png"), |
541 UI.PixmapCache.getIcon("breakpointNext.png"), |
542 self.trUtf8('Next Breakpoint'), |
542 self.tr('Next Breakpoint'), |
543 QKeySequence( |
543 QKeySequence( |
544 self.trUtf8("Ctrl+Shift+PgDown", "Debug|Next Breakpoint")), 0, |
544 self.tr("Ctrl+Shift+PgDown", "Debug|Next Breakpoint")), 0, |
545 self.dbgSetBpActGrp, 'dbg_next_breakpoint') |
545 self.dbgSetBpActGrp, 'dbg_next_breakpoint') |
546 self.dbgNextBpAct.setStatusTip(self.trUtf8('Next Breakpoint')) |
546 self.dbgNextBpAct.setStatusTip(self.tr('Next Breakpoint')) |
547 self.dbgNextBpAct.setWhatsThis(self.trUtf8( |
547 self.dbgNextBpAct.setWhatsThis(self.tr( |
548 """<b>Next Breakpoint</b>""" |
548 """<b>Next Breakpoint</b>""" |
549 """<p>Go to next breakpoint of the current editor.</p>""" |
549 """<p>Go to next breakpoint of the current editor.</p>""" |
550 )) |
550 )) |
551 self.dbgNextBpAct.triggered[()].connect(self.__nextBreakpoint) |
551 self.dbgNextBpAct.triggered[()].connect(self.__nextBreakpoint) |
552 self.actions.append(self.dbgNextBpAct) |
552 self.actions.append(self.dbgNextBpAct) |
553 |
553 |
554 self.dbgPrevBpAct = E5Action( |
554 self.dbgPrevBpAct = E5Action( |
555 self.trUtf8('Previous Breakpoint'), |
555 self.tr('Previous Breakpoint'), |
556 UI.PixmapCache.getIcon("breakpointPrevious.png"), |
556 UI.PixmapCache.getIcon("breakpointPrevious.png"), |
557 self.trUtf8('Previous Breakpoint'), |
557 self.tr('Previous Breakpoint'), |
558 QKeySequence( |
558 QKeySequence( |
559 self.trUtf8("Ctrl+Shift+PgUp", "Debug|Previous Breakpoint")), |
559 self.tr("Ctrl+Shift+PgUp", "Debug|Previous Breakpoint")), |
560 0, self.dbgSetBpActGrp, 'dbg_previous_breakpoint') |
560 0, self.dbgSetBpActGrp, 'dbg_previous_breakpoint') |
561 self.dbgPrevBpAct.setStatusTip(self.trUtf8('Previous Breakpoint')) |
561 self.dbgPrevBpAct.setStatusTip(self.tr('Previous Breakpoint')) |
562 self.dbgPrevBpAct.setWhatsThis(self.trUtf8( |
562 self.dbgPrevBpAct.setWhatsThis(self.tr( |
563 """<b>Previous Breakpoint</b>""" |
563 """<b>Previous Breakpoint</b>""" |
564 """<p>Go to previous breakpoint of the current editor.</p>""" |
564 """<p>Go to previous breakpoint of the current editor.</p>""" |
565 )) |
565 )) |
566 self.dbgPrevBpAct.triggered[()].connect(self.__previousBreakpoint) |
566 self.dbgPrevBpAct.triggered[()].connect(self.__previousBreakpoint) |
567 self.actions.append(self.dbgPrevBpAct) |
567 self.actions.append(self.dbgPrevBpAct) |
568 |
568 |
569 act = E5Action( |
569 act = E5Action( |
570 self.trUtf8('Clear Breakpoints'), |
570 self.tr('Clear Breakpoints'), |
571 self.trUtf8('Clear Breakpoints'), |
571 self.tr('Clear Breakpoints'), |
572 QKeySequence( |
572 QKeySequence( |
573 self.trUtf8("Ctrl+Shift+C", "Debug|Clear Breakpoints")), 0, |
573 self.tr("Ctrl+Shift+C", "Debug|Clear Breakpoints")), 0, |
574 self.dbgSetBpActGrp, 'dbg_clear_breakpoint') |
574 self.dbgSetBpActGrp, 'dbg_clear_breakpoint') |
575 act.setStatusTip(self.trUtf8('Clear Breakpoints')) |
575 act.setStatusTip(self.tr('Clear Breakpoints')) |
576 act.setWhatsThis(self.trUtf8( |
576 act.setWhatsThis(self.tr( |
577 """<b>Clear Breakpoints</b>""" |
577 """<b>Clear Breakpoints</b>""" |
578 """<p>Clear breakpoints of all editors.</p>""" |
578 """<p>Clear breakpoints of all editors.</p>""" |
579 )) |
579 )) |
580 act.triggered[()].connect(self.__clearBreakpoints) |
580 act.triggered[()].connect(self.__clearBreakpoints) |
581 self.actions.append(act) |
581 self.actions.append(act) |