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

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8596
d64760b2da50
child 10436
f6881d10e995
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.WebBrowser.History.HistoryMenu</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.WebBrowser.History.HistoryMenu</h1>
10
11 <p>
12 Module implementing the history menu.
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="#HistoryMenu">HistoryMenu</a></td>
25 <td>Class implementing the history menu.</td>
26 </tr>
27 <tr>
28 <td><a href="#HistoryMenuModel">HistoryMenuModel</a></td>
29 <td>Class implementing a model for the history menu.</td>
30 </tr>
31 <tr>
32 <td><a href="#HistoryMostVisitedMenu">HistoryMostVisitedMenu</a></td>
33 <td>Class implementing the most visited history menu.</td>
34 </tr>
35 <tr>
36 <td><a href="#HistoryMostVisitedMenuModel">HistoryMostVisitedMenuModel</a></td>
37 <td>Class implementing a model to show the most visited history entries.</td>
38 </tr>
39 </table>
40 <h3>Functions</h3>
41
42 <table>
43 <tr><td>None</td></tr>
44 </table>
45 <hr />
46 <hr />
47 <a NAME="HistoryMenu" ID="HistoryMenu"></a>
48 <h2>HistoryMenu</h2>
49
50 <p>
51 Class implementing the history menu.
52 </p>
53 <h3>Signals</h3>
54 <dl>
55
56 <dt>newBackgroundTab(QUrl, str)</dt>
57 <dd>
58 emitted to open a URL in a new
59 background tab
60 </dd>
61 <dt>newPrivateWindow(QUrl, str)</dt>
62 <dd>
63 emitted to open a URL in a new
64 private window
65 </dd>
66 <dt>newTab(QUrl, str)</dt>
67 <dd>
68 emitted to open a URL in a new tab
69 </dd>
70 <dt>newWindow(QUrl, str)</dt>
71 <dd>
72 emitted to open a URL in a new window
73 </dd>
74 <dt>openUrl(QUrl, str)</dt>
75 <dd>
76 emitted to open a URL in the current tab
77 </dd>
78 </dl>
79 <h3>Derived from</h3>
80 EricModelMenu
81 <h3>Class Attributes</h3>
82
83 <table>
84 <tr><td>None</td></tr>
85 </table>
86 <h3>Class Methods</h3>
87
88 <table>
89 <tr><td>None</td></tr>
90 </table>
91 <h3>Methods</h3>
92
93 <table>
94
95 <tr>
96 <td><a href="#HistoryMenu.__init__">HistoryMenu</a></td>
97 <td>Constructor</td>
98 </tr>
99 <tr>
100 <td><a href="#HistoryMenu.__aboutToShowClosedTabsMenu">__aboutToShowClosedTabsMenu</a></td>
101 <td>Private slot to populate the closed tabs menu.</td>
102 </tr>
103 <tr>
104 <td><a href="#HistoryMenu.__activated">__activated</a></td>
105 <td>Private slot handling the activated signal.</td>
106 </tr>
107 <tr>
108 <td><a href="#HistoryMenu.__clearHistoryDialog">__clearHistoryDialog</a></td>
109 <td>Private slot to clear the history.</td>
110 </tr>
111 <tr>
112 <td><a href="#HistoryMenu.__closedTabAvailable">__closedTabAvailable</a></td>
113 <td>Private slot to handle changes of the availability of closed tabs.</td>
114 </tr>
115 <tr>
116 <td><a href="#HistoryMenu.postPopulated">postPopulated</a></td>
117 <td>Public method to add any actions after the tree.</td>
118 </tr>
119 <tr>
120 <td><a href="#HistoryMenu.prePopulated">prePopulated</a></td>
121 <td>Public method to add any actions before the tree.</td>
122 </tr>
123 <tr>
124 <td><a href="#HistoryMenu.setInitialActions">setInitialActions</a></td>
125 <td>Public method to set the list of actions that should appear first in the menu.</td>
126 </tr>
127 <tr>
128 <td><a href="#HistoryMenu.showHistoryDialog">showHistoryDialog</a></td>
129 <td>Public slot to show the history dialog.</td>
130 </tr>
131 </table>
132 <h3>Static Methods</h3>
133
134 <table>
135 <tr><td>None</td></tr>
136 </table>
137
138 <a NAME="HistoryMenu.__init__" ID="HistoryMenu.__init__"></a>
139 <h4>HistoryMenu (Constructor)</h4>
140 <b>HistoryMenu</b>(<i>parent=None, tabWidget=None</i>)
141
142 <p>
143 Constructor
144 </p>
145 <dl>
146
147 <dt><i>parent</i></dt>
148 <dd>
149 reference to the parent widget (QWidget)
150 </dd>
151 <dt><i>tabWidget</i></dt>
152 <dd>
153 reference to the tab widget managing the browser
154 tabs (HelpTabWidget
155 </dd>
156 </dl>
157 <a NAME="HistoryMenu.__aboutToShowClosedTabsMenu" ID="HistoryMenu.__aboutToShowClosedTabsMenu"></a>
158 <h4>HistoryMenu.__aboutToShowClosedTabsMenu</h4>
159 <b>__aboutToShowClosedTabsMenu</b>(<i></i>)
160
161 <p>
162 Private slot to populate the closed tabs menu.
163 </p>
164 <a NAME="HistoryMenu.__activated" ID="HistoryMenu.__activated"></a>
165 <h4>HistoryMenu.__activated</h4>
166 <b>__activated</b>(<i>idx</i>)
167
168 <p>
169 Private slot handling the activated signal.
170 </p>
171 <dl>
172
173 <dt><i>idx</i></dt>
174 <dd>
175 index of the activated item (QModelIndex)
176 </dd>
177 </dl>
178 <a NAME="HistoryMenu.__clearHistoryDialog" ID="HistoryMenu.__clearHistoryDialog"></a>
179 <h4>HistoryMenu.__clearHistoryDialog</h4>
180 <b>__clearHistoryDialog</b>(<i></i>)
181
182 <p>
183 Private slot to clear the history.
184 </p>
185 <a NAME="HistoryMenu.__closedTabAvailable" ID="HistoryMenu.__closedTabAvailable"></a>
186 <h4>HistoryMenu.__closedTabAvailable</h4>
187 <b>__closedTabAvailable</b>(<i>avail</i>)
188
189 <p>
190 Private slot to handle changes of the availability of closed tabs.
191 </p>
192 <dl>
193
194 <dt><i>avail</i></dt>
195 <dd>
196 flag indicating the availability of closed tabs (boolean)
197 </dd>
198 </dl>
199 <a NAME="HistoryMenu.postPopulated" ID="HistoryMenu.postPopulated"></a>
200 <h4>HistoryMenu.postPopulated</h4>
201 <b>postPopulated</b>(<i></i>)
202
203 <p>
204 Public method to add any actions after the tree.
205 </p>
206 <a NAME="HistoryMenu.prePopulated" ID="HistoryMenu.prePopulated"></a>
207 <h4>HistoryMenu.prePopulated</h4>
208 <b>prePopulated</b>(<i></i>)
209
210 <p>
211 Public method to add any actions before the tree.
212 </p>
213 <dl>
214 <dt>Return:</dt>
215 <dd>
216 flag indicating if any actions were added (boolean)
217 </dd>
218 </dl>
219 <a NAME="HistoryMenu.setInitialActions" ID="HistoryMenu.setInitialActions"></a>
220 <h4>HistoryMenu.setInitialActions</h4>
221 <b>setInitialActions</b>(<i>actions</i>)
222
223 <p>
224 Public method to set the list of actions that should appear first in
225 the menu.
226 </p>
227 <dl>
228
229 <dt><i>actions</i></dt>
230 <dd>
231 list of initial actions (list of QAction)
232 </dd>
233 </dl>
234 <a NAME="HistoryMenu.showHistoryDialog" ID="HistoryMenu.showHistoryDialog"></a>
235 <h4>HistoryMenu.showHistoryDialog</h4>
236 <b>showHistoryDialog</b>(<i></i>)
237
238 <p>
239 Public slot to show the history dialog.
240 </p>
241 <div align="right"><a href="#top">Up</a></div>
242 <hr />
243 <hr />
244 <a NAME="HistoryMenuModel" ID="HistoryMenuModel"></a>
245 <h2>HistoryMenuModel</h2>
246
247 <p>
248 Class implementing a model for the history menu.
249 </p>
250 <p>
251 It maps the first bunch of items of the source model to the root.
252 </p>
253 <h3>Derived from</h3>
254 QAbstractProxyModel
255 <h3>Class Attributes</h3>
256
257 <table>
258 <tr><td>MOVEDROWS</td></tr>
259 </table>
260 <h3>Class Methods</h3>
261
262 <table>
263 <tr><td>None</td></tr>
264 </table>
265 <h3>Methods</h3>
266
267 <table>
268
269 <tr>
270 <td><a href="#HistoryMenuModel.__init__">HistoryMenuModel</a></td>
271 <td>Constructor</td>
272 </tr>
273 <tr>
274 <td><a href="#HistoryMenuModel.bumpedRows">bumpedRows</a></td>
275 <td>Public method to determine the number of rows moved to the root.</td>
276 </tr>
277 <tr>
278 <td><a href="#HistoryMenuModel.columnCount">columnCount</a></td>
279 <td>Public method to get the number of columns.</td>
280 </tr>
281 <tr>
282 <td><a href="#HistoryMenuModel.index">index</a></td>
283 <td>Public method to create an index.</td>
284 </tr>
285 <tr>
286 <td><a href="#HistoryMenuModel.mapFromSource">mapFromSource</a></td>
287 <td>Public method to map an index to the proxy model index.</td>
288 </tr>
289 <tr>
290 <td><a href="#HistoryMenuModel.mapToSource">mapToSource</a></td>
291 <td>Public method to map an index to the source model index.</td>
292 </tr>
293 <tr>
294 <td><a href="#HistoryMenuModel.mimeData">mimeData</a></td>
295 <td>Public method to return the mime data.</td>
296 </tr>
297 <tr>
298 <td><a href="#HistoryMenuModel.parent">parent</a></td>
299 <td>Public method to get the parent index.</td>
300 </tr>
301 <tr>
302 <td><a href="#HistoryMenuModel.rowCount">rowCount</a></td>
303 <td>Public method to determine the number of rows.</td>
304 </tr>
305 </table>
306 <h3>Static Methods</h3>
307
308 <table>
309 <tr><td>None</td></tr>
310 </table>
311
312 <a NAME="HistoryMenuModel.__init__" ID="HistoryMenuModel.__init__"></a>
313 <h4>HistoryMenuModel (Constructor)</h4>
314 <b>HistoryMenuModel</b>(<i>sourceModel, parent=None</i>)
315
316 <p>
317 Constructor
318 </p>
319 <dl>
320
321 <dt><i>sourceModel</i></dt>
322 <dd>
323 reference to the source model (QAbstractItemModel)
324 </dd>
325 <dt><i>parent</i></dt>
326 <dd>
327 reference to the parent object (QObject)
328 </dd>
329 </dl>
330 <a NAME="HistoryMenuModel.bumpedRows" ID="HistoryMenuModel.bumpedRows"></a>
331 <h4>HistoryMenuModel.bumpedRows</h4>
332 <b>bumpedRows</b>(<i></i>)
333
334 <p>
335 Public method to determine the number of rows moved to the root.
336 </p>
337 <dl>
338 <dt>Return:</dt>
339 <dd>
340 number of rows moved to the root (integer)
341 </dd>
342 </dl>
343 <a NAME="HistoryMenuModel.columnCount" ID="HistoryMenuModel.columnCount"></a>
344 <h4>HistoryMenuModel.columnCount</h4>
345 <b>columnCount</b>(<i>parent=None</i>)
346
347 <p>
348 Public method to get the number of columns.
349 </p>
350 <dl>
351
352 <dt><i>parent</i></dt>
353 <dd>
354 index of parent (QModelIndex)
355 </dd>
356 </dl>
357 <dl>
358 <dt>Return:</dt>
359 <dd>
360 number of columns (integer)
361 </dd>
362 </dl>
363 <a NAME="HistoryMenuModel.index" ID="HistoryMenuModel.index"></a>
364 <h4>HistoryMenuModel.index</h4>
365 <b>index</b>(<i>row, column, parent=None</i>)
366
367 <p>
368 Public method to create an index.
369 </p>
370 <dl>
371
372 <dt><i>row</i></dt>
373 <dd>
374 row number for the index (integer)
375 </dd>
376 <dt><i>column</i></dt>
377 <dd>
378 column number for the index (integer)
379 </dd>
380 <dt><i>parent</i></dt>
381 <dd>
382 index of the parent item (QModelIndex)
383 </dd>
384 </dl>
385 <dl>
386 <dt>Return:</dt>
387 <dd>
388 requested index (QModelIndex)
389 </dd>
390 </dl>
391 <a NAME="HistoryMenuModel.mapFromSource" ID="HistoryMenuModel.mapFromSource"></a>
392 <h4>HistoryMenuModel.mapFromSource</h4>
393 <b>mapFromSource</b>(<i>sourceIndex</i>)
394
395 <p>
396 Public method to map an index to the proxy model index.
397 </p>
398 <dl>
399
400 <dt><i>sourceIndex</i></dt>
401 <dd>
402 reference to a source model index (QModelIndex)
403 </dd>
404 </dl>
405 <dl>
406 <dt>Return:</dt>
407 <dd>
408 proxy model index (QModelIndex)
409 </dd>
410 </dl>
411 <a NAME="HistoryMenuModel.mapToSource" ID="HistoryMenuModel.mapToSource"></a>
412 <h4>HistoryMenuModel.mapToSource</h4>
413 <b>mapToSource</b>(<i>proxyIndex</i>)
414
415 <p>
416 Public method to map an index to the source model index.
417 </p>
418 <dl>
419
420 <dt><i>proxyIndex</i></dt>
421 <dd>
422 reference to a proxy model index (QModelIndex)
423 </dd>
424 </dl>
425 <dl>
426 <dt>Return:</dt>
427 <dd>
428 source model index (QModelIndex)
429 </dd>
430 </dl>
431 <a NAME="HistoryMenuModel.mimeData" ID="HistoryMenuModel.mimeData"></a>
432 <h4>HistoryMenuModel.mimeData</h4>
433 <b>mimeData</b>(<i>indexes</i>)
434
435 <p>
436 Public method to return the mime data.
437 </p>
438 <dl>
439
440 <dt><i>indexes</i></dt>
441 <dd>
442 list of indexes (QModelIndexList)
443 </dd>
444 </dl>
445 <dl>
446 <dt>Return:</dt>
447 <dd>
448 mime data (QMimeData)
449 </dd>
450 </dl>
451 <a NAME="HistoryMenuModel.parent" ID="HistoryMenuModel.parent"></a>
452 <h4>HistoryMenuModel.parent</h4>
453 <b>parent</b>(<i>index</i>)
454
455 <p>
456 Public method to get the parent index.
457 </p>
458 <dl>
459
460 <dt><i>index</i></dt>
461 <dd>
462 index of item to get parent (QModelIndex)
463 </dd>
464 </dl>
465 <dl>
466 <dt>Return:</dt>
467 <dd>
468 index of parent (QModelIndex)
469 </dd>
470 </dl>
471 <a NAME="HistoryMenuModel.rowCount" ID="HistoryMenuModel.rowCount"></a>
472 <h4>HistoryMenuModel.rowCount</h4>
473 <b>rowCount</b>(<i>parent=None</i>)
474
475 <p>
476 Public method to determine the number of rows.
477 </p>
478 <dl>
479
480 <dt><i>parent</i></dt>
481 <dd>
482 index of parent (QModelIndex)
483 </dd>
484 </dl>
485 <dl>
486 <dt>Return:</dt>
487 <dd>
488 number of rows (integer)
489 </dd>
490 </dl>
491 <div align="right"><a href="#top">Up</a></div>
492 <hr />
493 <hr />
494 <a NAME="HistoryMostVisitedMenu" ID="HistoryMostVisitedMenu"></a>
495 <h2>HistoryMostVisitedMenu</h2>
496
497 <p>
498 Class implementing the most visited history menu.
499 </p>
500 <h3>Signals</h3>
501 <dl>
502
503 <dt>newBackgroundTab(QUrl, str)</dt>
504 <dd>
505 emitted to open a URL in a new
506 background tab
507 </dd>
508 <dt>newPrivateWindow(QUrl, str)</dt>
509 <dd>
510 emitted to open a URL in a new
511 private window
512 </dd>
513 <dt>newTab(QUrl, str)</dt>
514 <dd>
515 emitted to open a URL in a new tab
516 </dd>
517 <dt>newWindow(QUrl, str)</dt>
518 <dd>
519 emitted to open a URL in a new window
520 </dd>
521 <dt>openUrl(QUrl, str)</dt>
522 <dd>
523 emitted to open a URL in the current tab
524 </dd>
525 </dl>
526 <h3>Derived from</h3>
527 EricModelMenu
528 <h3>Class Attributes</h3>
529
530 <table>
531 <tr><td>None</td></tr>
532 </table>
533 <h3>Class Methods</h3>
534
535 <table>
536 <tr><td>None</td></tr>
537 </table>
538 <h3>Methods</h3>
539
540 <table>
541
542 <tr>
543 <td><a href="#HistoryMostVisitedMenu.__init__">HistoryMostVisitedMenu</a></td>
544 <td>Constructor</td>
545 </tr>
546 <tr>
547 <td><a href="#HistoryMostVisitedMenu.__activated">__activated</a></td>
548 <td>Private slot handling the activated signal.</td>
549 </tr>
550 <tr>
551 <td><a href="#HistoryMostVisitedMenu.prePopulated">prePopulated</a></td>
552 <td>Public method to add any actions before the tree.</td>
553 </tr>
554 </table>
555 <h3>Static Methods</h3>
556
557 <table>
558 <tr><td>None</td></tr>
559 </table>
560
561 <a NAME="HistoryMostVisitedMenu.__init__" ID="HistoryMostVisitedMenu.__init__"></a>
562 <h4>HistoryMostVisitedMenu (Constructor)</h4>
563 <b>HistoryMostVisitedMenu</b>(<i>count, parent=None</i>)
564
565 <p>
566 Constructor
567 </p>
568 <dl>
569
570 <dt><i>count</i></dt>
571 <dd>
572 maximum number of entries to be shown (integer)
573 </dd>
574 <dt><i>parent</i></dt>
575 <dd>
576 reference to the parent widget (QWidget)
577 </dd>
578 </dl>
579 <a NAME="HistoryMostVisitedMenu.__activated" ID="HistoryMostVisitedMenu.__activated"></a>
580 <h4>HistoryMostVisitedMenu.__activated</h4>
581 <b>__activated</b>(<i>idx</i>)
582
583 <p>
584 Private slot handling the activated signal.
585 </p>
586 <dl>
587
588 <dt><i>idx</i></dt>
589 <dd>
590 index of the activated item (QModelIndex)
591 </dd>
592 </dl>
593 <a NAME="HistoryMostVisitedMenu.prePopulated" ID="HistoryMostVisitedMenu.prePopulated"></a>
594 <h4>HistoryMostVisitedMenu.prePopulated</h4>
595 <b>prePopulated</b>(<i></i>)
596
597 <p>
598 Public method to add any actions before the tree.
599 </p>
600 <dl>
601 <dt>Return:</dt>
602 <dd>
603 flag indicating if any actions were added (boolean)
604 </dd>
605 </dl>
606 <div align="right"><a href="#top">Up</a></div>
607 <hr />
608 <hr />
609 <a NAME="HistoryMostVisitedMenuModel" ID="HistoryMostVisitedMenuModel"></a>
610 <h2>HistoryMostVisitedMenuModel</h2>
611
612 <p>
613 Class implementing a model to show the most visited history entries.
614 </p>
615 <h3>Derived from</h3>
616 QSortFilterProxyModel
617 <h3>Class Attributes</h3>
618
619 <table>
620 <tr><td>None</td></tr>
621 </table>
622 <h3>Class Methods</h3>
623
624 <table>
625 <tr><td>None</td></tr>
626 </table>
627 <h3>Methods</h3>
628
629 <table>
630
631 <tr>
632 <td><a href="#HistoryMostVisitedMenuModel.__init__">HistoryMostVisitedMenuModel</a></td>
633 <td>Constructor</td>
634 </tr>
635 <tr>
636 <td><a href="#HistoryMostVisitedMenuModel.lessThan">lessThan</a></td>
637 <td>Public method used to sort the displayed items.</td>
638 </tr>
639 </table>
640 <h3>Static Methods</h3>
641
642 <table>
643 <tr><td>None</td></tr>
644 </table>
645
646 <a NAME="HistoryMostVisitedMenuModel.__init__" ID="HistoryMostVisitedMenuModel.__init__"></a>
647 <h4>HistoryMostVisitedMenuModel (Constructor)</h4>
648 <b>HistoryMostVisitedMenuModel</b>(<i>sourceModel, parent=None</i>)
649
650 <p>
651 Constructor
652 </p>
653 <dl>
654
655 <dt><i>sourceModel</i></dt>
656 <dd>
657 reference to the source model (QAbstractItemModel)
658 </dd>
659 <dt><i>parent</i></dt>
660 <dd>
661 reference to the parent object (QObject)
662 </dd>
663 </dl>
664 <a NAME="HistoryMostVisitedMenuModel.lessThan" ID="HistoryMostVisitedMenuModel.lessThan"></a>
665 <h4>HistoryMostVisitedMenuModel.lessThan</h4>
666 <b>lessThan</b>(<i>left, right</i>)
667
668 <p>
669 Public method used to sort the displayed items.
670 </p>
671 <dl>
672
673 <dt><i>left</i></dt>
674 <dd>
675 index of left item (QModelIndex)
676 </dd>
677 <dt><i>right</i></dt>
678 <dd>
679 index of right item (QModelIndex)
680 </dd>
681 </dl>
682 <dl>
683 <dt>Return:</dt>
684 <dd>
685 true, if left is less than right (boolean)
686 </dd>
687 </dl>
688 <div align="right"><a href="#top">Up</a></div>
689 <hr />
690 </body></html>

eric ide

mercurial