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

changeset 5707
1273cd92a8f4
parent 4918
71caf42a13d8
child 6695
0a51887c13cd
equal deleted inserted replaced
5706:59458b006d76 5707:1273cd92a8f4
23 <p> 23 <p>
24 Module implementing the history manager. 24 Module implementing the history manager.
25 </p> 25 </p>
26 <h3>Global Attributes</h3> 26 <h3>Global Attributes</h3>
27 <table> 27 <table>
28 <tr><td>HISTORY_VERSION</td></tr> 28 <tr><td>HISTORY_VERSIONS</td></tr><tr><td>HISTORY_VERSION_42</td></tr><tr><td>HISTORY_VERSION_60</td></tr>
29 </table> 29 </table>
30 <h3>Classes</h3> 30 <h3>Classes</h3>
31 <table> 31 <table>
32 <tr> 32 <tr>
33 <td><a href="#HistoryEntry">HistoryEntry</a></td> 33 <td><a href="#HistoryEntry">HistoryEntry</a></td>
67 <td>Special method determining equality.</td> 67 <td>Special method determining equality.</td>
68 </tr><tr> 68 </tr><tr>
69 <td><a href="#HistoryEntry.__lt__">__lt__</a></td> 69 <td><a href="#HistoryEntry.__lt__">__lt__</a></td>
70 <td>Special method determining less relation.</td> 70 <td>Special method determining less relation.</td>
71 </tr><tr> 71 </tr><tr>
72 <td><a href="#HistoryEntry.isValid">isValid</a></td>
73 <td>Public method to determine validity.</td>
74 </tr><tr>
72 <td><a href="#HistoryEntry.userTitle">userTitle</a></td> 75 <td><a href="#HistoryEntry.userTitle">userTitle</a></td>
73 <td>Public method to get the title of the history entry.</td> 76 <td>Public method to get the title of the history entry.</td>
74 </tr> 77 </tr>
75 </table> 78 </table>
76 <h3>Static Methods</h3> 79 <h3>Static Methods</h3>
77 <table> 80 <table>
78 <tr><td>None</td></tr> 81 <tr><td>None</td></tr>
79 </table> 82 </table>
80 <a NAME="HistoryEntry.__init__" ID="HistoryEntry.__init__"></a> 83 <a NAME="HistoryEntry.__init__" ID="HistoryEntry.__init__"></a>
81 <h4>HistoryEntry (Constructor)</h4> 84 <h4>HistoryEntry (Constructor)</h4>
82 <b>HistoryEntry</b>(<i>url=None, dateTime=None, title=None</i>) 85 <b>HistoryEntry</b>(<i>url=None, dateTime=None, title=None, visitCount=None</i>)
83 <p> 86 <p>
84 Constructor 87 Constructor
85 </p><dl> 88 </p><dl>
86 <dt><i>url</i></dt> 89 <dt><i>url</i></dt>
87 <dd> 90 <dd>
90 <dd> 93 <dd>
91 date and time this entry was created (QDateTime) 94 date and time this entry was created (QDateTime)
92 </dd><dt><i>title</i></dt> 95 </dd><dt><i>title</i></dt>
93 <dd> 96 <dd>
94 title string for the history entry (string) 97 title string for the history entry (string)
98 </dd><dt><i>visitCount</i></dt>
99 <dd>
100 number of visits of this URL (int)
95 </dd> 101 </dd>
96 </dl><a NAME="HistoryEntry.__eq__" ID="HistoryEntry.__eq__"></a> 102 </dl><a NAME="HistoryEntry.__eq__" ID="HistoryEntry.__eq__"></a>
97 <h4>HistoryEntry.__eq__</h4> 103 <h4>HistoryEntry.__eq__</h4>
98 <b>__eq__</b>(<i>other</i>) 104 <b>__eq__</b>(<i>other</i>)
99 <p> 105 <p>
124 </dd> 130 </dd>
125 </dl><dl> 131 </dl><dl>
126 <dt>Returns:</dt> 132 <dt>Returns:</dt>
127 <dd> 133 <dd>
128 flag indicating less (boolean) 134 flag indicating less (boolean)
135 </dd>
136 </dl><a NAME="HistoryEntry.isValid" ID="HistoryEntry.isValid"></a>
137 <h4>HistoryEntry.isValid</h4>
138 <b>isValid</b>(<i></i>)
139 <p>
140 Public method to determine validity.
141 </p><dl>
142 <dt>Returns:</dt>
143 <dd>
144 flag indicating validity
145 </dd>
146 </dl><dl>
147 <dt>Return Type:</dt>
148 <dd>
149 bool
129 </dd> 150 </dd>
130 </dl><a NAME="HistoryEntry.userTitle" ID="HistoryEntry.userTitle"></a> 151 </dl><a NAME="HistoryEntry.userTitle" ID="HistoryEntry.userTitle"></a>
131 <h4>HistoryEntry.userTitle</h4> 152 <h4>HistoryEntry.userTitle</h4>
132 <b>userTitle</b>(<i></i>) 153 <b>userTitle</b>(<i></i>)
133 <p> 154 <p>
185 <td>Constructor</td> 206 <td>Constructor</td>
186 </tr><tr> 207 </tr><tr>
187 <td><a href="#HistoryManager.__checkForExpired">__checkForExpired</a></td> 208 <td><a href="#HistoryManager.__checkForExpired">__checkForExpired</a></td>
188 <td>Private slot to check entries for expiration.</td> 209 <td>Private slot to check entries for expiration.</td>
189 </tr><tr> 210 </tr><tr>
211 <td><a href="#HistoryManager.__cleanUrl">__cleanUrl</a></td>
212 <td>Private method to generate a clean URL usable for the history entry.</td>
213 </tr><tr>
214 <td><a href="#HistoryManager.__cleanUrlStr">__cleanUrlStr</a></td>
215 <td>Private method to generate a clean URL usable for the history entry.</td>
216 </tr><tr>
217 <td><a href="#HistoryManager.__findFirstHistoryEntry">__findFirstHistoryEntry</a></td>
218 <td>Private method to find the first entry for the given URL.</td>
219 </tr><tr>
190 <td><a href="#HistoryManager.__load">__load</a></td> 220 <td><a href="#HistoryManager.__load">__load</a></td>
191 <td>Private method to load the saved history entries from disk.</td> 221 <td>Private method to load the saved history entries from disk.</td>
192 </tr><tr> 222 </tr><tr>
193 <td><a href="#HistoryManager.__refreshFrequencies">__refreshFrequencies</a></td> 223 <td><a href="#HistoryManager.__refreshFrequencies">__refreshFrequencies</a></td>
194 <td>Private slot to recalculate the refresh frequencies.</td> 224 <td>Private slot to recalculate the refresh frequencies.</td>
195 </tr><tr> 225 </tr><tr>
196 <td><a href="#HistoryManager.__startFrequencyTimer">__startFrequencyTimer</a></td> 226 <td><a href="#HistoryManager.__startFrequencyTimer">__startFrequencyTimer</a></td>
197 <td>Private method to start the timer to recalculate the frequencies.</td> 227 <td>Private method to start the timer to recalculate the frequencies.</td>
228 </tr><tr>
229 <td><a href="#HistoryManager.__updateVisitCount">__updateVisitCount</a></td>
230 <td>Private method to update the visit count for all entries of the given URL.</td>
198 </tr><tr> 231 </tr><tr>
199 <td><a href="#HistoryManager.addHistoryEntry">addHistoryEntry</a></td> 232 <td><a href="#HistoryManager.addHistoryEntry">addHistoryEntry</a></td>
200 <td>Public method to add a history entry.</td> 233 <td>Public method to add a history entry.</td>
201 </tr><tr> 234 </tr><tr>
202 <td><a href="#HistoryManager.clear">clear</a></td> 235 <td><a href="#HistoryManager.clear">clear</a></td>
262 </dl><a NAME="HistoryManager.__checkForExpired" ID="HistoryManager.__checkForExpired"></a> 295 </dl><a NAME="HistoryManager.__checkForExpired" ID="HistoryManager.__checkForExpired"></a>
263 <h4>HistoryManager.__checkForExpired</h4> 296 <h4>HistoryManager.__checkForExpired</h4>
264 <b>__checkForExpired</b>(<i></i>) 297 <b>__checkForExpired</b>(<i></i>)
265 <p> 298 <p>
266 Private slot to check entries for expiration. 299 Private slot to check entries for expiration.
267 </p><a NAME="HistoryManager.__load" ID="HistoryManager.__load"></a> 300 </p><a NAME="HistoryManager.__cleanUrl" ID="HistoryManager.__cleanUrl"></a>
301 <h4>HistoryManager.__cleanUrl</h4>
302 <b>__cleanUrl</b>(<i>url</i>)
303 <p>
304 Private method to generate a clean URL usable for the history entry.
305 </p><dl>
306 <dt><i>url</i> (QUrl)</dt>
307 <dd>
308 original URL
309 </dd>
310 </dl><dl>
311 <dt>Returns:</dt>
312 <dd>
313 cleaned URL
314 </dd>
315 </dl><dl>
316 <dt>Return Type:</dt>
317 <dd>
318 QUrl
319 </dd>
320 </dl><a NAME="HistoryManager.__cleanUrlStr" ID="HistoryManager.__cleanUrlStr"></a>
321 <h4>HistoryManager.__cleanUrlStr</h4>
322 <b>__cleanUrlStr</b>(<i>url</i>)
323 <p>
324 Private method to generate a clean URL usable for the history entry.
325 </p><dl>
326 <dt><i>url</i> (QUrl)</dt>
327 <dd>
328 original URL
329 </dd>
330 </dl><dl>
331 <dt>Returns:</dt>
332 <dd>
333 cleaned URL
334 </dd>
335 </dl><dl>
336 <dt>Return Type:</dt>
337 <dd>
338 str
339 </dd>
340 </dl><a NAME="HistoryManager.__findFirstHistoryEntry" ID="HistoryManager.__findFirstHistoryEntry"></a>
341 <h4>HistoryManager.__findFirstHistoryEntry</h4>
342 <b>__findFirstHistoryEntry</b>(<i>url</i>)
343 <p>
344 Private method to find the first entry for the given URL.
345 </p><dl>
346 <dt><i>url</i> (str)</dt>
347 <dd>
348 URL to search for
349 </dd>
350 </dl><dl>
351 <dt>Returns:</dt>
352 <dd>
353 first entry for the given URL
354 </dd>
355 </dl><dl>
356 <dt>Return Type:</dt>
357 <dd>
358 HistoryEntry
359 </dd>
360 </dl><a NAME="HistoryManager.__load" ID="HistoryManager.__load"></a>
268 <h4>HistoryManager.__load</h4> 361 <h4>HistoryManager.__load</h4>
269 <b>__load</b>(<i></i>) 362 <b>__load</b>(<i></i>)
270 <p> 363 <p>
271 Private method to load the saved history entries from disk. 364 Private method to load the saved history entries from disk.
272 </p><a NAME="HistoryManager.__refreshFrequencies" ID="HistoryManager.__refreshFrequencies"></a> 365 </p><a NAME="HistoryManager.__refreshFrequencies" ID="HistoryManager.__refreshFrequencies"></a>
277 </p><a NAME="HistoryManager.__startFrequencyTimer" ID="HistoryManager.__startFrequencyTimer"></a> 370 </p><a NAME="HistoryManager.__startFrequencyTimer" ID="HistoryManager.__startFrequencyTimer"></a>
278 <h4>HistoryManager.__startFrequencyTimer</h4> 371 <h4>HistoryManager.__startFrequencyTimer</h4>
279 <b>__startFrequencyTimer</b>(<i></i>) 372 <b>__startFrequencyTimer</b>(<i></i>)
280 <p> 373 <p>
281 Private method to start the timer to recalculate the frequencies. 374 Private method to start the timer to recalculate the frequencies.
282 </p><a NAME="HistoryManager.addHistoryEntry" ID="HistoryManager.addHistoryEntry"></a> 375 </p><a NAME="HistoryManager.__updateVisitCount" ID="HistoryManager.__updateVisitCount"></a>
376 <h4>HistoryManager.__updateVisitCount</h4>
377 <b>__updateVisitCount</b>(<i>url, count</i>)
378 <p>
379 Private method to update the visit count for all entries of the
380 given URL.
381 </p><dl>
382 <dt><i>url</i> (str)</dt>
383 <dd>
384 URL to be updated
385 </dd><dt><i>count</i> (int)</dt>
386 <dd>
387 new visit count
388 </dd>
389 </dl><a NAME="HistoryManager.addHistoryEntry" ID="HistoryManager.addHistoryEntry"></a>
283 <h4>HistoryManager.addHistoryEntry</h4> 390 <h4>HistoryManager.addHistoryEntry</h4>
284 <b>addHistoryEntry</b>(<i>view</i>) 391 <b>addHistoryEntry</b>(<i>view</i>)
285 <p> 392 <p>
286 Public method to add a history entry. 393 Public method to add a history entry.
287 </p><dl> 394 </p><dl>

eric ide

mercurial