<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html><head><title>QWebHistoryInterface Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm } a:link { color: #004faf; text-decoration: none } a:visited { color: #672967; text-decoration: none } td.postheader { font-family: sans-serif } tr.address { font-family: sans-serif } body { background: #ffffff; color: black; } </style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QWebHistoryInterface Class Reference<br /><sup><sup>[<a href="qtwebkit.html">QtWebKit</a> module]</sup></sup></h1><p>The QWebHistoryInterface class provides an interface to implement link history. <a href="#details">More...</a></p> <p>Inherits <a href="qobject.html">QObject</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qwebhistoryinterface.html#QWebHistoryInterface">__init__</a></b> (<i>self</i>, QObject <i>parent</i> = None)</li><li><div class="fn" /><b><a href="qwebhistoryinterface.html#addHistoryEntry">addHistoryEntry</a></b> (<i>self</i>, QString <i>url</i>)</li><li><div class="fn" />bool <b><a href="qwebhistoryinterface.html#historyContains">historyContains</a></b> (<i>self</i>, QString <i>url</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />QWebHistoryInterface <b><a href="qwebhistoryinterface.html#defaultInterface">defaultInterface</a></b> ()</li><li><div class="fn" /><b><a href="qwebhistoryinterface.html#setDefaultInterface">setDefaultInterface</a></b> (QWebHistoryInterface <i>defaultInterface</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QWebHistoryInterface class provides an interface to implement link history.</p> <p>The QWebHistoryInterface is an interface that can be used to keep track of visited links. It contains two pure virtual methods that are called by the WebKit engine: <a href="qwebhistoryinterface.html#addHistoryEntry">addHistoryEntry</a>() is used to add urls that have been visited to the interface, while <a href="qwebhistoryinterface.html#historyContains">historyContains</a>() is used to query whether the given url has been visited by the user. By default the QWebHistoryInterface is not set, so WebKit does not keep track of visited links.</p> <p><b>Note:</b> The history tracked by QWebHistoryInterface is not specific to an instance of <a href="qwebpage.html">QWebPage</a> but applies to all pages.</p> <hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QWebHistoryInterface" />QWebHistoryInterface.__init__ (<i>self</i>, <a href="qobject.html">QObject</a> <i>parent</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a new <a href="qwebhistoryinterface.html">QWebHistoryInterface</a> with parent <i>parent</i>.</p> <h3 class="fn"><a name="addHistoryEntry" />QWebHistoryInterface.addHistoryEntry (<i>self</i>, QString <i>url</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Called by WebKit to add another <i>url</i> to the list of visited pages.</p> <h3 class="fn"><a name="defaultInterface" /><a href="qwebhistoryinterface.html">QWebHistoryInterface</a> QWebHistoryInterface.defaultInterface ()</h3><p>Returns the default interface that will be used by WebKit. If no default interface has been set, WebKit will not keep track of visited links and a null pointer will be returned.</p> <p><b>See also</b> <a href="qwebhistoryinterface.html#setDefaultInterface">setDefaultInterface</a>().</p> <h3 class="fn"><a name="historyContains" />bool QWebHistoryInterface.historyContains (<i>self</i>, QString <i>url</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Called by the WebKit engine to query whether a certain <i>url</i> has been visited by the user already. Returns true if the <i>url</i> is part of the history of visited links; otherwise returns false.</p> <h3 class="fn"><a name="setDefaultInterface" />QWebHistoryInterface.setDefaultInterface (<a href="qwebhistoryinterface.html">QWebHistoryInterface</a> <i>defaultInterface</i>)</h3><p>Sets a new default interface, <i>defaultInterface</i>, that will be used by all of WebKit to keep track of visited links.</p> <p>If an interface without a parent has already been set, the old interface will be deleted. When the application exists <a href="qwebhistoryinterface.html">QWebHistoryInterface</a> will automatically delete the <i>defaultInterface</i> if it does not have a parent.</p> <p><b>See also</b> <a href="qwebhistoryinterface.html#defaultInterface">defaultInterface</a>().</p> <address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.10.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.5</td></tr></table></div></address></body></html>