|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Debugger.WatchPointModel</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.WatchPointModel</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing the Watch expression model. |
|
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="#WatchPointModel">WatchPointModel</a></td> |
|
39 <td>Class implementing a custom model for watch expressions.</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="WatchPointModel" ID="WatchPointModel"></a> |
|
50 <h2>WatchPointModel</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing a custom model for watch expressions. |
|
54 </p> |
|
55 <h3>Signals</h3> |
|
56 <dl> |
|
57 |
|
58 <dt>dataAboutToBeChanged(QModelIndex, QModelIndex)</dt> |
|
59 <dd> |
|
60 emitted to indicate |
|
61 a change of the data |
|
62 </dd> |
|
63 </dl> |
|
64 <h3>Derived from</h3> |
|
65 QAbstractItemModel |
|
66 <h3>Class Attributes</h3> |
|
67 |
|
68 <table> |
|
69 <tr><td>None</td></tr> |
|
70 </table> |
|
71 <h3>Class Methods</h3> |
|
72 |
|
73 <table> |
|
74 <tr><td>None</td></tr> |
|
75 </table> |
|
76 <h3>Methods</h3> |
|
77 |
|
78 <table> |
|
79 |
|
80 <tr> |
|
81 <td><a href="#WatchPointModel.__init__">WatchPointModel</a></td> |
|
82 <td>Constructor</td> |
|
83 </tr> |
|
84 <tr> |
|
85 <td><a href="#WatchPointModel.addWatchPoint">addWatchPoint</a></td> |
|
86 <td>Public method to add a new watch expression to the list.</td> |
|
87 </tr> |
|
88 <tr> |
|
89 <td><a href="#WatchPointModel.addWatchPoints">addWatchPoints</a></td> |
|
90 <td>Public method to add multiple watch expressions to the list.</td> |
|
91 </tr> |
|
92 <tr> |
|
93 <td><a href="#WatchPointModel.columnCount">columnCount</a></td> |
|
94 <td>Public method to get the current column count.</td> |
|
95 </tr> |
|
96 <tr> |
|
97 <td><a href="#WatchPointModel.data">data</a></td> |
|
98 <td>Public method to get the requested data.</td> |
|
99 </tr> |
|
100 <tr> |
|
101 <td><a href="#WatchPointModel.deleteAll">deleteAll</a></td> |
|
102 <td>Public method to delete all watch expressions.</td> |
|
103 </tr> |
|
104 <tr> |
|
105 <td><a href="#WatchPointModel.deleteWatchPointByIndex">deleteWatchPointByIndex</a></td> |
|
106 <td>Public method to set the values of a watch expression given by index.</td> |
|
107 </tr> |
|
108 <tr> |
|
109 <td><a href="#WatchPointModel.deleteWatchPoints">deleteWatchPoints</a></td> |
|
110 <td>Public method to delete a list of watch expressions given by their indexes.</td> |
|
111 </tr> |
|
112 <tr> |
|
113 <td><a href="#WatchPointModel.flags">flags</a></td> |
|
114 <td>Public method to get item flags.</td> |
|
115 </tr> |
|
116 <tr> |
|
117 <td><a href="#WatchPointModel.getAllWatchpoints">getAllWatchpoints</a></td> |
|
118 <td>Public method to get the list of watchpoints.</td> |
|
119 </tr> |
|
120 <tr> |
|
121 <td><a href="#WatchPointModel.getWatchPointByIndex">getWatchPointByIndex</a></td> |
|
122 <td>Public method to get the values of a watch expression given by index.</td> |
|
123 </tr> |
|
124 <tr> |
|
125 <td><a href="#WatchPointModel.getWatchPointIndex">getWatchPointIndex</a></td> |
|
126 <td>Public method to get the index of a watch expression given by expression.</td> |
|
127 </tr> |
|
128 <tr> |
|
129 <td><a href="#WatchPointModel.hasChildren">hasChildren</a></td> |
|
130 <td>Public method to check for the presence of child items.</td> |
|
131 </tr> |
|
132 <tr> |
|
133 <td><a href="#WatchPointModel.headerData">headerData</a></td> |
|
134 <td>Public method to get header data.</td> |
|
135 </tr> |
|
136 <tr> |
|
137 <td><a href="#WatchPointModel.index">index</a></td> |
|
138 <td>Public method to create an index.</td> |
|
139 </tr> |
|
140 <tr> |
|
141 <td><a href="#WatchPointModel.parent">parent</a></td> |
|
142 <td>Public method to get the parent index.</td> |
|
143 </tr> |
|
144 <tr> |
|
145 <td><a href="#WatchPointModel.rowCount">rowCount</a></td> |
|
146 <td>Public method to get the current row count.</td> |
|
147 </tr> |
|
148 <tr> |
|
149 <td><a href="#WatchPointModel.setWatchPointByIndex">setWatchPointByIndex</a></td> |
|
150 <td>Public method to set the values of a watch expression given by index.</td> |
|
151 </tr> |
|
152 <tr> |
|
153 <td><a href="#WatchPointModel.setWatchPointEnabledByIndex">setWatchPointEnabledByIndex</a></td> |
|
154 <td>Public method to set the enabled state of a watch expression given by index.</td> |
|
155 </tr> |
|
156 </table> |
|
157 <h3>Static Methods</h3> |
|
158 |
|
159 <table> |
|
160 <tr><td>None</td></tr> |
|
161 </table> |
|
162 |
|
163 <a NAME="WatchPointModel.__init__" ID="WatchPointModel.__init__"></a> |
|
164 <h4>WatchPointModel (Constructor)</h4> |
|
165 <b>WatchPointModel</b>(<i>parent=None</i>) |
|
166 |
|
167 <p> |
|
168 Constructor |
|
169 </p> |
|
170 <dl> |
|
171 |
|
172 <dt><i>parent</i></dt> |
|
173 <dd> |
|
174 reference to the parent widget (QObject) |
|
175 </dd> |
|
176 </dl> |
|
177 <a NAME="WatchPointModel.addWatchPoint" ID="WatchPointModel.addWatchPoint"></a> |
|
178 <h4>WatchPointModel.addWatchPoint</h4> |
|
179 <b>addWatchPoint</b>(<i>cond, special, properties</i>) |
|
180 |
|
181 <p> |
|
182 Public method to add a new watch expression to the list. |
|
183 </p> |
|
184 <dl> |
|
185 |
|
186 <dt><i>cond</i> (str)</dt> |
|
187 <dd> |
|
188 expression of the watch expression |
|
189 </dd> |
|
190 <dt><i>special</i> (str)</dt> |
|
191 <dd> |
|
192 special condition of the watch expression |
|
193 </dd> |
|
194 <dt><i>properties</i> (tuple of (bool, bool, int))</dt> |
|
195 <dd> |
|
196 properties of the watch expression |
|
197 (tuple of temporary flag, enabled flag, ignore count) |
|
198 </dd> |
|
199 </dl> |
|
200 <a NAME="WatchPointModel.addWatchPoints" ID="WatchPointModel.addWatchPoints"></a> |
|
201 <h4>WatchPointModel.addWatchPoints</h4> |
|
202 <b>addWatchPoints</b>(<i>watchpoints</i>) |
|
203 |
|
204 <p> |
|
205 Public method to add multiple watch expressions to the list. |
|
206 </p> |
|
207 <dl> |
|
208 |
|
209 <dt><i>watchpoints</i> (list of (str, str, bool, bool, int))</dt> |
|
210 <dd> |
|
211 list of watch expressions with expression, special |
|
212 condition, temporary flag, enabled flag and ignore count each |
|
213 </dd> |
|
214 </dl> |
|
215 <a NAME="WatchPointModel.columnCount" ID="WatchPointModel.columnCount"></a> |
|
216 <h4>WatchPointModel.columnCount</h4> |
|
217 <b>columnCount</b>(<i>parent=None</i>) |
|
218 |
|
219 <p> |
|
220 Public method to get the current column count. |
|
221 </p> |
|
222 <dl> |
|
223 |
|
224 <dt><i>parent</i></dt> |
|
225 <dd> |
|
226 index of the parent item (QModelIndex) (Unused) |
|
227 </dd> |
|
228 </dl> |
|
229 <dl> |
|
230 <dt>Return:</dt> |
|
231 <dd> |
|
232 column count (integer) |
|
233 </dd> |
|
234 </dl> |
|
235 <a NAME="WatchPointModel.data" ID="WatchPointModel.data"></a> |
|
236 <h4>WatchPointModel.data</h4> |
|
237 <b>data</b>(<i>index, role</i>) |
|
238 |
|
239 <p> |
|
240 Public method to get the requested data. |
|
241 </p> |
|
242 <dl> |
|
243 |
|
244 <dt><i>index</i></dt> |
|
245 <dd> |
|
246 index of the requested data (QModelIndex) |
|
247 </dd> |
|
248 <dt><i>role</i></dt> |
|
249 <dd> |
|
250 role of the requested data (Qt.ItemDataRole) |
|
251 </dd> |
|
252 </dl> |
|
253 <dl> |
|
254 <dt>Return:</dt> |
|
255 <dd> |
|
256 the requested data |
|
257 </dd> |
|
258 </dl> |
|
259 <a NAME="WatchPointModel.deleteAll" ID="WatchPointModel.deleteAll"></a> |
|
260 <h4>WatchPointModel.deleteAll</h4> |
|
261 <b>deleteAll</b>(<i></i>) |
|
262 |
|
263 <p> |
|
264 Public method to delete all watch expressions. |
|
265 </p> |
|
266 <a NAME="WatchPointModel.deleteWatchPointByIndex" ID="WatchPointModel.deleteWatchPointByIndex"></a> |
|
267 <h4>WatchPointModel.deleteWatchPointByIndex</h4> |
|
268 <b>deleteWatchPointByIndex</b>(<i>index</i>) |
|
269 |
|
270 <p> |
|
271 Public method to set the values of a watch expression given by index. |
|
272 </p> |
|
273 <dl> |
|
274 |
|
275 <dt><i>index</i></dt> |
|
276 <dd> |
|
277 index of the watch expression (QModelIndex) |
|
278 </dd> |
|
279 </dl> |
|
280 <a NAME="WatchPointModel.deleteWatchPoints" ID="WatchPointModel.deleteWatchPoints"></a> |
|
281 <h4>WatchPointModel.deleteWatchPoints</h4> |
|
282 <b>deleteWatchPoints</b>(<i>idxList</i>) |
|
283 |
|
284 <p> |
|
285 Public method to delete a list of watch expressions given by their |
|
286 indexes. |
|
287 </p> |
|
288 <dl> |
|
289 |
|
290 <dt><i>idxList</i></dt> |
|
291 <dd> |
|
292 list of watch expression indexes (list of QModelIndex) |
|
293 </dd> |
|
294 </dl> |
|
295 <a NAME="WatchPointModel.flags" ID="WatchPointModel.flags"></a> |
|
296 <h4>WatchPointModel.flags</h4> |
|
297 <b>flags</b>(<i>index</i>) |
|
298 |
|
299 <p> |
|
300 Public method to get item flags. |
|
301 </p> |
|
302 <dl> |
|
303 |
|
304 <dt><i>index</i></dt> |
|
305 <dd> |
|
306 index of the requested flags (QModelIndex) |
|
307 </dd> |
|
308 </dl> |
|
309 <dl> |
|
310 <dt>Return:</dt> |
|
311 <dd> |
|
312 item flags for the given index (Qt.ItemFlags) |
|
313 </dd> |
|
314 </dl> |
|
315 <a NAME="WatchPointModel.getAllWatchpoints" ID="WatchPointModel.getAllWatchpoints"></a> |
|
316 <h4>WatchPointModel.getAllWatchpoints</h4> |
|
317 <b>getAllWatchpoints</b>(<i></i>) |
|
318 |
|
319 <p> |
|
320 Public method to get the list of watchpoints. |
|
321 </p> |
|
322 <dl> |
|
323 <dt>Return:</dt> |
|
324 <dd> |
|
325 list of watchpoints |
|
326 </dd> |
|
327 </dl> |
|
328 <dl> |
|
329 <dt>Return Type:</dt> |
|
330 <dd> |
|
331 list of list of [str, str, bool, bool, int] |
|
332 </dd> |
|
333 </dl> |
|
334 <a NAME="WatchPointModel.getWatchPointByIndex" ID="WatchPointModel.getWatchPointByIndex"></a> |
|
335 <h4>WatchPointModel.getWatchPointByIndex</h4> |
|
336 <b>getWatchPointByIndex</b>(<i>index</i>) |
|
337 |
|
338 <p> |
|
339 Public method to get the values of a watch expression given by index. |
|
340 </p> |
|
341 <dl> |
|
342 |
|
343 <dt><i>index</i></dt> |
|
344 <dd> |
|
345 index of the watch expression (QModelIndex) |
|
346 </dd> |
|
347 </dl> |
|
348 <dl> |
|
349 <dt>Return:</dt> |
|
350 <dd> |
|
351 watch expression (list of six values (expression, |
|
352 special condition, temporary flag, enabled flag, ignore count)) |
|
353 </dd> |
|
354 </dl> |
|
355 <dl> |
|
356 <dt>Return Type:</dt> |
|
357 <dd> |
|
358 tuple of (str, str, bool, bool, int) |
|
359 </dd> |
|
360 </dl> |
|
361 <a NAME="WatchPointModel.getWatchPointIndex" ID="WatchPointModel.getWatchPointIndex"></a> |
|
362 <h4>WatchPointModel.getWatchPointIndex</h4> |
|
363 <b>getWatchPointIndex</b>(<i>cond, special=""</i>) |
|
364 |
|
365 <p> |
|
366 Public method to get the index of a watch expression given by |
|
367 expression. |
|
368 </p> |
|
369 <dl> |
|
370 |
|
371 <dt><i>cond</i></dt> |
|
372 <dd> |
|
373 expression of the watch expression (string) |
|
374 </dd> |
|
375 <dt><i>special</i></dt> |
|
376 <dd> |
|
377 special condition of the watch expression (string) |
|
378 </dd> |
|
379 </dl> |
|
380 <dl> |
|
381 <dt>Return:</dt> |
|
382 <dd> |
|
383 index (QModelIndex) |
|
384 </dd> |
|
385 </dl> |
|
386 <a NAME="WatchPointModel.hasChildren" ID="WatchPointModel.hasChildren"></a> |
|
387 <h4>WatchPointModel.hasChildren</h4> |
|
388 <b>hasChildren</b>(<i>parent=None</i>) |
|
389 |
|
390 <p> |
|
391 Public method to check for the presence of child items. |
|
392 </p> |
|
393 <dl> |
|
394 |
|
395 <dt><i>parent</i></dt> |
|
396 <dd> |
|
397 index of parent item (QModelIndex) |
|
398 </dd> |
|
399 </dl> |
|
400 <dl> |
|
401 <dt>Return:</dt> |
|
402 <dd> |
|
403 flag indicating the presence of child items (boolean) |
|
404 </dd> |
|
405 </dl> |
|
406 <a NAME="WatchPointModel.headerData" ID="WatchPointModel.headerData"></a> |
|
407 <h4>WatchPointModel.headerData</h4> |
|
408 <b>headerData</b>(<i>section, orientation, role=Qt.ItemDataRole.DisplayRole</i>) |
|
409 |
|
410 <p> |
|
411 Public method to get header data. |
|
412 </p> |
|
413 <dl> |
|
414 |
|
415 <dt><i>section</i></dt> |
|
416 <dd> |
|
417 section number of the requested header data (integer) |
|
418 </dd> |
|
419 <dt><i>orientation</i></dt> |
|
420 <dd> |
|
421 orientation of the header (Qt.Orientation) |
|
422 </dd> |
|
423 <dt><i>role</i></dt> |
|
424 <dd> |
|
425 role of the requested data (Qt.ItemDataRole) |
|
426 </dd> |
|
427 </dl> |
|
428 <dl> |
|
429 <dt>Return:</dt> |
|
430 <dd> |
|
431 header data |
|
432 </dd> |
|
433 </dl> |
|
434 <a NAME="WatchPointModel.index" ID="WatchPointModel.index"></a> |
|
435 <h4>WatchPointModel.index</h4> |
|
436 <b>index</b>(<i>row, column, parent=None</i>) |
|
437 |
|
438 <p> |
|
439 Public method to create an index. |
|
440 </p> |
|
441 <dl> |
|
442 |
|
443 <dt><i>row</i></dt> |
|
444 <dd> |
|
445 row number for the index (integer) |
|
446 </dd> |
|
447 <dt><i>column</i></dt> |
|
448 <dd> |
|
449 column number for the index (integer) |
|
450 </dd> |
|
451 <dt><i>parent</i></dt> |
|
452 <dd> |
|
453 index of the parent item (QModelIndex) |
|
454 </dd> |
|
455 </dl> |
|
456 <dl> |
|
457 <dt>Return:</dt> |
|
458 <dd> |
|
459 requested index (QModelIndex) |
|
460 </dd> |
|
461 </dl> |
|
462 <a NAME="WatchPointModel.parent" ID="WatchPointModel.parent"></a> |
|
463 <h4>WatchPointModel.parent</h4> |
|
464 <b>parent</b>(<i>index</i>) |
|
465 |
|
466 <p> |
|
467 Public method to get the parent index. |
|
468 </p> |
|
469 <dl> |
|
470 |
|
471 <dt><i>index</i></dt> |
|
472 <dd> |
|
473 index of item to get parent (QModelIndex) |
|
474 </dd> |
|
475 </dl> |
|
476 <dl> |
|
477 <dt>Return:</dt> |
|
478 <dd> |
|
479 index of parent (QModelIndex) |
|
480 </dd> |
|
481 </dl> |
|
482 <a NAME="WatchPointModel.rowCount" ID="WatchPointModel.rowCount"></a> |
|
483 <h4>WatchPointModel.rowCount</h4> |
|
484 <b>rowCount</b>(<i>parent=None</i>) |
|
485 |
|
486 <p> |
|
487 Public method to get the current row count. |
|
488 </p> |
|
489 <dl> |
|
490 |
|
491 <dt><i>parent</i></dt> |
|
492 <dd> |
|
493 index of the parent item (QModelIndex) |
|
494 </dd> |
|
495 </dl> |
|
496 <dl> |
|
497 <dt>Return:</dt> |
|
498 <dd> |
|
499 row count (integer) |
|
500 </dd> |
|
501 </dl> |
|
502 <a NAME="WatchPointModel.setWatchPointByIndex" ID="WatchPointModel.setWatchPointByIndex"></a> |
|
503 <h4>WatchPointModel.setWatchPointByIndex</h4> |
|
504 <b>setWatchPointByIndex</b>(<i>index, cond, special, properties</i>) |
|
505 |
|
506 <p> |
|
507 Public method to set the values of a watch expression given by index. |
|
508 </p> |
|
509 <dl> |
|
510 |
|
511 <dt><i>index</i></dt> |
|
512 <dd> |
|
513 index of the watch expression (QModelIndex) |
|
514 </dd> |
|
515 <dt><i>cond</i></dt> |
|
516 <dd> |
|
517 expression of the watch expression (string) |
|
518 </dd> |
|
519 <dt><i>special</i></dt> |
|
520 <dd> |
|
521 special condition of the watch expression (string) |
|
522 </dd> |
|
523 <dt><i>properties</i></dt> |
|
524 <dd> |
|
525 properties of the watch expression |
|
526 (tuple of temporary flag (bool), enabled flag (bool), |
|
527 ignore count (integer)) |
|
528 </dd> |
|
529 </dl> |
|
530 <a NAME="WatchPointModel.setWatchPointEnabledByIndex" ID="WatchPointModel.setWatchPointEnabledByIndex"></a> |
|
531 <h4>WatchPointModel.setWatchPointEnabledByIndex</h4> |
|
532 <b>setWatchPointEnabledByIndex</b>(<i>index, enabled</i>) |
|
533 |
|
534 <p> |
|
535 Public method to set the enabled state of a watch expression given by |
|
536 index. |
|
537 </p> |
|
538 <dl> |
|
539 |
|
540 <dt><i>index</i></dt> |
|
541 <dd> |
|
542 index of the watch expression (QModelIndex) |
|
543 </dd> |
|
544 <dt><i>enabled</i></dt> |
|
545 <dd> |
|
546 flag giving the enabled state (boolean) |
|
547 </dd> |
|
548 </dl> |
|
549 <div align="right"><a href="#top">Up</a></div> |
|
550 <hr /> |
|
551 </body></html> |