--- a/eric6/Documentation/Source/eric6.WebBrowser.History.HistoryCompleter.html Wed Sep 25 19:40:31 2019 +0200 +++ b/eric6/Documentation/Source/eric6.WebBrowser.History.HistoryCompleter.html Wed Sep 25 19:42:44 2019 +0200 @@ -18,229 +18,300 @@ </style> </head> -<body><a NAME="top" ID="top"></a> +<body> +<a NAME="top" ID="top"></a> <h1>eric6.WebBrowser.History.HistoryCompleter</h1> + <p> Module implementing a special completer for the history. </p> <h3>Global Attributes</h3> + <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> + <table> + <tr> <td><a href="#HistoryCompleter">HistoryCompleter</a></td> <td>Class implementing a completer for the browser history.</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompletionModel">HistoryCompletionModel</a></td> <td>Class implementing a special model for history based completions.</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompletionView">HistoryCompletionView</a></td> <td>Class implementing a special completer view for history based completions.</td> </tr> </table> <h3>Functions</h3> + <table> <tr><td>None</td></tr> </table> -<hr /><hr /> +<hr /> +<hr /> <a NAME="HistoryCompleter" ID="HistoryCompleter"></a> <h2>HistoryCompleter</h2> + <p> Class implementing a completer for the browser history. </p> <h3>Derived from</h3> QCompleter <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="#HistoryCompleter.__init__">HistoryCompleter</a></td> <td>Constructor</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompleter.__updateFilter">__updateFilter</a></td> <td>Private slot to update the search string.</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompleter.pathFromIndex">pathFromIndex</a></td> <td>Public method to get a path for a given index.</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompleter.splitPath">splitPath</a></td> <td>Public method to split the given path into strings, that are used to match at each level in the model.</td> </tr> </table> <h3>Static Methods</h3> + <table> <tr><td>None</td></tr> </table> + <a NAME="HistoryCompleter.__init__" ID="HistoryCompleter.__init__"></a> <h4>HistoryCompleter (Constructor)</h4> <b>HistoryCompleter</b>(<i>model, parent=None</i>) + <p> Constructor -</p><dl> +</p> +<dl> + <dt><i>model</i></dt> <dd> reference to the model (QAbstractItemModel) -</dd><dt><i>parent</i></dt> +</dd> +<dt><i>parent</i></dt> <dd> reference to the parent object (QObject) </dd> -</dl><a NAME="HistoryCompleter.__updateFilter" ID="HistoryCompleter.__updateFilter"></a> +</dl> +<a NAME="HistoryCompleter.__updateFilter" ID="HistoryCompleter.__updateFilter"></a> <h4>HistoryCompleter.__updateFilter</h4> <b>__updateFilter</b>(<i></i>) + <p> Private slot to update the search string. -</p><a NAME="HistoryCompleter.pathFromIndex" ID="HistoryCompleter.pathFromIndex"></a> +</p> +<a NAME="HistoryCompleter.pathFromIndex" ID="HistoryCompleter.pathFromIndex"></a> <h4>HistoryCompleter.pathFromIndex</h4> <b>pathFromIndex</b>(<i>idx</i>) + <p> Public method to get a path for a given index. -</p><dl> +</p> +<dl> + <dt><i>idx</i></dt> <dd> reference to the index (QModelIndex) </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> the actual URL from the history (string) </dd> -</dl><a NAME="HistoryCompleter.splitPath" ID="HistoryCompleter.splitPath"></a> +</dl> +<a NAME="HistoryCompleter.splitPath" ID="HistoryCompleter.splitPath"></a> <h4>HistoryCompleter.splitPath</h4> <b>splitPath</b>(<i>path</i>) + <p> Public method to split the given path into strings, that are used to match at each level in the model. -</p><dl> +</p> +<dl> + <dt><i>path</i></dt> <dd> path to be split (string) </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> list of path elements (list of strings) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="HistoryCompletionModel" ID="HistoryCompletionModel"></a> <h2>HistoryCompletionModel</h2> + <p> Class implementing a special model for history based completions. </p> <h3>Derived from</h3> QSortFilterProxyModel <h3>Class Attributes</h3> + <table> <tr><td>HistoryCompletionRole</td></tr> </table> <h3>Class Methods</h3> + <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> + <table> + <tr> <td><a href="#HistoryCompletionModel.__init__">HistoryCompletionModel</a></td> <td>Constructor</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompletionModel.data">data</a></td> <td>Public method to get data from the model.</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompletionModel.filterAcceptsRow">filterAcceptsRow</a></td> <td>Public method to determine, if the row is acceptable.</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompletionModel.isValid">isValid</a></td> <td>Public method to check the model for validity.</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompletionModel.lessThan">lessThan</a></td> <td>Public method used to sort the displayed items.</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompletionModel.searchString">searchString</a></td> <td>Public method to get the current search string.</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompletionModel.setSearchString">setSearchString</a></td> <td>Public method to set the current search string.</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompletionModel.setValid">setValid</a></td> <td>Public method to set the model's validity.</td> </tr> </table> <h3>Static Methods</h3> + <table> <tr><td>None</td></tr> </table> + <a NAME="HistoryCompletionModel.__init__" ID="HistoryCompletionModel.__init__"></a> <h4>HistoryCompletionModel (Constructor)</h4> <b>HistoryCompletionModel</b>(<i>parent=None</i>) + <p> Constructor -</p><dl> +</p> +<dl> + <dt><i>parent</i></dt> <dd> reference to the parent object (QObject) </dd> -</dl><a NAME="HistoryCompletionModel.data" ID="HistoryCompletionModel.data"></a> +</dl> +<a NAME="HistoryCompletionModel.data" ID="HistoryCompletionModel.data"></a> <h4>HistoryCompletionModel.data</h4> <b>data</b>(<i>index, role=Qt.DisplayRole</i>) + <p> Public method to get data from the model. -</p><dl> +</p> +<dl> + <dt><i>index</i></dt> <dd> index of history entry to get data for (QModelIndex) -</dd><dt><i>role</i></dt> +</dd> +<dt><i>role</i></dt> <dd> data role (integer) </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> history entry data </dd> -</dl><a NAME="HistoryCompletionModel.filterAcceptsRow" ID="HistoryCompletionModel.filterAcceptsRow"></a> +</dl> +<a NAME="HistoryCompletionModel.filterAcceptsRow" ID="HistoryCompletionModel.filterAcceptsRow"></a> <h4>HistoryCompletionModel.filterAcceptsRow</h4> <b>filterAcceptsRow</b>(<i>sourceRow, sourceParent</i>) + <p> Public method to determine, if the row is acceptable. -</p><dl> +</p> +<dl> + <dt><i>sourceRow</i></dt> <dd> row number in the source model (integer) -</dd><dt><i>sourceParent</i></dt> +</dd> +<dt><i>sourceParent</i></dt> <dd> index of the source item (QModelIndex) </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> flag indicating acceptance (boolean) </dd> -</dl><a NAME="HistoryCompletionModel.isValid" ID="HistoryCompletionModel.isValid"></a> +</dl> +<a NAME="HistoryCompletionModel.isValid" ID="HistoryCompletionModel.isValid"></a> <h4>HistoryCompletionModel.isValid</h4> <b>isValid</b>(<i></i>) + <p> Public method to check the model for validity. -</p><dl> +</p> +<dl> <dt>Returns:</dt> <dd> flag indicating a valid status (boolean) </dd> -</dl><a NAME="HistoryCompletionModel.lessThan" ID="HistoryCompletionModel.lessThan"></a> +</dl> +<a NAME="HistoryCompletionModel.lessThan" ID="HistoryCompletionModel.lessThan"></a> <h4>HistoryCompletionModel.lessThan</h4> <b>lessThan</b>(<i>left, right</i>) + <p> Public method used to sort the displayed items. -</p><p> +</p> +<p> It implements a special sorting function based on the history entry's frequency giving a bonus to hits that match on a word boundary so that e.g. "dot.python-projects.org" is a better result for typing "dot" than @@ -248,115 +319,152 @@ not the entire URL, since while it makes sense to e.g. give "www.phoronix.com" a bonus for "ph", it does NOT make sense to give "www.yadda.com/foo.php" the bonus. -</p><dl> +</p> +<dl> + <dt><i>left</i></dt> <dd> index of left item (QModelIndex) -</dd><dt><i>right</i></dt> +</dd> +<dt><i>right</i></dt> <dd> index of right item (QModelIndex) </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> true, if left is less than right (boolean) </dd> -</dl><a NAME="HistoryCompletionModel.searchString" ID="HistoryCompletionModel.searchString"></a> +</dl> +<a NAME="HistoryCompletionModel.searchString" ID="HistoryCompletionModel.searchString"></a> <h4>HistoryCompletionModel.searchString</h4> <b>searchString</b>(<i></i>) + <p> Public method to get the current search string. -</p><dl> +</p> +<dl> <dt>Returns:</dt> <dd> current search string (string) </dd> -</dl><a NAME="HistoryCompletionModel.setSearchString" ID="HistoryCompletionModel.setSearchString"></a> +</dl> +<a NAME="HistoryCompletionModel.setSearchString" ID="HistoryCompletionModel.setSearchString"></a> <h4>HistoryCompletionModel.setSearchString</h4> <b>setSearchString</b>(<i>string</i>) + <p> Public method to set the current search string. -</p><dl> +</p> +<dl> + <dt><i>string</i></dt> <dd> new search string (string) </dd> -</dl><a NAME="HistoryCompletionModel.setValid" ID="HistoryCompletionModel.setValid"></a> +</dl> +<a NAME="HistoryCompletionModel.setValid" ID="HistoryCompletionModel.setValid"></a> <h4>HistoryCompletionModel.setValid</h4> <b>setValid</b>(<i>valid</i>) + <p> Public method to set the model's validity. -</p><dl> +</p> +<dl> + <dt><i>valid</i></dt> <dd> flag indicating the new valid status (boolean) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="HistoryCompletionView" ID="HistoryCompletionView"></a> <h2>HistoryCompletionView</h2> + <p> Class implementing a special completer view for history based completions. </p> <h3>Derived from</h3> QTableView <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="#HistoryCompletionView.__init__">HistoryCompletionView</a></td> <td>Constructor</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompletionView.resizeEvent">resizeEvent</a></td> <td>Protected method handling resize events.</td> -</tr><tr> +</tr> +<tr> <td><a href="#HistoryCompletionView.sizeHintForRow">sizeHintForRow</a></td> <td>Public method to give a size hint for rows.</td> </tr> </table> <h3>Static Methods</h3> + <table> <tr><td>None</td></tr> </table> + <a NAME="HistoryCompletionView.__init__" ID="HistoryCompletionView.__init__"></a> <h4>HistoryCompletionView (Constructor)</h4> <b>HistoryCompletionView</b>(<i>parent=None</i>) + <p> Constructor -</p><dl> +</p> +<dl> + <dt><i>parent</i></dt> <dd> reference to the parent widget (QWidget) </dd> -</dl><a NAME="HistoryCompletionView.resizeEvent" ID="HistoryCompletionView.resizeEvent"></a> +</dl> +<a NAME="HistoryCompletionView.resizeEvent" ID="HistoryCompletionView.resizeEvent"></a> <h4>HistoryCompletionView.resizeEvent</h4> <b>resizeEvent</b>(<i>evt</i>) + <p> Protected method handling resize events. -</p><dl> +</p> +<dl> + <dt><i>evt</i></dt> <dd> reference to the resize event (QResizeEvent) </dd> -</dl><a NAME="HistoryCompletionView.sizeHintForRow" ID="HistoryCompletionView.sizeHintForRow"></a> +</dl> +<a NAME="HistoryCompletionView.sizeHintForRow" ID="HistoryCompletionView.sizeHintForRow"></a> <h4>HistoryCompletionView.sizeHintForRow</h4> <b>sizeHintForRow</b>(<i>row</i>) + <p> Public method to give a size hint for rows. -</p><dl> +</p> +<dl> + <dt><i>row</i></dt> <dd> row number (integer) </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> desired row height (integer)