Thu, 14 Jan 2010 18:35:52 +0000
Corrected the version docu and regenerated the source docu.
<?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.HistoryTreeModel</title> <style> body { background:white; margin: 0em 1em 10em 1em; color: black; } h1 { color: white; background: #4FA4FF; } h2 { color: white; background: #4FA4FF; } h3 { color: white; background: #00557F; } h4 { color: white; background: #00557F; } a { color: #AA5500; } </style> </head> <body><a NAME="top" ID="top"></a> <h1>eric5.Helpviewer.History.HistoryTreeModel</h1> <p> Module implementing the history tree model. </p> <h3>Global Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#HistoryTreeModel">HistoryTreeModel</a></td> <td>Class implementing the history tree model.</td> </tr> </table> <h3>Functions</h3> <table> <tr><td>None</td></tr> </table> <hr /><hr /> <a NAME="HistoryTreeModel" ID="HistoryTreeModel"></a> <h2>HistoryTreeModel</h2> <p> Class implementing the history tree model. </p> <h3>Derived from</h3> QAbstractProxyModel <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#HistoryTreeModel.__init__">HistoryTreeModel</a></td> <td>Constructor</td> </tr><tr> <td><a href="#HistoryTreeModel.__sourceDateRow">__sourceDateRow</a></td> <td>Private method to translate the top level date row into the offset where that date starts.</td> </tr><tr> <td><a href="#HistoryTreeModel.__sourceReset">__sourceReset</a></td> <td>Private slot to handle a reset of the source model.</td> </tr><tr> <td><a href="#HistoryTreeModel.__sourceRowsInserted">__sourceRowsInserted</a></td> <td>Private slot to handle the insertion of data in the source model.</td> </tr><tr> <td><a href="#HistoryTreeModel.__sourceRowsRemoved">__sourceRowsRemoved</a></td> <td>Private slot to handle the removal of data in the source model.</td> </tr><tr> <td><a href="#HistoryTreeModel.columnCount">columnCount</a></td> <td>Public method to get the number of columns.</td> </tr><tr> <td><a href="#HistoryTreeModel.data">data</a></td> <td>Public method to get data from the model.</td> </tr><tr> <td><a href="#HistoryTreeModel.flags">flags</a></td> <td>Public method to get the item flags.</td> </tr><tr> <td><a href="#HistoryTreeModel.hasChildren">hasChildren</a></td> <td>Public method to check, if an entry has some children.</td> </tr><tr> <td><a href="#HistoryTreeModel.headerData">headerData</a></td> <td>Public method to get the header data.</td> </tr><tr> <td><a href="#HistoryTreeModel.index">index</a></td> <td>Public method to create an index.</td> </tr><tr> <td><a href="#HistoryTreeModel.mapFromSource">mapFromSource</a></td> <td>Public method to map an index to the proxy model index.</td> </tr><tr> <td><a href="#HistoryTreeModel.mapToSource">mapToSource</a></td> <td>Public method to map an index to the source model index.</td> </tr><tr> <td><a href="#HistoryTreeModel.parent">parent</a></td> <td>Public method to get the parent index.</td> </tr><tr> <td><a href="#HistoryTreeModel.removeRows">removeRows</a></td> <td>Public method to remove entries from the model.</td> </tr><tr> <td><a href="#HistoryTreeModel.rowCount">rowCount</a></td> <td>Public method to determine the number of rows.</td> </tr><tr> <td><a href="#HistoryTreeModel.setSourceModel">setSourceModel</a></td> <td>Public method to set the source model.</td> </tr> </table> <a NAME="HistoryTreeModel.__init__" ID="HistoryTreeModel.__init__"></a> <h4>HistoryTreeModel (Constructor)</h4> <b>HistoryTreeModel</b>(<i>sourceModel, parent = None</i>) <p> Constructor </p><dl> <dt><i>sourceModel</i></dt> <dd> reference to the source model (QAbstractItemModel) </dd><dt><i>parent</i></dt> <dd> reference to the parent object (QObject) </dd> </dl><a NAME="HistoryTreeModel.__sourceDateRow" ID="HistoryTreeModel.__sourceDateRow"></a> <h4>HistoryTreeModel.__sourceDateRow</h4> <b>__sourceDateRow</b>(<i>row</i>) <p> Private method to translate the top level date row into the offset where that date starts. </p><dl> <dt><i>row</i></dt> <dd> row number of the date (integer) </dd> </dl><dl> <dt>Returns:</dt> <dd> offset where that date starts (integer) </dd> </dl><a NAME="HistoryTreeModel.__sourceReset" ID="HistoryTreeModel.__sourceReset"></a> <h4>HistoryTreeModel.__sourceReset</h4> <b>__sourceReset</b>(<i></i>) <p> Private slot to handle a reset of the source model. </p><a NAME="HistoryTreeModel.__sourceRowsInserted" ID="HistoryTreeModel.__sourceRowsInserted"></a> <h4>HistoryTreeModel.__sourceRowsInserted</h4> <b>__sourceRowsInserted</b>(<i>parent, start, end</i>) <p> Private slot to handle the insertion of data in the source model. </p><dl> <dt><i>parent</i></dt> <dd> reference to the parent index (QModelIndex) </dd><dt><i>start</i></dt> <dd> start row (integer) </dd><dt><i>end</i></dt> <dd> end row (integer) </dd> </dl><a NAME="HistoryTreeModel.__sourceRowsRemoved" ID="HistoryTreeModel.__sourceRowsRemoved"></a> <h4>HistoryTreeModel.__sourceRowsRemoved</h4> <b>__sourceRowsRemoved</b>(<i>parent, start, end</i>) <p> Private slot to handle the removal of data in the source model. </p><dl> <dt><i>parent</i></dt> <dd> reference to the parent index (QModelIndex) </dd><dt><i>start</i></dt> <dd> start row (integer) </dd><dt><i>end</i></dt> <dd> end row (integer) </dd> </dl><a NAME="HistoryTreeModel.columnCount" ID="HistoryTreeModel.columnCount"></a> <h4>HistoryTreeModel.columnCount</h4> <b>columnCount</b>(<i>parent = QModelIndex()</i>) <p> Public method to get the number of columns. </p><dl> <dt><i>parent</i></dt> <dd> index of parent (QModelIndex) </dd> </dl><dl> <dt>Returns:</dt> <dd> number of columns (integer) </dd> </dl><a NAME="HistoryTreeModel.data" ID="HistoryTreeModel.data"></a> <h4>HistoryTreeModel.data</h4> <b>data</b>(<i>index, role = Qt.DisplayRole</i>) <p> Public method to get data from the model. </p><dl> <dt><i>index</i></dt> <dd> index of history entry to get data for (QModelIndex) </dd><dt><i>role</i></dt> <dd> data role (integer) </dd> </dl><dl> <dt>Returns:</dt> <dd> history entry data </dd> </dl><a NAME="HistoryTreeModel.flags" ID="HistoryTreeModel.flags"></a> <h4>HistoryTreeModel.flags</h4> <b>flags</b>(<i>index</i>) <p> Public method to get the item flags. </p><dl> <dt><i>index</i></dt> <dd> index of the item (QModelIndex) </dd> </dl><dl> <dt>Returns:</dt> <dd> flags (Qt.ItemFlags) </dd> </dl><a NAME="HistoryTreeModel.hasChildren" ID="HistoryTreeModel.hasChildren"></a> <h4>HistoryTreeModel.hasChildren</h4> <b>hasChildren</b>(<i>parent = QModelIndex()</i>) <p> Public method to check, if an entry has some children. </p><dl> <dt><i>parent</i></dt> <dd> index of the entry to check (QModelIndex) </dd> </dl><dl> <dt>Returns:</dt> <dd> flag indicating the presence of children (boolean) </dd> </dl><a NAME="HistoryTreeModel.headerData" ID="HistoryTreeModel.headerData"></a> <h4>HistoryTreeModel.headerData</h4> <b>headerData</b>(<i>section, orientation, role = Qt.DisplayRole</i>) <p> Public method to get the header data. </p><dl> <dt><i>section</i></dt> <dd> section number (integer) </dd><dt><i>orientation</i></dt> <dd> header orientation (Qt.Orientation) </dd><dt><i>role</i></dt> <dd> data role (integer) </dd> </dl><dl> <dt>Returns:</dt> <dd> header data </dd> </dl><a NAME="HistoryTreeModel.index" ID="HistoryTreeModel.index"></a> <h4>HistoryTreeModel.index</h4> <b>index</b>(<i>row, column, parent = QModelIndex()</i>) <p> Public method to create an index. </p><dl> <dt><i>row</i></dt> <dd> row number for the index (integer) </dd><dt><i>column</i></dt> <dd> column number for the index (integer) </dd><dt><i>parent</i></dt> <dd> index of the parent item (QModelIndex) </dd> </dl><dl> <dt>Returns:</dt> <dd> requested index (QModelIndex) </dd> </dl><a NAME="HistoryTreeModel.mapFromSource" ID="HistoryTreeModel.mapFromSource"></a> <h4>HistoryTreeModel.mapFromSource</h4> <b>mapFromSource</b>(<i>sourceIndex</i>) <p> Public method to map an index to the proxy model index. </p><dl> <dt><i>sourceIndex</i></dt> <dd> reference to a source model index (QModelIndex) </dd> </dl><dl> <dt>Returns:</dt> <dd> proxy model index (QModelIndex) </dd> </dl><a NAME="HistoryTreeModel.mapToSource" ID="HistoryTreeModel.mapToSource"></a> <h4>HistoryTreeModel.mapToSource</h4> <b>mapToSource</b>(<i>proxyIndex</i>) <p> Public method to map an index to the source model index. </p><dl> <dt><i>proxyIndex</i></dt> <dd> reference to a proxy model index (QModelIndex) </dd> </dl><dl> <dt>Returns:</dt> <dd> source model index (QModelIndex) </dd> </dl><a NAME="HistoryTreeModel.parent" ID="HistoryTreeModel.parent"></a> <h4>HistoryTreeModel.parent</h4> <b>parent</b>(<i>index</i>) <p> Public method to get the parent index. </p><dl> <dt><i>index</i></dt> <dd> index of item to get parent (QModelIndex) </dd> </dl><dl> <dt>Returns:</dt> <dd> index of parent (QModelIndex) </dd> </dl><a NAME="HistoryTreeModel.removeRows" ID="HistoryTreeModel.removeRows"></a> <h4>HistoryTreeModel.removeRows</h4> <b>removeRows</b>(<i>row, count, parent = QModelIndex()</i>) <p> Public method to remove entries from the model. </p><dl> <dt><i>row</i></dt> <dd> row of the first entry to remove (integer) </dd><dt><i>count</i></dt> <dd> number of entries to remove (integer) </dd><dt><i>index</i></dt> <dd> of the parent entry (QModelIndex) </dd> </dl><dl> <dt>Returns:</dt> <dd> flag indicating successful removal (boolean) </dd> </dl><a NAME="HistoryTreeModel.rowCount" ID="HistoryTreeModel.rowCount"></a> <h4>HistoryTreeModel.rowCount</h4> <b>rowCount</b>(<i>parent = QModelIndex()</i>) <p> Public method to determine the number of rows. </p><dl> <dt><i>parent</i></dt> <dd> index of parent (QModelIndex) </dd> </dl><dl> <dt>Returns:</dt> <dd> number of rows (integer) </dd> </dl><a NAME="HistoryTreeModel.setSourceModel" ID="HistoryTreeModel.setSourceModel"></a> <h4>HistoryTreeModel.setSourceModel</h4> <b>setSourceModel</b>(<i>sourceModel</i>) <p> Public method to set the source model. </p><dl> <dt><i>sourceModel</i></dt> <dd> reference to the source model (QAbstractItemModel) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>