|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Debugger.WatchPointViewer</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.Debugger.WatchPointViewer</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing the watch expression viewer widget. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#WatchPointViewer">WatchPointViewer</a></td> |
|
39 <td>Class implementing the watch expression viewer widget.</td> |
|
40 </tr> |
|
41 </table> |
|
42 <h3>Functions</h3> |
|
43 |
|
44 <table> |
|
45 <tr><td>None</td></tr> |
|
46 </table> |
|
47 <hr /> |
|
48 <hr /> |
|
49 <a NAME="WatchPointViewer" ID="WatchPointViewer"></a> |
|
50 <h2>WatchPointViewer</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing the watch expression viewer widget. |
|
54 </p> |
|
55 <p> |
|
56 Watch expressions will be shown with all their details. They can be |
|
57 modified through the context menu of this widget. |
|
58 </p> |
|
59 <h3>Derived from</h3> |
|
60 QTreeView |
|
61 <h3>Class Attributes</h3> |
|
62 |
|
63 <table> |
|
64 <tr><td>None</td></tr> |
|
65 </table> |
|
66 <h3>Class Methods</h3> |
|
67 |
|
68 <table> |
|
69 <tr><td>None</td></tr> |
|
70 </table> |
|
71 <h3>Methods</h3> |
|
72 |
|
73 <table> |
|
74 |
|
75 <tr> |
|
76 <td><a href="#WatchPointViewer.__init__">WatchPointViewer</a></td> |
|
77 <td>Constructor</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#WatchPointViewer.__addWatchPoint">__addWatchPoint</a></td> |
|
81 <td>Private slot to handle the add watch expression context menu entry.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#WatchPointViewer.__clearSelection">__clearSelection</a></td> |
|
85 <td>Private slot to clear the selection.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#WatchPointViewer.__configure">__configure</a></td> |
|
89 <td>Private method to open the configuration dialog.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#WatchPointViewer.__createPopupMenus">__createPopupMenus</a></td> |
|
93 <td>Private method to generate the popup menus.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#WatchPointViewer.__deleteAllWatchPoints">__deleteAllWatchPoints</a></td> |
|
97 <td>Private slot to handle the delete all watch expressions context menu entry.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#WatchPointViewer.__deleteSelectedWatchPoints">__deleteSelectedWatchPoints</a></td> |
|
101 <td>Private slot to handle the delete selected watch expressions context menu entry.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#WatchPointViewer.__deleteWatchPoint">__deleteWatchPoint</a></td> |
|
105 <td>Private slot to handle the delete watch expression context menu entry.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#WatchPointViewer.__disableAllWatchPoints">__disableAllWatchPoints</a></td> |
|
109 <td>Private slot to handle the disable all watch expressions context menu entry.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#WatchPointViewer.__disableSelectedWatchPoints">__disableSelectedWatchPoints</a></td> |
|
113 <td>Private slot to handle the disable selected watch expressions context menu entry.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#WatchPointViewer.__disableWatchPoint">__disableWatchPoint</a></td> |
|
117 <td>Private slot to handle the disable watch expression context menu entry.</td> |
|
118 </tr> |
|
119 <tr> |
|
120 <td><a href="#WatchPointViewer.__doEditWatchPoint">__doEditWatchPoint</a></td> |
|
121 <td>Private slot to edit a watch expression.</td> |
|
122 </tr> |
|
123 <tr> |
|
124 <td><a href="#WatchPointViewer.__doubleClicked">__doubleClicked</a></td> |
|
125 <td>Private slot to handle the double clicked signal.</td> |
|
126 </tr> |
|
127 <tr> |
|
128 <td><a href="#WatchPointViewer.__editWatchPoint">__editWatchPoint</a></td> |
|
129 <td>Private slot to handle the edit watch expression context menu entry.</td> |
|
130 </tr> |
|
131 <tr> |
|
132 <td><a href="#WatchPointViewer.__enableAllWatchPoints">__enableAllWatchPoints</a></td> |
|
133 <td>Private slot to handle the enable all watch expressions context menu entry.</td> |
|
134 </tr> |
|
135 <tr> |
|
136 <td><a href="#WatchPointViewer.__enableSelectedWatchPoints">__enableSelectedWatchPoints</a></td> |
|
137 <td>Private slot to handle the enable selected watch expressions context menu entry.</td> |
|
138 </tr> |
|
139 <tr> |
|
140 <td><a href="#WatchPointViewer.__enableWatchPoint">__enableWatchPoint</a></td> |
|
141 <td>Private slot to handle the enable watch expression context menu entry.</td> |
|
142 </tr> |
|
143 <tr> |
|
144 <td><a href="#WatchPointViewer.__findDuplicates">__findDuplicates</a></td> |
|
145 <td>Private method to check, if an entry already exists.</td> |
|
146 </tr> |
|
147 <tr> |
|
148 <td><a href="#WatchPointViewer.__fromSourceIndex">__fromSourceIndex</a></td> |
|
149 <td>Private slot to convert a source index to an index.</td> |
|
150 </tr> |
|
151 <tr> |
|
152 <td><a href="#WatchPointViewer.__getSelectedItemsCount">__getSelectedItemsCount</a></td> |
|
153 <td>Private method to get the count of items selected.</td> |
|
154 </tr> |
|
155 <tr> |
|
156 <td><a href="#WatchPointViewer.__layoutDisplay">__layoutDisplay</a></td> |
|
157 <td>Private slot to perform a layout operation.</td> |
|
158 </tr> |
|
159 <tr> |
|
160 <td><a href="#WatchPointViewer.__resizeColumns">__resizeColumns</a></td> |
|
161 <td>Private slot to resize the view when items get added, edited or deleted.</td> |
|
162 </tr> |
|
163 <tr> |
|
164 <td><a href="#WatchPointViewer.__resort">__resort</a></td> |
|
165 <td>Private slot to resort the tree.</td> |
|
166 </tr> |
|
167 <tr> |
|
168 <td><a href="#WatchPointViewer.__setRowSelected">__setRowSelected</a></td> |
|
169 <td>Private slot to select a complete row.</td> |
|
170 </tr> |
|
171 <tr> |
|
172 <td><a href="#WatchPointViewer.__setWpEnabled">__setWpEnabled</a></td> |
|
173 <td>Private method to set the enabled status of a watch expression.</td> |
|
174 </tr> |
|
175 <tr> |
|
176 <td><a href="#WatchPointViewer.__showBackMenu">__showBackMenu</a></td> |
|
177 <td>Private slot to handle the aboutToShow signal of the background menu.</td> |
|
178 </tr> |
|
179 <tr> |
|
180 <td><a href="#WatchPointViewer.__showContextMenu">__showContextMenu</a></td> |
|
181 <td>Private slot to show the context menu.</td> |
|
182 </tr> |
|
183 <tr> |
|
184 <td><a href="#WatchPointViewer.__toSourceIndex">__toSourceIndex</a></td> |
|
185 <td>Private slot to convert an index to a source index.</td> |
|
186 </tr> |
|
187 <tr> |
|
188 <td><a href="#WatchPointViewer.setModel">setModel</a></td> |
|
189 <td>Public slot to set the watch expression model.</td> |
|
190 </tr> |
|
191 </table> |
|
192 <h3>Static Methods</h3> |
|
193 |
|
194 <table> |
|
195 <tr><td>None</td></tr> |
|
196 </table> |
|
197 |
|
198 <a NAME="WatchPointViewer.__init__" ID="WatchPointViewer.__init__"></a> |
|
199 <h4>WatchPointViewer (Constructor)</h4> |
|
200 <b>WatchPointViewer</b>(<i>parent=None</i>) |
|
201 |
|
202 <p> |
|
203 Constructor |
|
204 </p> |
|
205 <dl> |
|
206 |
|
207 <dt><i>parent</i></dt> |
|
208 <dd> |
|
209 the parent (QWidget) |
|
210 </dd> |
|
211 </dl> |
|
212 <a NAME="WatchPointViewer.__addWatchPoint" ID="WatchPointViewer.__addWatchPoint"></a> |
|
213 <h4>WatchPointViewer.__addWatchPoint</h4> |
|
214 <b>__addWatchPoint</b>(<i></i>) |
|
215 |
|
216 <p> |
|
217 Private slot to handle the add watch expression context menu entry. |
|
218 </p> |
|
219 <a NAME="WatchPointViewer.__clearSelection" ID="WatchPointViewer.__clearSelection"></a> |
|
220 <h4>WatchPointViewer.__clearSelection</h4> |
|
221 <b>__clearSelection</b>(<i></i>) |
|
222 |
|
223 <p> |
|
224 Private slot to clear the selection. |
|
225 </p> |
|
226 <a NAME="WatchPointViewer.__configure" ID="WatchPointViewer.__configure"></a> |
|
227 <h4>WatchPointViewer.__configure</h4> |
|
228 <b>__configure</b>(<i></i>) |
|
229 |
|
230 <p> |
|
231 Private method to open the configuration dialog. |
|
232 </p> |
|
233 <a NAME="WatchPointViewer.__createPopupMenus" ID="WatchPointViewer.__createPopupMenus"></a> |
|
234 <h4>WatchPointViewer.__createPopupMenus</h4> |
|
235 <b>__createPopupMenus</b>(<i></i>) |
|
236 |
|
237 <p> |
|
238 Private method to generate the popup menus. |
|
239 </p> |
|
240 <a NAME="WatchPointViewer.__deleteAllWatchPoints" ID="WatchPointViewer.__deleteAllWatchPoints"></a> |
|
241 <h4>WatchPointViewer.__deleteAllWatchPoints</h4> |
|
242 <b>__deleteAllWatchPoints</b>(<i></i>) |
|
243 |
|
244 <p> |
|
245 Private slot to handle the delete all watch expressions context menu |
|
246 entry. |
|
247 </p> |
|
248 <a NAME="WatchPointViewer.__deleteSelectedWatchPoints" ID="WatchPointViewer.__deleteSelectedWatchPoints"></a> |
|
249 <h4>WatchPointViewer.__deleteSelectedWatchPoints</h4> |
|
250 <b>__deleteSelectedWatchPoints</b>(<i></i>) |
|
251 |
|
252 <p> |
|
253 Private slot to handle the delete selected watch expressions context |
|
254 menu entry. |
|
255 </p> |
|
256 <a NAME="WatchPointViewer.__deleteWatchPoint" ID="WatchPointViewer.__deleteWatchPoint"></a> |
|
257 <h4>WatchPointViewer.__deleteWatchPoint</h4> |
|
258 <b>__deleteWatchPoint</b>(<i></i>) |
|
259 |
|
260 <p> |
|
261 Private slot to handle the delete watch expression context menu entry. |
|
262 </p> |
|
263 <a NAME="WatchPointViewer.__disableAllWatchPoints" ID="WatchPointViewer.__disableAllWatchPoints"></a> |
|
264 <h4>WatchPointViewer.__disableAllWatchPoints</h4> |
|
265 <b>__disableAllWatchPoints</b>(<i></i>) |
|
266 |
|
267 <p> |
|
268 Private slot to handle the disable all watch expressions context menu |
|
269 entry. |
|
270 </p> |
|
271 <a NAME="WatchPointViewer.__disableSelectedWatchPoints" ID="WatchPointViewer.__disableSelectedWatchPoints"></a> |
|
272 <h4>WatchPointViewer.__disableSelectedWatchPoints</h4> |
|
273 <b>__disableSelectedWatchPoints</b>(<i></i>) |
|
274 |
|
275 <p> |
|
276 Private slot to handle the disable selected watch expressions context |
|
277 menu entry. |
|
278 </p> |
|
279 <a NAME="WatchPointViewer.__disableWatchPoint" ID="WatchPointViewer.__disableWatchPoint"></a> |
|
280 <h4>WatchPointViewer.__disableWatchPoint</h4> |
|
281 <b>__disableWatchPoint</b>(<i></i>) |
|
282 |
|
283 <p> |
|
284 Private slot to handle the disable watch expression context menu entry. |
|
285 </p> |
|
286 <a NAME="WatchPointViewer.__doEditWatchPoint" ID="WatchPointViewer.__doEditWatchPoint"></a> |
|
287 <h4>WatchPointViewer.__doEditWatchPoint</h4> |
|
288 <b>__doEditWatchPoint</b>(<i>index</i>) |
|
289 |
|
290 <p> |
|
291 Private slot to edit a watch expression. |
|
292 </p> |
|
293 <dl> |
|
294 |
|
295 <dt><i>index</i></dt> |
|
296 <dd> |
|
297 index of watch expression to be edited (QModelIndex) |
|
298 </dd> |
|
299 </dl> |
|
300 <a NAME="WatchPointViewer.__doubleClicked" ID="WatchPointViewer.__doubleClicked"></a> |
|
301 <h4>WatchPointViewer.__doubleClicked</h4> |
|
302 <b>__doubleClicked</b>(<i>index</i>) |
|
303 |
|
304 <p> |
|
305 Private slot to handle the double clicked signal. |
|
306 </p> |
|
307 <dl> |
|
308 |
|
309 <dt><i>index</i></dt> |
|
310 <dd> |
|
311 index of the entry that was double clicked (QModelIndex) |
|
312 </dd> |
|
313 </dl> |
|
314 <a NAME="WatchPointViewer.__editWatchPoint" ID="WatchPointViewer.__editWatchPoint"></a> |
|
315 <h4>WatchPointViewer.__editWatchPoint</h4> |
|
316 <b>__editWatchPoint</b>(<i></i>) |
|
317 |
|
318 <p> |
|
319 Private slot to handle the edit watch expression context menu entry. |
|
320 </p> |
|
321 <a NAME="WatchPointViewer.__enableAllWatchPoints" ID="WatchPointViewer.__enableAllWatchPoints"></a> |
|
322 <h4>WatchPointViewer.__enableAllWatchPoints</h4> |
|
323 <b>__enableAllWatchPoints</b>(<i></i>) |
|
324 |
|
325 <p> |
|
326 Private slot to handle the enable all watch expressions context menu |
|
327 entry. |
|
328 </p> |
|
329 <a NAME="WatchPointViewer.__enableSelectedWatchPoints" ID="WatchPointViewer.__enableSelectedWatchPoints"></a> |
|
330 <h4>WatchPointViewer.__enableSelectedWatchPoints</h4> |
|
331 <b>__enableSelectedWatchPoints</b>(<i></i>) |
|
332 |
|
333 <p> |
|
334 Private slot to handle the enable selected watch expressions context |
|
335 menu entry. |
|
336 </p> |
|
337 <a NAME="WatchPointViewer.__enableWatchPoint" ID="WatchPointViewer.__enableWatchPoint"></a> |
|
338 <h4>WatchPointViewer.__enableWatchPoint</h4> |
|
339 <b>__enableWatchPoint</b>(<i></i>) |
|
340 |
|
341 <p> |
|
342 Private slot to handle the enable watch expression context menu entry. |
|
343 </p> |
|
344 <a NAME="WatchPointViewer.__findDuplicates" ID="WatchPointViewer.__findDuplicates"></a> |
|
345 <h4>WatchPointViewer.__findDuplicates</h4> |
|
346 <b>__findDuplicates</b>(<i>cond, special, showMessage=False, index=None</i>) |
|
347 |
|
348 <p> |
|
349 Private method to check, if an entry already exists. |
|
350 </p> |
|
351 <dl> |
|
352 |
|
353 <dt><i>cond</i></dt> |
|
354 <dd> |
|
355 condition to check (string) |
|
356 </dd> |
|
357 <dt><i>special</i></dt> |
|
358 <dd> |
|
359 special condition to check (string) |
|
360 </dd> |
|
361 <dt><i>showMessage</i></dt> |
|
362 <dd> |
|
363 flag indicating a message should be shown, |
|
364 if a duplicate entry is found (boolean) |
|
365 </dd> |
|
366 <dt><i>index</i></dt> |
|
367 <dd> |
|
368 index that should not be considered duplicate |
|
369 (QModelIndex) |
|
370 </dd> |
|
371 </dl> |
|
372 <dl> |
|
373 <dt>Return:</dt> |
|
374 <dd> |
|
375 flag indicating a duplicate entry (boolean) |
|
376 </dd> |
|
377 </dl> |
|
378 <a NAME="WatchPointViewer.__fromSourceIndex" ID="WatchPointViewer.__fromSourceIndex"></a> |
|
379 <h4>WatchPointViewer.__fromSourceIndex</h4> |
|
380 <b>__fromSourceIndex</b>(<i>sindex</i>) |
|
381 |
|
382 <p> |
|
383 Private slot to convert a source index to an index. |
|
384 </p> |
|
385 <dl> |
|
386 |
|
387 <dt><i>sindex</i></dt> |
|
388 <dd> |
|
389 source index to be converted (QModelIndex) |
|
390 </dd> |
|
391 </dl> |
|
392 <dl> |
|
393 <dt>Return:</dt> |
|
394 <dd> |
|
395 mapped index (QModelIndex) |
|
396 </dd> |
|
397 </dl> |
|
398 <a NAME="WatchPointViewer.__getSelectedItemsCount" ID="WatchPointViewer.__getSelectedItemsCount"></a> |
|
399 <h4>WatchPointViewer.__getSelectedItemsCount</h4> |
|
400 <b>__getSelectedItemsCount</b>(<i></i>) |
|
401 |
|
402 <p> |
|
403 Private method to get the count of items selected. |
|
404 </p> |
|
405 <dl> |
|
406 <dt>Return:</dt> |
|
407 <dd> |
|
408 count of items selected (integer) |
|
409 </dd> |
|
410 </dl> |
|
411 <a NAME="WatchPointViewer.__layoutDisplay" ID="WatchPointViewer.__layoutDisplay"></a> |
|
412 <h4>WatchPointViewer.__layoutDisplay</h4> |
|
413 <b>__layoutDisplay</b>(<i></i>) |
|
414 |
|
415 <p> |
|
416 Private slot to perform a layout operation. |
|
417 </p> |
|
418 <a NAME="WatchPointViewer.__resizeColumns" ID="WatchPointViewer.__resizeColumns"></a> |
|
419 <h4>WatchPointViewer.__resizeColumns</h4> |
|
420 <b>__resizeColumns</b>(<i></i>) |
|
421 |
|
422 <p> |
|
423 Private slot to resize the view when items get added, edited or |
|
424 deleted. |
|
425 </p> |
|
426 <a NAME="WatchPointViewer.__resort" ID="WatchPointViewer.__resort"></a> |
|
427 <h4>WatchPointViewer.__resort</h4> |
|
428 <b>__resort</b>(<i></i>) |
|
429 |
|
430 <p> |
|
431 Private slot to resort the tree. |
|
432 </p> |
|
433 <a NAME="WatchPointViewer.__setRowSelected" ID="WatchPointViewer.__setRowSelected"></a> |
|
434 <h4>WatchPointViewer.__setRowSelected</h4> |
|
435 <b>__setRowSelected</b>(<i>index, selected=True</i>) |
|
436 |
|
437 <p> |
|
438 Private slot to select a complete row. |
|
439 </p> |
|
440 <dl> |
|
441 |
|
442 <dt><i>index</i></dt> |
|
443 <dd> |
|
444 index determining the row to be selected (QModelIndex) |
|
445 </dd> |
|
446 <dt><i>selected</i></dt> |
|
447 <dd> |
|
448 flag indicating the action (bool) |
|
449 </dd> |
|
450 </dl> |
|
451 <a NAME="WatchPointViewer.__setWpEnabled" ID="WatchPointViewer.__setWpEnabled"></a> |
|
452 <h4>WatchPointViewer.__setWpEnabled</h4> |
|
453 <b>__setWpEnabled</b>(<i>index, enabled</i>) |
|
454 |
|
455 <p> |
|
456 Private method to set the enabled status of a watch expression. |
|
457 </p> |
|
458 <dl> |
|
459 |
|
460 <dt><i>index</i></dt> |
|
461 <dd> |
|
462 index of watch expression to be enabled/disabled |
|
463 (QModelIndex) |
|
464 </dd> |
|
465 <dt><i>enabled</i></dt> |
|
466 <dd> |
|
467 flag indicating the enabled status to be set (boolean) |
|
468 </dd> |
|
469 </dl> |
|
470 <a NAME="WatchPointViewer.__showBackMenu" ID="WatchPointViewer.__showBackMenu"></a> |
|
471 <h4>WatchPointViewer.__showBackMenu</h4> |
|
472 <b>__showBackMenu</b>(<i></i>) |
|
473 |
|
474 <p> |
|
475 Private slot to handle the aboutToShow signal of the background menu. |
|
476 </p> |
|
477 <a NAME="WatchPointViewer.__showContextMenu" ID="WatchPointViewer.__showContextMenu"></a> |
|
478 <h4>WatchPointViewer.__showContextMenu</h4> |
|
479 <b>__showContextMenu</b>(<i>coord</i>) |
|
480 |
|
481 <p> |
|
482 Private slot to show the context menu. |
|
483 </p> |
|
484 <dl> |
|
485 |
|
486 <dt><i>coord</i></dt> |
|
487 <dd> |
|
488 the position of the mouse pointer (QPoint) |
|
489 </dd> |
|
490 </dl> |
|
491 <a NAME="WatchPointViewer.__toSourceIndex" ID="WatchPointViewer.__toSourceIndex"></a> |
|
492 <h4>WatchPointViewer.__toSourceIndex</h4> |
|
493 <b>__toSourceIndex</b>(<i>index</i>) |
|
494 |
|
495 <p> |
|
496 Private slot to convert an index to a source index. |
|
497 </p> |
|
498 <dl> |
|
499 |
|
500 <dt><i>index</i></dt> |
|
501 <dd> |
|
502 index to be converted (QModelIndex) |
|
503 </dd> |
|
504 </dl> |
|
505 <dl> |
|
506 <dt>Return:</dt> |
|
507 <dd> |
|
508 mapped index (QModelIndex) |
|
509 </dd> |
|
510 </dl> |
|
511 <a NAME="WatchPointViewer.setModel" ID="WatchPointViewer.setModel"></a> |
|
512 <h4>WatchPointViewer.setModel</h4> |
|
513 <b>setModel</b>(<i>model</i>) |
|
514 |
|
515 <p> |
|
516 Public slot to set the watch expression model. |
|
517 </p> |
|
518 <dl> |
|
519 |
|
520 <dt><i>model</i></dt> |
|
521 <dd> |
|
522 reference to the watch expression model (WatchPointModel) |
|
523 </dd> |
|
524 </dl> |
|
525 <div align="right"><a href="#top">Up</a></div> |
|
526 <hr /> |
|
527 </body></html> |