eric6/Documentation/Source/eric6.Helpviewer.History.HistoryManager.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.HistoryManager</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.HistoryManager</h1>
23 <p>
24 Module implementing the history manager.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>HISTORY_VERSION</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#HistoryEntry">HistoryEntry</a></td>
34 <td>Class implementing a history entry.</td>
35 </tr><tr>
36 <td><a href="#HistoryManager">HistoryManager</a></td>
37 <td>Class implementing the history manager.</td>
38 </tr>
39 </table>
40 <h3>Functions</h3>
41 <table>
42 <tr><td>None</td></tr>
43 </table>
44 <hr /><hr />
45 <a NAME="HistoryEntry" ID="HistoryEntry"></a>
46 <h2>HistoryEntry</h2>
47 <p>
48 Class implementing a history entry.
49 </p>
50 <h3>Derived from</h3>
51 object
52 <h3>Class Attributes</h3>
53 <table>
54 <tr><td>None</td></tr>
55 </table>
56 <h3>Class Methods</h3>
57 <table>
58 <tr><td>None</td></tr>
59 </table>
60 <h3>Methods</h3>
61 <table>
62 <tr>
63 <td><a href="#HistoryEntry.__init__">HistoryEntry</a></td>
64 <td>Constructor</td>
65 </tr><tr>
66 <td><a href="#HistoryEntry.__eq__">__eq__</a></td>
67 <td>Special method determining equality.</td>
68 </tr><tr>
69 <td><a href="#HistoryEntry.__lt__">__lt__</a></td>
70 <td>Special method determining less relation.</td>
71 </tr><tr>
72 <td><a href="#HistoryEntry.userTitle">userTitle</a></td>
73 <td>Public method to get the title of the history entry.</td>
74 </tr>
75 </table>
76 <h3>Static Methods</h3>
77 <table>
78 <tr><td>None</td></tr>
79 </table>
80 <a NAME="HistoryEntry.__init__" ID="HistoryEntry.__init__"></a>
81 <h4>HistoryEntry (Constructor)</h4>
82 <b>HistoryEntry</b>(<i>url=None, dateTime=None, title=None</i>)
83 <p>
84 Constructor
85 </p><dl>
86 <dt><i>url</i></dt>
87 <dd>
88 URL of the history entry (string)
89 </dd><dt><i>dateTime</i></dt>
90 <dd>
91 date and time this entry was created (QDateTime)
92 </dd><dt><i>title</i></dt>
93 <dd>
94 title string for the history entry (string)
95 </dd>
96 </dl><a NAME="HistoryEntry.__eq__" ID="HistoryEntry.__eq__"></a>
97 <h4>HistoryEntry.__eq__</h4>
98 <b>__eq__</b>(<i>other</i>)
99 <p>
100 Special method determining equality.
101 </p><dl>
102 <dt><i>other</i></dt>
103 <dd>
104 reference to the history entry to compare against
105 (HistoryEntry)
106 </dd>
107 </dl><dl>
108 <dt>Returns:</dt>
109 <dd>
110 flag indicating equality (boolean)
111 </dd>
112 </dl><a NAME="HistoryEntry.__lt__" ID="HistoryEntry.__lt__"></a>
113 <h4>HistoryEntry.__lt__</h4>
114 <b>__lt__</b>(<i>other</i>)
115 <p>
116 Special method determining less relation.
117 </p><p>
118 Note: History is sorted in reverse order by date and time
119 </p><dl>
120 <dt><i>other</i></dt>
121 <dd>
122 reference to the history entry to compare against
123 (HistoryEntry)
124 </dd>
125 </dl><dl>
126 <dt>Returns:</dt>
127 <dd>
128 flag indicating less (boolean)
129 </dd>
130 </dl><a NAME="HistoryEntry.userTitle" ID="HistoryEntry.userTitle"></a>
131 <h4>HistoryEntry.userTitle</h4>
132 <b>userTitle</b>(<i></i>)
133 <p>
134 Public method to get the title of the history entry.
135 </p><dl>
136 <dt>Returns:</dt>
137 <dd>
138 title of the entry (string)
139 </dd>
140 </dl>
141 <div align="right"><a href="#top">Up</a></div>
142 <hr /><hr />
143 <a NAME="HistoryManager" ID="HistoryManager"></a>
144 <h2>HistoryManager</h2>
145 <p>
146 Class implementing the history manager.
147 </p><h3>Signals</h3>
148 <dl>
149 <dt>entryAdded(HistoryEntry)</dt>
150 <dd>
151 emitted after a history entry has been
152 added
153 </dd><dt>entryRemoved(HistoryEntry)</dt>
154 <dd>
155 emitted after a history entry has been
156 removed
157 </dd><dt>entryUpdated(int)</dt>
158 <dd>
159 emitted after a history entry has been updated
160 </dd><dt>historyCleared()</dt>
161 <dd>
162 emitted after the history has been cleared
163 </dd><dt>historyReset()</dt>
164 <dd>
165 emitted after the history has been reset
166 </dd><dt>historySaved()</dt>
167 <dd>
168 emitted after the history was saved
169 </dd>
170 </dl>
171 <h3>Derived from</h3>
172 QWebHistoryInterface
173 <h3>Class Attributes</h3>
174 <table>
175 <tr><td>None</td></tr>
176 </table>
177 <h3>Class Methods</h3>
178 <table>
179 <tr><td>None</td></tr>
180 </table>
181 <h3>Methods</h3>
182 <table>
183 <tr>
184 <td><a href="#HistoryManager.__init__">HistoryManager</a></td>
185 <td>Constructor</td>
186 </tr><tr>
187 <td><a href="#HistoryManager.__checkForExpired">__checkForExpired</a></td>
188 <td>Private slot to check entries for expiration.</td>
189 </tr><tr>
190 <td><a href="#HistoryManager.__load">__load</a></td>
191 <td>Private method to load the saved history entries from disk.</td>
192 </tr><tr>
193 <td><a href="#HistoryManager.__refreshFrequencies">__refreshFrequencies</a></td>
194 <td>Private slot to recalculate the refresh frequencies.</td>
195 </tr><tr>
196 <td><a href="#HistoryManager.__startFrequencyTimer">__startFrequencyTimer</a></td>
197 <td>Private method to start the timer to recalculate the frequencies.</td>
198 </tr><tr>
199 <td><a href="#HistoryManager._addHistoryEntry">_addHistoryEntry</a></td>
200 <td>Protected method to add a history item.</td>
201 </tr><tr>
202 <td><a href="#HistoryManager._removeHistoryEntry">_removeHistoryEntry</a></td>
203 <td>Protected method to remove a history item.</td>
204 </tr><tr>
205 <td><a href="#HistoryManager.addHistoryEntry">addHistoryEntry</a></td>
206 <td>Public method to add a history entry.</td>
207 </tr><tr>
208 <td><a href="#HistoryManager.clear">clear</a></td>
209 <td>Public slot to clear the complete history.</td>
210 </tr><tr>
211 <td><a href="#HistoryManager.close">close</a></td>
212 <td>Public method to close the history manager.</td>
213 </tr><tr>
214 <td><a href="#HistoryManager.daysToExpire">daysToExpire</a></td>
215 <td>Public method to get the days for entry expiration.</td>
216 </tr><tr>
217 <td><a href="#HistoryManager.getFileName">getFileName</a></td>
218 <td>Public method to get the file name of the history file.</td>
219 </tr><tr>
220 <td><a href="#HistoryManager.history">history</a></td>
221 <td>Public method to return the history.</td>
222 </tr><tr>
223 <td><a href="#HistoryManager.historyContains">historyContains</a></td>
224 <td>Public method to check the history for an entry.</td>
225 </tr><tr>
226 <td><a href="#HistoryManager.historyFilterModel">historyFilterModel</a></td>
227 <td>Public method to get a reference to the history filter model.</td>
228 </tr><tr>
229 <td><a href="#HistoryManager.historyModel">historyModel</a></td>
230 <td>Public method to get a reference to the history model.</td>
231 </tr><tr>
232 <td><a href="#HistoryManager.historyTreeModel">historyTreeModel</a></td>
233 <td>Public method to get a reference to the history tree model.</td>
234 </tr><tr>
235 <td><a href="#HistoryManager.preferencesChanged">preferencesChanged</a></td>
236 <td>Public method to indicate a change of preferences.</td>
237 </tr><tr>
238 <td><a href="#HistoryManager.reload">reload</a></td>
239 <td>Public method to reload the history.</td>
240 </tr><tr>
241 <td><a href="#HistoryManager.removeHistoryEntry">removeHistoryEntry</a></td>
242 <td>Public method to remove a history entry.</td>
243 </tr><tr>
244 <td><a href="#HistoryManager.save">save</a></td>
245 <td>Public slot to save the history entries to disk.</td>
246 </tr><tr>
247 <td><a href="#HistoryManager.setDaysToExpire">setDaysToExpire</a></td>
248 <td>Public method to set the days for entry expiration.</td>
249 </tr><tr>
250 <td><a href="#HistoryManager.setHistory">setHistory</a></td>
251 <td>Public method to set a new history.</td>
252 </tr><tr>
253 <td><a href="#HistoryManager.updateHistoryEntry">updateHistoryEntry</a></td>
254 <td>Public method to update a history entry.</td>
255 </tr>
256 </table>
257 <h3>Static Methods</h3>
258 <table>
259 <tr><td>None</td></tr>
260 </table>
261 <a NAME="HistoryManager.__init__" ID="HistoryManager.__init__"></a>
262 <h4>HistoryManager (Constructor)</h4>
263 <b>HistoryManager</b>(<i>parent=None</i>)
264 <p>
265 Constructor
266 </p><dl>
267 <dt><i>parent</i></dt>
268 <dd>
269 reference to the parent object (QObject)
270 </dd>
271 </dl><a NAME="HistoryManager.__checkForExpired" ID="HistoryManager.__checkForExpired"></a>
272 <h4>HistoryManager.__checkForExpired</h4>
273 <b>__checkForExpired</b>(<i></i>)
274 <p>
275 Private slot to check entries for expiration.
276 </p><a NAME="HistoryManager.__load" ID="HistoryManager.__load"></a>
277 <h4>HistoryManager.__load</h4>
278 <b>__load</b>(<i></i>)
279 <p>
280 Private method to load the saved history entries from disk.
281 </p><a NAME="HistoryManager.__refreshFrequencies" ID="HistoryManager.__refreshFrequencies"></a>
282 <h4>HistoryManager.__refreshFrequencies</h4>
283 <b>__refreshFrequencies</b>(<i></i>)
284 <p>
285 Private slot to recalculate the refresh frequencies.
286 </p><a NAME="HistoryManager.__startFrequencyTimer" ID="HistoryManager.__startFrequencyTimer"></a>
287 <h4>HistoryManager.__startFrequencyTimer</h4>
288 <b>__startFrequencyTimer</b>(<i></i>)
289 <p>
290 Private method to start the timer to recalculate the frequencies.
291 </p><a NAME="HistoryManager._addHistoryEntry" ID="HistoryManager._addHistoryEntry"></a>
292 <h4>HistoryManager._addHistoryEntry</h4>
293 <b>_addHistoryEntry</b>(<i>itm</i>)
294 <p>
295 Protected method to add a history item.
296 </p><dl>
297 <dt><i>itm</i></dt>
298 <dd>
299 reference to the history item to add (HistoryEntry)
300 </dd>
301 </dl><a NAME="HistoryManager._removeHistoryEntry" ID="HistoryManager._removeHistoryEntry"></a>
302 <h4>HistoryManager._removeHistoryEntry</h4>
303 <b>_removeHistoryEntry</b>(<i>itm</i>)
304 <p>
305 Protected method to remove a history item.
306 </p><dl>
307 <dt><i>itm</i></dt>
308 <dd>
309 reference to the history item to remove (HistoryEntry)
310 </dd>
311 </dl><a NAME="HistoryManager.addHistoryEntry" ID="HistoryManager.addHistoryEntry"></a>
312 <h4>HistoryManager.addHistoryEntry</h4>
313 <b>addHistoryEntry</b>(<i>url</i>)
314 <p>
315 Public method to add a history entry.
316 </p><dl>
317 <dt><i>url</i></dt>
318 <dd>
319 URL to be added (string)
320 </dd>
321 </dl><a NAME="HistoryManager.clear" ID="HistoryManager.clear"></a>
322 <h4>HistoryManager.clear</h4>
323 <b>clear</b>(<i>period=0</i>)
324 <p>
325 Public slot to clear the complete history.
326 </p><dl>
327 <dt><i>period</i></dt>
328 <dd>
329 history period in milliseconds to be cleared (integer)
330 </dd>
331 </dl><a NAME="HistoryManager.close" ID="HistoryManager.close"></a>
332 <h4>HistoryManager.close</h4>
333 <b>close</b>(<i></i>)
334 <p>
335 Public method to close the history manager.
336 </p><a NAME="HistoryManager.daysToExpire" ID="HistoryManager.daysToExpire"></a>
337 <h4>HistoryManager.daysToExpire</h4>
338 <b>daysToExpire</b>(<i></i>)
339 <p>
340 Public method to get the days for entry expiration.
341 </p><dl>
342 <dt>Returns:</dt>
343 <dd>
344 days for entry expiration (integer)
345 </dd>
346 </dl><a NAME="HistoryManager.getFileName" ID="HistoryManager.getFileName"></a>
347 <h4>HistoryManager.getFileName</h4>
348 <b>getFileName</b>(<i></i>)
349 <p>
350 Public method to get the file name of the history file.
351 </p><dl>
352 <dt>Returns:</dt>
353 <dd>
354 name of the history file (string)
355 </dd>
356 </dl><a NAME="HistoryManager.history" ID="HistoryManager.history"></a>
357 <h4>HistoryManager.history</h4>
358 <b>history</b>(<i></i>)
359 <p>
360 Public method to return the history.
361 </p><dl>
362 <dt>Returns:</dt>
363 <dd>
364 reference to the list of history entries (list of HistoryEntry)
365 </dd>
366 </dl><a NAME="HistoryManager.historyContains" ID="HistoryManager.historyContains"></a>
367 <h4>HistoryManager.historyContains</h4>
368 <b>historyContains</b>(<i>url</i>)
369 <p>
370 Public method to check the history for an entry.
371 </p><dl>
372 <dt><i>url</i></dt>
373 <dd>
374 URL to check for (string)
375 </dd>
376 </dl><dl>
377 <dt>Returns:</dt>
378 <dd>
379 flag indicating success (boolean)
380 </dd>
381 </dl><a NAME="HistoryManager.historyFilterModel" ID="HistoryManager.historyFilterModel"></a>
382 <h4>HistoryManager.historyFilterModel</h4>
383 <b>historyFilterModel</b>(<i></i>)
384 <p>
385 Public method to get a reference to the history filter model.
386 </p><dl>
387 <dt>Returns:</dt>
388 <dd>
389 reference to the history filter model (HistoryFilterModel)
390 </dd>
391 </dl><a NAME="HistoryManager.historyModel" ID="HistoryManager.historyModel"></a>
392 <h4>HistoryManager.historyModel</h4>
393 <b>historyModel</b>(<i></i>)
394 <p>
395 Public method to get a reference to the history model.
396 </p><dl>
397 <dt>Returns:</dt>
398 <dd>
399 reference to the history model (HistoryModel)
400 </dd>
401 </dl><a NAME="HistoryManager.historyTreeModel" ID="HistoryManager.historyTreeModel"></a>
402 <h4>HistoryManager.historyTreeModel</h4>
403 <b>historyTreeModel</b>(<i></i>)
404 <p>
405 Public method to get a reference to the history tree model.
406 </p><dl>
407 <dt>Returns:</dt>
408 <dd>
409 reference to the history tree model (HistoryTreeModel)
410 </dd>
411 </dl><a NAME="HistoryManager.preferencesChanged" ID="HistoryManager.preferencesChanged"></a>
412 <h4>HistoryManager.preferencesChanged</h4>
413 <b>preferencesChanged</b>(<i></i>)
414 <p>
415 Public method to indicate a change of preferences.
416 </p><a NAME="HistoryManager.reload" ID="HistoryManager.reload"></a>
417 <h4>HistoryManager.reload</h4>
418 <b>reload</b>(<i></i>)
419 <p>
420 Public method to reload the history.
421 </p><a NAME="HistoryManager.removeHistoryEntry" ID="HistoryManager.removeHistoryEntry"></a>
422 <h4>HistoryManager.removeHistoryEntry</h4>
423 <b>removeHistoryEntry</b>(<i>url, title=""</i>)
424 <p>
425 Public method to remove a history entry.
426 </p><dl>
427 <dt><i>url</i></dt>
428 <dd>
429 URL of the entry to remove (QUrl)
430 </dd><dt><i>title</i></dt>
431 <dd>
432 title of the entry to remove (string)
433 </dd>
434 </dl><a NAME="HistoryManager.save" ID="HistoryManager.save"></a>
435 <h4>HistoryManager.save</h4>
436 <b>save</b>(<i></i>)
437 <p>
438 Public slot to save the history entries to disk.
439 </p><a NAME="HistoryManager.setDaysToExpire" ID="HistoryManager.setDaysToExpire"></a>
440 <h4>HistoryManager.setDaysToExpire</h4>
441 <b>setDaysToExpire</b>(<i>limit</i>)
442 <p>
443 Public method to set the days for entry expiration.
444 </p><dl>
445 <dt><i>limit</i></dt>
446 <dd>
447 days for entry expiration (integer)
448 </dd>
449 </dl><a NAME="HistoryManager.setHistory" ID="HistoryManager.setHistory"></a>
450 <h4>HistoryManager.setHistory</h4>
451 <b>setHistory</b>(<i>history, loadedAndSorted=False</i>)
452 <p>
453 Public method to set a new history.
454 </p><dl>
455 <dt><i>history</i></dt>
456 <dd>
457 reference to the list of history entries to be set
458 (list of HistoryEntry)
459 </dd><dt><i>loadedAndSorted</i></dt>
460 <dd>
461 flag indicating that the list is sorted
462 (boolean)
463 </dd>
464 </dl><a NAME="HistoryManager.updateHistoryEntry" ID="HistoryManager.updateHistoryEntry"></a>
465 <h4>HistoryManager.updateHistoryEntry</h4>
466 <b>updateHistoryEntry</b>(<i>url, title</i>)
467 <p>
468 Public method to update a history entry.
469 </p><dl>
470 <dt><i>url</i></dt>
471 <dd>
472 URL of the entry to update (string)
473 </dd><dt><i>title</i></dt>
474 <dd>
475 title of the entry to update (string)
476 </dd>
477 </dl>
478 <div align="right"><a href="#top">Up</a></div>
479 <hr />
480 </body></html>

eric ide

mercurial