Documentation/Source/eric4.Helpviewer.History.HistoryTreeModel.html

changeset 3
0d9daebf5b8c
child 7
c679fb30c8f3
equal deleted inserted replaced
2:bc6196164237 3:0d9daebf5b8c
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4 <html><head>
5 <title>eric4.Helpviewer.History.HistoryTreeModel</title>
6 <style>
7 body {
8 background:white;
9 margin: 0em 1em 10em 1em;
10 color: black;
11 }
12
13 h1 { color: white; background: #4FA4FF; }
14 h2 { color: white; background: #4FA4FF; }
15 h3 { color: white; background: #00557F; }
16 h4 { color: white; background: #00557F; }
17
18 a { color: #AA5500; }
19
20 </style>
21 </head>
22 <body><a NAME="top" ID="top"></a>
23 <h1>eric4.Helpviewer.History.HistoryTreeModel</h1>
24 <p>
25 Module implementing the history tree model.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#HistoryTreeModel">HistoryTreeModel</a></td>
35 <td>Class implementing the history tree model.</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr><td>None</td></tr>
41 </table>
42 <hr /><hr />
43 <a NAME="HistoryTreeModel" ID="HistoryTreeModel"></a>
44 <h2>HistoryTreeModel</h2>
45 <p>
46 Class implementing the history tree model.
47 </p>
48 <h3>Derived from</h3>
49 QAbstractProxyModel
50 <h3>Class Attributes</h3>
51 <table>
52 <tr><td>None</td></tr>
53 </table>
54 <h3>Methods</h3>
55 <table>
56 <tr>
57 <td><a href="#HistoryTreeModel.__init__">HistoryTreeModel</a></td>
58 <td>Constructor</td>
59 </tr><tr>
60 <td><a href="#HistoryTreeModel.__sourceDateRow">__sourceDateRow</a></td>
61 <td>Private method to translate the top level date row into the offset where that date starts.</td>
62 </tr><tr>
63 <td><a href="#HistoryTreeModel.__sourceReset">__sourceReset</a></td>
64 <td>Private slot to handle a reset of the source model.</td>
65 </tr><tr>
66 <td><a href="#HistoryTreeModel.__sourceRowsInserted">__sourceRowsInserted</a></td>
67 <td>Private slot to handle the insertion of data in the source model.</td>
68 </tr><tr>
69 <td><a href="#HistoryTreeModel.__sourceRowsRemoved">__sourceRowsRemoved</a></td>
70 <td>Private slot to handle the removal of data in the source model.</td>
71 </tr><tr>
72 <td><a href="#HistoryTreeModel.columnCount">columnCount</a></td>
73 <td>Public method to get the number of columns.</td>
74 </tr><tr>
75 <td><a href="#HistoryTreeModel.data">data</a></td>
76 <td>Public method to get data from the model.</td>
77 </tr><tr>
78 <td><a href="#HistoryTreeModel.flags">flags</a></td>
79 <td>Public method to get the item flags.</td>
80 </tr><tr>
81 <td><a href="#HistoryTreeModel.hasChildren">hasChildren</a></td>
82 <td>Public method to check, if an entry has some children.</td>
83 </tr><tr>
84 <td><a href="#HistoryTreeModel.headerData">headerData</a></td>
85 <td>Public method to get the header data.</td>
86 </tr><tr>
87 <td><a href="#HistoryTreeModel.index">index</a></td>
88 <td>Public method to create an index.</td>
89 </tr><tr>
90 <td><a href="#HistoryTreeModel.mapFromSource">mapFromSource</a></td>
91 <td>Public method to map an index to the proxy model index.</td>
92 </tr><tr>
93 <td><a href="#HistoryTreeModel.mapToSource">mapToSource</a></td>
94 <td>Public method to map an index to the source model index.</td>
95 </tr><tr>
96 <td><a href="#HistoryTreeModel.parent">parent</a></td>
97 <td>Public method to get the parent index.</td>
98 </tr><tr>
99 <td><a href="#HistoryTreeModel.removeRows">removeRows</a></td>
100 <td>Public method to remove entries from the model.</td>
101 </tr><tr>
102 <td><a href="#HistoryTreeModel.rowCount">rowCount</a></td>
103 <td>Public method to determine the number of rows.</td>
104 </tr><tr>
105 <td><a href="#HistoryTreeModel.setSourceModel">setSourceModel</a></td>
106 <td>Public method to set the source model.</td>
107 </tr>
108 </table>
109 <a NAME="HistoryTreeModel.__init__" ID="HistoryTreeModel.__init__"></a>
110 <h4>HistoryTreeModel (Constructor)</h4>
111 <b>HistoryTreeModel</b>(<i>sourceModel, parent = None</i>)
112 <p>
113 Constructor
114 </p><dl>
115 <dt><i>sourceModel</i></dt>
116 <dd>
117 reference to the source model (QAbstractItemModel)
118 </dd><dt><i>parent</i></dt>
119 <dd>
120 reference to the parent object (QObject)
121 </dd>
122 </dl><a NAME="HistoryTreeModel.__sourceDateRow" ID="HistoryTreeModel.__sourceDateRow"></a>
123 <h4>HistoryTreeModel.__sourceDateRow</h4>
124 <b>__sourceDateRow</b>(<i>row</i>)
125 <p>
126 Private method to translate the top level date row into the offset
127 where that date starts.
128 </p><dl>
129 <dt><i>row</i></dt>
130 <dd>
131 row number of the date (integer)
132 </dd>
133 </dl><dl>
134 <dt>Returns:</dt>
135 <dd>
136 offset where that date starts (integer)
137 </dd>
138 </dl><a NAME="HistoryTreeModel.__sourceReset" ID="HistoryTreeModel.__sourceReset"></a>
139 <h4>HistoryTreeModel.__sourceReset</h4>
140 <b>__sourceReset</b>(<i></i>)
141 <p>
142 Private slot to handle a reset of the source model.
143 </p><a NAME="HistoryTreeModel.__sourceRowsInserted" ID="HistoryTreeModel.__sourceRowsInserted"></a>
144 <h4>HistoryTreeModel.__sourceRowsInserted</h4>
145 <b>__sourceRowsInserted</b>(<i>parent, start, end</i>)
146 <p>
147 Private slot to handle the insertion of data in the source model.
148 </p><dl>
149 <dt><i>parent</i></dt>
150 <dd>
151 reference to the parent index (QModelIndex)
152 </dd><dt><i>start</i></dt>
153 <dd>
154 start row (integer)
155 </dd><dt><i>end</i></dt>
156 <dd>
157 end row (integer)
158 </dd>
159 </dl><a NAME="HistoryTreeModel.__sourceRowsRemoved" ID="HistoryTreeModel.__sourceRowsRemoved"></a>
160 <h4>HistoryTreeModel.__sourceRowsRemoved</h4>
161 <b>__sourceRowsRemoved</b>(<i>parent, start, end</i>)
162 <p>
163 Private slot to handle the removal of data in the source model.
164 </p><dl>
165 <dt><i>parent</i></dt>
166 <dd>
167 reference to the parent index (QModelIndex)
168 </dd><dt><i>start</i></dt>
169 <dd>
170 start row (integer)
171 </dd><dt><i>end</i></dt>
172 <dd>
173 end row (integer)
174 </dd>
175 </dl><a NAME="HistoryTreeModel.columnCount" ID="HistoryTreeModel.columnCount"></a>
176 <h4>HistoryTreeModel.columnCount</h4>
177 <b>columnCount</b>(<i>parent = QModelIndex()</i>)
178 <p>
179 Public method to get the number of columns.
180 </p><dl>
181 <dt><i>parent</i></dt>
182 <dd>
183 index of parent (QModelIndex)
184 </dd>
185 </dl><dl>
186 <dt>Returns:</dt>
187 <dd>
188 number of columns (integer)
189 </dd>
190 </dl><a NAME="HistoryTreeModel.data" ID="HistoryTreeModel.data"></a>
191 <h4>HistoryTreeModel.data</h4>
192 <b>data</b>(<i>index, role = Qt.DisplayRole</i>)
193 <p>
194 Public method to get data from the model.
195 </p><dl>
196 <dt><i>index</i></dt>
197 <dd>
198 index of history entry to get data for (QModelIndex)
199 </dd><dt><i>role</i></dt>
200 <dd>
201 data role (integer)
202 </dd>
203 </dl><dl>
204 <dt>Returns:</dt>
205 <dd>
206 history entry data (QVariant)
207 </dd>
208 </dl><a NAME="HistoryTreeModel.flags" ID="HistoryTreeModel.flags"></a>
209 <h4>HistoryTreeModel.flags</h4>
210 <b>flags</b>(<i>index</i>)
211 <p>
212 Public method to get the item flags.
213 </p><dl>
214 <dt><i>index</i></dt>
215 <dd>
216 index of the item (QModelIndex)
217 </dd>
218 </dl><dl>
219 <dt>Returns:</dt>
220 <dd>
221 flags (Qt.ItemFlags)
222 </dd>
223 </dl><a NAME="HistoryTreeModel.hasChildren" ID="HistoryTreeModel.hasChildren"></a>
224 <h4>HistoryTreeModel.hasChildren</h4>
225 <b>hasChildren</b>(<i>parent = QModelIndex()</i>)
226 <p>
227 Public method to check, if an entry has some children.
228 </p><dl>
229 <dt><i>parent</i></dt>
230 <dd>
231 index of the entry to check (QModelIndex)
232 </dd>
233 </dl><dl>
234 <dt>Returns:</dt>
235 <dd>
236 flag indicating the presence of children (boolean)
237 </dd>
238 </dl><a NAME="HistoryTreeModel.headerData" ID="HistoryTreeModel.headerData"></a>
239 <h4>HistoryTreeModel.headerData</h4>
240 <b>headerData</b>(<i>section, orientation, role = Qt.DisplayRole</i>)
241 <p>
242 Public method to get the header data.
243 </p><dl>
244 <dt><i>section</i></dt>
245 <dd>
246 section number (integer)
247 </dd><dt><i>orientation</i></dt>
248 <dd>
249 header orientation (Qt.Orientation)
250 </dd><dt><i>role</i></dt>
251 <dd>
252 data role (integer)
253 </dd>
254 </dl><dl>
255 <dt>Returns:</dt>
256 <dd>
257 header data (QVariant)
258 </dd>
259 </dl><a NAME="HistoryTreeModel.index" ID="HistoryTreeModel.index"></a>
260 <h4>HistoryTreeModel.index</h4>
261 <b>index</b>(<i>row, column, parent = QModelIndex()</i>)
262 <p>
263 Public method to create an index.
264 </p><dl>
265 <dt><i>row</i></dt>
266 <dd>
267 row number for the index (integer)
268 </dd><dt><i>column</i></dt>
269 <dd>
270 column number for the index (integer)
271 </dd><dt><i>parent</i></dt>
272 <dd>
273 index of the parent item (QModelIndex)
274 </dd>
275 </dl><dl>
276 <dt>Returns:</dt>
277 <dd>
278 requested index (QModelIndex)
279 </dd>
280 </dl><a NAME="HistoryTreeModel.mapFromSource" ID="HistoryTreeModel.mapFromSource"></a>
281 <h4>HistoryTreeModel.mapFromSource</h4>
282 <b>mapFromSource</b>(<i>sourceIndex</i>)
283 <p>
284 Public method to map an index to the proxy model index.
285 </p><dl>
286 <dt><i>sourceIndex</i></dt>
287 <dd>
288 reference to a source model index (QModelIndex)
289 </dd>
290 </dl><dl>
291 <dt>Returns:</dt>
292 <dd>
293 proxy model index (QModelIndex)
294 </dd>
295 </dl><a NAME="HistoryTreeModel.mapToSource" ID="HistoryTreeModel.mapToSource"></a>
296 <h4>HistoryTreeModel.mapToSource</h4>
297 <b>mapToSource</b>(<i>proxyIndex</i>)
298 <p>
299 Public method to map an index to the source model index.
300 </p><dl>
301 <dt><i>proxyIndex</i></dt>
302 <dd>
303 reference to a proxy model index (QModelIndex)
304 </dd>
305 </dl><dl>
306 <dt>Returns:</dt>
307 <dd>
308 source model index (QModelIndex)
309 </dd>
310 </dl><a NAME="HistoryTreeModel.parent" ID="HistoryTreeModel.parent"></a>
311 <h4>HistoryTreeModel.parent</h4>
312 <b>parent</b>(<i>index</i>)
313 <p>
314 Public method to get the parent index.
315 </p><dl>
316 <dt><i>index</i></dt>
317 <dd>
318 index of item to get parent (QModelIndex)
319 </dd>
320 </dl><dl>
321 <dt>Returns:</dt>
322 <dd>
323 index of parent (QModelIndex)
324 </dd>
325 </dl><a NAME="HistoryTreeModel.removeRows" ID="HistoryTreeModel.removeRows"></a>
326 <h4>HistoryTreeModel.removeRows</h4>
327 <b>removeRows</b>(<i>row, count, parent = QModelIndex()</i>)
328 <p>
329 Public method to remove entries from the model.
330 </p><dl>
331 <dt><i>row</i></dt>
332 <dd>
333 row of the first entry to remove (integer)
334 </dd><dt><i>count</i></dt>
335 <dd>
336 number of entries to remove (integer)
337 </dd><dt><i>index</i></dt>
338 <dd>
339 of the parent entry (QModelIndex)
340 </dd>
341 </dl><dl>
342 <dt>Returns:</dt>
343 <dd>
344 flag indicating successful removal (boolean)
345 </dd>
346 </dl><a NAME="HistoryTreeModel.rowCount" ID="HistoryTreeModel.rowCount"></a>
347 <h4>HistoryTreeModel.rowCount</h4>
348 <b>rowCount</b>(<i>parent = QModelIndex()</i>)
349 <p>
350 Public method to determine the number of rows.
351 </p><dl>
352 <dt><i>parent</i></dt>
353 <dd>
354 index of parent (QModelIndex)
355 </dd>
356 </dl><dl>
357 <dt>Returns:</dt>
358 <dd>
359 number of rows (integer)
360 </dd>
361 </dl><a NAME="HistoryTreeModel.setSourceModel" ID="HistoryTreeModel.setSourceModel"></a>
362 <h4>HistoryTreeModel.setSourceModel</h4>
363 <b>setSourceModel</b>(<i>sourceModel</i>)
364 <p>
365 Public method to set the source model.
366 </p><dl>
367 <dt><i>sourceModel</i></dt>
368 <dd>
369 reference to the source model (QAbstractItemModel)
370 </dd>
371 </dl>
372 <div align="right"><a href="#top">Up</a></div>
373 <hr />
374 </body></html>

eric ide

mercurial