|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Debugger.VariablesViewer</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><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.Debugger.VariablesViewer</h1> |
|
23 <p> |
|
24 Module implementing the variables viewer widget. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#ArrayElementVarItem">ArrayElementVarItem</a></td> |
|
34 <td>Class implementing a VariableItem that represents an array element.</td> |
|
35 </tr><tr> |
|
36 <td><a href="#SpecialArrayElementVarItem">SpecialArrayElementVarItem</a></td> |
|
37 <td>Class implementing a QTreeWidgetItem that represents a special array variable node.</td> |
|
38 </tr><tr> |
|
39 <td><a href="#SpecialVarItem">SpecialVarItem</a></td> |
|
40 <td>Class implementing a VariableItem that represents a special variable node.</td> |
|
41 </tr><tr> |
|
42 <td><a href="#VariableItem">VariableItem</a></td> |
|
43 <td>Class implementing the data structure for variable items.</td> |
|
44 </tr><tr> |
|
45 <td><a href="#VariablesViewer">VariablesViewer</a></td> |
|
46 <td>Class implementing the variables viewer widget.</td> |
|
47 </tr> |
|
48 </table> |
|
49 <h3>Functions</h3> |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <hr /><hr /> |
|
54 <a NAME="ArrayElementVarItem" ID="ArrayElementVarItem"></a> |
|
55 <h2>ArrayElementVarItem</h2> |
|
56 <p> |
|
57 Class implementing a VariableItem that represents an array element. |
|
58 </p> |
|
59 <h3>Derived from</h3> |
|
60 VariableItem |
|
61 <h3>Class Attributes</h3> |
|
62 <table> |
|
63 <tr><td>None</td></tr> |
|
64 </table> |
|
65 <h3>Class Methods</h3> |
|
66 <table> |
|
67 <tr><td>None</td></tr> |
|
68 </table> |
|
69 <h3>Methods</h3> |
|
70 <table> |
|
71 <tr> |
|
72 <td><a href="#ArrayElementVarItem.__init__">ArrayElementVarItem</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr> |
|
75 </table> |
|
76 <h3>Static Methods</h3> |
|
77 <table> |
|
78 <tr><td>None</td></tr> |
|
79 </table> |
|
80 <a NAME="ArrayElementVarItem.__init__" ID="ArrayElementVarItem.__init__"></a> |
|
81 <h4>ArrayElementVarItem (Constructor)</h4> |
|
82 <b>ArrayElementVarItem</b>(<i>parent, dvar, dvalue, dtype</i>) |
|
83 <p> |
|
84 Constructor |
|
85 </p><dl> |
|
86 <dt><i>parent</i></dt> |
|
87 <dd> |
|
88 parent of this item |
|
89 </dd><dt><i>dvar</i></dt> |
|
90 <dd> |
|
91 variable name (string) |
|
92 </dd><dt><i>dvalue</i></dt> |
|
93 <dd> |
|
94 value string (string) |
|
95 </dd><dt><i>dtype</i></dt> |
|
96 <dd> |
|
97 type string (string) |
|
98 </dd> |
|
99 </dl> |
|
100 <div align="right"><a href="#top">Up</a></div> |
|
101 <hr /><hr /> |
|
102 <a NAME="SpecialArrayElementVarItem" ID="SpecialArrayElementVarItem"></a> |
|
103 <h2>SpecialArrayElementVarItem</h2> |
|
104 <p> |
|
105 Class implementing a QTreeWidgetItem that represents a special array |
|
106 variable node. |
|
107 </p> |
|
108 <h3>Derived from</h3> |
|
109 SpecialVarItem |
|
110 <h3>Class Attributes</h3> |
|
111 <table> |
|
112 <tr><td>None</td></tr> |
|
113 </table> |
|
114 <h3>Class Methods</h3> |
|
115 <table> |
|
116 <tr><td>None</td></tr> |
|
117 </table> |
|
118 <h3>Methods</h3> |
|
119 <table> |
|
120 <tr> |
|
121 <td><a href="#SpecialArrayElementVarItem.__init__">SpecialArrayElementVarItem</a></td> |
|
122 <td>Constructor</td> |
|
123 </tr> |
|
124 </table> |
|
125 <h3>Static Methods</h3> |
|
126 <table> |
|
127 <tr><td>None</td></tr> |
|
128 </table> |
|
129 <a NAME="SpecialArrayElementVarItem.__init__" ID="SpecialArrayElementVarItem.__init__"></a> |
|
130 <h4>SpecialArrayElementVarItem (Constructor)</h4> |
|
131 <b>SpecialArrayElementVarItem</b>(<i>parent, dvar, dvalue, dtype, frmnr, globalScope</i>) |
|
132 <p> |
|
133 Constructor |
|
134 </p><dl> |
|
135 <dt><i>parent</i></dt> |
|
136 <dd> |
|
137 parent of this item |
|
138 </dd><dt><i>dvar</i></dt> |
|
139 <dd> |
|
140 variable name (string) |
|
141 </dd><dt><i>dvalue</i></dt> |
|
142 <dd> |
|
143 value string (string) |
|
144 </dd><dt><i>dtype</i></dt> |
|
145 <dd> |
|
146 type string (string) |
|
147 </dd><dt><i>frmnr</i></dt> |
|
148 <dd> |
|
149 frame number (0 is the current frame) (int) |
|
150 </dd><dt><i>globalScope</i></dt> |
|
151 <dd> |
|
152 flag indicating global (True) or local (False) |
|
153 variables |
|
154 </dd> |
|
155 </dl> |
|
156 <div align="right"><a href="#top">Up</a></div> |
|
157 <hr /><hr /> |
|
158 <a NAME="SpecialVarItem" ID="SpecialVarItem"></a> |
|
159 <h2>SpecialVarItem</h2> |
|
160 <p> |
|
161 Class implementing a VariableItem that represents a special variable node. |
|
162 </p><p> |
|
163 These special variable nodes are generated for classes, lists, |
|
164 tuples and dictionaries. |
|
165 </p> |
|
166 <h3>Derived from</h3> |
|
167 VariableItem |
|
168 <h3>Class Attributes</h3> |
|
169 <table> |
|
170 <tr><td>None</td></tr> |
|
171 </table> |
|
172 <h3>Class Methods</h3> |
|
173 <table> |
|
174 <tr><td>None</td></tr> |
|
175 </table> |
|
176 <h3>Methods</h3> |
|
177 <table> |
|
178 <tr> |
|
179 <td><a href="#SpecialVarItem.__init__">SpecialVarItem</a></td> |
|
180 <td>Constructor</td> |
|
181 </tr><tr> |
|
182 <td><a href="#SpecialVarItem.expand">expand</a></td> |
|
183 <td>Public method to expand the item.</td> |
|
184 </tr> |
|
185 </table> |
|
186 <h3>Static Methods</h3> |
|
187 <table> |
|
188 <tr><td>None</td></tr> |
|
189 </table> |
|
190 <a NAME="SpecialVarItem.__init__" ID="SpecialVarItem.__init__"></a> |
|
191 <h4>SpecialVarItem (Constructor)</h4> |
|
192 <b>SpecialVarItem</b>(<i>parent, dvar, dvalue, dtype, frmnr, globalScope</i>) |
|
193 <p> |
|
194 Constructor |
|
195 </p><dl> |
|
196 <dt><i>parent</i></dt> |
|
197 <dd> |
|
198 parent of this item |
|
199 </dd><dt><i>dvar</i></dt> |
|
200 <dd> |
|
201 variable name (string) |
|
202 </dd><dt><i>dvalue</i></dt> |
|
203 <dd> |
|
204 value string (string) |
|
205 </dd><dt><i>dtype</i></dt> |
|
206 <dd> |
|
207 type string (string) |
|
208 </dd><dt><i>frmnr</i></dt> |
|
209 <dd> |
|
210 frame number (0 is the current frame) (int) |
|
211 </dd><dt><i>globalScope</i></dt> |
|
212 <dd> |
|
213 flag indicating global (True) or local (False) |
|
214 variables |
|
215 </dd> |
|
216 </dl><a NAME="SpecialVarItem.expand" ID="SpecialVarItem.expand"></a> |
|
217 <h4>SpecialVarItem.expand</h4> |
|
218 <b>expand</b>(<i></i>) |
|
219 <p> |
|
220 Public method to expand the item. |
|
221 </p> |
|
222 <div align="right"><a href="#top">Up</a></div> |
|
223 <hr /><hr /> |
|
224 <a NAME="VariableItem" ID="VariableItem"></a> |
|
225 <h2>VariableItem</h2> |
|
226 <p> |
|
227 Class implementing the data structure for variable items. |
|
228 </p> |
|
229 <h3>Derived from</h3> |
|
230 QTreeWidgetItem |
|
231 <h3>Class Attributes</h3> |
|
232 <table> |
|
233 <tr><td>Indicators</td></tr><tr><td>Type2Indicators</td></tr> |
|
234 </table> |
|
235 <h3>Class Methods</h3> |
|
236 <table> |
|
237 <tr> |
|
238 <td><a href="#VariableItem.extractId">extractId</a></td> |
|
239 <td>Class method to extract the ID string from a variable text.</td> |
|
240 </tr><tr> |
|
241 <td><a href="#VariableItem.extractIndicators">extractIndicators</a></td> |
|
242 <td>Class method to extract the indicator string from a variable text.</td> |
|
243 </tr> |
|
244 </table> |
|
245 <h3>Methods</h3> |
|
246 <table> |
|
247 <tr> |
|
248 <td><a href="#VariableItem.__init__">VariableItem</a></td> |
|
249 <td>Constructor</td> |
|
250 </tr><tr> |
|
251 <td><a href="#VariableItem._buildKey">_buildKey</a></td> |
|
252 <td>Protected method to build the access key for the variable.</td> |
|
253 </tr><tr> |
|
254 <td><a href="#VariableItem.attachDummy">attachDummy</a></td> |
|
255 <td>Public method to attach a dummy sub item to allow for lazy population.</td> |
|
256 </tr><tr> |
|
257 <td><a href="#VariableItem.collapse">collapse</a></td> |
|
258 <td>Public method to collapse the item.</td> |
|
259 </tr><tr> |
|
260 <td><a href="#VariableItem.data">data</a></td> |
|
261 <td>Public method to return the data for the requested role.</td> |
|
262 </tr><tr> |
|
263 <td><a href="#VariableItem.deleteChildren">deleteChildren</a></td> |
|
264 <td>Public method to delete all children (cleaning the subtree).</td> |
|
265 </tr><tr> |
|
266 <td><a href="#VariableItem.expand">expand</a></td> |
|
267 <td>Public method to expand the item.</td> |
|
268 </tr><tr> |
|
269 <td><a href="#VariableItem.getId">getId</a></td> |
|
270 <td>Public method to get the ID string.</td> |
|
271 </tr><tr> |
|
272 <td><a href="#VariableItem.getValue">getValue</a></td> |
|
273 <td>Public method to return the value of the item.</td> |
|
274 </tr> |
|
275 </table> |
|
276 <h3>Static Methods</h3> |
|
277 <table> |
|
278 <tr><td>None</td></tr> |
|
279 </table> |
|
280 <a NAME="VariableItem.extractId" ID="VariableItem.extractId"></a> |
|
281 <h4>VariableItem.extractId (class method)</h4> |
|
282 <b>extractId</b>(<i>var</i>) |
|
283 <p> |
|
284 Class method to extract the ID string from a variable text. |
|
285 </p><dl> |
|
286 <dt><i>var</i> (str)</dt> |
|
287 <dd> |
|
288 variable text |
|
289 </dd> |
|
290 </dl><dl> |
|
291 <dt>Returns:</dt> |
|
292 <dd> |
|
293 tuple containing the variable text without ID and the ID string |
|
294 </dd> |
|
295 </dl><dl> |
|
296 <dt>Return Type:</dt> |
|
297 <dd> |
|
298 tuple of two str |
|
299 </dd> |
|
300 </dl><a NAME="VariableItem.extractIndicators" ID="VariableItem.extractIndicators"></a> |
|
301 <h4>VariableItem.extractIndicators (class method)</h4> |
|
302 <b>extractIndicators</b>(<i>var</i>) |
|
303 <p> |
|
304 Class method to extract the indicator string from a variable text. |
|
305 </p><dl> |
|
306 <dt><i>var</i> (str)</dt> |
|
307 <dd> |
|
308 variable text |
|
309 </dd> |
|
310 </dl><dl> |
|
311 <dt>Returns:</dt> |
|
312 <dd> |
|
313 tuple containing the variable text without indicators and the |
|
314 indicator string |
|
315 </dd> |
|
316 </dl><dl> |
|
317 <dt>Return Type:</dt> |
|
318 <dd> |
|
319 tuple of two str |
|
320 </dd> |
|
321 </dl><a NAME="VariableItem.__init__" ID="VariableItem.__init__"></a> |
|
322 <h4>VariableItem (Constructor)</h4> |
|
323 <b>VariableItem</b>(<i>parent, dvar, dvalue, dtype</i>) |
|
324 <p> |
|
325 Constructor |
|
326 </p><dl> |
|
327 <dt><i>parent</i></dt> |
|
328 <dd> |
|
329 reference to the parent item |
|
330 </dd><dt><i>dvar</i></dt> |
|
331 <dd> |
|
332 variable name (string) |
|
333 </dd><dt><i>dvalue</i></dt> |
|
334 <dd> |
|
335 value string (string) |
|
336 </dd><dt><i>dtype</i></dt> |
|
337 <dd> |
|
338 type string (string) |
|
339 </dd> |
|
340 </dl><a NAME="VariableItem._buildKey" ID="VariableItem._buildKey"></a> |
|
341 <h4>VariableItem._buildKey</h4> |
|
342 <b>_buildKey</b>(<i></i>) |
|
343 <p> |
|
344 Protected method to build the access key for the variable. |
|
345 </p><dl> |
|
346 <dt>Returns:</dt> |
|
347 <dd> |
|
348 access key |
|
349 </dd> |
|
350 </dl><dl> |
|
351 <dt>Return Type:</dt> |
|
352 <dd> |
|
353 str |
|
354 </dd> |
|
355 </dl><a NAME="VariableItem.attachDummy" ID="VariableItem.attachDummy"></a> |
|
356 <h4>VariableItem.attachDummy</h4> |
|
357 <b>attachDummy</b>(<i></i>) |
|
358 <p> |
|
359 Public method to attach a dummy sub item to allow for lazy population. |
|
360 </p><a NAME="VariableItem.collapse" ID="VariableItem.collapse"></a> |
|
361 <h4>VariableItem.collapse</h4> |
|
362 <b>collapse</b>(<i></i>) |
|
363 <p> |
|
364 Public method to collapse the item. |
|
365 </p><p> |
|
366 Note: This is just a do nothing and should be overwritten. |
|
367 </p><a NAME="VariableItem.data" ID="VariableItem.data"></a> |
|
368 <h4>VariableItem.data</h4> |
|
369 <b>data</b>(<i>column, role</i>) |
|
370 <p> |
|
371 Public method to return the data for the requested role. |
|
372 </p><p> |
|
373 This implementation changes the original behavior in a way, that the |
|
374 display data is returned as the tooltip for column 1. |
|
375 </p><dl> |
|
376 <dt><i>column</i></dt> |
|
377 <dd> |
|
378 column number (integer) |
|
379 </dd><dt><i>role</i></dt> |
|
380 <dd> |
|
381 data role (Qt.ItemDataRole) |
|
382 </dd> |
|
383 </dl><dl> |
|
384 <dt>Returns:</dt> |
|
385 <dd> |
|
386 requested data |
|
387 </dd> |
|
388 </dl><a NAME="VariableItem.deleteChildren" ID="VariableItem.deleteChildren"></a> |
|
389 <h4>VariableItem.deleteChildren</h4> |
|
390 <b>deleteChildren</b>(<i></i>) |
|
391 <p> |
|
392 Public method to delete all children (cleaning the subtree). |
|
393 </p><a NAME="VariableItem.expand" ID="VariableItem.expand"></a> |
|
394 <h4>VariableItem.expand</h4> |
|
395 <b>expand</b>(<i></i>) |
|
396 <p> |
|
397 Public method to expand the item. |
|
398 </p><p> |
|
399 Note: This is just a do nothing and should be overwritten. |
|
400 </p><a NAME="VariableItem.getId" ID="VariableItem.getId"></a> |
|
401 <h4>VariableItem.getId</h4> |
|
402 <b>getId</b>(<i></i>) |
|
403 <p> |
|
404 Public method to get the ID string. |
|
405 </p><dl> |
|
406 <dt>Returns:</dt> |
|
407 <dd> |
|
408 ID string |
|
409 </dd> |
|
410 </dl><dl> |
|
411 <dt>Return Type:</dt> |
|
412 <dd> |
|
413 str |
|
414 </dd> |
|
415 </dl><a NAME="VariableItem.getValue" ID="VariableItem.getValue"></a> |
|
416 <h4>VariableItem.getValue</h4> |
|
417 <b>getValue</b>(<i></i>) |
|
418 <p> |
|
419 Public method to return the value of the item. |
|
420 </p><dl> |
|
421 <dt>Returns:</dt> |
|
422 <dd> |
|
423 value of the item (string) |
|
424 </dd> |
|
425 </dl> |
|
426 <div align="right"><a href="#top">Up</a></div> |
|
427 <hr /><hr /> |
|
428 <a NAME="VariablesViewer" ID="VariablesViewer"></a> |
|
429 <h2>VariablesViewer</h2> |
|
430 <p> |
|
431 Class implementing the variables viewer widget. |
|
432 </p><p> |
|
433 This widget is used to display the variables of the program being |
|
434 debugged in a tree. Compound types will be shown with |
|
435 their main entry first. Once the subtree has been expanded, the |
|
436 individual entries will be shown. Double clicking an entry will |
|
437 popup a dialog showing the variables parameters in a more readable |
|
438 form. This is especially useful for lengthy strings. |
|
439 </p><p> |
|
440 This widget has two modes for displaying the global and the local |
|
441 variables. |
|
442 </p> |
|
443 <h3>Derived from</h3> |
|
444 QTreeWidget |
|
445 <h3>Class Attributes</h3> |
|
446 <table> |
|
447 <tr><td>None</td></tr> |
|
448 </table> |
|
449 <h3>Class Methods</h3> |
|
450 <table> |
|
451 <tr><td>None</td></tr> |
|
452 </table> |
|
453 <h3>Methods</h3> |
|
454 <table> |
|
455 <tr> |
|
456 <td><a href="#VariablesViewer.__init__">VariablesViewer</a></td> |
|
457 <td>Constructor</td> |
|
458 </tr><tr> |
|
459 <td><a href="#VariablesViewer.__addItem">__addItem</a></td> |
|
460 <td>Private method used to add an item to the list.</td> |
|
461 </tr><tr> |
|
462 <td><a href="#VariablesViewer.__buildTreePath">__buildTreePath</a></td> |
|
463 <td>Private method to build up a path from the top to an item.</td> |
|
464 </tr><tr> |
|
465 <td><a href="#VariablesViewer.__configure">__configure</a></td> |
|
466 <td>Private method to open the configuration dialog.</td> |
|
467 </tr><tr> |
|
468 <td><a href="#VariablesViewer.__createPopupMenus">__createPopupMenus</a></td> |
|
469 <td>Private method to generate the popup menus.</td> |
|
470 </tr><tr> |
|
471 <td><a href="#VariablesViewer.__expandItemSignal">__expandItemSignal</a></td> |
|
472 <td>Private slot to handle the expanded signal.</td> |
|
473 </tr><tr> |
|
474 <td><a href="#VariablesViewer.__findItem">__findItem</a></td> |
|
475 <td>Private method to search for an item.</td> |
|
476 </tr><tr> |
|
477 <td><a href="#VariablesViewer.__generateItem">__generateItem</a></td> |
|
478 <td>Private method used to generate a VariableItem.</td> |
|
479 </tr><tr> |
|
480 <td><a href="#VariablesViewer.__getDispType">__getDispType</a></td> |
|
481 <td>Private method used to get the display string for type vtype.</td> |
|
482 </tr><tr> |
|
483 <td><a href="#VariablesViewer.__refreshView">__refreshView</a></td> |
|
484 <td>Private slot to refresh the view.</td> |
|
485 </tr><tr> |
|
486 <td><a href="#VariablesViewer.__resort">__resort</a></td> |
|
487 <td>Private method to resort the tree.</td> |
|
488 </tr><tr> |
|
489 <td><a href="#VariablesViewer.__sectionClicked">__sectionClicked</a></td> |
|
490 <td>Private method handling a click onto a header section.</td> |
|
491 </tr><tr> |
|
492 <td><a href="#VariablesViewer.__showContextMenu">__showContextMenu</a></td> |
|
493 <td>Private slot to show the context menu.</td> |
|
494 </tr><tr> |
|
495 <td><a href="#VariablesViewer.__showDetails">__showDetails</a></td> |
|
496 <td>Private slot to show details about the selected variable.</td> |
|
497 </tr><tr> |
|
498 <td><a href="#VariablesViewer.__showVariableDetails">__showVariableDetails</a></td> |
|
499 <td>Private method to show details about a variable.</td> |
|
500 </tr><tr> |
|
501 <td><a href="#VariablesViewer.collapseItem">collapseItem</a></td> |
|
502 <td>Public slot to handle the collapsed signal.</td> |
|
503 </tr><tr> |
|
504 <td><a href="#VariablesViewer.expandItem">expandItem</a></td> |
|
505 <td>Public slot to handle the expanded signal.</td> |
|
506 </tr><tr> |
|
507 <td><a href="#VariablesViewer.handleResetUI">handleResetUI</a></td> |
|
508 <td>Public method to reset the VariablesViewer.</td> |
|
509 </tr><tr> |
|
510 <td><a href="#VariablesViewer.mouseDoubleClickEvent">mouseDoubleClickEvent</a></td> |
|
511 <td>Protected method of QAbstractItemView.</td> |
|
512 </tr><tr> |
|
513 <td><a href="#VariablesViewer.showVariable">showVariable</a></td> |
|
514 <td>Public method to show variables in a list.</td> |
|
515 </tr><tr> |
|
516 <td><a href="#VariablesViewer.showVariables">showVariables</a></td> |
|
517 <td>Public method to show variables in a list.</td> |
|
518 </tr> |
|
519 </table> |
|
520 <h3>Static Methods</h3> |
|
521 <table> |
|
522 <tr><td>None</td></tr> |
|
523 </table> |
|
524 <a NAME="VariablesViewer.__init__" ID="VariablesViewer.__init__"></a> |
|
525 <h4>VariablesViewer (Constructor)</h4> |
|
526 <b>VariablesViewer</b>(<i>viewer, globalScope, parent=None</i>) |
|
527 <p> |
|
528 Constructor |
|
529 </p><dl> |
|
530 <dt><i>viewer</i></dt> |
|
531 <dd> |
|
532 reference to the debug viewer object (DebugViewer) |
|
533 </dd><dt><i>globalScope</i></dt> |
|
534 <dd> |
|
535 flag indicating global (True) or local (False) |
|
536 variables |
|
537 </dd><dt><i>parent</i></dt> |
|
538 <dd> |
|
539 the parent (QWidget) |
|
540 </dd> |
|
541 </dl><a NAME="VariablesViewer.__addItem" ID="VariablesViewer.__addItem"></a> |
|
542 <h4>VariablesViewer.__addItem</h4> |
|
543 <b>__addItem</b>(<i>parent, vtype, var, value</i>) |
|
544 <p> |
|
545 Private method used to add an item to the list. |
|
546 </p><p> |
|
547 If the item is of a type with subelements (i.e. list, dictionary, |
|
548 tuple), these subelements are added by calling this method recursively. |
|
549 </p><dl> |
|
550 <dt><i>parent</i></dt> |
|
551 <dd> |
|
552 the parent of the item to be added |
|
553 (QTreeWidgetItem or None) |
|
554 </dd><dt><i>vtype</i></dt> |
|
555 <dd> |
|
556 the type of the item to be added |
|
557 (string) |
|
558 </dd><dt><i>var</i></dt> |
|
559 <dd> |
|
560 the variable name (string) |
|
561 </dd><dt><i>value</i></dt> |
|
562 <dd> |
|
563 the value string (string) |
|
564 </dd> |
|
565 </dl><dl> |
|
566 <dt>Returns:</dt> |
|
567 <dd> |
|
568 The item that was added to the listview (QTreeWidgetItem). |
|
569 </dd> |
|
570 </dl><a NAME="VariablesViewer.__buildTreePath" ID="VariablesViewer.__buildTreePath"></a> |
|
571 <h4>VariablesViewer.__buildTreePath</h4> |
|
572 <b>__buildTreePath</b>(<i>itm</i>) |
|
573 <p> |
|
574 Private method to build up a path from the top to an item. |
|
575 </p><dl> |
|
576 <dt><i>itm</i></dt> |
|
577 <dd> |
|
578 item to build the path for (QTreeWidgetItem) |
|
579 </dd> |
|
580 </dl><dl> |
|
581 <dt>Returns:</dt> |
|
582 <dd> |
|
583 list of names denoting the path from the top (list of strings) |
|
584 </dd> |
|
585 </dl><a NAME="VariablesViewer.__configure" ID="VariablesViewer.__configure"></a> |
|
586 <h4>VariablesViewer.__configure</h4> |
|
587 <b>__configure</b>(<i></i>) |
|
588 <p> |
|
589 Private method to open the configuration dialog. |
|
590 </p><a NAME="VariablesViewer.__createPopupMenus" ID="VariablesViewer.__createPopupMenus"></a> |
|
591 <h4>VariablesViewer.__createPopupMenus</h4> |
|
592 <b>__createPopupMenus</b>(<i></i>) |
|
593 <p> |
|
594 Private method to generate the popup menus. |
|
595 </p><a NAME="VariablesViewer.__expandItemSignal" ID="VariablesViewer.__expandItemSignal"></a> |
|
596 <h4>VariablesViewer.__expandItemSignal</h4> |
|
597 <b>__expandItemSignal</b>(<i>parentItem</i>) |
|
598 <p> |
|
599 Private slot to handle the expanded signal. |
|
600 </p><dl> |
|
601 <dt><i>parentItem</i></dt> |
|
602 <dd> |
|
603 reference to the item being expanded |
|
604 (QTreeWidgetItem) |
|
605 </dd> |
|
606 </dl><a NAME="VariablesViewer.__findItem" ID="VariablesViewer.__findItem"></a> |
|
607 <h4>VariablesViewer.__findItem</h4> |
|
608 <b>__findItem</b>(<i>slist, column, node=None</i>) |
|
609 <p> |
|
610 Private method to search for an item. |
|
611 </p><p> |
|
612 It is used to find a specific item in column, |
|
613 that is a child of node. If node is None, a child of the |
|
614 QTreeWidget is searched. |
|
615 </p><dl> |
|
616 <dt><i>slist</i></dt> |
|
617 <dd> |
|
618 searchlist (list of strings) |
|
619 </dd><dt><i>column</i></dt> |
|
620 <dd> |
|
621 index of column to search in (int) |
|
622 </dd><dt><i>node</i></dt> |
|
623 <dd> |
|
624 start point of the search |
|
625 </dd> |
|
626 </dl><dl> |
|
627 <dt>Returns:</dt> |
|
628 <dd> |
|
629 the found item or None |
|
630 </dd> |
|
631 </dl><a NAME="VariablesViewer.__generateItem" ID="VariablesViewer.__generateItem"></a> |
|
632 <h4>VariablesViewer.__generateItem</h4> |
|
633 <b>__generateItem</b>(<i>parent, dvar, dvalue, dtype, isSpecial=False</i>) |
|
634 <p> |
|
635 Private method used to generate a VariableItem. |
|
636 </p><dl> |
|
637 <dt><i>parent</i></dt> |
|
638 <dd> |
|
639 parent of the item to be generated |
|
640 </dd><dt><i>dvar</i></dt> |
|
641 <dd> |
|
642 variable name (string) |
|
643 </dd><dt><i>dvalue</i></dt> |
|
644 <dd> |
|
645 value string (string) |
|
646 </dd><dt><i>dtype</i></dt> |
|
647 <dd> |
|
648 type string (string) |
|
649 </dd><dt><i>isSpecial</i></dt> |
|
650 <dd> |
|
651 flag indicating that a special node should be |
|
652 generated (boolean) |
|
653 </dd> |
|
654 </dl><dl> |
|
655 <dt>Returns:</dt> |
|
656 <dd> |
|
657 The item that was generated (VariableItem). |
|
658 </dd> |
|
659 </dl><a NAME="VariablesViewer.__getDispType" ID="VariablesViewer.__getDispType"></a> |
|
660 <h4>VariablesViewer.__getDispType</h4> |
|
661 <b>__getDispType</b>(<i>vtype</i>) |
|
662 <p> |
|
663 Private method used to get the display string for type vtype. |
|
664 </p><dl> |
|
665 <dt><i>vtype</i></dt> |
|
666 <dd> |
|
667 the type, the display string should be looked up for |
|
668 (string) |
|
669 </dd> |
|
670 </dl><dl> |
|
671 <dt>Returns:</dt> |
|
672 <dd> |
|
673 displaystring (string) |
|
674 </dd> |
|
675 </dl><a NAME="VariablesViewer.__refreshView" ID="VariablesViewer.__refreshView"></a> |
|
676 <h4>VariablesViewer.__refreshView</h4> |
|
677 <b>__refreshView</b>(<i></i>) |
|
678 <p> |
|
679 Private slot to refresh the view. |
|
680 </p><a NAME="VariablesViewer.__resort" ID="VariablesViewer.__resort"></a> |
|
681 <h4>VariablesViewer.__resort</h4> |
|
682 <b>__resort</b>(<i>parent=None</i>) |
|
683 <p> |
|
684 Private method to resort the tree. |
|
685 </p><dl> |
|
686 <dt><i>parent</i> (QTreeWidgetItem)</dt> |
|
687 <dd> |
|
688 reference to a parent item |
|
689 </dd> |
|
690 </dl><a NAME="VariablesViewer.__sectionClicked" ID="VariablesViewer.__sectionClicked"></a> |
|
691 <h4>VariablesViewer.__sectionClicked</h4> |
|
692 <b>__sectionClicked</b>(<i></i>) |
|
693 <p> |
|
694 Private method handling a click onto a header section. |
|
695 </p><a NAME="VariablesViewer.__showContextMenu" ID="VariablesViewer.__showContextMenu"></a> |
|
696 <h4>VariablesViewer.__showContextMenu</h4> |
|
697 <b>__showContextMenu</b>(<i>coord</i>) |
|
698 <p> |
|
699 Private slot to show the context menu. |
|
700 </p><dl> |
|
701 <dt><i>coord</i></dt> |
|
702 <dd> |
|
703 the position of the mouse pointer (QPoint) |
|
704 </dd> |
|
705 </dl><a NAME="VariablesViewer.__showDetails" ID="VariablesViewer.__showDetails"></a> |
|
706 <h4>VariablesViewer.__showDetails</h4> |
|
707 <b>__showDetails</b>(<i></i>) |
|
708 <p> |
|
709 Private slot to show details about the selected variable. |
|
710 </p><a NAME="VariablesViewer.__showVariableDetails" ID="VariablesViewer.__showVariableDetails"></a> |
|
711 <h4>VariablesViewer.__showVariableDetails</h4> |
|
712 <b>__showVariableDetails</b>(<i>itm</i>) |
|
713 <p> |
|
714 Private method to show details about a variable. |
|
715 </p><dl> |
|
716 <dt><i>itm</i></dt> |
|
717 <dd> |
|
718 reference to the variable item |
|
719 </dd> |
|
720 </dl><a NAME="VariablesViewer.collapseItem" ID="VariablesViewer.collapseItem"></a> |
|
721 <h4>VariablesViewer.collapseItem</h4> |
|
722 <b>collapseItem</b>(<i>parentItem</i>) |
|
723 <p> |
|
724 Public slot to handle the collapsed signal. |
|
725 </p><dl> |
|
726 <dt><i>parentItem</i></dt> |
|
727 <dd> |
|
728 reference to the item being collapsed |
|
729 (QTreeWidgetItem) |
|
730 </dd> |
|
731 </dl><a NAME="VariablesViewer.expandItem" ID="VariablesViewer.expandItem"></a> |
|
732 <h4>VariablesViewer.expandItem</h4> |
|
733 <b>expandItem</b>(<i>parentItem</i>) |
|
734 <p> |
|
735 Public slot to handle the expanded signal. |
|
736 </p><dl> |
|
737 <dt><i>parentItem</i></dt> |
|
738 <dd> |
|
739 reference to the item being expanded |
|
740 (QTreeWidgetItem) |
|
741 </dd> |
|
742 </dl><a NAME="VariablesViewer.handleResetUI" ID="VariablesViewer.handleResetUI"></a> |
|
743 <h4>VariablesViewer.handleResetUI</h4> |
|
744 <b>handleResetUI</b>(<i></i>) |
|
745 <p> |
|
746 Public method to reset the VariablesViewer. |
|
747 </p><a NAME="VariablesViewer.mouseDoubleClickEvent" ID="VariablesViewer.mouseDoubleClickEvent"></a> |
|
748 <h4>VariablesViewer.mouseDoubleClickEvent</h4> |
|
749 <b>mouseDoubleClickEvent</b>(<i>mouseEvent</i>) |
|
750 <p> |
|
751 Protected method of QAbstractItemView. |
|
752 </p><p> |
|
753 Reimplemented to disable expanding/collapsing of items when |
|
754 double-clicking. Instead the double-clicked entry is opened. |
|
755 </p><dl> |
|
756 <dt><i>mouseEvent</i></dt> |
|
757 <dd> |
|
758 the mouse event object (QMouseEvent) |
|
759 </dd> |
|
760 </dl><a NAME="VariablesViewer.showVariable" ID="VariablesViewer.showVariable"></a> |
|
761 <h4>VariablesViewer.showVariable</h4> |
|
762 <b>showVariable</b>(<i>vlist</i>) |
|
763 <p> |
|
764 Public method to show variables in a list. |
|
765 </p><dl> |
|
766 <dt><i>vlist</i></dt> |
|
767 <dd> |
|
768 the list of subitems to be displayed. |
|
769 The first element gives the path of the |
|
770 parent variable. Each other listentry is |
|
771 a tuple of three values. |
|
772 <ul> |
|
773 <li>the variable name (string)</li> |
|
774 <li>the variables type (string)</li> |
|
775 <li>the variables value (string)</li> |
|
776 </ul> |
|
777 </dd> |
|
778 </dl><a NAME="VariablesViewer.showVariables" ID="VariablesViewer.showVariables"></a> |
|
779 <h4>VariablesViewer.showVariables</h4> |
|
780 <b>showVariables</b>(<i>vlist, frmnr</i>) |
|
781 <p> |
|
782 Public method to show variables in a list. |
|
783 </p><dl> |
|
784 <dt><i>vlist</i></dt> |
|
785 <dd> |
|
786 the list of variables to be displayed. Each |
|
787 listentry is a tuple of three values. |
|
788 <ul> |
|
789 <li>the variable name (string)</li> |
|
790 <li>the variables type (string)</li> |
|
791 <li>the variables value (string)</li> |
|
792 </ul> |
|
793 </dd><dt><i>frmnr</i></dt> |
|
794 <dd> |
|
795 frame number (0 is the current frame) (int) |
|
796 </dd> |
|
797 </dl> |
|
798 <div align="right"><a href="#top">Up</a></div> |
|
799 <hr /> |
|
800 </body></html> |