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