|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.UI.PythonDisViewer</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.UI.PythonDisViewer</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a widget to visualize the Python Disassembly for some |
|
27 Python sources. |
|
28 </p> |
|
29 <h3>Global Attributes</h3> |
|
30 |
|
31 <table> |
|
32 <tr><td>None</td></tr> |
|
33 </table> |
|
34 <h3>Classes</h3> |
|
35 |
|
36 <table> |
|
37 |
|
38 <tr> |
|
39 <td><a href="#PythonDisViewer">PythonDisViewer</a></td> |
|
40 <td>Class implementing a widget to visualize the Python Disassembly for some Python sources.</td> |
|
41 </tr> |
|
42 <tr> |
|
43 <td><a href="#PythonDisViewerModes">PythonDisViewerModes</a></td> |
|
44 <td>Class implementing the disassembly viewer operation modes.</td> |
|
45 </tr> |
|
46 </table> |
|
47 <h3>Functions</h3> |
|
48 |
|
49 <table> |
|
50 <tr><td>None</td></tr> |
|
51 </table> |
|
52 <hr /> |
|
53 <hr /> |
|
54 <a NAME="PythonDisViewer" ID="PythonDisViewer"></a> |
|
55 <h2>PythonDisViewer</h2> |
|
56 |
|
57 <p> |
|
58 Class implementing a widget to visualize the Python Disassembly for some |
|
59 Python sources. |
|
60 </p> |
|
61 <h3>Derived from</h3> |
|
62 QWidget, Ui_PythonDisViewer |
|
63 <h3>Class Attributes</h3> |
|
64 |
|
65 <table> |
|
66 <tr><td>CodeInfoRole</td></tr><tr><td>EndLineRole</td></tr><tr><td>StartLineRole</td></tr> |
|
67 </table> |
|
68 <h3>Class Methods</h3> |
|
69 |
|
70 <table> |
|
71 <tr><td>None</td></tr> |
|
72 </table> |
|
73 <h3>Methods</h3> |
|
74 |
|
75 <table> |
|
76 |
|
77 <tr> |
|
78 <td><a href="#PythonDisViewer.__init__">PythonDisViewer</a></td> |
|
79 <td>Constructor</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#PythonDisViewer.__clearSelection">__clearSelection</a></td> |
|
83 <td>Private method to clear all selected items.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#PythonDisViewer.__codeInfoContextMenuRequested">__codeInfoContextMenuRequested</a></td> |
|
87 <td>Private slot to show the context menu of the code info widget.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#PythonDisViewer.__collapseAllCodeInfo">__collapseAllCodeInfo</a></td> |
|
91 <td>Private slot to collapse all items of the code info widget.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#PythonDisViewer.__collapseAllDis">__collapseAllDis</a></td> |
|
95 <td>Private slot to collapse all items of the disassembly widget.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#PythonDisViewer.__configure">__configure</a></td> |
|
99 <td>Private method to open the configuration dialog.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#PythonDisViewer.__createCodeInfo">__createCodeInfo</a></td> |
|
103 <td>Private method to create a dictionary containing the code info data.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#PythonDisViewer.__createErrorItem">__createErrorItem</a></td> |
|
107 <td>Private method to create a top level error item.</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#PythonDisViewer.__createInstructionItem">__createInstructionItem</a></td> |
|
111 <td>Private method to create an item for the given instruction.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#PythonDisViewer.__createTitleItem">__createTitleItem</a></td> |
|
115 <td>Private method to create a title item.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#PythonDisViewer.__disContextMenuRequested">__disContextMenuRequested</a></td> |
|
119 <td>Private slot to show the context menu of the disassembly widget.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#PythonDisViewer.__disItemClicked">__disItemClicked</a></td> |
|
123 <td>Private slot handling a user click on a Disassembly node item.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#PythonDisViewer.__disViewerStateChanged">__disViewerStateChanged</a></td> |
|
127 <td>Private slot to toggle the display of the Disassembly viewer.</td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td><a href="#PythonDisViewer.__disassembleObject">__disassembleObject</a></td> |
|
131 <td>Private method to disassemble the given code object recursively.</td> |
|
132 </tr> |
|
133 <tr> |
|
134 <td><a href="#PythonDisViewer.__editorChanged">__editorChanged</a></td> |
|
135 <td>Private slot to handle a change of the current editor.</td> |
|
136 </tr> |
|
137 <tr> |
|
138 <td><a href="#PythonDisViewer.__editorLanguageChanged">__editorLanguageChanged</a></td> |
|
139 <td>Private slot to handle a change of the editor language.</td> |
|
140 </tr> |
|
141 <tr> |
|
142 <td><a href="#PythonDisViewer.__editorLineChanged">__editorLineChanged</a></td> |
|
143 <td>Private slot to handle a mouse button double click in the editor.</td> |
|
144 </tr> |
|
145 <tr> |
|
146 <td><a href="#PythonDisViewer.__editorSaved">__editorSaved</a></td> |
|
147 <td>Private slot to reload the Disassembly after the connected editor was saved.</td> |
|
148 </tr> |
|
149 <tr> |
|
150 <td><a href="#PythonDisViewer.__expandAllCodeInfo">__expandAllCodeInfo</a></td> |
|
151 <td>Private slot to expand all items of the code info widget.</td> |
|
152 </tr> |
|
153 <tr> |
|
154 <td><a href="#PythonDisViewer.__expandAllDis">__expandAllDis</a></td> |
|
155 <td>Private slot to expand all items of the disassembly widget.</td> |
|
156 </tr> |
|
157 <tr> |
|
158 <td><a href="#PythonDisViewer.__lastEditorClosed">__lastEditorClosed</a></td> |
|
159 <td>Private slot to handle the last editor closed signal of the view manager.</td> |
|
160 </tr> |
|
161 <tr> |
|
162 <td><a href="#PythonDisViewer.__loadDIS">__loadDIS</a></td> |
|
163 <td>Private method to generate the Disassembly from the source of the current editor and visualize it.</td> |
|
164 </tr> |
|
165 <tr> |
|
166 <td><a href="#PythonDisViewer.__resizeCodeInfoColumns">__resizeCodeInfoColumns</a></td> |
|
167 <td>Private method to resize the columns of the code info widget to suitable values.</td> |
|
168 </tr> |
|
169 <tr> |
|
170 <td><a href="#PythonDisViewer.__resizeDisColumns">__resizeDisColumns</a></td> |
|
171 <td>Private method to resize the columns of the disassembly widget to suitable values.</td> |
|
172 </tr> |
|
173 <tr> |
|
174 <td><a href="#PythonDisViewer.__selectChildren">__selectChildren</a></td> |
|
175 <td>Private method to select children of the given item covering the given line number.</td> |
|
176 </tr> |
|
177 <tr> |
|
178 <td><a href="#PythonDisViewer.__selectItemForEditorLine">__selectItemForEditorLine</a></td> |
|
179 <td>Private slot to select the items corresponding with the cursor line of the current editor.</td> |
|
180 </tr> |
|
181 <tr> |
|
182 <td><a href="#PythonDisViewer.__showCodeInfo">__showCodeInfo</a></td> |
|
183 <td>Private slot handling the context menu action to show code info.</td> |
|
184 </tr> |
|
185 <tr> |
|
186 <td><a href="#PythonDisViewer.__showCodeInfoData">__showCodeInfoData</a></td> |
|
187 <td>Private method to show the passed code info data.</td> |
|
188 </tr> |
|
189 <tr> |
|
190 <td><a href="#PythonDisViewer.__styleLabels">__styleLabels</a></td> |
|
191 <td>Private method to style the info labels iaw.</td> |
|
192 </tr> |
|
193 <tr> |
|
194 <td><a href="#PythonDisViewer.__tryCompile">__tryCompile</a></td> |
|
195 <td>Private method to attempt to compile the given source, first as an expression and then as a statement if the first approach fails.</td> |
|
196 </tr> |
|
197 <tr> |
|
198 <td><a href="#PythonDisViewer.__updateItemEndLine">__updateItemEndLine</a></td> |
|
199 <td>Private method to update an items end line based on its children.</td> |
|
200 </tr> |
|
201 <tr> |
|
202 <td><a href="#PythonDisViewer.clear">clear</a></td> |
|
203 <td>Public method to clear the display.</td> |
|
204 </tr> |
|
205 <tr> |
|
206 <td><a href="#PythonDisViewer.createCodeInfoItems">createCodeInfoItems</a></td> |
|
207 <td>Function to create code info items for the given list.</td> |
|
208 </tr> |
|
209 <tr> |
|
210 <td><a href="#PythonDisViewer.hide">hide</a></td> |
|
211 <td>Public slot to hide the DIS viewer.</td> |
|
212 </tr> |
|
213 <tr> |
|
214 <td><a href="#PythonDisViewer.preferencesChanged">preferencesChanged</a></td> |
|
215 <td>Public slot handling changes of the Disassembly viewer settings.</td> |
|
216 </tr> |
|
217 <tr> |
|
218 <td><a href="#PythonDisViewer.resizeEvent">resizeEvent</a></td> |
|
219 <td>Protected method to handle resize events.</td> |
|
220 </tr> |
|
221 <tr> |
|
222 <td><a href="#PythonDisViewer.show">show</a></td> |
|
223 <td>Public slot to show the DIS viewer.</td> |
|
224 </tr> |
|
225 <tr> |
|
226 <td><a href="#PythonDisViewer.showDisassembly">showDisassembly</a></td> |
|
227 <td>Public slot to receive a code disassembly from the debug client.</td> |
|
228 </tr> |
|
229 <tr> |
|
230 <td><a href="#PythonDisViewer.shutdown">shutdown</a></td> |
|
231 <td>Public method to perform shutdown actions.</td> |
|
232 </tr> |
|
233 </table> |
|
234 <h3>Static Methods</h3> |
|
235 |
|
236 <table> |
|
237 <tr><td>None</td></tr> |
|
238 </table> |
|
239 |
|
240 <a NAME="PythonDisViewer.__init__" ID="PythonDisViewer.__init__"></a> |
|
241 <h4>PythonDisViewer (Constructor)</h4> |
|
242 <b>PythonDisViewer</b>(<i>viewmanager, mode=PythonDisViewerModes.SOURCEDISASSEMBLY, parent=None</i>) |
|
243 |
|
244 <p> |
|
245 Constructor |
|
246 </p> |
|
247 <dl> |
|
248 |
|
249 <dt><i>viewmanager</i> (ViewManager)</dt> |
|
250 <dd> |
|
251 reference to the viewmanager object |
|
252 </dd> |
|
253 <dt><i>mode</i> (int)</dt> |
|
254 <dd> |
|
255 operation mode of the viewer |
|
256 </dd> |
|
257 <dt><i>parent</i> (QWidget)</dt> |
|
258 <dd> |
|
259 reference to the parent widget |
|
260 </dd> |
|
261 </dl> |
|
262 <a NAME="PythonDisViewer.__clearSelection" ID="PythonDisViewer.__clearSelection"></a> |
|
263 <h4>PythonDisViewer.__clearSelection</h4> |
|
264 <b>__clearSelection</b>(<i></i>) |
|
265 |
|
266 <p> |
|
267 Private method to clear all selected items. |
|
268 </p> |
|
269 <a NAME="PythonDisViewer.__codeInfoContextMenuRequested" ID="PythonDisViewer.__codeInfoContextMenuRequested"></a> |
|
270 <h4>PythonDisViewer.__codeInfoContextMenuRequested</h4> |
|
271 <b>__codeInfoContextMenuRequested</b>(<i>coord</i>) |
|
272 |
|
273 <p> |
|
274 Private slot to show the context menu of the code info widget. |
|
275 </p> |
|
276 <dl> |
|
277 |
|
278 <dt><i>coord</i> (QPoint)</dt> |
|
279 <dd> |
|
280 position of the mouse pointer |
|
281 </dd> |
|
282 </dl> |
|
283 <a NAME="PythonDisViewer.__collapseAllCodeInfo" ID="PythonDisViewer.__collapseAllCodeInfo"></a> |
|
284 <h4>PythonDisViewer.__collapseAllCodeInfo</h4> |
|
285 <b>__collapseAllCodeInfo</b>(<i></i>) |
|
286 |
|
287 <p> |
|
288 Private slot to collapse all items of the code info widget. |
|
289 </p> |
|
290 <a NAME="PythonDisViewer.__collapseAllDis" ID="PythonDisViewer.__collapseAllDis"></a> |
|
291 <h4>PythonDisViewer.__collapseAllDis</h4> |
|
292 <b>__collapseAllDis</b>(<i></i>) |
|
293 |
|
294 <p> |
|
295 Private slot to collapse all items of the disassembly widget. |
|
296 </p> |
|
297 <a NAME="PythonDisViewer.__configure" ID="PythonDisViewer.__configure"></a> |
|
298 <h4>PythonDisViewer.__configure</h4> |
|
299 <b>__configure</b>(<i></i>) |
|
300 |
|
301 <p> |
|
302 Private method to open the configuration dialog. |
|
303 </p> |
|
304 <a NAME="PythonDisViewer.__createCodeInfo" ID="PythonDisViewer.__createCodeInfo"></a> |
|
305 <h4>PythonDisViewer.__createCodeInfo</h4> |
|
306 <b>__createCodeInfo</b>(<i>co</i>) |
|
307 |
|
308 <p> |
|
309 Private method to create a dictionary containing the code info data. |
|
310 </p> |
|
311 <dl> |
|
312 |
|
313 <dt><i>co</i> (code)</dt> |
|
314 <dd> |
|
315 reference to the code object to generate the info for |
|
316 </dd> |
|
317 </dl> |
|
318 <dl> |
|
319 <dt>Return:</dt> |
|
320 <dd> |
|
321 dictionary containing the code info data |
|
322 </dd> |
|
323 </dl> |
|
324 <dl> |
|
325 <dt>Return Type:</dt> |
|
326 <dd> |
|
327 dict |
|
328 </dd> |
|
329 </dl> |
|
330 <a NAME="PythonDisViewer.__createErrorItem" ID="PythonDisViewer.__createErrorItem"></a> |
|
331 <h4>PythonDisViewer.__createErrorItem</h4> |
|
332 <b>__createErrorItem</b>(<i>error</i>) |
|
333 |
|
334 <p> |
|
335 Private method to create a top level error item. |
|
336 </p> |
|
337 <dl> |
|
338 |
|
339 <dt><i>error</i> (str)</dt> |
|
340 <dd> |
|
341 error message |
|
342 </dd> |
|
343 </dl> |
|
344 <dl> |
|
345 <dt>Return:</dt> |
|
346 <dd> |
|
347 generated item |
|
348 </dd> |
|
349 </dl> |
|
350 <dl> |
|
351 <dt>Return Type:</dt> |
|
352 <dd> |
|
353 QTreeWidgetItem |
|
354 </dd> |
|
355 </dl> |
|
356 <a NAME="PythonDisViewer.__createInstructionItem" ID="PythonDisViewer.__createInstructionItem"></a> |
|
357 <h4>PythonDisViewer.__createInstructionItem</h4> |
|
358 <b>__createInstructionItem</b>(<i>instr, parent, lasti=-1</i>) |
|
359 |
|
360 <p> |
|
361 Private method to create an item for the given instruction. |
|
362 </p> |
|
363 <dl> |
|
364 |
|
365 <dt><i>instr</i> (dis.Instruction)</dt> |
|
366 <dd> |
|
367 instruction the item should be based on |
|
368 </dd> |
|
369 <dt><i>parent</i> (QTreeWidgetItem)</dt> |
|
370 <dd> |
|
371 reference to the parent item |
|
372 </dd> |
|
373 <dt><i>lasti</i> (int)</dt> |
|
374 <dd> |
|
375 index of the instruction of a traceback |
|
376 </dd> |
|
377 </dl> |
|
378 <dl> |
|
379 <dt>Return:</dt> |
|
380 <dd> |
|
381 generated item |
|
382 </dd> |
|
383 </dl> |
|
384 <dl> |
|
385 <dt>Return Type:</dt> |
|
386 <dd> |
|
387 QTreeWidgetItem |
|
388 </dd> |
|
389 </dl> |
|
390 <a NAME="PythonDisViewer.__createTitleItem" ID="PythonDisViewer.__createTitleItem"></a> |
|
391 <h4>PythonDisViewer.__createTitleItem</h4> |
|
392 <b>__createTitleItem</b>(<i>title, line, parentItem</i>) |
|
393 |
|
394 <p> |
|
395 Private method to create a title item. |
|
396 </p> |
|
397 <dl> |
|
398 |
|
399 <dt><i>title</i> (str)</dt> |
|
400 <dd> |
|
401 titel string for the item |
|
402 </dd> |
|
403 <dt><i>line</i> (int)</dt> |
|
404 <dd> |
|
405 start line of the titled disassembly |
|
406 </dd> |
|
407 <dt><i>parentItem</i> (QTreeWidget or QTreeWidgetItem)</dt> |
|
408 <dd> |
|
409 reference to the parent item |
|
410 </dd> |
|
411 </dl> |
|
412 <dl> |
|
413 <dt>Return:</dt> |
|
414 <dd> |
|
415 generated item |
|
416 </dd> |
|
417 </dl> |
|
418 <dl> |
|
419 <dt>Return Type:</dt> |
|
420 <dd> |
|
421 QTreeWidgetItem |
|
422 </dd> |
|
423 </dl> |
|
424 <a NAME="PythonDisViewer.__disContextMenuRequested" ID="PythonDisViewer.__disContextMenuRequested"></a> |
|
425 <h4>PythonDisViewer.__disContextMenuRequested</h4> |
|
426 <b>__disContextMenuRequested</b>(<i>coord</i>) |
|
427 |
|
428 <p> |
|
429 Private slot to show the context menu of the disassembly widget. |
|
430 </p> |
|
431 <dl> |
|
432 |
|
433 <dt><i>coord</i> (QPoint)</dt> |
|
434 <dd> |
|
435 position of the mouse pointer |
|
436 </dd> |
|
437 </dl> |
|
438 <a NAME="PythonDisViewer.__disItemClicked" ID="PythonDisViewer.__disItemClicked"></a> |
|
439 <h4>PythonDisViewer.__disItemClicked</h4> |
|
440 <b>__disItemClicked</b>(<i>itm, column</i>) |
|
441 |
|
442 <p> |
|
443 Private slot handling a user click on a Disassembly node item. |
|
444 </p> |
|
445 <dl> |
|
446 |
|
447 <dt><i>itm</i> (QTreeWidgetItem)</dt> |
|
448 <dd> |
|
449 reference to the clicked item |
|
450 </dd> |
|
451 <dt><i>column</i> (int)</dt> |
|
452 <dd> |
|
453 column number of the click |
|
454 </dd> |
|
455 </dl> |
|
456 <a NAME="PythonDisViewer.__disViewerStateChanged" ID="PythonDisViewer.__disViewerStateChanged"></a> |
|
457 <h4>PythonDisViewer.__disViewerStateChanged</h4> |
|
458 <b>__disViewerStateChanged</b>(<i>on</i>) |
|
459 |
|
460 <p> |
|
461 Private slot to toggle the display of the Disassembly viewer. |
|
462 </p> |
|
463 <dl> |
|
464 |
|
465 <dt><i>on</i> (bool)</dt> |
|
466 <dd> |
|
467 flag indicating to show the Disassembly |
|
468 </dd> |
|
469 </dl> |
|
470 <a NAME="PythonDisViewer.__disassembleObject" ID="PythonDisViewer.__disassembleObject"></a> |
|
471 <h4>PythonDisViewer.__disassembleObject</h4> |
|
472 <b>__disassembleObject</b>(<i>co, parentItem, parentName="", lasti=-1</i>) |
|
473 |
|
474 <p> |
|
475 Private method to disassemble the given code object recursively. |
|
476 </p> |
|
477 <dl> |
|
478 |
|
479 <dt><i>co</i> (code object)</dt> |
|
480 <dd> |
|
481 code object to be disassembled |
|
482 </dd> |
|
483 <dt><i>parentItem</i> (QTreeWidget or QTreeWidgetItem)</dt> |
|
484 <dd> |
|
485 reference to the parent item |
|
486 </dd> |
|
487 <dt><i>parentName</i> (str)</dt> |
|
488 <dd> |
|
489 name of the parent code object |
|
490 </dd> |
|
491 <dt><i>lasti</i> (int)</dt> |
|
492 <dd> |
|
493 index of the instruction of a traceback |
|
494 </dd> |
|
495 </dl> |
|
496 <a NAME="PythonDisViewer.__editorChanged" ID="PythonDisViewer.__editorChanged"></a> |
|
497 <h4>PythonDisViewer.__editorChanged</h4> |
|
498 <b>__editorChanged</b>(<i>editor</i>) |
|
499 |
|
500 <p> |
|
501 Private slot to handle a change of the current editor. |
|
502 </p> |
|
503 <dl> |
|
504 |
|
505 <dt><i>editor</i> (Editor)</dt> |
|
506 <dd> |
|
507 reference to the current editor |
|
508 </dd> |
|
509 </dl> |
|
510 <a NAME="PythonDisViewer.__editorLanguageChanged" ID="PythonDisViewer.__editorLanguageChanged"></a> |
|
511 <h4>PythonDisViewer.__editorLanguageChanged</h4> |
|
512 <b>__editorLanguageChanged</b>(<i>editor</i>) |
|
513 |
|
514 <p> |
|
515 Private slot to handle a change of the editor language. |
|
516 </p> |
|
517 <dl> |
|
518 |
|
519 <dt><i>editor</i> (Editor)</dt> |
|
520 <dd> |
|
521 reference to the editor which changed language |
|
522 </dd> |
|
523 </dl> |
|
524 <a NAME="PythonDisViewer.__editorLineChanged" ID="PythonDisViewer.__editorLineChanged"></a> |
|
525 <h4>PythonDisViewer.__editorLineChanged</h4> |
|
526 <b>__editorLineChanged</b>(<i>editor, lineno</i>) |
|
527 |
|
528 <p> |
|
529 Private slot to handle a mouse button double click in the editor. |
|
530 </p> |
|
531 <dl> |
|
532 |
|
533 <dt><i>editor</i> (Editor)</dt> |
|
534 <dd> |
|
535 reference to the editor, that emitted the signal |
|
536 </dd> |
|
537 <dt><i>lineno</i> (int)</dt> |
|
538 <dd> |
|
539 line number of the editor's cursor (zero based) |
|
540 </dd> |
|
541 </dl> |
|
542 <a NAME="PythonDisViewer.__editorSaved" ID="PythonDisViewer.__editorSaved"></a> |
|
543 <h4>PythonDisViewer.__editorSaved</h4> |
|
544 <b>__editorSaved</b>(<i>editor</i>) |
|
545 |
|
546 <p> |
|
547 Private slot to reload the Disassembly after the connected editor was |
|
548 saved. |
|
549 </p> |
|
550 <dl> |
|
551 |
|
552 <dt><i>editor</i> (Editor)</dt> |
|
553 <dd> |
|
554 reference to the editor that performed a save action |
|
555 </dd> |
|
556 </dl> |
|
557 <a NAME="PythonDisViewer.__expandAllCodeInfo" ID="PythonDisViewer.__expandAllCodeInfo"></a> |
|
558 <h4>PythonDisViewer.__expandAllCodeInfo</h4> |
|
559 <b>__expandAllCodeInfo</b>(<i></i>) |
|
560 |
|
561 <p> |
|
562 Private slot to expand all items of the code info widget. |
|
563 </p> |
|
564 <a NAME="PythonDisViewer.__expandAllDis" ID="PythonDisViewer.__expandAllDis"></a> |
|
565 <h4>PythonDisViewer.__expandAllDis</h4> |
|
566 <b>__expandAllDis</b>(<i></i>) |
|
567 |
|
568 <p> |
|
569 Private slot to expand all items of the disassembly widget. |
|
570 </p> |
|
571 <a NAME="PythonDisViewer.__lastEditorClosed" ID="PythonDisViewer.__lastEditorClosed"></a> |
|
572 <h4>PythonDisViewer.__lastEditorClosed</h4> |
|
573 <b>__lastEditorClosed</b>(<i></i>) |
|
574 |
|
575 <p> |
|
576 Private slot to handle the last editor closed signal of the view |
|
577 manager. |
|
578 </p> |
|
579 <a NAME="PythonDisViewer.__loadDIS" ID="PythonDisViewer.__loadDIS"></a> |
|
580 <h4>PythonDisViewer.__loadDIS</h4> |
|
581 <b>__loadDIS</b>(<i></i>) |
|
582 |
|
583 <p> |
|
584 Private method to generate the Disassembly from the source of the |
|
585 current editor and visualize it. |
|
586 </p> |
|
587 <a NAME="PythonDisViewer.__resizeCodeInfoColumns" ID="PythonDisViewer.__resizeCodeInfoColumns"></a> |
|
588 <h4>PythonDisViewer.__resizeCodeInfoColumns</h4> |
|
589 <b>__resizeCodeInfoColumns</b>(<i></i>) |
|
590 |
|
591 <p> |
|
592 Private method to resize the columns of the code info widget to |
|
593 suitable values. |
|
594 </p> |
|
595 <a NAME="PythonDisViewer.__resizeDisColumns" ID="PythonDisViewer.__resizeDisColumns"></a> |
|
596 <h4>PythonDisViewer.__resizeDisColumns</h4> |
|
597 <b>__resizeDisColumns</b>(<i></i>) |
|
598 |
|
599 <p> |
|
600 Private method to resize the columns of the disassembly widget to |
|
601 suitable values. |
|
602 </p> |
|
603 <a NAME="PythonDisViewer.__selectChildren" ID="PythonDisViewer.__selectChildren"></a> |
|
604 <h4>PythonDisViewer.__selectChildren</h4> |
|
605 <b>__selectChildren</b>(<i>itm, lineno</i>) |
|
606 |
|
607 <p> |
|
608 Private method to select children of the given item covering the given |
|
609 line number. |
|
610 </p> |
|
611 <dl> |
|
612 |
|
613 <dt><i>itm</i> (QTreeWidgetItem)</dt> |
|
614 <dd> |
|
615 reference to the item |
|
616 </dd> |
|
617 <dt><i>lineno</i> (int)</dt> |
|
618 <dd> |
|
619 line number to base the selection on |
|
620 </dd> |
|
621 </dl> |
|
622 <a NAME="PythonDisViewer.__selectItemForEditorLine" ID="PythonDisViewer.__selectItemForEditorLine"></a> |
|
623 <h4>PythonDisViewer.__selectItemForEditorLine</h4> |
|
624 <b>__selectItemForEditorLine</b>(<i></i>) |
|
625 |
|
626 <p> |
|
627 Private slot to select the items corresponding with the cursor line |
|
628 of the current editor. |
|
629 </p> |
|
630 <a NAME="PythonDisViewer.__showCodeInfo" ID="PythonDisViewer.__showCodeInfo"></a> |
|
631 <h4>PythonDisViewer.__showCodeInfo</h4> |
|
632 <b>__showCodeInfo</b>(<i></i>) |
|
633 |
|
634 <p> |
|
635 Private slot handling the context menu action to show code info. |
|
636 </p> |
|
637 <a NAME="PythonDisViewer.__showCodeInfoData" ID="PythonDisViewer.__showCodeInfoData"></a> |
|
638 <h4>PythonDisViewer.__showCodeInfoData</h4> |
|
639 <b>__showCodeInfoData</b>(<i>codeInfo</i>) |
|
640 |
|
641 <p> |
|
642 Private method to show the passed code info data. |
|
643 </p> |
|
644 <dl> |
|
645 |
|
646 <dt><i>codeInfo</i> (dict)</dt> |
|
647 <dd> |
|
648 dictionary containing the code info data |
|
649 </dd> |
|
650 </dl> |
|
651 <a NAME="PythonDisViewer.__styleLabels" ID="PythonDisViewer.__styleLabels"></a> |
|
652 <h4>PythonDisViewer.__styleLabels</h4> |
|
653 <b>__styleLabels</b>(<i></i>) |
|
654 |
|
655 <p> |
|
656 Private method to style the info labels iaw. selected colors. |
|
657 </p> |
|
658 <a NAME="PythonDisViewer.__tryCompile" ID="PythonDisViewer.__tryCompile"></a> |
|
659 <h4>PythonDisViewer.__tryCompile</h4> |
|
660 <b>__tryCompile</b>(<i>source, name</i>) |
|
661 |
|
662 <p> |
|
663 Private method to attempt to compile the given source, first as an |
|
664 expression and then as a statement if the first approach fails. |
|
665 </p> |
|
666 <dl> |
|
667 |
|
668 <dt><i>source</i> (str)</dt> |
|
669 <dd> |
|
670 source code string to be compiled |
|
671 </dd> |
|
672 <dt><i>name</i> (str)</dt> |
|
673 <dd> |
|
674 name of the file containing the source |
|
675 </dd> |
|
676 </dl> |
|
677 <dl> |
|
678 <dt>Return:</dt> |
|
679 <dd> |
|
680 compiled code |
|
681 </dd> |
|
682 </dl> |
|
683 <dl> |
|
684 <dt>Return Type:</dt> |
|
685 <dd> |
|
686 code object |
|
687 </dd> |
|
688 </dl> |
|
689 <a NAME="PythonDisViewer.__updateItemEndLine" ID="PythonDisViewer.__updateItemEndLine"></a> |
|
690 <h4>PythonDisViewer.__updateItemEndLine</h4> |
|
691 <b>__updateItemEndLine</b>(<i>itm</i>) |
|
692 |
|
693 <p> |
|
694 Private method to update an items end line based on its children. |
|
695 </p> |
|
696 <dl> |
|
697 |
|
698 <dt><i>itm</i> (QTreeWidgetItem)</dt> |
|
699 <dd> |
|
700 reference to the item to be updated |
|
701 </dd> |
|
702 </dl> |
|
703 <a NAME="PythonDisViewer.clear" ID="PythonDisViewer.clear"></a> |
|
704 <h4>PythonDisViewer.clear</h4> |
|
705 <b>clear</b>(<i></i>) |
|
706 |
|
707 <p> |
|
708 Public method to clear the display. |
|
709 </p> |
|
710 <a NAME="PythonDisViewer.createCodeInfoItems" ID="PythonDisViewer.createCodeInfoItems"></a> |
|
711 <h4>PythonDisViewer.createCodeInfoItems</h4> |
|
712 <b>createCodeInfoItems</b>(<i>infoList</i>) |
|
713 |
|
714 <p> |
|
715 Function to create code info items for the given list. |
|
716 </p> |
|
717 <dl> |
|
718 |
|
719 <dt><i>title</i> (str)</dt> |
|
720 <dd> |
|
721 title string for the list |
|
722 </dd> |
|
723 <dt><i>infoList</i> (list of str)</dt> |
|
724 <dd> |
|
725 list of info strings |
|
726 </dd> |
|
727 </dl> |
|
728 <a NAME="PythonDisViewer.hide" ID="PythonDisViewer.hide"></a> |
|
729 <h4>PythonDisViewer.hide</h4> |
|
730 <b>hide</b>(<i></i>) |
|
731 |
|
732 <p> |
|
733 Public slot to hide the DIS viewer. |
|
734 </p> |
|
735 <a NAME="PythonDisViewer.preferencesChanged" ID="PythonDisViewer.preferencesChanged"></a> |
|
736 <h4>PythonDisViewer.preferencesChanged</h4> |
|
737 <b>preferencesChanged</b>(<i></i>) |
|
738 |
|
739 <p> |
|
740 Public slot handling changes of the Disassembly viewer settings. |
|
741 </p> |
|
742 <a NAME="PythonDisViewer.resizeEvent" ID="PythonDisViewer.resizeEvent"></a> |
|
743 <h4>PythonDisViewer.resizeEvent</h4> |
|
744 <b>resizeEvent</b>(<i>evt</i>) |
|
745 |
|
746 <p> |
|
747 Protected method to handle resize events. |
|
748 </p> |
|
749 <dl> |
|
750 |
|
751 <dt><i>evt</i> (QResizeEvent)</dt> |
|
752 <dd> |
|
753 resize event |
|
754 </dd> |
|
755 </dl> |
|
756 <a NAME="PythonDisViewer.show" ID="PythonDisViewer.show"></a> |
|
757 <h4>PythonDisViewer.show</h4> |
|
758 <b>show</b>(<i></i>) |
|
759 |
|
760 <p> |
|
761 Public slot to show the DIS viewer. |
|
762 </p> |
|
763 <a NAME="PythonDisViewer.showDisassembly" ID="PythonDisViewer.showDisassembly"></a> |
|
764 <h4>PythonDisViewer.showDisassembly</h4> |
|
765 <b>showDisassembly</b>(<i>disassembly</i>) |
|
766 |
|
767 <p> |
|
768 Public slot to receive a code disassembly from the debug client. |
|
769 </p> |
|
770 <dl> |
|
771 |
|
772 <dt><i>disassembly</i> (dict)</dt> |
|
773 <dd> |
|
774 dictionary containing the disassembly information |
|
775 </dd> |
|
776 </dl> |
|
777 <a NAME="PythonDisViewer.shutdown" ID="PythonDisViewer.shutdown"></a> |
|
778 <h4>PythonDisViewer.shutdown</h4> |
|
779 <b>shutdown</b>(<i></i>) |
|
780 |
|
781 <p> |
|
782 Public method to perform shutdown actions. |
|
783 </p> |
|
784 <div align="right"><a href="#top">Up</a></div> |
|
785 <hr /> |
|
786 <hr /> |
|
787 <a NAME="PythonDisViewerModes" ID="PythonDisViewerModes"></a> |
|
788 <h2>PythonDisViewerModes</h2> |
|
789 |
|
790 <p> |
|
791 Class implementing the disassembly viewer operation modes. |
|
792 </p> |
|
793 <h3>Derived from</h3> |
|
794 enum.Enum |
|
795 <h3>Class Attributes</h3> |
|
796 |
|
797 <table> |
|
798 <tr><td>SOURCEDISASSEMBLY</td></tr><tr><td>TRACEBACK</td></tr> |
|
799 </table> |
|
800 <h3>Class Methods</h3> |
|
801 |
|
802 <table> |
|
803 <tr><td>None</td></tr> |
|
804 </table> |
|
805 <h3>Methods</h3> |
|
806 |
|
807 <table> |
|
808 <tr><td>None</td></tr> |
|
809 </table> |
|
810 <h3>Static Methods</h3> |
|
811 |
|
812 <table> |
|
813 <tr><td>None</td></tr> |
|
814 </table> |
|
815 |
|
816 <div align="right"><a href="#top">Up</a></div> |
|
817 <hr /> |
|
818 </body></html> |