Sat, 20 Aug 2011 16:30:49 +0200
Updated source docu with new soutce documentor.
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html><head> <title>eric5.Helpviewer.History.HistoryManager</title> <style> body { background: #EDECE6; margin: 0em 1em 10em 1em; color: black; } h1 { color: white; background: #85774A; } h2 { color: white; background: #85774A; } h3 { color: white; background: #9D936E; } h4 { color: white; background: #9D936E; } a { color: #BA6D36; } </style> </head> <body><a NAME="top" ID="top"></a> <h1>eric5.Helpviewer.History.HistoryManager</h1> <p> Module implementing the history manager. </p> <h3>Global Attributes</h3> <table> <tr><td>HISTORY_VERSION</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#HistoryEntry">HistoryEntry</a></td> <td>Class implementing a history entry.</td> </tr><tr> <td><a href="#HistoryManager">HistoryManager</a></td> <td>Class implementing the history manager.</td> </tr> </table> <h3>Functions</h3> <table> <tr><td>None</td></tr> </table> <hr /><hr /> <a NAME="HistoryEntry" ID="HistoryEntry"></a> <h2>HistoryEntry</h2> <p> Class implementing a history entry. </p> <h3>Derived from</h3> object <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#HistoryEntry.__eq__">__eq__</a></td> <td>Special method determining equality.</td> </tr><tr> <td><a href="#HistoryEntry.__lt__">__lt__</a></td> <td>Special method determining less relation.</td> </tr><tr> <td><a href="#HistoryEntry.userTitle">userTitle</a></td> <td>Public method to get the title of the history entry.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="HistoryEntry.__init__" ID="HistoryEntry.__init__"></a> <h4>HistoryEntry (Constructor)</h4> <b>HistoryEntry</b>(<i>url=None, dateTime=None, title=None</i>) <p> Constructor </p><dl> <dt><i>url</i></dt> <dd> URL of the history entry (string) </dd><dt><i>dateTime</i></dt> <dd> date and time this entry was created (QDateTime) </dd><dt><i>title</i></dt> <dd> title string for the history entry (string) </dd> </dl><a NAME="HistoryEntry.__eq__" ID="HistoryEntry.__eq__"></a> <h4>HistoryEntry.__eq__</h4> <b>__eq__</b>(<i>other</i>) <p> Special method determining equality. </p><dl> <dt><i>other</i></dt> <dd> reference to the history entry to compare against (HistoryEntry) </dd> </dl><dl> <dt>Returns:</dt> <dd> flag indicating equality (boolean) </dd> </dl><a NAME="HistoryEntry.__lt__" ID="HistoryEntry.__lt__"></a> <h4>HistoryEntry.__lt__</h4> <b>__lt__</b>(<i>other</i>) <p> Special method determining less relation. </p><p> Note: History is sorted in reverse order by date and time </p><dl> <dt><i>other</i></dt> <dd> reference to the history entry to compare against (HistoryEntry) </dd> </dl><dl> <dt>Returns:</dt> <dd> flag indicating less (boolean) </dd> </dl><a NAME="HistoryEntry.userTitle" ID="HistoryEntry.userTitle"></a> <h4>HistoryEntry.userTitle</h4> <b>userTitle</b>(<i></i>) <p> Public method to get the title of the history entry. </p><dl> <dt>Returns:</dt> <dd> title of the entry (string) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="HistoryManager" ID="HistoryManager"></a> <h2>HistoryManager</h2> <p> Class implementing the history manager. </p><h3>Signals</h3> <dl> <dt>entryAdded(HistoryEntry)</dt> <dd> emitted after a history entry has been added </dd><dt>entryRemoved(HistoryEntry)</dt> <dd> emitted after a history entry has been removed </dd><dt>entryUpdated(int)</dt> <dd> emitted after a history entry has been updated </dd><dt>historyCleared()</dt> <dd> emitted after the history has been cleared </dd><dt>historyReset()</dt> <dd> emitted after the history has been reset </dd> </dl> <h3>Derived from</h3> QWebHistoryInterface <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#HistoryManager.__checkForExpired">__checkForExpired</a></td> <td>Private slot to check entries for expiration.</td> </tr><tr> <td><a href="#HistoryManager.__load">__load</a></td> <td>Private method to load the saved history entries from disk.</td> </tr><tr> <td><a href="#HistoryManager.__refreshFrequencies">__refreshFrequencies</a></td> <td>Private slot to recalculate the refresh frequencies.</td> </tr><tr> <td><a href="#HistoryManager.__startFrequencyTimer">__startFrequencyTimer</a></td> <td>Private method to start the timer to recalculate the frequencies.</td> </tr><tr> <td><a href="#HistoryManager._addHistoryEntry">_addHistoryEntry</a></td> <td>Protected method to add a history item.</td> </tr><tr> <td><a href="#HistoryManager._removeHistoryEntry">_removeHistoryEntry</a></td> <td>Protected method to remove a history item.</td> </tr><tr> <td><a href="#HistoryManager.addHistoryEntry">addHistoryEntry</a></td> <td>Public method to add a history entry.</td> </tr><tr> <td><a href="#HistoryManager.clear">clear</a></td> <td>Public slot to clear the complete history.</td> </tr><tr> <td><a href="#HistoryManager.close">close</a></td> <td>Public method to close the history manager.</td> </tr><tr> <td><a href="#HistoryManager.daysToExpire">daysToExpire</a></td> <td>Public method to get the days for entry expiration.</td> </tr><tr> <td><a href="#HistoryManager.history">history</a></td> <td>Public method to return the history.</td> </tr><tr> <td><a href="#HistoryManager.historyContains">historyContains</a></td> <td>Public method to check the history for an entry.</td> </tr><tr> <td><a href="#HistoryManager.historyFilterModel">historyFilterModel</a></td> <td>Public method to get a reference to the history filter model.</td> </tr><tr> <td><a href="#HistoryManager.historyModel">historyModel</a></td> <td>Public method to get a reference to the history model.</td> </tr><tr> <td><a href="#HistoryManager.historyTreeModel">historyTreeModel</a></td> <td>Public method to get a reference to the history tree model.</td> </tr><tr> <td><a href="#HistoryManager.preferencesChanged">preferencesChanged</a></td> <td>Public method to indicate a change of preferences.</td> </tr><tr> <td><a href="#HistoryManager.removeHistoryEntry">removeHistoryEntry</a></td> <td>Public method to remove a history entry.</td> </tr><tr> <td><a href="#HistoryManager.save">save</a></td> <td>Public slot to save the history entries to disk.</td> </tr><tr> <td><a href="#HistoryManager.setDaysToExpire">setDaysToExpire</a></td> <td>Public method to set the days for entry expiration.</td> </tr><tr> <td><a href="#HistoryManager.setHistory">setHistory</a></td> <td>Public method to set a new history.</td> </tr><tr> <td><a href="#HistoryManager.updateHistoryEntry">updateHistoryEntry</a></td> <td>Public method to update a history entry.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="HistoryManager.__init__" ID="HistoryManager.__init__"></a> <h4>HistoryManager (Constructor)</h4> <b>HistoryManager</b>(<i>parent=None</i>) <p> Constructor </p><dl> <dt><i>parent</i></dt> <dd> reference to the parent object (QObject) </dd> </dl><a NAME="HistoryManager.__checkForExpired" ID="HistoryManager.__checkForExpired"></a> <h4>HistoryManager.__checkForExpired</h4> <b>__checkForExpired</b>(<i></i>) <p> Private slot to check entries for expiration. </p><a NAME="HistoryManager.__load" ID="HistoryManager.__load"></a> <h4>HistoryManager.__load</h4> <b>__load</b>(<i></i>) <p> Private method to load the saved history entries from disk. </p><a NAME="HistoryManager.__refreshFrequencies" ID="HistoryManager.__refreshFrequencies"></a> <h4>HistoryManager.__refreshFrequencies</h4> <b>__refreshFrequencies</b>(<i></i>) <p> Private slot to recalculate the refresh frequencies. </p><a NAME="HistoryManager.__startFrequencyTimer" ID="HistoryManager.__startFrequencyTimer"></a> <h4>HistoryManager.__startFrequencyTimer</h4> <b>__startFrequencyTimer</b>(<i></i>) <p> Private method to start the timer to recalculate the frequencies. </p><a NAME="HistoryManager._addHistoryEntry" ID="HistoryManager._addHistoryEntry"></a> <h4>HistoryManager._addHistoryEntry</h4> <b>_addHistoryEntry</b>(<i>itm</i>) <p> Protected method to add a history item. </p><dl> <dt><i>itm</i></dt> <dd> reference to the history item to add (HistoryEntry) </dd> </dl><a NAME="HistoryManager._removeHistoryEntry" ID="HistoryManager._removeHistoryEntry"></a> <h4>HistoryManager._removeHistoryEntry</h4> <b>_removeHistoryEntry</b>(<i>itm</i>) <p> Protected method to remove a history item. </p><dl> <dt><i>itm</i></dt> <dd> reference to the history item to remove (HistoryEntry) </dd> </dl><a NAME="HistoryManager.addHistoryEntry" ID="HistoryManager.addHistoryEntry"></a> <h4>HistoryManager.addHistoryEntry</h4> <b>addHistoryEntry</b>(<i>url</i>) <p> Public method to add a history entry. </p><dl> <dt><i>url</i></dt> <dd> URL to be added (string) </dd> </dl><a NAME="HistoryManager.clear" ID="HistoryManager.clear"></a> <h4>HistoryManager.clear</h4> <b>clear</b>(<i></i>) <p> Public slot to clear the complete history. </p><a NAME="HistoryManager.close" ID="HistoryManager.close"></a> <h4>HistoryManager.close</h4> <b>close</b>(<i></i>) <p> Public method to close the history manager. </p><a NAME="HistoryManager.daysToExpire" ID="HistoryManager.daysToExpire"></a> <h4>HistoryManager.daysToExpire</h4> <b>daysToExpire</b>(<i></i>) <p> Public method to get the days for entry expiration. </p><dl> <dt>Returns:</dt> <dd> days for entry expiration (integer) </dd> </dl><a NAME="HistoryManager.history" ID="HistoryManager.history"></a> <h4>HistoryManager.history</h4> <b>history</b>(<i></i>) <p> Public method to return the history. </p><dl> <dt>Returns:</dt> <dd> reference to the list of history entries (list of HistoryEntry) </dd> </dl><a NAME="HistoryManager.historyContains" ID="HistoryManager.historyContains"></a> <h4>HistoryManager.historyContains</h4> <b>historyContains</b>(<i>url</i>) <p> Public method to check the history for an entry. </p><dl> <dt><i>url</i></dt> <dd> URL to check for (string) </dd> </dl><dl> <dt>Returns:</dt> <dd> flag indicating success (boolean) </dd> </dl><a NAME="HistoryManager.historyFilterModel" ID="HistoryManager.historyFilterModel"></a> <h4>HistoryManager.historyFilterModel</h4> <b>historyFilterModel</b>(<i></i>) <p> Public method to get a reference to the history filter model. </p><dl> <dt>Returns:</dt> <dd> reference to the history filter model (HistoryFilterModel) </dd> </dl><a NAME="HistoryManager.historyModel" ID="HistoryManager.historyModel"></a> <h4>HistoryManager.historyModel</h4> <b>historyModel</b>(<i></i>) <p> Public method to get a reference to the history model. </p><dl> <dt>Returns:</dt> <dd> reference to the history model (HistoryModel) </dd> </dl><a NAME="HistoryManager.historyTreeModel" ID="HistoryManager.historyTreeModel"></a> <h4>HistoryManager.historyTreeModel</h4> <b>historyTreeModel</b>(<i></i>) <p> Public method to get a reference to the history tree model. </p><dl> <dt>Returns:</dt> <dd> reference to the history tree model (HistoryTreeModel) </dd> </dl><a NAME="HistoryManager.preferencesChanged" ID="HistoryManager.preferencesChanged"></a> <h4>HistoryManager.preferencesChanged</h4> <b>preferencesChanged</b>(<i></i>) <p> Public method to indicate a change of preferences. </p><a NAME="HistoryManager.removeHistoryEntry" ID="HistoryManager.removeHistoryEntry"></a> <h4>HistoryManager.removeHistoryEntry</h4> <b>removeHistoryEntry</b>(<i>url, title=""</i>) <p> Public method to remove a history entry. </p><dl> <dt><i>url</i></dt> <dd> URL of the entry to remove (QUrl) </dd><dt><i>title</i></dt> <dd> title of the entry to remove (string) </dd> </dl><a NAME="HistoryManager.save" ID="HistoryManager.save"></a> <h4>HistoryManager.save</h4> <b>save</b>(<i></i>) <p> Public slot to save the history entries to disk. </p><a NAME="HistoryManager.setDaysToExpire" ID="HistoryManager.setDaysToExpire"></a> <h4>HistoryManager.setDaysToExpire</h4> <b>setDaysToExpire</b>(<i>limit</i>) <p> Public method to set the days for entry expiration. </p><dl> <dt><i>limit</i></dt> <dd> days for entry expiration (integer) </dd> </dl><a NAME="HistoryManager.setHistory" ID="HistoryManager.setHistory"></a> <h4>HistoryManager.setHistory</h4> <b>setHistory</b>(<i>history, loadedAndSorted=False</i>) <p> Public method to set a new history. </p><dl> <dt><i>history</i></dt> <dd> reference to the list of history entries to be set (list of HistoryEntry) </dd><dt><i>loadedAndSorted</i></dt> <dd> flag indicating that the list is sorted (boolean) </dd> </dl><a NAME="HistoryManager.updateHistoryEntry" ID="HistoryManager.updateHistoryEntry"></a> <h4>HistoryManager.updateHistoryEntry</h4> <b>updateHistoryEntry</b>(<i>url, title</i>) <p> Public method to update a history entry. </p><dl> <dt><i>url</i></dt> <dd> URL of the entry to update (string) </dd><dt><i>title</i></dt> <dd> title of the entry to update (string) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>