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

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

eric ide

mercurial