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

changeset 4918
71caf42a13d8
child 5707
1273cd92a8f4
equal deleted inserted replaced
4917:682750cc7bd5 4918:71caf42a13d8
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.WebBrowser.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.WebBrowser.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 QObject
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>Public method to add a history entry.</td>
201 </tr><tr>
202 <td><a href="#HistoryManager.clear">clear</a></td>
203 <td>Public slot to clear the complete history.</td>
204 </tr><tr>
205 <td><a href="#HistoryManager.close">close</a></td>
206 <td>Public method to close the history manager.</td>
207 </tr><tr>
208 <td><a href="#HistoryManager.daysToExpire">daysToExpire</a></td>
209 <td>Public method to get the days for entry expiration.</td>
210 </tr><tr>
211 <td><a href="#HistoryManager.getFileName">getFileName</a></td>
212 <td>Public method to get the file name of the history file.</td>
213 </tr><tr>
214 <td><a href="#HistoryManager.history">history</a></td>
215 <td>Public method to return the history.</td>
216 </tr><tr>
217 <td><a href="#HistoryManager.historyFilterModel">historyFilterModel</a></td>
218 <td>Public method to get a reference to the history filter model.</td>
219 </tr><tr>
220 <td><a href="#HistoryManager.historyModel">historyModel</a></td>
221 <td>Public method to get a reference to the history model.</td>
222 </tr><tr>
223 <td><a href="#HistoryManager.historyTreeModel">historyTreeModel</a></td>
224 <td>Public method to get a reference to the history tree model.</td>
225 </tr><tr>
226 <td><a href="#HistoryManager.preferencesChanged">preferencesChanged</a></td>
227 <td>Public method to indicate a change of preferences.</td>
228 </tr><tr>
229 <td><a href="#HistoryManager.reload">reload</a></td>
230 <td>Public method to reload the history.</td>
231 </tr><tr>
232 <td><a href="#HistoryManager.removeHistoryEntry">removeHistoryEntry</a></td>
233 <td>Public method to remove a history entry.</td>
234 </tr><tr>
235 <td><a href="#HistoryManager.save">save</a></td>
236 <td>Public slot to save the history entries to disk.</td>
237 </tr><tr>
238 <td><a href="#HistoryManager.setDaysToExpire">setDaysToExpire</a></td>
239 <td>Public method to set the days for entry expiration.</td>
240 </tr><tr>
241 <td><a href="#HistoryManager.setHistory">setHistory</a></td>
242 <td>Public method to set a new history.</td>
243 </tr><tr>
244 <td><a href="#HistoryManager.updateHistoryEntry">updateHistoryEntry</a></td>
245 <td>Public method to update a history entry.</td>
246 </tr>
247 </table>
248 <h3>Static Methods</h3>
249 <table>
250 <tr><td>None</td></tr>
251 </table>
252 <a NAME="HistoryManager.__init__" ID="HistoryManager.__init__"></a>
253 <h4>HistoryManager (Constructor)</h4>
254 <b>HistoryManager</b>(<i>parent=None</i>)
255 <p>
256 Constructor
257 </p><dl>
258 <dt><i>parent</i></dt>
259 <dd>
260 reference to the parent object (QObject)
261 </dd>
262 </dl><a NAME="HistoryManager.__checkForExpired" ID="HistoryManager.__checkForExpired"></a>
263 <h4>HistoryManager.__checkForExpired</h4>
264 <b>__checkForExpired</b>(<i></i>)
265 <p>
266 Private slot to check entries for expiration.
267 </p><a NAME="HistoryManager.__load" ID="HistoryManager.__load"></a>
268 <h4>HistoryManager.__load</h4>
269 <b>__load</b>(<i></i>)
270 <p>
271 Private method to load the saved history entries from disk.
272 </p><a NAME="HistoryManager.__refreshFrequencies" ID="HistoryManager.__refreshFrequencies"></a>
273 <h4>HistoryManager.__refreshFrequencies</h4>
274 <b>__refreshFrequencies</b>(<i></i>)
275 <p>
276 Private slot to recalculate the refresh frequencies.
277 </p><a NAME="HistoryManager.__startFrequencyTimer" ID="HistoryManager.__startFrequencyTimer"></a>
278 <h4>HistoryManager.__startFrequencyTimer</h4>
279 <b>__startFrequencyTimer</b>(<i></i>)
280 <p>
281 Private method to start the timer to recalculate the frequencies.
282 </p><a NAME="HistoryManager.addHistoryEntry" ID="HistoryManager.addHistoryEntry"></a>
283 <h4>HistoryManager.addHistoryEntry</h4>
284 <b>addHistoryEntry</b>(<i>view</i>)
285 <p>
286 Public method to add a history entry.
287 </p><dl>
288 <dt><i>view</i> (WebBrowserView)</dt>
289 <dd>
290 reference to the view to add an entry for
291 </dd>
292 </dl><a NAME="HistoryManager.clear" ID="HistoryManager.clear"></a>
293 <h4>HistoryManager.clear</h4>
294 <b>clear</b>(<i>period=0</i>)
295 <p>
296 Public slot to clear the complete history.
297 </p><dl>
298 <dt><i>period</i></dt>
299 <dd>
300 history period in milliseconds to be cleared (integer)
301 </dd>
302 </dl><a NAME="HistoryManager.close" ID="HistoryManager.close"></a>
303 <h4>HistoryManager.close</h4>
304 <b>close</b>(<i></i>)
305 <p>
306 Public method to close the history manager.
307 </p><a NAME="HistoryManager.daysToExpire" ID="HistoryManager.daysToExpire"></a>
308 <h4>HistoryManager.daysToExpire</h4>
309 <b>daysToExpire</b>(<i></i>)
310 <p>
311 Public method to get the days for entry expiration.
312 </p><dl>
313 <dt>Returns:</dt>
314 <dd>
315 days for entry expiration (integer)
316 </dd>
317 </dl><a NAME="HistoryManager.getFileName" ID="HistoryManager.getFileName"></a>
318 <h4>HistoryManager.getFileName</h4>
319 <b>getFileName</b>(<i></i>)
320 <p>
321 Public method to get the file name of the history file.
322 </p><dl>
323 <dt>Returns:</dt>
324 <dd>
325 name of the history file (string)
326 </dd>
327 </dl><a NAME="HistoryManager.history" ID="HistoryManager.history"></a>
328 <h4>HistoryManager.history</h4>
329 <b>history</b>(<i></i>)
330 <p>
331 Public method to return the history.
332 </p><dl>
333 <dt>Returns:</dt>
334 <dd>
335 reference to the list of history entries (list of HistoryEntry)
336 </dd>
337 </dl><a NAME="HistoryManager.historyFilterModel" ID="HistoryManager.historyFilterModel"></a>
338 <h4>HistoryManager.historyFilterModel</h4>
339 <b>historyFilterModel</b>(<i></i>)
340 <p>
341 Public method to get a reference to the history filter model.
342 </p><dl>
343 <dt>Returns:</dt>
344 <dd>
345 reference to the history filter model (HistoryFilterModel)
346 </dd>
347 </dl><a NAME="HistoryManager.historyModel" ID="HistoryManager.historyModel"></a>
348 <h4>HistoryManager.historyModel</h4>
349 <b>historyModel</b>(<i></i>)
350 <p>
351 Public method to get a reference to the history model.
352 </p><dl>
353 <dt>Returns:</dt>
354 <dd>
355 reference to the history model (HistoryModel)
356 </dd>
357 </dl><a NAME="HistoryManager.historyTreeModel" ID="HistoryManager.historyTreeModel"></a>
358 <h4>HistoryManager.historyTreeModel</h4>
359 <b>historyTreeModel</b>(<i></i>)
360 <p>
361 Public method to get a reference to the history tree model.
362 </p><dl>
363 <dt>Returns:</dt>
364 <dd>
365 reference to the history tree model (HistoryTreeModel)
366 </dd>
367 </dl><a NAME="HistoryManager.preferencesChanged" ID="HistoryManager.preferencesChanged"></a>
368 <h4>HistoryManager.preferencesChanged</h4>
369 <b>preferencesChanged</b>(<i></i>)
370 <p>
371 Public method to indicate a change of preferences.
372 </p><a NAME="HistoryManager.reload" ID="HistoryManager.reload"></a>
373 <h4>HistoryManager.reload</h4>
374 <b>reload</b>(<i></i>)
375 <p>
376 Public method to reload the history.
377 </p><a NAME="HistoryManager.removeHistoryEntry" ID="HistoryManager.removeHistoryEntry"></a>
378 <h4>HistoryManager.removeHistoryEntry</h4>
379 <b>removeHistoryEntry</b>(<i>url, title=""</i>)
380 <p>
381 Public method to remove a history entry.
382 </p><dl>
383 <dt><i>url</i></dt>
384 <dd>
385 URL of the entry to remove (QUrl)
386 </dd><dt><i>title</i></dt>
387 <dd>
388 title of the entry to remove (string)
389 </dd>
390 </dl><a NAME="HistoryManager.save" ID="HistoryManager.save"></a>
391 <h4>HistoryManager.save</h4>
392 <b>save</b>(<i></i>)
393 <p>
394 Public slot to save the history entries to disk.
395 </p><a NAME="HistoryManager.setDaysToExpire" ID="HistoryManager.setDaysToExpire"></a>
396 <h4>HistoryManager.setDaysToExpire</h4>
397 <b>setDaysToExpire</b>(<i>limit</i>)
398 <p>
399 Public method to set the days for entry expiration.
400 </p><dl>
401 <dt><i>limit</i></dt>
402 <dd>
403 days for entry expiration (integer)
404 </dd>
405 </dl><a NAME="HistoryManager.setHistory" ID="HistoryManager.setHistory"></a>
406 <h4>HistoryManager.setHistory</h4>
407 <b>setHistory</b>(<i>history, loadedAndSorted=False</i>)
408 <p>
409 Public method to set a new history.
410 </p><dl>
411 <dt><i>history</i></dt>
412 <dd>
413 reference to the list of history entries to be set
414 (list of HistoryEntry)
415 </dd><dt><i>loadedAndSorted</i></dt>
416 <dd>
417 flag indicating that the list is sorted
418 (boolean)
419 </dd>
420 </dl><a NAME="HistoryManager.updateHistoryEntry" ID="HistoryManager.updateHistoryEntry"></a>
421 <h4>HistoryManager.updateHistoryEntry</h4>
422 <b>updateHistoryEntry</b>(<i>url, title</i>)
423 <p>
424 Public method to update a history entry.
425 </p><dl>
426 <dt><i>url</i></dt>
427 <dd>
428 URL of the entry to update (string)
429 </dd><dt><i>title</i></dt>
430 <dd>
431 title of the entry to update (string)
432 </dd>
433 </dl>
434 <div align="right"><a href="#top">Up</a></div>
435 <hr />
436 </body></html>

eric ide

mercurial