src/eric7/Documentation/Source/eric7.WebBrowser.History.HistoryTreeModel.html

branch
eric7
changeset 10479
856476537696
parent 10436
f6881d10e995
equal deleted inserted replaced
10478:de9106c55c3d 10479:856476537696
5 <link rel="stylesheet" href="styles.css"> 5 <link rel="stylesheet" href="styles.css">
6 </head> 6 </head>
7 <body> 7 <body>
8 <a NAME="top" ID="top"></a> 8 <a NAME="top" ID="top"></a>
9 <h1>eric7.WebBrowser.History.HistoryTreeModel</h1> 9 <h1>eric7.WebBrowser.History.HistoryTreeModel</h1>
10
11 <p> 10 <p>
12 Module implementing the history tree model. 11 Module implementing the history tree model.
13 </p> 12 </p>
13
14 <h3>Global Attributes</h3> 14 <h3>Global Attributes</h3>
15
16 <table> 15 <table>
17 <tr><td>None</td></tr> 16 <tr><td>None</td></tr>
18 </table> 17 </table>
18
19 <h3>Classes</h3> 19 <h3>Classes</h3>
20 20 <table>
21 <table>
22
23 <tr> 21 <tr>
24 <td><a href="#HistoryTreeModel">HistoryTreeModel</a></td> 22 <td><a href="#HistoryTreeModel">HistoryTreeModel</a></td>
25 <td>Class implementing the history tree model.</td> 23 <td>Class implementing the history tree model.</td>
26 </tr> 24 </tr>
27 </table> 25 </table>
26
28 <h3>Functions</h3> 27 <h3>Functions</h3>
29
30 <table> 28 <table>
31 <tr><td>None</td></tr> 29 <tr><td>None</td></tr>
32 </table> 30 </table>
31
33 <hr /> 32 <hr />
34 <hr /> 33 <hr />
35 <a NAME="HistoryTreeModel" ID="HistoryTreeModel"></a> 34 <a NAME="HistoryTreeModel" ID="HistoryTreeModel"></a>
36 <h2>HistoryTreeModel</h2> 35 <h2>HistoryTreeModel</h2>
37
38 <p> 36 <p>
39 Class implementing the history tree model. 37 Class implementing the history tree model.
40 </p> 38 </p>
39
41 <h3>Derived from</h3> 40 <h3>Derived from</h3>
42 QAbstractProxyModel 41 QAbstractProxyModel
43 <h3>Class Attributes</h3> 42 <h3>Class Attributes</h3>
44
45 <table> 43 <table>
46 <tr><td>None</td></tr> 44 <tr><td>None</td></tr>
47 </table> 45 </table>
46
48 <h3>Class Methods</h3> 47 <h3>Class Methods</h3>
49
50 <table> 48 <table>
51 <tr><td>None</td></tr> 49 <tr><td>None</td></tr>
52 </table> 50 </table>
51
53 <h3>Methods</h3> 52 <h3>Methods</h3>
54 53 <table>
55 <table>
56
57 <tr> 54 <tr>
58 <td><a href="#HistoryTreeModel.__init__">HistoryTreeModel</a></td> 55 <td><a href="#HistoryTreeModel.__init__">HistoryTreeModel</a></td>
59 <td>Constructor</td> 56 <td>Constructor</td>
60 </tr> 57 </tr>
61 <tr> 58 <tr>
121 <tr> 118 <tr>
122 <td><a href="#HistoryTreeModel.setSourceModel">setSourceModel</a></td> 119 <td><a href="#HistoryTreeModel.setSourceModel">setSourceModel</a></td>
123 <td>Public method to set the source model.</td> 120 <td>Public method to set the source model.</td>
124 </tr> 121 </tr>
125 </table> 122 </table>
123
126 <h3>Static Methods</h3> 124 <h3>Static Methods</h3>
127
128 <table> 125 <table>
129 <tr><td>None</td></tr> 126 <tr><td>None</td></tr>
130 </table> 127 </table>
128
131 129
132 <a NAME="HistoryTreeModel.__init__" ID="HistoryTreeModel.__init__"></a> 130 <a NAME="HistoryTreeModel.__init__" ID="HistoryTreeModel.__init__"></a>
133 <h4>HistoryTreeModel (Constructor)</h4> 131 <h4>HistoryTreeModel (Constructor)</h4>
134 <b>HistoryTreeModel</b>(<i>sourceModel, parent=None</i>) 132 <b>HistoryTreeModel</b>(<i>sourceModel, parent=None</i>)
135
136 <p> 133 <p>
137 Constructor 134 Constructor
138 </p> 135 </p>
136
139 <dl> 137 <dl>
140 138
141 <dt><i>sourceModel</i> (QAbstractItemModel)</dt> 139 <dt><i>sourceModel</i> (QAbstractItemModel)</dt>
142 <dd> 140 <dd>
143 reference to the source model 141 reference to the source model
148 </dd> 146 </dd>
149 </dl> 147 </dl>
150 <a NAME="HistoryTreeModel.__sourceDateRow" ID="HistoryTreeModel.__sourceDateRow"></a> 148 <a NAME="HistoryTreeModel.__sourceDateRow" ID="HistoryTreeModel.__sourceDateRow"></a>
151 <h4>HistoryTreeModel.__sourceDateRow</h4> 149 <h4>HistoryTreeModel.__sourceDateRow</h4>
152 <b>__sourceDateRow</b>(<i>row</i>) 150 <b>__sourceDateRow</b>(<i>row</i>)
153
154 <p> 151 <p>
155 Private method to translate the top level date row into the offset 152 Private method to translate the top level date row into the offset
156 where that date starts. 153 where that date starts.
157 </p> 154 </p>
155
158 <dl> 156 <dl>
159 157
160 <dt><i>row</i> (int)</dt> 158 <dt><i>row</i> (int)</dt>
161 <dd> 159 <dd>
162 row number of the date 160 row number of the date
175 </dd> 173 </dd>
176 </dl> 174 </dl>
177 <a NAME="HistoryTreeModel.__sourceReset" ID="HistoryTreeModel.__sourceReset"></a> 175 <a NAME="HistoryTreeModel.__sourceReset" ID="HistoryTreeModel.__sourceReset"></a>
178 <h4>HistoryTreeModel.__sourceReset</h4> 176 <h4>HistoryTreeModel.__sourceReset</h4>
179 <b>__sourceReset</b>(<i></i>) 177 <b>__sourceReset</b>(<i></i>)
180
181 <p> 178 <p>
182 Private slot to handle a reset of the source model. 179 Private slot to handle a reset of the source model.
183 </p> 180 </p>
181
184 <a NAME="HistoryTreeModel.__sourceRowsInserted" ID="HistoryTreeModel.__sourceRowsInserted"></a> 182 <a NAME="HistoryTreeModel.__sourceRowsInserted" ID="HistoryTreeModel.__sourceRowsInserted"></a>
185 <h4>HistoryTreeModel.__sourceRowsInserted</h4> 183 <h4>HistoryTreeModel.__sourceRowsInserted</h4>
186 <b>__sourceRowsInserted</b>(<i>parent, start, end</i>) 184 <b>__sourceRowsInserted</b>(<i>parent, start, end</i>)
187
188 <p> 185 <p>
189 Private slot to handle the insertion of data in the source model. 186 Private slot to handle the insertion of data in the source model.
190 </p> 187 </p>
188
191 <dl> 189 <dl>
192 190
193 <dt><i>parent</i> (QModelIndex)</dt> 191 <dt><i>parent</i> (QModelIndex)</dt>
194 <dd> 192 <dd>
195 reference to the parent index 193 reference to the parent index
204 </dd> 202 </dd>
205 </dl> 203 </dl>
206 <a NAME="HistoryTreeModel.__sourceRowsRemoved" ID="HistoryTreeModel.__sourceRowsRemoved"></a> 204 <a NAME="HistoryTreeModel.__sourceRowsRemoved" ID="HistoryTreeModel.__sourceRowsRemoved"></a>
207 <h4>HistoryTreeModel.__sourceRowsRemoved</h4> 205 <h4>HistoryTreeModel.__sourceRowsRemoved</h4>
208 <b>__sourceRowsRemoved</b>(<i>parent, start, end</i>) 206 <b>__sourceRowsRemoved</b>(<i>parent, start, end</i>)
209
210 <p> 207 <p>
211 Private slot to handle the removal of data in the source model. 208 Private slot to handle the removal of data in the source model.
212 </p> 209 </p>
210
213 <dl> 211 <dl>
214 212
215 <dt><i>parent</i> (QModelIndex)</dt> 213 <dt><i>parent</i> (QModelIndex)</dt>
216 <dd> 214 <dd>
217 reference to the parent index 215 reference to the parent index
226 </dd> 224 </dd>
227 </dl> 225 </dl>
228 <a NAME="HistoryTreeModel.columnCount" ID="HistoryTreeModel.columnCount"></a> 226 <a NAME="HistoryTreeModel.columnCount" ID="HistoryTreeModel.columnCount"></a>
229 <h4>HistoryTreeModel.columnCount</h4> 227 <h4>HistoryTreeModel.columnCount</h4>
230 <b>columnCount</b>(<i>parent=None</i>) 228 <b>columnCount</b>(<i>parent=None</i>)
231
232 <p> 229 <p>
233 Public method to get the number of columns. 230 Public method to get the number of columns.
234 </p> 231 </p>
232
235 <dl> 233 <dl>
236 234
237 <dt><i>parent</i> (QModelIndex)</dt> 235 <dt><i>parent</i> (QModelIndex)</dt>
238 <dd> 236 <dd>
239 index of parent 237 index of parent
252 </dd> 250 </dd>
253 </dl> 251 </dl>
254 <a NAME="HistoryTreeModel.data" ID="HistoryTreeModel.data"></a> 252 <a NAME="HistoryTreeModel.data" ID="HistoryTreeModel.data"></a>
255 <h4>HistoryTreeModel.data</h4> 253 <h4>HistoryTreeModel.data</h4>
256 <b>data</b>(<i>index, role=Qt.ItemDataRole.DisplayRole</i>) 254 <b>data</b>(<i>index, role=Qt.ItemDataRole.DisplayRole</i>)
257
258 <p> 255 <p>
259 Public method to get data from the model. 256 Public method to get data from the model.
260 </p> 257 </p>
258
261 <dl> 259 <dl>
262 260
263 <dt><i>index</i> (QModelIndex)</dt> 261 <dt><i>index</i> (QModelIndex)</dt>
264 <dd> 262 <dd>
265 index of history entry to get data for 263 index of history entry to get data for
282 </dd> 280 </dd>
283 </dl> 281 </dl>
284 <a NAME="HistoryTreeModel.flags" ID="HistoryTreeModel.flags"></a> 282 <a NAME="HistoryTreeModel.flags" ID="HistoryTreeModel.flags"></a>
285 <h4>HistoryTreeModel.flags</h4> 283 <h4>HistoryTreeModel.flags</h4>
286 <b>flags</b>(<i>index</i>) 284 <b>flags</b>(<i>index</i>)
287
288 <p> 285 <p>
289 Public method to get the item flags. 286 Public method to get the item flags.
290 </p> 287 </p>
288
291 <dl> 289 <dl>
292 290
293 <dt><i>index</i> (QModelIndex)</dt> 291 <dt><i>index</i> (QModelIndex)</dt>
294 <dd> 292 <dd>
295 index of the item 293 index of the item
308 </dd> 306 </dd>
309 </dl> 307 </dl>
310 <a NAME="HistoryTreeModel.hasChildren" ID="HistoryTreeModel.hasChildren"></a> 308 <a NAME="HistoryTreeModel.hasChildren" ID="HistoryTreeModel.hasChildren"></a>
311 <h4>HistoryTreeModel.hasChildren</h4> 309 <h4>HistoryTreeModel.hasChildren</h4>
312 <b>hasChildren</b>(<i>parent=None</i>) 310 <b>hasChildren</b>(<i>parent=None</i>)
313
314 <p> 311 <p>
315 Public method to check, if an entry has some children. 312 Public method to check, if an entry has some children.
316 </p> 313 </p>
314
317 <dl> 315 <dl>
318 316
319 <dt><i>parent</i> (QModelIndex)</dt> 317 <dt><i>parent</i> (QModelIndex)</dt>
320 <dd> 318 <dd>
321 index of the entry to check 319 index of the entry to check
334 </dd> 332 </dd>
335 </dl> 333 </dl>
336 <a NAME="HistoryTreeModel.headerData" ID="HistoryTreeModel.headerData"></a> 334 <a NAME="HistoryTreeModel.headerData" ID="HistoryTreeModel.headerData"></a>
337 <h4>HistoryTreeModel.headerData</h4> 335 <h4>HistoryTreeModel.headerData</h4>
338 <b>headerData</b>(<i>section, orientation, role=Qt.ItemDataRole.DisplayRole</i>) 336 <b>headerData</b>(<i>section, orientation, role=Qt.ItemDataRole.DisplayRole</i>)
339
340 <p> 337 <p>
341 Public method to get the header data. 338 Public method to get the header data.
342 </p> 339 </p>
340
343 <dl> 341 <dl>
344 342
345 <dt><i>section</i> (int)</dt> 343 <dt><i>section</i> (int)</dt>
346 <dd> 344 <dd>
347 section number 345 section number
368 </dd> 366 </dd>
369 </dl> 367 </dl>
370 <a NAME="HistoryTreeModel.index" ID="HistoryTreeModel.index"></a> 368 <a NAME="HistoryTreeModel.index" ID="HistoryTreeModel.index"></a>
371 <h4>HistoryTreeModel.index</h4> 369 <h4>HistoryTreeModel.index</h4>
372 <b>index</b>(<i>row, column, parent=None</i>) 370 <b>index</b>(<i>row, column, parent=None</i>)
373
374 <p> 371 <p>
375 Public method to create an index. 372 Public method to create an index.
376 </p> 373 </p>
374
377 <dl> 375 <dl>
378 376
379 <dt><i>row</i> (int)</dt> 377 <dt><i>row</i> (int)</dt>
380 <dd> 378 <dd>
381 row number for the index 379 row number for the index
402 </dd> 400 </dd>
403 </dl> 401 </dl>
404 <a NAME="HistoryTreeModel.mapFromSource" ID="HistoryTreeModel.mapFromSource"></a> 402 <a NAME="HistoryTreeModel.mapFromSource" ID="HistoryTreeModel.mapFromSource"></a>
405 <h4>HistoryTreeModel.mapFromSource</h4> 403 <h4>HistoryTreeModel.mapFromSource</h4>
406 <b>mapFromSource</b>(<i>sourceIndex</i>) 404 <b>mapFromSource</b>(<i>sourceIndex</i>)
407
408 <p> 405 <p>
409 Public method to map an index to the proxy model index. 406 Public method to map an index to the proxy model index.
410 </p> 407 </p>
408
411 <dl> 409 <dl>
412 410
413 <dt><i>sourceIndex</i> (QModelIndex)</dt> 411 <dt><i>sourceIndex</i> (QModelIndex)</dt>
414 <dd> 412 <dd>
415 reference to a source model index 413 reference to a source model index
428 </dd> 426 </dd>
429 </dl> 427 </dl>
430 <a NAME="HistoryTreeModel.mapToSource" ID="HistoryTreeModel.mapToSource"></a> 428 <a NAME="HistoryTreeModel.mapToSource" ID="HistoryTreeModel.mapToSource"></a>
431 <h4>HistoryTreeModel.mapToSource</h4> 429 <h4>HistoryTreeModel.mapToSource</h4>
432 <b>mapToSource</b>(<i>proxyIndex</i>) 430 <b>mapToSource</b>(<i>proxyIndex</i>)
433
434 <p> 431 <p>
435 Public method to map an index to the source model index. 432 Public method to map an index to the source model index.
436 </p> 433 </p>
434
437 <dl> 435 <dl>
438 436
439 <dt><i>proxyIndex</i> (QModelIndex)</dt> 437 <dt><i>proxyIndex</i> (QModelIndex)</dt>
440 <dd> 438 <dd>
441 reference to a proxy model index 439 reference to a proxy model index
454 </dd> 452 </dd>
455 </dl> 453 </dl>
456 <a NAME="HistoryTreeModel.parent" ID="HistoryTreeModel.parent"></a> 454 <a NAME="HistoryTreeModel.parent" ID="HistoryTreeModel.parent"></a>
457 <h4>HistoryTreeModel.parent</h4> 455 <h4>HistoryTreeModel.parent</h4>
458 <b>parent</b>(<i>index</i>) 456 <b>parent</b>(<i>index</i>)
459
460 <p> 457 <p>
461 Public method to get the parent index. 458 Public method to get the parent index.
462 </p> 459 </p>
460
463 <dl> 461 <dl>
464 462
465 <dt><i>index</i> (QModelIndex)</dt> 463 <dt><i>index</i> (QModelIndex)</dt>
466 <dd> 464 <dd>
467 index of item to get parent 465 index of item to get parent
480 </dd> 478 </dd>
481 </dl> 479 </dl>
482 <a NAME="HistoryTreeModel.removeRows" ID="HistoryTreeModel.removeRows"></a> 480 <a NAME="HistoryTreeModel.removeRows" ID="HistoryTreeModel.removeRows"></a>
483 <h4>HistoryTreeModel.removeRows</h4> 481 <h4>HistoryTreeModel.removeRows</h4>
484 <b>removeRows</b>(<i>row, count, parent=None</i>) 482 <b>removeRows</b>(<i>row, count, parent=None</i>)
485
486 <p> 483 <p>
487 Public method to remove entries from the model. 484 Public method to remove entries from the model.
488 </p> 485 </p>
486
489 <dl> 487 <dl>
490 488
491 <dt><i>row</i> (int)</dt> 489 <dt><i>row</i> (int)</dt>
492 <dd> 490 <dd>
493 row of the first entry to remove 491 row of the first entry to remove
514 </dd> 512 </dd>
515 </dl> 513 </dl>
516 <a NAME="HistoryTreeModel.rowCount" ID="HistoryTreeModel.rowCount"></a> 514 <a NAME="HistoryTreeModel.rowCount" ID="HistoryTreeModel.rowCount"></a>
517 <h4>HistoryTreeModel.rowCount</h4> 515 <h4>HistoryTreeModel.rowCount</h4>
518 <b>rowCount</b>(<i>parent=None</i>) 516 <b>rowCount</b>(<i>parent=None</i>)
519
520 <p> 517 <p>
521 Public method to determine the number of rows. 518 Public method to determine the number of rows.
522 </p> 519 </p>
520
523 <dl> 521 <dl>
524 522
525 <dt><i>parent</i> (QModelIndex)</dt> 523 <dt><i>parent</i> (QModelIndex)</dt>
526 <dd> 524 <dd>
527 index of parent 525 index of parent
540 </dd> 538 </dd>
541 </dl> 539 </dl>
542 <a NAME="HistoryTreeModel.setSourceModel" ID="HistoryTreeModel.setSourceModel"></a> 540 <a NAME="HistoryTreeModel.setSourceModel" ID="HistoryTreeModel.setSourceModel"></a>
543 <h4>HistoryTreeModel.setSourceModel</h4> 541 <h4>HistoryTreeModel.setSourceModel</h4>
544 <b>setSourceModel</b>(<i>sourceModel</i>) 542 <b>setSourceModel</b>(<i>sourceModel</i>)
545
546 <p> 543 <p>
547 Public method to set the source model. 544 Public method to set the source model.
548 </p> 545 </p>
546
549 <dl> 547 <dl>
550 548
551 <dt><i>sourceModel</i> (QAbstractItemModel)</dt> 549 <dt><i>sourceModel</i> (QAbstractItemModel)</dt>
552 <dd> 550 <dd>
553 reference to the source model 551 reference to the source model

eric ide

mercurial