Documentation/Source/eric4.Helpviewer.Bookmarks.BookmarksModel.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.Bookmarks.BookmarksModel</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.Bookmarks.BookmarksModel</h1>
24 <p>
25 Module implementing the bookmark model class.
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="#BookmarksModel">BookmarksModel</a></td>
35 <td>Class implementing the bookmark 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="BookmarksModel" ID="BookmarksModel"></a>
44 <h2>BookmarksModel</h2>
45 <p>
46 Class implementing the bookmark model.
47 </p>
48 <h3>Derived from</h3>
49 QAbstractItemModel
50 <h3>Class Attributes</h3>
51 <table>
52 <tr><td>MIMETYPE</td></tr><tr><td>SeparatorRole</td></tr><tr><td>TypeRole</td></tr><tr><td>UrlRole</td></tr><tr><td>UrlStringRole</td></tr>
53 </table>
54 <h3>Methods</h3>
55 <table>
56 <tr>
57 <td><a href="#BookmarksModel.__init__">BookmarksModel</a></td>
58 <td>Constructor</td>
59 </tr><tr>
60 <td><a href="#BookmarksModel.bookmarksManager">bookmarksManager</a></td>
61 <td>Public method to get a reference to the bookmarks manager.</td>
62 </tr><tr>
63 <td><a href="#BookmarksModel.columnCount">columnCount</a></td>
64 <td>Public method to get the number of columns.</td>
65 </tr><tr>
66 <td><a href="#BookmarksModel.data">data</a></td>
67 <td>Public method to get data from the model.</td>
68 </tr><tr>
69 <td><a href="#BookmarksModel.dropMimeData">dropMimeData</a></td>
70 <td>Public method to accept the mime data of a drop action.</td>
71 </tr><tr>
72 <td><a href="#BookmarksModel.entryAdded">entryAdded</a></td>
73 <td>Public slot to add a bookmark node.</td>
74 </tr><tr>
75 <td><a href="#BookmarksModel.entryChanged">entryChanged</a></td>
76 <td>Public method to change a node.</td>
77 </tr><tr>
78 <td><a href="#BookmarksModel.entryRemoved">entryRemoved</a></td>
79 <td>Public slot to remove a bookmark node.</td>
80 </tr><tr>
81 <td><a href="#BookmarksModel.flags">flags</a></td>
82 <td>Public method to get flags for a node cell.</td>
83 </tr><tr>
84 <td><a href="#BookmarksModel.hasChildren">hasChildren</a></td>
85 <td>Public method to check, if a parent node has some children.</td>
86 </tr><tr>
87 <td><a href="#BookmarksModel.headerData">headerData</a></td>
88 <td>Public method to get the header data.</td>
89 </tr><tr>
90 <td><a href="#BookmarksModel.index">index</a></td>
91 <td>Public method to get a model index for a node cell.</td>
92 </tr><tr>
93 <td><a href="#BookmarksModel.mimeData">mimeData</a></td>
94 <td>Public method to return the mime data.</td>
95 </tr><tr>
96 <td><a href="#BookmarksModel.mimeTypes">mimeTypes</a></td>
97 <td>Public method to report the supported mime types.</td>
98 </tr><tr>
99 <td><a href="#BookmarksModel.node">node</a></td>
100 <td>Public method to get a bookmark node given it's index.</td>
101 </tr><tr>
102 <td><a href="#BookmarksModel.nodeIndex">nodeIndex</a></td>
103 <td>Public method to get a model index.</td>
104 </tr><tr>
105 <td><a href="#BookmarksModel.parent">parent</a></td>
106 <td>Public method to get the index of the parent node.</td>
107 </tr><tr>
108 <td><a href="#BookmarksModel.removeRows">removeRows</a></td>
109 <td>Public method to remove bookmarks from the model.</td>
110 </tr><tr>
111 <td><a href="#BookmarksModel.rowCount">rowCount</a></td>
112 <td>Public method to determine the number of rows.</td>
113 </tr><tr>
114 <td><a href="#BookmarksModel.setData">setData</a></td>
115 <td>Public method to set the data of a node cell.</td>
116 </tr><tr>
117 <td><a href="#BookmarksModel.supportedDropActions">supportedDropActions</a></td>
118 <td>Public method to report the supported drop actions.</td>
119 </tr>
120 </table>
121 <a NAME="BookmarksModel.__init__" ID="BookmarksModel.__init__"></a>
122 <h4>BookmarksModel (Constructor)</h4>
123 <b>BookmarksModel</b>(<i>manager, parent = None</i>)
124 <p>
125 Constructor
126 </p><dl>
127 <dt><i>manager</i></dt>
128 <dd>
129 reference to the bookmark manager object (BookmarksManager)
130 </dd><dt><i>parent</i></dt>
131 <dd>
132 reference to the parent object (QObject)
133 </dd>
134 </dl><a NAME="BookmarksModel.bookmarksManager" ID="BookmarksModel.bookmarksManager"></a>
135 <h4>BookmarksModel.bookmarksManager</h4>
136 <b>bookmarksManager</b>(<i></i>)
137 <p>
138 Public method to get a reference to the bookmarks manager.
139 </p><dl>
140 <dt>Returns:</dt>
141 <dd>
142 reference to the bookmarks manager object (BookmarksManager)
143 </dd>
144 </dl><a NAME="BookmarksModel.columnCount" ID="BookmarksModel.columnCount"></a>
145 <h4>BookmarksModel.columnCount</h4>
146 <b>columnCount</b>(<i>parent = QModelIndex()</i>)
147 <p>
148 Public method to get the number of columns.
149 </p><dl>
150 <dt><i>parent</i></dt>
151 <dd>
152 index of parent (QModelIndex)
153 </dd>
154 </dl><dl>
155 <dt>Returns:</dt>
156 <dd>
157 number of columns (integer)
158 </dd>
159 </dl><a NAME="BookmarksModel.data" ID="BookmarksModel.data"></a>
160 <h4>BookmarksModel.data</h4>
161 <b>data</b>(<i>index, role = Qt.DisplayRole</i>)
162 <p>
163 Public method to get data from the model.
164 </p><dl>
165 <dt><i>index</i></dt>
166 <dd>
167 index of bookmark to get data for (QModelIndex)
168 </dd><dt><i>role</i></dt>
169 <dd>
170 data role (integer)
171 </dd>
172 </dl><dl>
173 <dt>Returns:</dt>
174 <dd>
175 bookmark data (QVariant)
176 </dd>
177 </dl><a NAME="BookmarksModel.dropMimeData" ID="BookmarksModel.dropMimeData"></a>
178 <h4>BookmarksModel.dropMimeData</h4>
179 <b>dropMimeData</b>(<i>data, action, row, column, parent</i>)
180 <p>
181 Public method to accept the mime data of a drop action.
182 </p><dl>
183 <dt><i>data</i></dt>
184 <dd>
185 reference to the mime data (QMimeData)
186 </dd><dt><i>action</i></dt>
187 <dd>
188 drop action requested (Qt.DropAction)
189 </dd><dt><i>row</i></dt>
190 <dd>
191 row number (integer)
192 </dd><dt><i>column</i></dt>
193 <dd>
194 column number (integer)
195 </dd><dt><i>parent</i></dt>
196 <dd>
197 index of the parent node (QModelIndex)
198 </dd>
199 </dl><dl>
200 <dt>Returns:</dt>
201 <dd>
202 flag indicating successful acceptance of the data (boolean)
203 </dd>
204 </dl><a NAME="BookmarksModel.entryAdded" ID="BookmarksModel.entryAdded"></a>
205 <h4>BookmarksModel.entryAdded</h4>
206 <b>entryAdded</b>(<i>node</i>)
207 <p>
208 Public slot to add a bookmark node.
209 </p><dl>
210 <dt><i>node</i></dt>
211 <dd>
212 reference to the bookmark node to add (BookmarkNode)
213 </dd>
214 </dl><a NAME="BookmarksModel.entryChanged" ID="BookmarksModel.entryChanged"></a>
215 <h4>BookmarksModel.entryChanged</h4>
216 <b>entryChanged</b>(<i>node</i>)
217 <p>
218 Public method to change a node.
219 </p><dl>
220 <dt><i>node</i></dt>
221 <dd>
222 reference to the bookmark node to change (BookmarkNode)
223 </dd>
224 </dl><a NAME="BookmarksModel.entryRemoved" ID="BookmarksModel.entryRemoved"></a>
225 <h4>BookmarksModel.entryRemoved</h4>
226 <b>entryRemoved</b>(<i>parent, row, node</i>)
227 <p>
228 Public slot to remove a bookmark node.
229 </p><dl>
230 <dt><i>parent</i></dt>
231 <dd>
232 reference to the parent bookmark node (BookmarkNode)
233 </dd><dt><i>row</i></dt>
234 <dd>
235 row number of the node (integer)
236 </dd><dt><i>node</i></dt>
237 <dd>
238 reference to the bookmark node to remove (BookmarkNode)
239 </dd>
240 </dl><a NAME="BookmarksModel.flags" ID="BookmarksModel.flags"></a>
241 <h4>BookmarksModel.flags</h4>
242 <b>flags</b>(<i>index</i>)
243 <p>
244 Public method to get flags for a node cell.
245 </p><dl>
246 <dt><i>index</i></dt>
247 <dd>
248 index of the node cell (QModelIndex)
249 </dd>
250 </dl><dl>
251 <dt>Returns:</dt>
252 <dd>
253 flags (Qt.ItemFlags)
254 </dd>
255 </dl><a NAME="BookmarksModel.hasChildren" ID="BookmarksModel.hasChildren"></a>
256 <h4>BookmarksModel.hasChildren</h4>
257 <b>hasChildren</b>(<i>parent = QModelIndex()</i>)
258 <p>
259 Public method to check, if a parent node has some children.
260 </p><dl>
261 <dt><i>parent</i></dt>
262 <dd>
263 index of the parent node (QModelIndex)
264 </dd>
265 </dl><dl>
266 <dt>Returns:</dt>
267 <dd>
268 flag indicating the presence of children (boolean)
269 </dd>
270 </dl><a NAME="BookmarksModel.headerData" ID="BookmarksModel.headerData"></a>
271 <h4>BookmarksModel.headerData</h4>
272 <b>headerData</b>(<i>section, orientation, role = Qt.DisplayRole</i>)
273 <p>
274 Public method to get the header data.
275 </p><dl>
276 <dt><i>section</i></dt>
277 <dd>
278 section number (integer)
279 </dd><dt><i>orientation</i></dt>
280 <dd>
281 header orientation (Qt.Orientation)
282 </dd><dt><i>role</i></dt>
283 <dd>
284 data role (integer)
285 </dd>
286 </dl><dl>
287 <dt>Returns:</dt>
288 <dd>
289 header data (QVariant)
290 </dd>
291 </dl><a NAME="BookmarksModel.index" ID="BookmarksModel.index"></a>
292 <h4>BookmarksModel.index</h4>
293 <b>index</b>(<i>row, column, parent = QModelIndex()</i>)
294 <p>
295 Public method to get a model index for a node cell.
296 </p><dl>
297 <dt><i>row</i></dt>
298 <dd>
299 row number (integer)
300 </dd><dt><i>column</i></dt>
301 <dd>
302 column number (integer)
303 </dd><dt><i>parent</i></dt>
304 <dd>
305 index of the parent (QModelIndex)
306 </dd>
307 </dl><dl>
308 <dt>Returns:</dt>
309 <dd>
310 index (QModelIndex)
311 </dd>
312 </dl><a NAME="BookmarksModel.mimeData" ID="BookmarksModel.mimeData"></a>
313 <h4>BookmarksModel.mimeData</h4>
314 <b>mimeData</b>(<i>indexes</i>)
315 <p>
316 Public method to return the mime data.
317 </p><dl>
318 <dt><i>indexes</i></dt>
319 <dd>
320 list of indexes (QModelIndexList)
321 </dd>
322 </dl><dl>
323 <dt>Returns:</dt>
324 <dd>
325 mime data (QMimeData)
326 </dd>
327 </dl><a NAME="BookmarksModel.mimeTypes" ID="BookmarksModel.mimeTypes"></a>
328 <h4>BookmarksModel.mimeTypes</h4>
329 <b>mimeTypes</b>(<i></i>)
330 <p>
331 Public method to report the supported mime types.
332 </p><dl>
333 <dt>Returns:</dt>
334 <dd>
335 supported mime types (list of strings)
336 </dd>
337 </dl><a NAME="BookmarksModel.node" ID="BookmarksModel.node"></a>
338 <h4>BookmarksModel.node</h4>
339 <b>node</b>(<i>index</i>)
340 <p>
341 Public method to get a bookmark node given it's index.
342 </p><dl>
343 <dt><i>index</i></dt>
344 <dd>
345 index of the node (QModelIndex)
346 </dd>
347 </dl><dl>
348 <dt>Returns:</dt>
349 <dd>
350 bookmark node (BookmarkNode)
351 </dd>
352 </dl><a NAME="BookmarksModel.nodeIndex" ID="BookmarksModel.nodeIndex"></a>
353 <h4>BookmarksModel.nodeIndex</h4>
354 <b>nodeIndex</b>(<i>node</i>)
355 <p>
356 Public method to get a model index.
357 </p><dl>
358 <dt><i>node</i></dt>
359 <dd>
360 reference to the node to get the index for (BookmarkNode)
361 </dd>
362 </dl><dl>
363 <dt>Returns:</dt>
364 <dd>
365 model index (QModelIndex)
366 </dd>
367 </dl><a NAME="BookmarksModel.parent" ID="BookmarksModel.parent"></a>
368 <h4>BookmarksModel.parent</h4>
369 <b>parent</b>(<i>index = QModelIndex()</i>)
370 <p>
371 Public method to get the index of the parent node.
372 </p><dl>
373 <dt><i>index</i></dt>
374 <dd>
375 index of the child node (QModelIndex)
376 </dd>
377 </dl><dl>
378 <dt>Returns:</dt>
379 <dd>
380 index of the parent node (QModelIndex)
381 </dd>
382 </dl><a NAME="BookmarksModel.removeRows" ID="BookmarksModel.removeRows"></a>
383 <h4>BookmarksModel.removeRows</h4>
384 <b>removeRows</b>(<i>row, count, parent = QModelIndex()</i>)
385 <p>
386 Public method to remove bookmarks from the model.
387 </p><dl>
388 <dt><i>row</i></dt>
389 <dd>
390 row of the first bookmark to remove (integer)
391 </dd><dt><i>count</i></dt>
392 <dd>
393 number of bookmarks to remove (integer)
394 </dd><dt><i>index</i></dt>
395 <dd>
396 of the parent bookmark node (QModelIndex)
397 </dd>
398 </dl><dl>
399 <dt>Returns:</dt>
400 <dd>
401 flag indicating successful removal (boolean)
402 </dd>
403 </dl><a NAME="BookmarksModel.rowCount" ID="BookmarksModel.rowCount"></a>
404 <h4>BookmarksModel.rowCount</h4>
405 <b>rowCount</b>(<i>parent = QModelIndex()</i>)
406 <p>
407 Public method to determine the number of rows.
408 </p><dl>
409 <dt><i>parent</i></dt>
410 <dd>
411 index of parent (QModelIndex)
412 </dd>
413 </dl><dl>
414 <dt>Returns:</dt>
415 <dd>
416 number of rows (integer)
417 </dd>
418 </dl><a NAME="BookmarksModel.setData" ID="BookmarksModel.setData"></a>
419 <h4>BookmarksModel.setData</h4>
420 <b>setData</b>(<i>index, value, role = Qt.EditRole</i>)
421 <p>
422 Public method to set the data of a node cell.
423 </p><dl>
424 <dt><i>index</i></dt>
425 <dd>
426 index of the node cell (QModelIndex)
427 </dd><dt><i>value</i></dt>
428 <dd>
429 value to be set (QVariant)
430 </dd><dt><i>role</i></dt>
431 <dd>
432 role of the data (integer)
433 </dd>
434 </dl><dl>
435 <dt>Returns:</dt>
436 <dd>
437 flag indicating success (boolean)
438 </dd>
439 </dl><a NAME="BookmarksModel.supportedDropActions" ID="BookmarksModel.supportedDropActions"></a>
440 <h4>BookmarksModel.supportedDropActions</h4>
441 <b>supportedDropActions</b>(<i></i>)
442 <p>
443 Public method to report the supported drop actions.
444 </p><dl>
445 <dt>Returns:</dt>
446 <dd>
447 supported drop actions (Qt.DropAction)
448 </dd>
449 </dl>
450 <div align="right"><a href="#top">Up</a></div>
451 <hr />
452 </body></html>

eric ide

mercurial