eric6/Documentation/Source/eric6.UI.PythonDisViewer.html

changeset 7713
ab61050423ef
parent 7707
6abcf4275d0e
child 7989
a21d673a8f99
equal deleted inserted replaced
7712:d8eedc2e5a0a 7713:ab61050423ef
57 <p> 57 <p>
58 Class implementing a widget to visualize the Python Disassembly for some 58 Class implementing a widget to visualize the Python Disassembly for some
59 Python sources. 59 Python sources.
60 </p> 60 </p>
61 <h3>Derived from</h3> 61 <h3>Derived from</h3>
62 QWidget 62 QWidget, Ui_PythonDisViewer
63 <h3>Class Attributes</h3> 63 <h3>Class Attributes</h3>
64 64
65 <table> 65 <table>
66 <tr><td>EndLineRole</td></tr><tr><td>StartLineRole</td></tr> 66 <tr><td>CodeInfoRole</td></tr><tr><td>EndLineRole</td></tr><tr><td>StartLineRole</td></tr>
67 </table> 67 </table>
68 <h3>Class Methods</h3> 68 <h3>Class Methods</h3>
69 69
70 <table> 70 <table>
71 <tr><td>None</td></tr> 71 <tr><td>None</td></tr>
81 <tr> 81 <tr>
82 <td><a href="#PythonDisViewer.__clearSelection">__clearSelection</a></td> 82 <td><a href="#PythonDisViewer.__clearSelection">__clearSelection</a></td>
83 <td>Private method to clear all selected items.</td> 83 <td>Private method to clear all selected items.</td>
84 </tr> 84 </tr>
85 <tr> 85 <tr>
86 <td><a href="#PythonDisViewer.__collapseAll">__collapseAll</a></td> 86 <td><a href="#PythonDisViewer.__codeInfoContextMenuRequested">__codeInfoContextMenuRequested</a></td>
87 <td>Private slot to collapse all items.</td> 87 <td>Private slot to show the context menu of the code info widget.</td>
88 </tr> 88 </tr>
89 <tr> 89 <tr>
90 <td><a href="#PythonDisViewer.__contextMenuRequested">__contextMenuRequested</a></td> 90 <td><a href="#PythonDisViewer.__collapseAllCodeInfo">__collapseAllCodeInfo</a></td>
91 <td>Private slot to show the context menu.</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>
92 </tr> 104 </tr>
93 <tr> 105 <tr>
94 <td><a href="#PythonDisViewer.__createErrorItem">__createErrorItem</a></td> 106 <td><a href="#PythonDisViewer.__createErrorItem">__createErrorItem</a></td>
95 <td>Private method to create a top level error item.</td> 107 <td>Private method to create a top level error item.</td>
96 </tr> 108 </tr>
101 <tr> 113 <tr>
102 <td><a href="#PythonDisViewer.__createTitleItem">__createTitleItem</a></td> 114 <td><a href="#PythonDisViewer.__createTitleItem">__createTitleItem</a></td>
103 <td>Private method to create a title item.</td> 115 <td>Private method to create a title item.</td>
104 </tr> 116 </tr>
105 <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>
106 <td><a href="#PythonDisViewer.__disItemClicked">__disItemClicked</a></td> 122 <td><a href="#PythonDisViewer.__disItemClicked">__disItemClicked</a></td>
107 <td>Private slot handling a user click on a Disassembly node item.</td> 123 <td>Private slot handling a user click on a Disassembly node item.</td>
108 </tr> 124 </tr>
109 <tr> 125 <tr>
110 <td><a href="#PythonDisViewer.__disViewerStateChanged">__disViewerStateChanged</a></td> 126 <td><a href="#PythonDisViewer.__disViewerStateChanged">__disViewerStateChanged</a></td>
129 <tr> 145 <tr>
130 <td><a href="#PythonDisViewer.__editorSaved">__editorSaved</a></td> 146 <td><a href="#PythonDisViewer.__editorSaved">__editorSaved</a></td>
131 <td>Private slot to reload the Disassembly after the connected editor was saved.</td> 147 <td>Private slot to reload the Disassembly after the connected editor was saved.</td>
132 </tr> 148 </tr>
133 <tr> 149 <tr>
134 <td><a href="#PythonDisViewer.__expandAll">__expandAll</a></td> 150 <td><a href="#PythonDisViewer.__expandAllCodeInfo">__expandAllCodeInfo</a></td>
135 <td>Private slot to expand all items.</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>
136 </tr> 156 </tr>
137 <tr> 157 <tr>
138 <td><a href="#PythonDisViewer.__lastEditorClosed">__lastEditorClosed</a></td> 158 <td><a href="#PythonDisViewer.__lastEditorClosed">__lastEditorClosed</a></td>
139 <td>Private slot to handle the last editor closed signal of the view manager.</td> 159 <td>Private slot to handle the last editor closed signal of the view manager.</td>
140 </tr> 160 </tr>
141 <tr> 161 <tr>
142 <td><a href="#PythonDisViewer.__loadDIS">__loadDIS</a></td> 162 <td><a href="#PythonDisViewer.__loadDIS">__loadDIS</a></td>
143 <td>Private method to generate the Disassembly from the source of the current editor and visualize it.</td> 163 <td>Private method to generate the Disassembly from the source of the current editor and visualize it.</td>
144 </tr> 164 </tr>
145 <tr> 165 <tr>
146 <td><a href="#PythonDisViewer.__resizeColumns">__resizeColumns</a></td> 166 <td><a href="#PythonDisViewer.__resizeCodeInfoColumns">__resizeCodeInfoColumns</a></td>
147 <td>Private method to resize the columns to suitable values.</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>
148 </tr> 172 </tr>
149 <tr> 173 <tr>
150 <td><a href="#PythonDisViewer.__selectChildren">__selectChildren</a></td> 174 <td><a href="#PythonDisViewer.__selectChildren">__selectChildren</a></td>
151 <td>Private method to select children of the given item covering the given line number.</td> 175 <td>Private method to select children of the given item covering the given line number.</td>
152 </tr> 176 </tr>
153 <tr> 177 <tr>
154 <td><a href="#PythonDisViewer.__selectItemForEditorLine">__selectItemForEditorLine</a></td> 178 <td><a href="#PythonDisViewer.__selectItemForEditorLine">__selectItemForEditorLine</a></td>
155 <td>Private slot to select the items corresponding with the cursor line of the current editor.</td> 179 <td>Private slot to select the items corresponding with the cursor line of the current editor.</td>
156 </tr> 180 </tr>
157 <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>
158 <td><a href="#PythonDisViewer.__styleLabels">__styleLabels</a></td> 190 <td><a href="#PythonDisViewer.__styleLabels">__styleLabels</a></td>
159 <td>Private method to style the info labels iaw.</td> 191 <td>Private method to style the info labels iaw.</td>
160 </tr> 192 </tr>
161 <tr> 193 <tr>
162 <td><a href="#PythonDisViewer.__tryCompile">__tryCompile</a></td> 194 <td><a href="#PythonDisViewer.__tryCompile">__tryCompile</a></td>
167 <td>Private method to update an items end line based on its children.</td> 199 <td>Private method to update an items end line based on its children.</td>
168 </tr> 200 </tr>
169 <tr> 201 <tr>
170 <td><a href="#PythonDisViewer.clear">clear</a></td> 202 <td><a href="#PythonDisViewer.clear">clear</a></td>
171 <td>Public method to clear the display.</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>
172 </tr> 208 </tr>
173 <tr> 209 <tr>
174 <td><a href="#PythonDisViewer.hide">hide</a></td> 210 <td><a href="#PythonDisViewer.hide">hide</a></td>
175 <td>Public slot to hide the DIS viewer.</td> 211 <td>Public slot to hide the DIS viewer.</td>
176 </tr> 212 </tr>
228 <b>__clearSelection</b>(<i></i>) 264 <b>__clearSelection</b>(<i></i>)
229 265
230 <p> 266 <p>
231 Private method to clear all selected items. 267 Private method to clear all selected items.
232 </p> 268 </p>
233 <a NAME="PythonDisViewer.__collapseAll" ID="PythonDisViewer.__collapseAll"></a> 269 <a NAME="PythonDisViewer.__codeInfoContextMenuRequested" ID="PythonDisViewer.__codeInfoContextMenuRequested"></a>
234 <h4>PythonDisViewer.__collapseAll</h4> 270 <h4>PythonDisViewer.__codeInfoContextMenuRequested</h4>
235 <b>__collapseAll</b>(<i></i>) 271 <b>__codeInfoContextMenuRequested</b>(<i>coord</i>)
236 272
237 <p> 273 <p>
238 Private slot to collapse all items. 274 Private slot to show the context menu of the code info widget.
239 </p>
240 <a NAME="PythonDisViewer.__contextMenuRequested" ID="PythonDisViewer.__contextMenuRequested"></a>
241 <h4>PythonDisViewer.__contextMenuRequested</h4>
242 <b>__contextMenuRequested</b>(<i>coord</i>)
243
244 <p>
245 Private slot to show the context menu.
246 </p> 275 </p>
247 <dl> 276 <dl>
248 277
249 <dt><i>coord</i> (QPoint)</dt> 278 <dt><i>coord</i> (QPoint)</dt>
250 <dd> 279 <dd>
251 position of the mouse pointer 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>Returns:</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
252 </dd> 328 </dd>
253 </dl> 329 </dl>
254 <a NAME="PythonDisViewer.__createErrorItem" ID="PythonDisViewer.__createErrorItem"></a> 330 <a NAME="PythonDisViewer.__createErrorItem" ID="PythonDisViewer.__createErrorItem"></a>
255 <h4>PythonDisViewer.__createErrorItem</h4> 331 <h4>PythonDisViewer.__createErrorItem</h4>
256 <b>__createErrorItem</b>(<i>error</i>) 332 <b>__createErrorItem</b>(<i>error</i>)
343 <dt>Return Type:</dt> 419 <dt>Return Type:</dt>
344 <dd> 420 <dd>
345 QTreeWidgetItem 421 QTreeWidgetItem
346 </dd> 422 </dd>
347 </dl> 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>
348 <a NAME="PythonDisViewer.__disItemClicked" ID="PythonDisViewer.__disItemClicked"></a> 438 <a NAME="PythonDisViewer.__disItemClicked" ID="PythonDisViewer.__disItemClicked"></a>
349 <h4>PythonDisViewer.__disItemClicked</h4> 439 <h4>PythonDisViewer.__disItemClicked</h4>
350 <b>__disItemClicked</b>(<i>itm, column</i>) 440 <b>__disItemClicked</b>(<i>itm, column</i>)
351 441
352 <p> 442 <p>
462 <dt><i>editor</i> (Editor)</dt> 552 <dt><i>editor</i> (Editor)</dt>
463 <dd> 553 <dd>
464 reference to the editor that performed a save action 554 reference to the editor that performed a save action
465 </dd> 555 </dd>
466 </dl> 556 </dl>
467 <a NAME="PythonDisViewer.__expandAll" ID="PythonDisViewer.__expandAll"></a> 557 <a NAME="PythonDisViewer.__expandAllCodeInfo" ID="PythonDisViewer.__expandAllCodeInfo"></a>
468 <h4>PythonDisViewer.__expandAll</h4> 558 <h4>PythonDisViewer.__expandAllCodeInfo</h4>
469 <b>__expandAll</b>(<i></i>) 559 <b>__expandAllCodeInfo</b>(<i></i>)
470 560
471 <p> 561 <p>
472 Private slot to expand all items. 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.
473 </p> 570 </p>
474 <a NAME="PythonDisViewer.__lastEditorClosed" ID="PythonDisViewer.__lastEditorClosed"></a> 571 <a NAME="PythonDisViewer.__lastEditorClosed" ID="PythonDisViewer.__lastEditorClosed"></a>
475 <h4>PythonDisViewer.__lastEditorClosed</h4> 572 <h4>PythonDisViewer.__lastEditorClosed</h4>
476 <b>__lastEditorClosed</b>(<i></i>) 573 <b>__lastEditorClosed</b>(<i></i>)
477 574
485 582
486 <p> 583 <p>
487 Private method to generate the Disassembly from the source of the 584 Private method to generate the Disassembly from the source of the
488 current editor and visualize it. 585 current editor and visualize it.
489 </p> 586 </p>
490 <a NAME="PythonDisViewer.__resizeColumns" ID="PythonDisViewer.__resizeColumns"></a> 587 <a NAME="PythonDisViewer.__resizeCodeInfoColumns" ID="PythonDisViewer.__resizeCodeInfoColumns"></a>
491 <h4>PythonDisViewer.__resizeColumns</h4> 588 <h4>PythonDisViewer.__resizeCodeInfoColumns</h4>
492 <b>__resizeColumns</b>(<i></i>) 589 <b>__resizeCodeInfoColumns</b>(<i></i>)
493 590
494 <p> 591 <p>
495 Private method to resize the columns to suitable values. 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.
496 </p> 602 </p>
497 <a NAME="PythonDisViewer.__selectChildren" ID="PythonDisViewer.__selectChildren"></a> 603 <a NAME="PythonDisViewer.__selectChildren" ID="PythonDisViewer.__selectChildren"></a>
498 <h4>PythonDisViewer.__selectChildren</h4> 604 <h4>PythonDisViewer.__selectChildren</h4>
499 <b>__selectChildren</b>(<i>itm, lineno</i>) 605 <b>__selectChildren</b>(<i>itm, lineno</i>)
500 606
519 625
520 <p> 626 <p>
521 Private slot to select the items corresponding with the cursor line 627 Private slot to select the items corresponding with the cursor line
522 of the current editor. 628 of the current editor.
523 </p> 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>
524 <a NAME="PythonDisViewer.__styleLabels" ID="PythonDisViewer.__styleLabels"></a> 651 <a NAME="PythonDisViewer.__styleLabels" ID="PythonDisViewer.__styleLabels"></a>
525 <h4>PythonDisViewer.__styleLabels</h4> 652 <h4>PythonDisViewer.__styleLabels</h4>
526 <b>__styleLabels</b>(<i></i>) 653 <b>__styleLabels</b>(<i></i>)
527 654
528 <p> 655 <p>
578 <b>clear</b>(<i></i>) 705 <b>clear</b>(<i></i>)
579 706
580 <p> 707 <p>
581 Public method to clear the display. 708 Public method to clear the display.
582 </p> 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>
583 <a NAME="PythonDisViewer.hide" ID="PythonDisViewer.hide"></a> 728 <a NAME="PythonDisViewer.hide" ID="PythonDisViewer.hide"></a>
584 <h4>PythonDisViewer.hide</h4> 729 <h4>PythonDisViewer.hide</h4>
585 <b>hide</b>(<i></i>) 730 <b>hide</b>(<i></i>)
586 731
587 <p> 732 <p>

eric ide

mercurial