eric6/Documentation/Source/eric6.WebBrowser.History.HistoryMenu.html

branch
maintenance
changeset 6989
8b8cadf8d7e9
parent 6942
2602857055c5
child 7273
391d6b7b1eff
equal deleted inserted replaced
6938:7926553b7509 6989:8b8cadf8d7e9
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.WebBrowser.History.HistoryMenu</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><a NAME="top" ID="top"></a>
22 <h1>eric6.WebBrowser.History.HistoryMenu</h1>
23 <p>
24 Module implementing the history menu.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#HistoryMenu">HistoryMenu</a></td>
34 <td>Class implementing the history menu.</td>
35 </tr><tr>
36 <td><a href="#HistoryMenuModel">HistoryMenuModel</a></td>
37 <td>Class implementing a model for the history menu.</td>
38 </tr><tr>
39 <td><a href="#HistoryMostVisitedMenu">HistoryMostVisitedMenu</a></td>
40 <td>Class implementing the most visited history menu.</td>
41 </tr><tr>
42 <td><a href="#HistoryMostVisitedMenuModel">HistoryMostVisitedMenuModel</a></td>
43 <td>Class implementing a model to show the most visited history entries.</td>
44 </tr>
45 </table>
46 <h3>Functions</h3>
47 <table>
48 <tr><td>None</td></tr>
49 </table>
50 <hr /><hr />
51 <a NAME="HistoryMenu" ID="HistoryMenu"></a>
52 <h2>HistoryMenu</h2>
53 <p>
54 Class implementing the history menu.
55 </p><h3>Signals</h3>
56 <dl>
57 <dt>newBackgroundTab(QUrl, str)</dt>
58 <dd>
59 emitted to open a URL in a new
60 background tab
61 </dd><dt>newPrivateWindow(QUrl, str)</dt>
62 <dd>
63 emitted to open a URL in a new
64 private window
65 </dd><dt>newTab(QUrl, str)</dt>
66 <dd>
67 emitted to open a URL in a new tab
68 </dd><dt>newWindow(QUrl, str)</dt>
69 <dd>
70 emitted to open a URL in a new window
71 </dd><dt>openUrl(QUrl, str)</dt>
72 <dd>
73 emitted to open a URL in the current tab
74 </dd>
75 </dl>
76 <h3>Derived from</h3>
77 E5ModelMenu
78 <h3>Class Attributes</h3>
79 <table>
80 <tr><td>None</td></tr>
81 </table>
82 <h3>Class Methods</h3>
83 <table>
84 <tr><td>None</td></tr>
85 </table>
86 <h3>Methods</h3>
87 <table>
88 <tr>
89 <td><a href="#HistoryMenu.__init__">HistoryMenu</a></td>
90 <td>Constructor</td>
91 </tr><tr>
92 <td><a href="#HistoryMenu.__aboutToShowClosedTabsMenu">__aboutToShowClosedTabsMenu</a></td>
93 <td>Private slot to populate the closed tabs menu.</td>
94 </tr><tr>
95 <td><a href="#HistoryMenu.__activated">__activated</a></td>
96 <td>Private slot handling the activated signal.</td>
97 </tr><tr>
98 <td><a href="#HistoryMenu.__clearHistoryDialog">__clearHistoryDialog</a></td>
99 <td>Private slot to clear the history.</td>
100 </tr><tr>
101 <td><a href="#HistoryMenu.__closedTabAvailable">__closedTabAvailable</a></td>
102 <td>Private slot to handle changes of the availability of closed tabs.</td>
103 </tr><tr>
104 <td><a href="#HistoryMenu.postPopulated">postPopulated</a></td>
105 <td>Public method to add any actions after the tree.</td>
106 </tr><tr>
107 <td><a href="#HistoryMenu.prePopulated">prePopulated</a></td>
108 <td>Public method to add any actions before the tree.</td>
109 </tr><tr>
110 <td><a href="#HistoryMenu.setInitialActions">setInitialActions</a></td>
111 <td>Public method to set the list of actions that should appear first in the menu.</td>
112 </tr><tr>
113 <td><a href="#HistoryMenu.showHistoryDialog">showHistoryDialog</a></td>
114 <td>Public slot to show the history dialog.</td>
115 </tr>
116 </table>
117 <h3>Static Methods</h3>
118 <table>
119 <tr><td>None</td></tr>
120 </table>
121 <a NAME="HistoryMenu.__init__" ID="HistoryMenu.__init__"></a>
122 <h4>HistoryMenu (Constructor)</h4>
123 <b>HistoryMenu</b>(<i>parent=None, tabWidget=None</i>)
124 <p>
125 Constructor
126 </p><dl>
127 <dt><i>parent</i></dt>
128 <dd>
129 reference to the parent widget (QWidget)
130 </dd><dt><i>tabWidget</i></dt>
131 <dd>
132 reference to the tab widget managing the browser
133 tabs (HelpTabWidget
134 </dd>
135 </dl><a NAME="HistoryMenu.__aboutToShowClosedTabsMenu" ID="HistoryMenu.__aboutToShowClosedTabsMenu"></a>
136 <h4>HistoryMenu.__aboutToShowClosedTabsMenu</h4>
137 <b>__aboutToShowClosedTabsMenu</b>(<i></i>)
138 <p>
139 Private slot to populate the closed tabs menu.
140 </p><a NAME="HistoryMenu.__activated" ID="HistoryMenu.__activated"></a>
141 <h4>HistoryMenu.__activated</h4>
142 <b>__activated</b>(<i>idx</i>)
143 <p>
144 Private slot handling the activated signal.
145 </p><dl>
146 <dt><i>idx</i></dt>
147 <dd>
148 index of the activated item (QModelIndex)
149 </dd>
150 </dl><a NAME="HistoryMenu.__clearHistoryDialog" ID="HistoryMenu.__clearHistoryDialog"></a>
151 <h4>HistoryMenu.__clearHistoryDialog</h4>
152 <b>__clearHistoryDialog</b>(<i></i>)
153 <p>
154 Private slot to clear the history.
155 </p><a NAME="HistoryMenu.__closedTabAvailable" ID="HistoryMenu.__closedTabAvailable"></a>
156 <h4>HistoryMenu.__closedTabAvailable</h4>
157 <b>__closedTabAvailable</b>(<i>avail</i>)
158 <p>
159 Private slot to handle changes of the availability of closed tabs.
160 </p><dl>
161 <dt><i>avail</i></dt>
162 <dd>
163 flag indicating the availability of closed tabs (boolean)
164 </dd>
165 </dl><a NAME="HistoryMenu.postPopulated" ID="HistoryMenu.postPopulated"></a>
166 <h4>HistoryMenu.postPopulated</h4>
167 <b>postPopulated</b>(<i></i>)
168 <p>
169 Public method to add any actions after the tree.
170 </p><a NAME="HistoryMenu.prePopulated" ID="HistoryMenu.prePopulated"></a>
171 <h4>HistoryMenu.prePopulated</h4>
172 <b>prePopulated</b>(<i></i>)
173 <p>
174 Public method to add any actions before the tree.
175 </p><dl>
176 <dt>Returns:</dt>
177 <dd>
178 flag indicating if any actions were added (boolean)
179 </dd>
180 </dl><a NAME="HistoryMenu.setInitialActions" ID="HistoryMenu.setInitialActions"></a>
181 <h4>HistoryMenu.setInitialActions</h4>
182 <b>setInitialActions</b>(<i>actions</i>)
183 <p>
184 Public method to set the list of actions that should appear first in
185 the menu.
186 </p><dl>
187 <dt><i>actions</i></dt>
188 <dd>
189 list of initial actions (list of QAction)
190 </dd>
191 </dl><a NAME="HistoryMenu.showHistoryDialog" ID="HistoryMenu.showHistoryDialog"></a>
192 <h4>HistoryMenu.showHistoryDialog</h4>
193 <b>showHistoryDialog</b>(<i></i>)
194 <p>
195 Public slot to show the history dialog.
196 </p>
197 <div align="right"><a href="#top">Up</a></div>
198 <hr /><hr />
199 <a NAME="HistoryMenuModel" ID="HistoryMenuModel"></a>
200 <h2>HistoryMenuModel</h2>
201 <p>
202 Class implementing a model for the history menu.
203 </p><p>
204 It maps the first bunch of items of the source model to the root.
205 </p>
206 <h3>Derived from</h3>
207 QAbstractProxyModel
208 <h3>Class Attributes</h3>
209 <table>
210 <tr><td>MOVEDROWS</td></tr>
211 </table>
212 <h3>Class Methods</h3>
213 <table>
214 <tr><td>None</td></tr>
215 </table>
216 <h3>Methods</h3>
217 <table>
218 <tr>
219 <td><a href="#HistoryMenuModel.__init__">HistoryMenuModel</a></td>
220 <td>Constructor</td>
221 </tr><tr>
222 <td><a href="#HistoryMenuModel.bumpedRows">bumpedRows</a></td>
223 <td>Public method to determine the number of rows moved to the root.</td>
224 </tr><tr>
225 <td><a href="#HistoryMenuModel.columnCount">columnCount</a></td>
226 <td>Public method to get the number of columns.</td>
227 </tr><tr>
228 <td><a href="#HistoryMenuModel.index">index</a></td>
229 <td>Public method to create an index.</td>
230 </tr><tr>
231 <td><a href="#HistoryMenuModel.mapFromSource">mapFromSource</a></td>
232 <td>Public method to map an index to the proxy model index.</td>
233 </tr><tr>
234 <td><a href="#HistoryMenuModel.mapToSource">mapToSource</a></td>
235 <td>Public method to map an index to the source model index.</td>
236 </tr><tr>
237 <td><a href="#HistoryMenuModel.mimeData">mimeData</a></td>
238 <td>Public method to return the mime data.</td>
239 </tr><tr>
240 <td><a href="#HistoryMenuModel.parent">parent</a></td>
241 <td>Public method to get the parent index.</td>
242 </tr><tr>
243 <td><a href="#HistoryMenuModel.rowCount">rowCount</a></td>
244 <td>Public method to determine the number of rows.</td>
245 </tr>
246 </table>
247 <h3>Static Methods</h3>
248 <table>
249 <tr><td>None</td></tr>
250 </table>
251 <a NAME="HistoryMenuModel.__init__" ID="HistoryMenuModel.__init__"></a>
252 <h4>HistoryMenuModel (Constructor)</h4>
253 <b>HistoryMenuModel</b>(<i>sourceModel, parent=None</i>)
254 <p>
255 Constructor
256 </p><dl>
257 <dt><i>sourceModel</i></dt>
258 <dd>
259 reference to the source model (QAbstractItemModel)
260 </dd><dt><i>parent</i></dt>
261 <dd>
262 reference to the parent object (QObject)
263 </dd>
264 </dl><a NAME="HistoryMenuModel.bumpedRows" ID="HistoryMenuModel.bumpedRows"></a>
265 <h4>HistoryMenuModel.bumpedRows</h4>
266 <b>bumpedRows</b>(<i></i>)
267 <p>
268 Public method to determine the number of rows moved to the root.
269 </p><dl>
270 <dt>Returns:</dt>
271 <dd>
272 number of rows moved to the root (integer)
273 </dd>
274 </dl><a NAME="HistoryMenuModel.columnCount" ID="HistoryMenuModel.columnCount"></a>
275 <h4>HistoryMenuModel.columnCount</h4>
276 <b>columnCount</b>(<i>parent=None</i>)
277 <p>
278 Public method to get the number of columns.
279 </p><dl>
280 <dt><i>parent</i></dt>
281 <dd>
282 index of parent (QModelIndex)
283 </dd>
284 </dl><dl>
285 <dt>Returns:</dt>
286 <dd>
287 number of columns (integer)
288 </dd>
289 </dl><a NAME="HistoryMenuModel.index" ID="HistoryMenuModel.index"></a>
290 <h4>HistoryMenuModel.index</h4>
291 <b>index</b>(<i>row, column, parent=None</i>)
292 <p>
293 Public method to create an index.
294 </p><dl>
295 <dt><i>row</i></dt>
296 <dd>
297 row number for the index (integer)
298 </dd><dt><i>column</i></dt>
299 <dd>
300 column number for the index (integer)
301 </dd><dt><i>parent</i></dt>
302 <dd>
303 index of the parent item (QModelIndex)
304 </dd>
305 </dl><dl>
306 <dt>Returns:</dt>
307 <dd>
308 requested index (QModelIndex)
309 </dd>
310 </dl><a NAME="HistoryMenuModel.mapFromSource" ID="HistoryMenuModel.mapFromSource"></a>
311 <h4>HistoryMenuModel.mapFromSource</h4>
312 <b>mapFromSource</b>(<i>sourceIndex</i>)
313 <p>
314 Public method to map an index to the proxy model index.
315 </p><dl>
316 <dt><i>sourceIndex</i></dt>
317 <dd>
318 reference to a source model index (QModelIndex)
319 </dd>
320 </dl><dl>
321 <dt>Returns:</dt>
322 <dd>
323 proxy model index (QModelIndex)
324 </dd>
325 </dl><a NAME="HistoryMenuModel.mapToSource" ID="HistoryMenuModel.mapToSource"></a>
326 <h4>HistoryMenuModel.mapToSource</h4>
327 <b>mapToSource</b>(<i>proxyIndex</i>)
328 <p>
329 Public method to map an index to the source model index.
330 </p><dl>
331 <dt><i>proxyIndex</i></dt>
332 <dd>
333 reference to a proxy model index (QModelIndex)
334 </dd>
335 </dl><dl>
336 <dt>Returns:</dt>
337 <dd>
338 source model index (QModelIndex)
339 </dd>
340 </dl><a NAME="HistoryMenuModel.mimeData" ID="HistoryMenuModel.mimeData"></a>
341 <h4>HistoryMenuModel.mimeData</h4>
342 <b>mimeData</b>(<i>indexes</i>)
343 <p>
344 Public method to return the mime data.
345 </p><dl>
346 <dt><i>indexes</i></dt>
347 <dd>
348 list of indexes (QModelIndexList)
349 </dd>
350 </dl><dl>
351 <dt>Returns:</dt>
352 <dd>
353 mime data (QMimeData)
354 </dd>
355 </dl><a NAME="HistoryMenuModel.parent" ID="HistoryMenuModel.parent"></a>
356 <h4>HistoryMenuModel.parent</h4>
357 <b>parent</b>(<i>index</i>)
358 <p>
359 Public method to get the parent index.
360 </p><dl>
361 <dt><i>index</i></dt>
362 <dd>
363 index of item to get parent (QModelIndex)
364 </dd>
365 </dl><dl>
366 <dt>Returns:</dt>
367 <dd>
368 index of parent (QModelIndex)
369 </dd>
370 </dl><a NAME="HistoryMenuModel.rowCount" ID="HistoryMenuModel.rowCount"></a>
371 <h4>HistoryMenuModel.rowCount</h4>
372 <b>rowCount</b>(<i>parent=None</i>)
373 <p>
374 Public method to determine the number of rows.
375 </p><dl>
376 <dt><i>parent</i></dt>
377 <dd>
378 index of parent (QModelIndex)
379 </dd>
380 </dl><dl>
381 <dt>Returns:</dt>
382 <dd>
383 number of rows (integer)
384 </dd>
385 </dl>
386 <div align="right"><a href="#top">Up</a></div>
387 <hr /><hr />
388 <a NAME="HistoryMostVisitedMenu" ID="HistoryMostVisitedMenu"></a>
389 <h2>HistoryMostVisitedMenu</h2>
390 <p>
391 Class implementing the most visited history menu.
392 </p><h3>Signals</h3>
393 <dl>
394 <dt>newBackgroundTab(QUrl, str)</dt>
395 <dd>
396 emitted to open a URL in a new
397 background tab
398 </dd><dt>newPrivateWindow(QUrl, str)</dt>
399 <dd>
400 emitted to open a URL in a new
401 private window
402 </dd><dt>newTab(QUrl, str)</dt>
403 <dd>
404 emitted to open a URL in a new tab
405 </dd><dt>newWindow(QUrl, str)</dt>
406 <dd>
407 emitted to open a URL in a new window
408 </dd><dt>openUrl(QUrl, str)</dt>
409 <dd>
410 emitted to open a URL in the current tab
411 </dd>
412 </dl>
413 <h3>Derived from</h3>
414 E5ModelMenu
415 <h3>Class Attributes</h3>
416 <table>
417 <tr><td>None</td></tr>
418 </table>
419 <h3>Class Methods</h3>
420 <table>
421 <tr><td>None</td></tr>
422 </table>
423 <h3>Methods</h3>
424 <table>
425 <tr>
426 <td><a href="#HistoryMostVisitedMenu.__init__">HistoryMostVisitedMenu</a></td>
427 <td>Constructor</td>
428 </tr><tr>
429 <td><a href="#HistoryMostVisitedMenu.__activated">__activated</a></td>
430 <td>Private slot handling the activated signal.</td>
431 </tr><tr>
432 <td><a href="#HistoryMostVisitedMenu.prePopulated">prePopulated</a></td>
433 <td>Public method to add any actions before the tree.</td>
434 </tr>
435 </table>
436 <h3>Static Methods</h3>
437 <table>
438 <tr><td>None</td></tr>
439 </table>
440 <a NAME="HistoryMostVisitedMenu.__init__" ID="HistoryMostVisitedMenu.__init__"></a>
441 <h4>HistoryMostVisitedMenu (Constructor)</h4>
442 <b>HistoryMostVisitedMenu</b>(<i>count, parent=None</i>)
443 <p>
444 Constructor
445 </p><dl>
446 <dt><i>count</i></dt>
447 <dd>
448 maximum number of entries to be shown (integer)
449 </dd><dt><i>parent</i></dt>
450 <dd>
451 reference to the parent widget (QWidget)
452 </dd>
453 </dl><a NAME="HistoryMostVisitedMenu.__activated" ID="HistoryMostVisitedMenu.__activated"></a>
454 <h4>HistoryMostVisitedMenu.__activated</h4>
455 <b>__activated</b>(<i>idx</i>)
456 <p>
457 Private slot handling the activated signal.
458 </p><dl>
459 <dt><i>idx</i></dt>
460 <dd>
461 index of the activated item (QModelIndex)
462 </dd>
463 </dl><a NAME="HistoryMostVisitedMenu.prePopulated" ID="HistoryMostVisitedMenu.prePopulated"></a>
464 <h4>HistoryMostVisitedMenu.prePopulated</h4>
465 <b>prePopulated</b>(<i></i>)
466 <p>
467 Public method to add any actions before the tree.
468 </p><dl>
469 <dt>Returns:</dt>
470 <dd>
471 flag indicating if any actions were added (boolean)
472 </dd>
473 </dl>
474 <div align="right"><a href="#top">Up</a></div>
475 <hr /><hr />
476 <a NAME="HistoryMostVisitedMenuModel" ID="HistoryMostVisitedMenuModel"></a>
477 <h2>HistoryMostVisitedMenuModel</h2>
478 <p>
479 Class implementing a model to show the most visited history entries.
480 </p>
481 <h3>Derived from</h3>
482 QSortFilterProxyModel
483 <h3>Class Attributes</h3>
484 <table>
485 <tr><td>None</td></tr>
486 </table>
487 <h3>Class Methods</h3>
488 <table>
489 <tr><td>None</td></tr>
490 </table>
491 <h3>Methods</h3>
492 <table>
493 <tr>
494 <td><a href="#HistoryMostVisitedMenuModel.__init__">HistoryMostVisitedMenuModel</a></td>
495 <td>Constructor</td>
496 </tr><tr>
497 <td><a href="#HistoryMostVisitedMenuModel.lessThan">lessThan</a></td>
498 <td>Public method used to sort the displayed items.</td>
499 </tr>
500 </table>
501 <h3>Static Methods</h3>
502 <table>
503 <tr><td>None</td></tr>
504 </table>
505 <a NAME="HistoryMostVisitedMenuModel.__init__" ID="HistoryMostVisitedMenuModel.__init__"></a>
506 <h4>HistoryMostVisitedMenuModel (Constructor)</h4>
507 <b>HistoryMostVisitedMenuModel</b>(<i>sourceModel, parent=None</i>)
508 <p>
509 Constructor
510 </p><dl>
511 <dt><i>sourceModel</i></dt>
512 <dd>
513 reference to the source model (QAbstractItemModel)
514 </dd><dt><i>parent</i></dt>
515 <dd>
516 reference to the parent object (QObject)
517 </dd>
518 </dl><a NAME="HistoryMostVisitedMenuModel.lessThan" ID="HistoryMostVisitedMenuModel.lessThan"></a>
519 <h4>HistoryMostVisitedMenuModel.lessThan</h4>
520 <b>lessThan</b>(<i>left, right</i>)
521 <p>
522 Public method used to sort the displayed items.
523 </p><dl>
524 <dt><i>left</i></dt>
525 <dd>
526 index of left item (QModelIndex)
527 </dd><dt><i>right</i></dt>
528 <dd>
529 index of right item (QModelIndex)
530 </dd>
531 </dl><dl>
532 <dt>Returns:</dt>
533 <dd>
534 true, if left is less than right (boolean)
535 </dd>
536 </dl>
537 <div align="right"><a href="#top">Up</a></div>
538 <hr />
539 </body></html>

eric ide

mercurial