eric6/Documentation/Source/eric6.Debugger.VariablesViewer.html

changeset 7015
b1a3094b33e1
parent 6942
2602857055c5
child 7273
391d6b7b1eff
equal deleted inserted replaced
7014:61172a5bc172 7015:b1a3094b33e1
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.Debugger.VariablesViewer</h1> 22 <h1>eric6.Debugger.VariablesViewer</h1>
23 <p> 23 <p>
24 Module implementing the variables viewer widget. 24 Module implementing the variables viewer view based on QTreeView.
25 </p> 25 </p>
26 <h3>Global Attributes</h3> 26 <h3>Global Attributes</h3>
27 <table> 27 <table>
28 <tr><td>None</td></tr> 28 <tr><td>SORT_ROLE</td></tr>
29 </table> 29 </table>
30 <h3>Classes</h3> 30 <h3>Classes</h3>
31 <table> 31 <table>
32 <tr> 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> 33 <td><a href="#VariableItem">VariableItem</a></td>
43 <td>Class implementing the data structure for variable items.</td> 34 <td>Class implementing the data structure for all variable items.</td>
35 </tr><tr>
36 <td><a href="#VariablesModel">VariablesModel</a></td>
37 <td>Class implementing the data model for QTreeView.</td>
38 </tr><tr>
39 <td><a href="#VariablesProxyModel">VariablesProxyModel</a></td>
40 <td>Class for handling the sort operations.</td>
44 </tr><tr> 41 </tr><tr>
45 <td><a href="#VariablesViewer">VariablesViewer</a></td> 42 <td><a href="#VariablesViewer">VariablesViewer</a></td>
46 <td>Class implementing the variables viewer widget.</td> 43 <td>Class implementing the variables viewer view.</td>
47 </tr> 44 </tr>
48 </table> 45 </table>
49 <h3>Functions</h3> 46 <h3>Functions</h3>
50 <table> 47 <table>
51 <tr><td>None</td></tr> 48 <tr><td>None</td></tr>
52 </table> 49 </table>
53 <hr /><hr /> 50 <hr /><hr />
54 <a NAME="ArrayElementVarItem" ID="ArrayElementVarItem"></a> 51 <a NAME="VariableItem" ID="VariableItem"></a>
55 <h2>ArrayElementVarItem</h2> 52 <h2>VariableItem</h2>
56 <p> 53 <p>
57 Class implementing a VariableItem that represents an array element. 54 Class implementing the data structure for all variable items.
58 </p> 55 </p>
59 <h3>Derived from</h3> 56 <h3>Derived from</h3>
60 VariableItem 57 object
61 <h3>Class Attributes</h3> 58 <h3>Class Attributes</h3>
62 <table> 59 <table>
63 <tr><td>None</td></tr> 60 <tr><td>Type2Indicators</td></tr><tr><td>arrayTypes</td></tr><tr><td>noOfItemsStr</td></tr><tr><td>nonExpandableTypes</td></tr><tr><td>rx_nonprintable</td></tr>
64 </table> 61 </table>
65 <h3>Class Methods</h3> 62 <h3>Class Methods</h3>
66 <table> 63 <table>
67 <tr><td>None</td></tr> 64 <tr><td>None</td></tr>
68 </table> 65 </table>
69 <h3>Methods</h3> 66 <h3>Methods</h3>
70 <table> 67 <table>
71 <tr> 68 <tr>
72 <td><a href="#ArrayElementVarItem.__init__">ArrayElementVarItem</a></td> 69 <td><a href="#VariableItem.__init__">VariableItem</a></td>
73 <td>Constructor</td> 70 <td>Constructor</td>
71 </tr><tr>
72 <td><a href="#VariableItem.__getName">__getName</a></td>
73 <td>Private method to extract the variable name.</td>
74 </tr><tr>
75 <td><a href="#VariableItem.__getType">__getType</a></td>
76 <td>Private method to process the type of the variable.</td>
77 </tr><tr>
78 <td><a href="#VariableItem.__getValue">__getValue</a></td>
79 <td>Private method to process the variables value.</td>
80 </tr><tr>
81 <td><a href="#VariableItem.absolutCount">absolutCount</a></td>
82 <td>Public property to get the total number of children.</td>
83 </tr><tr>
84 <td><a href="#VariableItem.populated">populated</a></td>
85 <td>Public property returning a flag indicating if item is fully populated.</td>
74 </tr> 86 </tr>
75 </table> 87 </table>
76 <h3>Static Methods</h3> 88 <h3>Static Methods</h3>
77 <table> 89 <table>
78 <tr><td>None</td></tr> 90 <tr><td>None</td></tr>
79 </table> 91 </table>
80 <a NAME="ArrayElementVarItem.__init__" ID="ArrayElementVarItem.__init__"></a> 92 <a NAME="VariableItem.__init__" ID="VariableItem.__init__"></a>
81 <h4>ArrayElementVarItem (Constructor)</h4> 93 <h4>VariableItem (Constructor)</h4>
82 <b>ArrayElementVarItem</b>(<i>parent, dvar, dvalue, dtype</i>) 94 <b>VariableItem</b>(<i>parent, dvar, dtype, dvalue</i>)
83 <p> 95 <p>
84 Constructor 96 Constructor
85 </p><dl> 97 </p><dl>
86 <dt><i>parent</i></dt> 98 <dt><i>parent</i> (VariableItem)</dt>
87 <dd> 99 <dd>
88 parent of this item 100 reference to the parent item
89 </dd><dt><i>dvar</i></dt> 101 </dd><dt><i>dvar</i> (str)</dt>
90 <dd> 102 <dd>
91 variable name (string) 103 variable name
92 </dd><dt><i>dvalue</i></dt> 104 </dd><dt><i>dtype</i> (str)</dt>
93 <dd> 105 <dd>
94 value string (string) 106 type string
95 </dd><dt><i>dtype</i></dt> 107 </dd><dt><i>dvalue</i> (str)</dt>
96 <dd> 108 <dd>
97 type string (string) 109 value string
110 </dd>
111 </dl><a NAME="VariableItem.__getName" ID="VariableItem.__getName"></a>
112 <h4>VariableItem.__getName</h4>
113 <b>__getName</b>(<i>dvar</i>)
114 <p>
115 Private method to extract the variable name.
116 </p><dl>
117 <dt><i>dvar</i> (str)</dt>
118 <dd>
119 name of variable maybe with ID
120 </dd>
121 </dl><a NAME="VariableItem.__getType" ID="VariableItem.__getType"></a>
122 <h4>VariableItem.__getType</h4>
123 <b>__getType</b>(<i>dtype</i>)
124 <p>
125 Private method to process the type of the variable.
126 </p><p>
127 If type is known to have children, the corresponding flag is set.
128 </p><dl>
129 <dt><i>dtype</i> (str)</dt>
130 <dd>
131 type string
132 </dd>
133 </dl><a NAME="VariableItem.__getValue" ID="VariableItem.__getValue"></a>
134 <h4>VariableItem.__getValue</h4>
135 <b>__getValue</b>(<i>dtype, dvalue</i>)
136 <p>
137 Private method to process the variables value.
138 </p><p>
139 Define and limit value, set tooltip text. If type is known to have
140 children, the corresponding flag is set.
141 </p><dl>
142 <dt><i>dtype</i> (str)</dt>
143 <dd>
144 type string
145 </dd><dt><i>dvalue</i> (str)</dt>
146 <dd>
147 value of variable encoded as utf-8
148 </dd>
149 </dl><a NAME="VariableItem.absolutCount" ID="VariableItem.absolutCount"></a>
150 <h4>VariableItem.absolutCount</h4>
151 <b>absolutCount</b>(<i></i>)
152 <p>
153 Public property to get the total number of children.
154 </p><dl>
155 <dt>Returns:</dt>
156 <dd>
157 total number of children
158 </dd>
159 </dl><dl>
160 <dt>Return Type:</dt>
161 <dd>
162 int
163 </dd>
164 </dl><a NAME="VariableItem.populated" ID="VariableItem.populated"></a>
165 <h4>VariableItem.populated</h4>
166 <b>populated</b>(<i></i>)
167 <p>
168 Public property returning a flag indicating if item is fully populated.
169 </p><dl>
170 <dt>Returns:</dt>
171 <dd>
172 item is fully populated
173 </dd>
174 </dl><dl>
175 <dt>Return Type:</dt>
176 <dd>
177 bool
98 </dd> 178 </dd>
99 </dl> 179 </dl>
100 <div align="right"><a href="#top">Up</a></div> 180 <div align="right"><a href="#top">Up</a></div>
101 <hr /><hr /> 181 <hr /><hr />
102 <a NAME="SpecialArrayElementVarItem" ID="SpecialArrayElementVarItem"></a> 182 <a NAME="VariablesModel" ID="VariablesModel"></a>
103 <h2>SpecialArrayElementVarItem</h2> 183 <h2>VariablesModel</h2>
104 <p> 184 <p>
105 Class implementing a QTreeWidgetItem that represents a special array 185 Class implementing the data model for QTreeView.
106 variable node. 186 </p><h3>Signals</h3>
107 </p> 187 <dl>
188 <dt>expand</dt>
189 <dd>
190 trigger QTreeView to expand given index
191 </dd>
192 </dl>
108 <h3>Derived from</h3> 193 <h3>Derived from</h3>
109 SpecialVarItem 194 QAbstractItemModel
110 <h3>Class Attributes</h3> 195 <h3>Class Attributes</h3>
111 <table> 196 <table>
112 <tr><td>None</td></tr> 197 <tr><td>None</td></tr>
113 </table> 198 </table>
114 <h3>Class Methods</h3> 199 <h3>Class Methods</h3>
116 <tr><td>None</td></tr> 201 <tr><td>None</td></tr>
117 </table> 202 </table>
118 <h3>Methods</h3> 203 <h3>Methods</h3>
119 <table> 204 <table>
120 <tr> 205 <tr>
121 <td><a href="#SpecialArrayElementVarItem.__init__">SpecialArrayElementVarItem</a></td> 206 <td><a href="#VariablesModel.__init__">VariablesModel</a></td>
122 <td>Constructor</td> 207 <td>Constructor</td>
208 </tr><tr>
209 <td><a href="#VariablesModel.__buildTreePath">__buildTreePath</a></td>
210 <td>Private method to build up a path from the root to parent.</td>
211 </tr><tr>
212 <td><a href="#VariablesModel.__cleanupParentList">__cleanupParentList</a></td>
213 <td>Private method to remove items which are left over at the end of the child list.</td>
214 </tr><tr>
215 <td><a href="#VariablesModel.__findPendingItem">__findPendingItem</a></td>
216 <td>Private method to find the next item to request data from debugger.</td>
217 </tr><tr>
218 <td><a href="#VariablesModel.__findVariable">__findVariable</a></td>
219 <td>Private method to get to the given variable.</td>
220 </tr><tr>
221 <td><a href="#VariablesModel.clear">clear</a></td>
222 <td>Public method to clear the complete data model.</td>
223 </tr><tr>
224 <td><a href="#VariablesModel.columnCount">columnCount</a></td>
225 <td>Public method to get the column count.</td>
226 </tr><tr>
227 <td><a href="#VariablesModel.data">data</a></td>
228 <td>Public method get the role data of item.</td>
229 </tr><tr>
230 <td><a href="#VariablesModel.flags">flags</a></td>
231 <td>Public method to get the item flags.</td>
232 </tr><tr>
233 <td><a href="#VariablesModel.getMore">getMore</a></td>
234 <td>Public method to fetch the next variable from debugger.</td>
235 </tr><tr>
236 <td><a href="#VariablesModel.handlePreferencesChanged">handlePreferencesChanged</a></td>
237 <td>Public slot to handle the preferencesChanged signal.</td>
238 </tr><tr>
239 <td><a href="#VariablesModel.hasChildren">hasChildren</a></td>
240 <td>Public method to get a flag if parent has children.</td>
241 </tr><tr>
242 <td><a href="#VariablesModel.headerData">headerData</a></td>
243 <td>Public method get the header names.</td>
244 </tr><tr>
245 <td><a href="#VariablesModel.index">index</a></td>
246 <td>Public method to get the index of item at row:column of parent.</td>
247 </tr><tr>
248 <td><a href="#VariablesModel.parent">parent</a></td>
249 <td>Public method to get the parent of the given child.</td>
250 </tr><tr>
251 <td><a href="#VariablesModel.resetModifiedMarker">resetModifiedMarker</a></td>
252 <td>Public method to remove the modified marker from changed items.</td>
253 </tr><tr>
254 <td><a href="#VariablesModel.rowCount">rowCount</a></td>
255 <td>Public method to get the row count.</td>
256 </tr><tr>
257 <td><a href="#VariablesModel.setExpanded">setExpanded</a></td>
258 <td>Public method to set the expanded state of item.</td>
259 </tr><tr>
260 <td><a href="#VariablesModel.showVariables">showVariables</a></td>
261 <td>Public method to update the data model of variable in pathlist.</td>
123 </tr> 262 </tr>
124 </table> 263 </table>
125 <h3>Static Methods</h3> 264 <h3>Static Methods</h3>
126 <table> 265 <table>
127 <tr><td>None</td></tr> 266 <tr><td>None</td></tr>
128 </table> 267 </table>
129 <a NAME="SpecialArrayElementVarItem.__init__" ID="SpecialArrayElementVarItem.__init__"></a> 268 <a NAME="VariablesModel.__init__" ID="VariablesModel.__init__"></a>
130 <h4>SpecialArrayElementVarItem (Constructor)</h4> 269 <h4>VariablesModel (Constructor)</h4>
131 <b>SpecialArrayElementVarItem</b>(<i>parent, dvar, dvalue, dtype, frmnr, globalScope</i>) 270 <b>VariablesModel</b>(<i>treeView, globalScope</i>)
132 <p> 271 <p>
133 Constructor 272 Constructor
134 </p><dl> 273 </p><dl>
135 <dt><i>parent</i></dt> 274 <dt><i>treeView</i> (VariablesViewer)</dt>
136 <dd> 275 <dd>
137 parent of this item 276 QTreeView showing the data
138 </dd><dt><i>dvar</i></dt> 277 </dd><dt><i>globalScope</i> (bool)</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> 278 <dd>
152 flag indicating global (True) or local (False) 279 flag indicating global (True) or local (False)
153 variables 280 variables
281 </dd>
282 </dl><a NAME="VariablesModel.__buildTreePath" ID="VariablesModel.__buildTreePath"></a>
283 <h4>VariablesModel.__buildTreePath</h4>
284 <b>__buildTreePath</b>(<i>parent</i>)
285 <p>
286 Private method to build up a path from the root to parent.
287 </p><dl>
288 <dt><i>parent</i> (VariableItem)</dt>
289 <dd>
290 item to build the path for
291 </dd>
292 </dl><dl>
293 <dt>Returns:</dt>
294 <dd>
295 list of names denoting the path from the root
296 </dd>
297 </dl><dl>
298 <dt>Return Type:</dt>
299 <dd>
300 tuple of str
301 </dd>
302 </dl><a NAME="VariablesModel.__cleanupParentList" ID="VariablesModel.__cleanupParentList"></a>
303 <h4>VariablesModel.__cleanupParentList</h4>
304 <b>__cleanupParentList</b>(<i>parent, parentIdx</i>)
305 <p>
306 Private method to remove items which are left over at the end of the
307 child list.
308 </p><dl>
309 <dt><i>parent</i> (VariableItem)</dt>
310 <dd>
311 to clean up
312 </dd><dt><i>parentIdx</i> (QModelIndex)</dt>
313 <dd>
314 the parent index as QModelIndex
315 </dd>
316 </dl><a NAME="VariablesModel.__findPendingItem" ID="VariablesModel.__findPendingItem"></a>
317 <h4>VariablesModel.__findPendingItem</h4>
318 <b>__findPendingItem</b>(<i>parent=None, pathlist=()</i>)
319 <p>
320 Private method to find the next item to request data from debugger.
321 </p><dl>
322 <dt><i>parent</i> (VariableItem)</dt>
323 <dd>
324 the model parent
325 </dd><dt><i>pathlist</i> (list of str)</dt>
326 <dd>
327 full path to the variable
328 </dd>
329 </dl><dl>
330 <dt>Returns:</dt>
331 <dd>
332 next item index to request data from debugger
333 </dd>
334 </dl><dl>
335 <dt>Return Type:</dt>
336 <dd>
337 QModelIndex
338 </dd>
339 </dl><a NAME="VariablesModel.__findVariable" ID="VariablesModel.__findVariable"></a>
340 <h4>VariablesModel.__findVariable</h4>
341 <b>__findVariable</b>(<i>pathlist</i>)
342 <p>
343 Private method to get to the given variable.
344 </p><dl>
345 <dt><i>pathlist</i> (list of str)</dt>
346 <dd>
347 full path to the variable
348 </dd>
349 </dl><dl>
350 <dt>Returns:</dt>
351 <dd>
352 the found variable or None if it doesn't exist
353 </dd>
354 </dl><dl>
355 <dt>Return Type:</dt>
356 <dd>
357 VariableItem or None
358 </dd>
359 </dl><a NAME="VariablesModel.clear" ID="VariablesModel.clear"></a>
360 <h4>VariablesModel.clear</h4>
361 <b>clear</b>(<i>reset=False</i>)
362 <p>
363 Public method to clear the complete data model.
364 </p><dl>
365 <dt><i>reset</i> (bool)</dt>
366 <dd>
367 flag to clear the expanded keys also
368 </dd>
369 </dl><a NAME="VariablesModel.columnCount" ID="VariablesModel.columnCount"></a>
370 <h4>VariablesModel.columnCount</h4>
371 <b>columnCount</b>(<i>parent=QModelIndex()</i>)
372 <p>
373 Public method to get the column count.
374 </p><dl>
375 <dt><i>parent</i> (QModelIndex)</dt>
376 <dd>
377 the model parent
378 </dd>
379 </dl><dl>
380 <dt>Returns:</dt>
381 <dd>
382 number of columns
383 </dd>
384 </dl><dl>
385 <dt>Return Type:</dt>
386 <dd>
387 int
388 </dd>
389 </dl><a NAME="VariablesModel.data" ID="VariablesModel.data"></a>
390 <h4>VariablesModel.data</h4>
391 <b>data</b>(<i>index, role=Qt.DisplayRole</i>)
392 <p>
393 Public method get the role data of item.
394 </p><dl>
395 <dt><i>index</i> (QModelIndex)</dt>
396 <dd>
397 the model index
398 </dd><dt><i>role</i> (QtCore.Qt.ItemDataRole)</dt>
399 <dd>
400 the requested data role
401 </dd>
402 </dl><dl>
403 <dt>Returns:</dt>
404 <dd>
405 role data of item
406 </dd>
407 </dl><dl>
408 <dt>Return Type:</dt>
409 <dd>
410 Any
411 </dd>
412 </dl><a NAME="VariablesModel.flags" ID="VariablesModel.flags"></a>
413 <h4>VariablesModel.flags</h4>
414 <b>flags</b>(<i>index</i>)
415 <p>
416 Public method to get the item flags.
417 </p><dl>
418 <dt><i>index</i> (QModelIndex)</dt>
419 <dd>
420 of item
421 </dd>
422 </dl><dl>
423 <dt>Returns:</dt>
424 <dd>
425 item flags
426 </dd>
427 </dl><dl>
428 <dt>Return Type:</dt>
429 <dd>
430 QtCore.Qt.ItemFlag
431 </dd>
432 </dl><a NAME="VariablesModel.getMore" ID="VariablesModel.getMore"></a>
433 <h4>VariablesModel.getMore</h4>
434 <b>getMore</b>(<i></i>)
435 <p>
436 Public method to fetch the next variable from debugger.
437 </p><a NAME="VariablesModel.handlePreferencesChanged" ID="VariablesModel.handlePreferencesChanged"></a>
438 <h4>VariablesModel.handlePreferencesChanged</h4>
439 <b>handlePreferencesChanged</b>(<i></i>)
440 <p>
441 Public slot to handle the preferencesChanged signal.
442 </p><a NAME="VariablesModel.hasChildren" ID="VariablesModel.hasChildren"></a>
443 <h4>VariablesModel.hasChildren</h4>
444 <b>hasChildren</b>(<i>parent=QModelIndex()</i>)
445 <p>
446 Public method to get a flag if parent has children.
447 </p><dl>
448 <dt><i>parent</i> (QModelIndex)</dt>
449 <dd>
450 the model parent
451 </dd>
452 </dl><dl>
453 <dt>Returns:</dt>
454 <dd>
455 flag indicating parent has children
456 </dd>
457 </dl><dl>
458 <dt>Return Type:</dt>
459 <dd>
460 bool
461 </dd>
462 </dl><a NAME="VariablesModel.headerData" ID="VariablesModel.headerData"></a>
463 <h4>VariablesModel.headerData</h4>
464 <b>headerData</b>(<i>section, orientation, role=Qt.DisplayRole</i>)
465 <p>
466 Public method get the header names.
467 </p><dl>
468 <dt><i>section</i> (int)</dt>
469 <dd>
470 the header section (row/coulumn)
471 </dd><dt><i>orientation</i> (QtCore.Qt.Orientation)</dt>
472 <dd>
473 the header's orientation
474 </dd><dt><i>role</i> (QtCore.Qt.ItemDataRole)</dt>
475 <dd>
476 the requested data role
477 </dd>
478 </dl><dl>
479 <dt>Returns:</dt>
480 <dd>
481 header name
482 </dd>
483 </dl><dl>
484 <dt>Return Type:</dt>
485 <dd>
486 str or None
487 </dd>
488 </dl><a NAME="VariablesModel.index" ID="VariablesModel.index"></a>
489 <h4>VariablesModel.index</h4>
490 <b>index</b>(<i>row, column, parent=QModelIndex()</i>)
491 <p>
492 Public method to get the index of item at row:column of parent.
493 </p><dl>
494 <dt><i>row</i> (int)</dt>
495 <dd>
496 number of rows
497 </dd><dt><i>column</i> (int)</dt>
498 <dd>
499 number of columns
500 </dd><dt><i>parent</i> (QModelIndex)</dt>
501 <dd>
502 the model parent
503 </dd>
504 </dl><dl>
505 <dt>Returns:</dt>
506 <dd>
507 new model index for child
508 </dd>
509 </dl><dl>
510 <dt>Return Type:</dt>
511 <dd>
512 QModelIndex
513 </dd>
514 </dl><a NAME="VariablesModel.parent" ID="VariablesModel.parent"></a>
515 <h4>VariablesModel.parent</h4>
516 <b>parent</b>(<i>child</i>)
517 <p>
518 Public method to get the parent of the given child.
519 </p><dl>
520 <dt><i>child</i> (QModelIndex)</dt>
521 <dd>
522 the model child node
523 </dd>
524 </dl><dl>
525 <dt>Returns:</dt>
526 <dd>
527 new model index for parent
528 </dd>
529 </dl><dl>
530 <dt>Return Type:</dt>
531 <dd>
532 QModelIndex
533 </dd>
534 </dl><a NAME="VariablesModel.resetModifiedMarker" ID="VariablesModel.resetModifiedMarker"></a>
535 <h4>VariablesModel.resetModifiedMarker</h4>
536 <b>resetModifiedMarker</b>(<i>parentIdx=QModelIndex(), pathlist=()</i>)
537 <p>
538 Public method to remove the modified marker from changed items.
539 </p><dl>
540 <dt><i>parentIdx</i> (QModelIndex)</dt>
541 <dd>
542 item to reset marker
543 </dd><dt><i>pathlist</i> (list of str)</dt>
544 <dd>
545 full path to the variable
546 </dd>
547 </dl><a NAME="VariablesModel.rowCount" ID="VariablesModel.rowCount"></a>
548 <h4>VariablesModel.rowCount</h4>
549 <b>rowCount</b>(<i>parent=QModelIndex()</i>)
550 <p>
551 Public method to get the row count.
552 </p><dl>
553 <dt><i>parent</i> (QModelIndex)</dt>
554 <dd>
555 the model parent
556 </dd>
557 </dl><dl>
558 <dt>Returns:</dt>
559 <dd>
560 number of rows
561 </dd>
562 </dl><dl>
563 <dt>Return Type:</dt>
564 <dd>
565 int
566 </dd>
567 </dl><a NAME="VariablesModel.setExpanded" ID="VariablesModel.setExpanded"></a>
568 <h4>VariablesModel.setExpanded</h4>
569 <b>setExpanded</b>(<i>index, state</i>)
570 <p>
571 Public method to set the expanded state of item.
572 </p><dl>
573 <dt><i>index</i> (QModelIndex)</dt>
574 <dd>
575 item to change expanded state
576 </dd><dt><i>state</i> (bool)</dt>
577 <dd>
578 state of the item
579 </dd>
580 </dl><a NAME="VariablesModel.showVariables" ID="VariablesModel.showVariables"></a>
581 <h4>VariablesModel.showVariables</h4>
582 <b>showVariables</b>(<i>vlist, frmnr, pathlist=None</i>)
583 <p>
584 Public method to update the data model of variable in pathlist.
585 </p><dl>
586 <dt><i>vlist</i> (list of str)</dt>
587 <dd>
588 the list of variables to be displayed. Each
589 list entry is a tuple of three values.
590 <ul>
591 <li>the variable name (string)</li>
592 <li>the variables type (string)</li>
593 <li>the variables value (string)</li>
594 </ul>
595 </dd><dt><i>frmnr</i> (int)</dt>
596 <dd>
597 frame number (0 is the current frame)
598 </dd><dt><i>pathlist</i> (list of str)</dt>
599 <dd>
600 full path to the variable
154 </dd> 601 </dd>
155 </dl> 602 </dl>
156 <div align="right"><a href="#top">Up</a></div> 603 <div align="right"><a href="#top">Up</a></div>
157 <hr /><hr /> 604 <hr /><hr />
158 <a NAME="SpecialVarItem" ID="SpecialVarItem"></a> 605 <a NAME="VariablesProxyModel" ID="VariablesProxyModel"></a>
159 <h2>SpecialVarItem</h2> 606 <h2>VariablesProxyModel</h2>
160 <p> 607 <p>
161 Class implementing a VariableItem that represents a special variable node. 608 Class for handling the sort operations.
162 </p><p>
163 These special variable nodes are generated for classes, lists,
164 tuples and dictionaries.
165 </p> 609 </p>
166 <h3>Derived from</h3> 610 <h3>Derived from</h3>
167 VariableItem 611 QSortFilterProxyModel
168 <h3>Class Attributes</h3> 612 <h3>Class Attributes</h3>
169 <table> 613 <table>
170 <tr><td>None</td></tr> 614 <tr><td>None</td></tr>
171 </table> 615 </table>
172 <h3>Class Methods</h3> 616 <h3>Class Methods</h3>
174 <tr><td>None</td></tr> 618 <tr><td>None</td></tr>
175 </table> 619 </table>
176 <h3>Methods</h3> 620 <h3>Methods</h3>
177 <table> 621 <table>
178 <tr> 622 <tr>
179 <td><a href="#SpecialVarItem.__init__">SpecialVarItem</a></td> 623 <td><a href="#VariablesProxyModel.__init__">VariablesProxyModel</a></td>
180 <td>Constructor</td> 624 <td>Constructor</td>
181 </tr><tr> 625 </tr><tr>
182 <td><a href="#SpecialVarItem.expand">expand</a></td> 626 <td><a href="#VariablesProxyModel.hasChildren">hasChildren</a></td>
183 <td>Public method to expand the item.</td> 627 <td>Public method to get a flag if parent has children.</td>
628 </tr><tr>
629 <td><a href="#VariablesProxyModel.setExpanded">setExpanded</a></td>
630 <td>Public slot to get a flag if parent has children.</td>
184 </tr> 631 </tr>
185 </table> 632 </table>
186 <h3>Static Methods</h3> 633 <h3>Static Methods</h3>
187 <table> 634 <table>
188 <tr><td>None</td></tr> 635 <tr><td>None</td></tr>
189 </table> 636 </table>
190 <a NAME="SpecialVarItem.__init__" ID="SpecialVarItem.__init__"></a> 637 <a NAME="VariablesProxyModel.__init__" ID="VariablesProxyModel.__init__"></a>
191 <h4>SpecialVarItem (Constructor)</h4> 638 <h4>VariablesProxyModel (Constructor)</h4>
192 <b>SpecialVarItem</b>(<i>parent, dvar, dvalue, dtype, frmnr, globalScope</i>) 639 <b>VariablesProxyModel</b>(<i>parent=None</i>)
193 <p> 640 <p>
194 Constructor 641 Constructor
195 </p><dl> 642 </p><dl>
196 <dt><i>parent</i></dt> 643 <dt><i>parent</i> (QModelIndex)</dt>
197 <dd> 644 <dd>
198 parent of this item 645 the parent model index
199 </dd><dt><i>dvar</i></dt> 646 </dd>
200 <dd> 647 </dl><a NAME="VariablesProxyModel.hasChildren" ID="VariablesProxyModel.hasChildren"></a>
201 variable name (string) 648 <h4>VariablesProxyModel.hasChildren</h4>
202 </dd><dt><i>dvalue</i></dt> 649 <b>hasChildren</b>(<i>parent</i>)
203 <dd> 650 <p>
204 value string (string) 651 Public method to get a flag if parent has children.
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> 652 </p><p>
366 Note: This is just a do nothing and should be overwritten. 653 The given model index has to be transformed to the underlying source
367 </p><a NAME="VariableItem.data" ID="VariableItem.data"></a> 654 model to get the correct result.
368 <h4>VariableItem.data</h4> 655 </p><dl>
369 <b>data</b>(<i>column, role</i>) 656 <dt><i>parent</i> (QModelIndex)</dt>
370 <p> 657 <dd>
371 Public method to return the data for the requested role. 658 the model parent
659 </dd>
660 </dl><dl>
661 <dt>Returns:</dt>
662 <dd>
663 flag if parent has children
664 </dd>
665 </dl><dl>
666 <dt>Return Type:</dt>
667 <dd>
668 bool
669 </dd>
670 </dl><a NAME="VariablesProxyModel.setExpanded" ID="VariablesProxyModel.setExpanded"></a>
671 <h4>VariablesProxyModel.setExpanded</h4>
672 <b>setExpanded</b>(<i>index, state</i>)
673 <p>
674 Public slot to get a flag if parent has children.
372 </p><p> 675 </p><p>
373 This implementation changes the original behavior in a way, that the 676 The given model index has to be transformed to the underlying source
374 display data is returned as the tooltip for column 1. 677 model to get the correct result.
375 </p><dl> 678 </p><dl>
376 <dt><i>column</i></dt> 679 <dt><i>index</i> (QModelIndex)</dt>
377 <dd> 680 <dd>
378 column number (integer) 681 item to change expanded state
379 </dd><dt><i>role</i></dt> 682 </dd><dt><i>state</i> (bool)</dt>
380 <dd> 683 <dd>
381 data role (Qt.ItemDataRole) 684 state of the item
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> 685 </dd>
425 </dl> 686 </dl>
426 <div align="right"><a href="#top">Up</a></div> 687 <div align="right"><a href="#top">Up</a></div>
427 <hr /><hr /> 688 <hr /><hr />
428 <a NAME="VariablesViewer" ID="VariablesViewer"></a> 689 <a NAME="VariablesViewer" ID="VariablesViewer"></a>
429 <h2>VariablesViewer</h2> 690 <h2>VariablesViewer</h2>
430 <p> 691 <p>
431 Class implementing the variables viewer widget. 692 Class implementing the variables viewer view.
432 </p><p> 693 </p><p>
433 This widget is used to display the variables of the program being 694 This view is used to display the variables of the program being
434 debugged in a tree. Compound types will be shown with 695 debugged in a tree. Compound types will be shown with
435 their main entry first. Once the subtree has been expanded, the 696 their main entry first. Once the subtree has been expanded, the
436 individual entries will be shown. Double clicking an entry will 697 individual entries will be shown. Double clicking an entry will
698 expand or collapse the item, if it has children and the double click
699 was performed on the first column of the tree, otherwise it'll
437 popup a dialog showing the variables parameters in a more readable 700 popup a dialog showing the variables parameters in a more readable
438 form. This is especially useful for lengthy strings. 701 form. This is especially useful for lengthy strings.
439 </p><p> 702 </p><p>
440 This widget has two modes for displaying the global and the local 703 This view has two modes for displaying the global and the local
441 variables. 704 variables.
442 </p> 705 </p><h3>Signals</h3>
706 <dl>
707 <dt>preferencesChanged()</dt>
708 <dd>
709 to inform model about new background colours
710 </dd>
711 </dl>
443 <h3>Derived from</h3> 712 <h3>Derived from</h3>
444 QTreeWidget 713 QTreeView
445 <h3>Class Attributes</h3> 714 <h3>Class Attributes</h3>
446 <table> 715 <table>
447 <tr><td>None</td></tr> 716 <tr><td>None</td></tr>
448 </table> 717 </table>
449 <h3>Class Methods</h3> 718 <h3>Class Methods</h3>
454 <table> 723 <table>
455 <tr> 724 <tr>
456 <td><a href="#VariablesViewer.__init__">VariablesViewer</a></td> 725 <td><a href="#VariablesViewer.__init__">VariablesViewer</a></td>
457 <td>Constructor</td> 726 <td>Constructor</td>
458 </tr><tr> 727 </tr><tr>
459 <td><a href="#VariablesViewer.__addItem">__addItem</a></td> 728 <td><a href="#VariablesViewer.__collapseChildren">__collapseChildren</a></td>
460 <td>Private method used to add an item to the list.</td> 729 <td>Private slot to collapse all child items of current parent.</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> 730 </tr><tr>
465 <td><a href="#VariablesViewer.__configure">__configure</a></td> 731 <td><a href="#VariablesViewer.__configure">__configure</a></td>
466 <td>Private method to open the configuration dialog.</td> 732 <td>Private method to open the configuration dialog.</td>
467 </tr><tr> 733 </tr><tr>
734 <td><a href="#VariablesViewer.__configureFilter">__configureFilter</a></td>
735 <td>Private method to open the variables filter dialog.</td>
736 </tr><tr>
468 <td><a href="#VariablesViewer.__createPopupMenus">__createPopupMenus</a></td> 737 <td><a href="#VariablesViewer.__createPopupMenus">__createPopupMenus</a></td>
469 <td>Private method to generate the popup menus.</td> 738 <td>Private method to generate the popup menus.</td>
470 </tr><tr> 739 </tr><tr>
471 <td><a href="#VariablesViewer.__expandItemSignal">__expandItemSignal</a></td> 740 <td><a href="#VariablesViewer.__expandChildren">__expandChildren</a></td>
472 <td>Private slot to handle the expanded signal.</td> 741 <td>Private slot to expand all child items of current parent.</td>
473 </tr><tr> 742 </tr><tr>
474 <td><a href="#VariablesViewer.__findItem">__findItem</a></td> 743 <td><a href="#VariablesViewer.__itemDoubleClicked">__itemDoubleClicked</a></td>
475 <td>Private method to search for an item.</td> 744 <td>Private method called if an item was double clicked.</td>
476 </tr><tr> 745 </tr><tr>
477 <td><a href="#VariablesViewer.__generateItem">__generateItem</a></td> 746 <td><a href="#VariablesViewer.__mdlRequestExpand">__mdlRequestExpand</a></td>
478 <td>Private method used to generate a VariableItem.</td> 747 <td>Private method to inform the view about items to be expand.</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> 748 </tr><tr>
483 <td><a href="#VariablesViewer.__refreshView">__refreshView</a></td> 749 <td><a href="#VariablesViewer.__refreshView">__refreshView</a></td>
484 <td>Private slot to refresh the view.</td> 750 <td>Private slot to refresh the view.</td>
485 </tr><tr> 751 </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> 752 <td><a href="#VariablesViewer.__showContextMenu">__showContextMenu</a></td>
493 <td>Private slot to show the context menu.</td> 753 <td>Private slot to show the context menu.</td>
494 </tr><tr> 754 </tr><tr>
495 <td><a href="#VariablesViewer.__showDetails">__showDetails</a></td> 755 <td><a href="#VariablesViewer.__showDetails">__showDetails</a></td>
496 <td>Private slot to show details about the selected variable.</td> 756 <td>Private slot to show details about the selected variable.</td>
497 </tr><tr> 757 </tr><tr>
498 <td><a href="#VariablesViewer.__showVariableDetails">__showVariableDetails</a></td> 758 <td><a href="#VariablesViewer.__showVariableDetails">__showVariableDetails</a></td>
499 <td>Private method to show details about a variable.</td> 759 <td>Private method to show details about a variable.</td>
500 </tr><tr> 760 </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> 761 <td><a href="#VariablesViewer.handleResetUI">handleResetUI</a></td>
508 <td>Public method to reset the VariablesViewer.</td> 762 <td>Public method to reset the VariablesViewer.</td>
509 </tr><tr> 763 </tr><tr>
510 <td><a href="#VariablesViewer.mouseDoubleClickEvent">mouseDoubleClickEvent</a></td> 764 <td><a href="#VariablesViewer.resizeEvent">resizeEvent</a></td>
511 <td>Protected method of QAbstractItemView.</td> 765 <td>Protected slot informing about the widget size change.</td>
512 </tr><tr> 766 </tr><tr>
513 <td><a href="#VariablesViewer.showVariable">showVariable</a></td> 767 <td><a href="#VariablesViewer.showVariable">showVariable</a></td>
514 <td>Public method to show variables in a list.</td> 768 <td>Public method to show variables in a list.</td>
515 </tr><tr> 769 </tr><tr>
516 <td><a href="#VariablesViewer.showVariables">showVariables</a></td> 770 <td><a href="#VariablesViewer.showVariables">showVariables</a></td>
517 <td>Public method to show variables in a list.</td> 771 <td>Public method to show variables in a list.</td>
772 </tr><tr>
773 <td><a href="#VariablesViewer.verticalScrollbarValueChanged">verticalScrollbarValueChanged</a></td>
774 <td>Public slot informing about the scrollbar change.</td>
518 </tr> 775 </tr>
519 </table> 776 </table>
520 <h3>Static Methods</h3> 777 <h3>Static Methods</h3>
521 <table> 778 <table>
522 <tr><td>None</td></tr> 779 <tr><td>None</td></tr>
525 <h4>VariablesViewer (Constructor)</h4> 782 <h4>VariablesViewer (Constructor)</h4>
526 <b>VariablesViewer</b>(<i>viewer, globalScope, parent=None</i>) 783 <b>VariablesViewer</b>(<i>viewer, globalScope, parent=None</i>)
527 <p> 784 <p>
528 Constructor 785 Constructor
529 </p><dl> 786 </p><dl>
530 <dt><i>viewer</i></dt> 787 <dt><i>viewer</i> (DebugViewer)</dt>
531 <dd> 788 <dd>
532 reference to the debug viewer object (DebugViewer) 789 reference to the debug viewer object
533 </dd><dt><i>globalScope</i></dt> 790 </dd><dt><i>globalScope</i> (bool)</dt>
534 <dd> 791 <dd>
535 flag indicating global (True) or local (False) 792 flag indicating global (True) or local (False)
536 variables 793 variables
537 </dd><dt><i>parent</i></dt> 794 </dd><dt><i>parent</i> (QWidget)</dt>
538 <dd> 795 <dd>
539 the parent (QWidget) 796 the parent
540 </dd> 797 </dd>
541 </dl><a NAME="VariablesViewer.__addItem" ID="VariablesViewer.__addItem"></a> 798 </dl><a NAME="VariablesViewer.__collapseChildren" ID="VariablesViewer.__collapseChildren"></a>
542 <h4>VariablesViewer.__addItem</h4> 799 <h4>VariablesViewer.__collapseChildren</h4>
543 <b>__addItem</b>(<i>parent, vtype, var, value</i>) 800 <b>__collapseChildren</b>(<i></i>)
544 <p> 801 <p>
545 Private method used to add an item to the list. 802 Private slot to collapse all child items of current parent.
546 </p><p> 803 </p><a NAME="VariablesViewer.__configure" ID="VariablesViewer.__configure"></a>
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> 804 <h4>VariablesViewer.__configure</h4>
587 <b>__configure</b>(<i></i>) 805 <b>__configure</b>(<i></i>)
588 <p> 806 <p>
589 Private method to open the configuration dialog. 807 Private method to open the configuration dialog.
808 </p><a NAME="VariablesViewer.__configureFilter" ID="VariablesViewer.__configureFilter"></a>
809 <h4>VariablesViewer.__configureFilter</h4>
810 <b>__configureFilter</b>(<i></i>)
811 <p>
812 Private method to open the variables filter dialog.
590 </p><a NAME="VariablesViewer.__createPopupMenus" ID="VariablesViewer.__createPopupMenus"></a> 813 </p><a NAME="VariablesViewer.__createPopupMenus" ID="VariablesViewer.__createPopupMenus"></a>
591 <h4>VariablesViewer.__createPopupMenus</h4> 814 <h4>VariablesViewer.__createPopupMenus</h4>
592 <b>__createPopupMenus</b>(<i></i>) 815 <b>__createPopupMenus</b>(<i></i>)
593 <p> 816 <p>
594 Private method to generate the popup menus. 817 Private method to generate the popup menus.
595 </p><a NAME="VariablesViewer.__expandItemSignal" ID="VariablesViewer.__expandItemSignal"></a> 818 </p><a NAME="VariablesViewer.__expandChildren" ID="VariablesViewer.__expandChildren"></a>
596 <h4>VariablesViewer.__expandItemSignal</h4> 819 <h4>VariablesViewer.__expandChildren</h4>
597 <b>__expandItemSignal</b>(<i>parentItem</i>) 820 <b>__expandChildren</b>(<i></i>)
598 <p> 821 <p>
599 Private slot to handle the expanded signal. 822 Private slot to expand all child items of current parent.
600 </p><dl> 823 </p><a NAME="VariablesViewer.__itemDoubleClicked" ID="VariablesViewer.__itemDoubleClicked"></a>
601 <dt><i>parentItem</i></dt> 824 <h4>VariablesViewer.__itemDoubleClicked</h4>
602 <dd> 825 <b>__itemDoubleClicked</b>(<i>index</i>)
603 reference to the item being expanded 826 <p>
604 (QTreeWidgetItem) 827 Private method called if an item was double clicked.
605 </dd> 828 </p><dl>
606 </dl><a NAME="VariablesViewer.__findItem" ID="VariablesViewer.__findItem"></a> 829 <dt><i>index</i> (QModelIndex)</dt>
607 <h4>VariablesViewer.__findItem</h4> 830 <dd>
608 <b>__findItem</b>(<i>slist, column, node=None</i>) 831 the double clicked item
609 <p> 832 </dd>
610 Private method to search for an item. 833 </dl><a NAME="VariablesViewer.__mdlRequestExpand" ID="VariablesViewer.__mdlRequestExpand"></a>
611 </p><p> 834 <h4>VariablesViewer.__mdlRequestExpand</h4>
612 It is used to find a specific item in column, 835 <b>__mdlRequestExpand</b>(<i>modelIndex</i>)
613 that is a child of node. If node is None, a child of the 836 <p>
614 QTreeWidget is searched. 837 Private method to inform the view about items to be expand.
615 </p><dl> 838 </p><dl>
616 <dt><i>slist</i></dt> 839 <dt><i>modelIndex</i> (QModelIndex)</dt>
617 <dd> 840 <dd>
618 searchlist (list of strings) 841 the model index
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> 842 </dd>
675 </dl><a NAME="VariablesViewer.__refreshView" ID="VariablesViewer.__refreshView"></a> 843 </dl><a NAME="VariablesViewer.__refreshView" ID="VariablesViewer.__refreshView"></a>
676 <h4>VariablesViewer.__refreshView</h4> 844 <h4>VariablesViewer.__refreshView</h4>
677 <b>__refreshView</b>(<i></i>) 845 <b>__refreshView</b>(<i></i>)
678 <p> 846 <p>
679 Private slot to refresh the view. 847 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> 848 </p><a NAME="VariablesViewer.__showContextMenu" ID="VariablesViewer.__showContextMenu"></a>
696 <h4>VariablesViewer.__showContextMenu</h4> 849 <h4>VariablesViewer.__showContextMenu</h4>
697 <b>__showContextMenu</b>(<i>coord</i>) 850 <b>__showContextMenu</b>(<i>coord</i>)
698 <p> 851 <p>
699 Private slot to show the context menu. 852 Private slot to show the context menu.
700 </p><dl> 853 </p><dl>
701 <dt><i>coord</i></dt> 854 <dt><i>coord</i> (QPoint)</dt>
702 <dd> 855 <dd>
703 the position of the mouse pointer (QPoint) 856 the position of the mouse pointer
704 </dd> 857 </dd>
705 </dl><a NAME="VariablesViewer.__showDetails" ID="VariablesViewer.__showDetails"></a> 858 </dl><a NAME="VariablesViewer.__showDetails" ID="VariablesViewer.__showDetails"></a>
706 <h4>VariablesViewer.__showDetails</h4> 859 <h4>VariablesViewer.__showDetails</h4>
707 <b>__showDetails</b>(<i></i>) 860 <b>__showDetails</b>(<i></i>)
708 <p> 861 <p>
709 Private slot to show details about the selected variable. 862 Private slot to show details about the selected variable.
710 </p><a NAME="VariablesViewer.__showVariableDetails" ID="VariablesViewer.__showVariableDetails"></a> 863 </p><a NAME="VariablesViewer.__showVariableDetails" ID="VariablesViewer.__showVariableDetails"></a>
711 <h4>VariablesViewer.__showVariableDetails</h4> 864 <h4>VariablesViewer.__showVariableDetails</h4>
712 <b>__showVariableDetails</b>(<i>itm</i>) 865 <b>__showVariableDetails</b>(<i>index</i>)
713 <p> 866 <p>
714 Private method to show details about a variable. 867 Private method to show details about a variable.
715 </p><dl> 868 </p><dl>
716 <dt><i>itm</i></dt> 869 <dt><i>index</i> (QModelIndex)</dt>
717 <dd> 870 <dd>
718 reference to the variable item 871 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> 872 </dd>
742 </dl><a NAME="VariablesViewer.handleResetUI" ID="VariablesViewer.handleResetUI"></a> 873 </dl><a NAME="VariablesViewer.handleResetUI" ID="VariablesViewer.handleResetUI"></a>
743 <h4>VariablesViewer.handleResetUI</h4> 874 <h4>VariablesViewer.handleResetUI</h4>
744 <b>handleResetUI</b>(<i></i>) 875 <b>handleResetUI</b>(<i></i>)
745 <p> 876 <p>
746 Public method to reset the VariablesViewer. 877 Public method to reset the VariablesViewer.
747 </p><a NAME="VariablesViewer.mouseDoubleClickEvent" ID="VariablesViewer.mouseDoubleClickEvent"></a> 878 </p><a NAME="VariablesViewer.resizeEvent" ID="VariablesViewer.resizeEvent"></a>
748 <h4>VariablesViewer.mouseDoubleClickEvent</h4> 879 <h4>VariablesViewer.resizeEvent</h4>
749 <b>mouseDoubleClickEvent</b>(<i>mouseEvent</i>) 880 <b>resizeEvent</b>(<i>event</i>)
750 <p> 881 <p>
751 Protected method of QAbstractItemView. 882 Protected slot informing about the widget size change.
752 </p><p> 883 </p><dl>
753 Reimplemented to disable expanding/collapsing of items when 884 <dt><i>event</i> (QResizeEvent)</dt>
754 double-clicking. Instead the double-clicked entry is opened. 885 <dd>
755 </p><dl> 886 information
756 <dt><i>mouseEvent</i></dt>
757 <dd>
758 the mouse event object (QMouseEvent)
759 </dd> 887 </dd>
760 </dl><a NAME="VariablesViewer.showVariable" ID="VariablesViewer.showVariable"></a> 888 </dl><a NAME="VariablesViewer.showVariable" ID="VariablesViewer.showVariable"></a>
761 <h4>VariablesViewer.showVariable</h4> 889 <h4>VariablesViewer.showVariable</h4>
762 <b>showVariable</b>(<i>vlist</i>) 890 <b>showVariable</b>(<i>vlist</i>)
763 <p> 891 <p>
764 Public method to show variables in a list. 892 Public method to show variables in a list.
765 </p><dl> 893 </p><dl>
766 <dt><i>vlist</i></dt> 894 <dt><i>vlist</i> (list)</dt>
767 <dd> 895 <dd>
768 the list of subitems to be displayed. 896 the list of subitems to be displayed.
769 The first element gives the path of the 897 The first element gives the path of the
770 parent variable. Each other listentry is 898 parent variable. Each other list entry is
771 a tuple of three values. 899 a tuple of three values.
772 <ul> 900 <ul>
773 <li>the variable name (string)</li> 901 <li>the variable name (string)</li>
774 <li>the variables type (string)</li> 902 <li>the variables type (string)</li>
775 <li>the variables value (string)</li> 903 <li>the variables value (string)</li>
779 <h4>VariablesViewer.showVariables</h4> 907 <h4>VariablesViewer.showVariables</h4>
780 <b>showVariables</b>(<i>vlist, frmnr</i>) 908 <b>showVariables</b>(<i>vlist, frmnr</i>)
781 <p> 909 <p>
782 Public method to show variables in a list. 910 Public method to show variables in a list.
783 </p><dl> 911 </p><dl>
784 <dt><i>vlist</i></dt> 912 <dt><i>vlist</i> (list)</dt>
785 <dd> 913 <dd>
786 the list of variables to be displayed. Each 914 the list of variables to be displayed. Each
787 listentry is a tuple of three values. 915 list entry is a tuple of three values.
788 <ul> 916 <ul>
789 <li>the variable name (string)</li> 917 <li>the variable name (string)</li>
790 <li>the variables type (string)</li> 918 <li>the variables type (string)</li>
791 <li>the variables value (string)</li> 919 <li>the variables value (string)</li>
792 </ul> 920 </ul>
793 </dd><dt><i>frmnr</i></dt> 921 </dd><dt><i>frmnr</i> (int)</dt>
794 <dd> 922 <dd>
795 frame number (0 is the current frame) (int) 923 frame number (0 is the current frame)
924 </dd>
925 </dl><a NAME="VariablesViewer.verticalScrollbarValueChanged" ID="VariablesViewer.verticalScrollbarValueChanged"></a>
926 <h4>VariablesViewer.verticalScrollbarValueChanged</h4>
927 <b>verticalScrollbarValueChanged</b>(<i>value</i>)
928 <p>
929 Public slot informing about the scrollbar change.
930 </p><dl>
931 <dt><i>value</i> (int)</dt>
932 <dd>
933 current value of the vertical scrollbar
796 </dd> 934 </dd>
797 </dl> 935 </dl>
798 <div align="right"><a href="#top">Up</a></div> 936 <div align="right"><a href="#top">Up</a></div>
799 <hr /> 937 <hr />
800 </body></html> 938 </body></html>

eric ide

mercurial