|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.WebBrowser.Bookmarks.AddBookmarkDialog</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.WebBrowser.Bookmarks.AddBookmarkDialog</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a dialog to add a bookmark or a bookmark folder. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#AddBookmarkDialog">AddBookmarkDialog</a></td> |
|
39 <td>Class implementing a dialog to add a bookmark or a bookmark folder.</td> |
|
40 </tr> |
|
41 <tr> |
|
42 <td><a href="#AddBookmarkProxyModel">AddBookmarkProxyModel</a></td> |
|
43 <td>Class implementing a proxy model used by the AddBookmarkDialog dialog.</td> |
|
44 </tr> |
|
45 </table> |
|
46 <h3>Functions</h3> |
|
47 |
|
48 <table> |
|
49 <tr><td>None</td></tr> |
|
50 </table> |
|
51 <hr /> |
|
52 <hr /> |
|
53 <a NAME="AddBookmarkDialog" ID="AddBookmarkDialog"></a> |
|
54 <h2>AddBookmarkDialog</h2> |
|
55 |
|
56 <p> |
|
57 Class implementing a dialog to add a bookmark or a bookmark folder. |
|
58 </p> |
|
59 <h3>Derived from</h3> |
|
60 QDialog, Ui_AddBookmarkDialog |
|
61 <h3>Class Attributes</h3> |
|
62 |
|
63 <table> |
|
64 <tr><td>None</td></tr> |
|
65 </table> |
|
66 <h3>Class Methods</h3> |
|
67 |
|
68 <table> |
|
69 <tr><td>None</td></tr> |
|
70 </table> |
|
71 <h3>Methods</h3> |
|
72 |
|
73 <table> |
|
74 |
|
75 <tr> |
|
76 <td><a href="#AddBookmarkDialog.__init__">AddBookmarkDialog</a></td> |
|
77 <td>Constructor</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#AddBookmarkDialog.accept">accept</a></td> |
|
81 <td>Public slot handling the acceptance of the dialog.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#AddBookmarkDialog.addedNode">addedNode</a></td> |
|
85 <td>Public method to get a reference to the added bookmark node.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#AddBookmarkDialog.currentIndex">currentIndex</a></td> |
|
89 <td>Public method to get the current index.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#AddBookmarkDialog.description">description</a></td> |
|
93 <td>Public method to get the description of the bookmark.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#AddBookmarkDialog.isFolder">isFolder</a></td> |
|
97 <td>Public method to test, if the dialog is in "Add Folder" mode.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#AddBookmarkDialog.setCurrentIndex">setCurrentIndex</a></td> |
|
101 <td>Public method to set the current index.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#AddBookmarkDialog.setDescription">setDescription</a></td> |
|
105 <td>Public method to set the description of the new bookmark.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#AddBookmarkDialog.setFolder">setFolder</a></td> |
|
109 <td>Public method to set the dialog to "Add Folder" mode.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#AddBookmarkDialog.setTitle">setTitle</a></td> |
|
113 <td>Public method to set the title of the new bookmark.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#AddBookmarkDialog.setUrl">setUrl</a></td> |
|
117 <td>Public slot to set the URL of the new bookmark.</td> |
|
118 </tr> |
|
119 <tr> |
|
120 <td><a href="#AddBookmarkDialog.title">title</a></td> |
|
121 <td>Public method to get the title of the bookmark.</td> |
|
122 </tr> |
|
123 <tr> |
|
124 <td><a href="#AddBookmarkDialog.url">url</a></td> |
|
125 <td>Public method to get the URL of the bookmark.</td> |
|
126 </tr> |
|
127 </table> |
|
128 <h3>Static Methods</h3> |
|
129 |
|
130 <table> |
|
131 <tr><td>None</td></tr> |
|
132 </table> |
|
133 |
|
134 <a NAME="AddBookmarkDialog.__init__" ID="AddBookmarkDialog.__init__"></a> |
|
135 <h4>AddBookmarkDialog (Constructor)</h4> |
|
136 <b>AddBookmarkDialog</b>(<i>parent=None, bookmarksManager=None</i>) |
|
137 |
|
138 <p> |
|
139 Constructor |
|
140 </p> |
|
141 <dl> |
|
142 |
|
143 <dt><i>parent</i></dt> |
|
144 <dd> |
|
145 reference to the parent widget (QWidget) |
|
146 </dd> |
|
147 <dt><i>bookmarksManager</i></dt> |
|
148 <dd> |
|
149 reference to the bookmarks manager |
|
150 object (BookmarksManager) |
|
151 </dd> |
|
152 </dl> |
|
153 <a NAME="AddBookmarkDialog.accept" ID="AddBookmarkDialog.accept"></a> |
|
154 <h4>AddBookmarkDialog.accept</h4> |
|
155 <b>accept</b>(<i></i>) |
|
156 |
|
157 <p> |
|
158 Public slot handling the acceptance of the dialog. |
|
159 </p> |
|
160 <a NAME="AddBookmarkDialog.addedNode" ID="AddBookmarkDialog.addedNode"></a> |
|
161 <h4>AddBookmarkDialog.addedNode</h4> |
|
162 <b>addedNode</b>(<i></i>) |
|
163 |
|
164 <p> |
|
165 Public method to get a reference to the added bookmark node. |
|
166 </p> |
|
167 <dl> |
|
168 <dt>Return:</dt> |
|
169 <dd> |
|
170 reference to the added bookmark node (BookmarkNode) |
|
171 </dd> |
|
172 </dl> |
|
173 <a NAME="AddBookmarkDialog.currentIndex" ID="AddBookmarkDialog.currentIndex"></a> |
|
174 <h4>AddBookmarkDialog.currentIndex</h4> |
|
175 <b>currentIndex</b>(<i></i>) |
|
176 |
|
177 <p> |
|
178 Public method to get the current index. |
|
179 </p> |
|
180 <dl> |
|
181 <dt>Return:</dt> |
|
182 <dd> |
|
183 current index (QModelIndex) |
|
184 </dd> |
|
185 </dl> |
|
186 <a NAME="AddBookmarkDialog.description" ID="AddBookmarkDialog.description"></a> |
|
187 <h4>AddBookmarkDialog.description</h4> |
|
188 <b>description</b>(<i></i>) |
|
189 |
|
190 <p> |
|
191 Public method to get the description of the bookmark. |
|
192 </p> |
|
193 <dl> |
|
194 <dt>Return:</dt> |
|
195 <dd> |
|
196 description of the bookamrk (string) |
|
197 </dd> |
|
198 </dl> |
|
199 <a NAME="AddBookmarkDialog.isFolder" ID="AddBookmarkDialog.isFolder"></a> |
|
200 <h4>AddBookmarkDialog.isFolder</h4> |
|
201 <b>isFolder</b>(<i></i>) |
|
202 |
|
203 <p> |
|
204 Public method to test, if the dialog is in "Add Folder" mode. |
|
205 </p> |
|
206 <dl> |
|
207 <dt>Return:</dt> |
|
208 <dd> |
|
209 flag indicating "Add Folder" mode (boolean) |
|
210 </dd> |
|
211 </dl> |
|
212 <a NAME="AddBookmarkDialog.setCurrentIndex" ID="AddBookmarkDialog.setCurrentIndex"></a> |
|
213 <h4>AddBookmarkDialog.setCurrentIndex</h4> |
|
214 <b>setCurrentIndex</b>(<i>idx</i>) |
|
215 |
|
216 <p> |
|
217 Public method to set the current index. |
|
218 </p> |
|
219 <dl> |
|
220 |
|
221 <dt><i>idx</i></dt> |
|
222 <dd> |
|
223 current index to be set (QModelIndex) |
|
224 </dd> |
|
225 </dl> |
|
226 <a NAME="AddBookmarkDialog.setDescription" ID="AddBookmarkDialog.setDescription"></a> |
|
227 <h4>AddBookmarkDialog.setDescription</h4> |
|
228 <b>setDescription</b>(<i>description</i>) |
|
229 |
|
230 <p> |
|
231 Public method to set the description of the new bookmark. |
|
232 </p> |
|
233 <dl> |
|
234 |
|
235 <dt><i>description</i></dt> |
|
236 <dd> |
|
237 description of the bookamrk (string) |
|
238 </dd> |
|
239 </dl> |
|
240 <a NAME="AddBookmarkDialog.setFolder" ID="AddBookmarkDialog.setFolder"></a> |
|
241 <h4>AddBookmarkDialog.setFolder</h4> |
|
242 <b>setFolder</b>(<i>folder</i>) |
|
243 |
|
244 <p> |
|
245 Public method to set the dialog to "Add Folder" mode. |
|
246 </p> |
|
247 <dl> |
|
248 |
|
249 <dt><i>folder</i></dt> |
|
250 <dd> |
|
251 flag indicating "Add Folder" mode (boolean) |
|
252 </dd> |
|
253 </dl> |
|
254 <a NAME="AddBookmarkDialog.setTitle" ID="AddBookmarkDialog.setTitle"></a> |
|
255 <h4>AddBookmarkDialog.setTitle</h4> |
|
256 <b>setTitle</b>(<i>title</i>) |
|
257 |
|
258 <p> |
|
259 Public method to set the title of the new bookmark. |
|
260 </p> |
|
261 <dl> |
|
262 |
|
263 <dt><i>title</i></dt> |
|
264 <dd> |
|
265 title of the bookmark (string) |
|
266 </dd> |
|
267 </dl> |
|
268 <a NAME="AddBookmarkDialog.setUrl" ID="AddBookmarkDialog.setUrl"></a> |
|
269 <h4>AddBookmarkDialog.setUrl</h4> |
|
270 <b>setUrl</b>(<i>url</i>) |
|
271 |
|
272 <p> |
|
273 Public slot to set the URL of the new bookmark. |
|
274 </p> |
|
275 <dl> |
|
276 |
|
277 <dt><i>url</i></dt> |
|
278 <dd> |
|
279 URL of the bookmark (string) |
|
280 </dd> |
|
281 </dl> |
|
282 <a NAME="AddBookmarkDialog.title" ID="AddBookmarkDialog.title"></a> |
|
283 <h4>AddBookmarkDialog.title</h4> |
|
284 <b>title</b>(<i></i>) |
|
285 |
|
286 <p> |
|
287 Public method to get the title of the bookmark. |
|
288 </p> |
|
289 <dl> |
|
290 <dt>Return:</dt> |
|
291 <dd> |
|
292 title of the bookmark (string) |
|
293 </dd> |
|
294 </dl> |
|
295 <a NAME="AddBookmarkDialog.url" ID="AddBookmarkDialog.url"></a> |
|
296 <h4>AddBookmarkDialog.url</h4> |
|
297 <b>url</b>(<i></i>) |
|
298 |
|
299 <p> |
|
300 Public method to get the URL of the bookmark. |
|
301 </p> |
|
302 <dl> |
|
303 <dt>Return:</dt> |
|
304 <dd> |
|
305 URL of the bookmark (string) |
|
306 </dd> |
|
307 </dl> |
|
308 <div align="right"><a href="#top">Up</a></div> |
|
309 <hr /> |
|
310 <hr /> |
|
311 <a NAME="AddBookmarkProxyModel" ID="AddBookmarkProxyModel"></a> |
|
312 <h2>AddBookmarkProxyModel</h2> |
|
313 |
|
314 <p> |
|
315 Class implementing a proxy model used by the AddBookmarkDialog dialog. |
|
316 </p> |
|
317 <h3>Derived from</h3> |
|
318 QSortFilterProxyModel |
|
319 <h3>Class Attributes</h3> |
|
320 |
|
321 <table> |
|
322 <tr><td>None</td></tr> |
|
323 </table> |
|
324 <h3>Class Methods</h3> |
|
325 |
|
326 <table> |
|
327 <tr><td>None</td></tr> |
|
328 </table> |
|
329 <h3>Methods</h3> |
|
330 |
|
331 <table> |
|
332 |
|
333 <tr> |
|
334 <td><a href="#AddBookmarkProxyModel.__init__">AddBookmarkProxyModel</a></td> |
|
335 <td>Constructor</td> |
|
336 </tr> |
|
337 <tr> |
|
338 <td><a href="#AddBookmarkProxyModel.columnCount">columnCount</a></td> |
|
339 <td>Public method to return the number of columns.</td> |
|
340 </tr> |
|
341 <tr> |
|
342 <td><a href="#AddBookmarkProxyModel.filterAcceptsColumn">filterAcceptsColumn</a></td> |
|
343 <td>Public method to determine, if the column is acceptable.</td> |
|
344 </tr> |
|
345 <tr> |
|
346 <td><a href="#AddBookmarkProxyModel.filterAcceptsRow">filterAcceptsRow</a></td> |
|
347 <td>Public method to determine, if the row is acceptable.</td> |
|
348 </tr> |
|
349 <tr> |
|
350 <td><a href="#AddBookmarkProxyModel.hasChildren">hasChildren</a></td> |
|
351 <td>Public method to check, if a parent node has some children.</td> |
|
352 </tr> |
|
353 </table> |
|
354 <h3>Static Methods</h3> |
|
355 |
|
356 <table> |
|
357 <tr><td>None</td></tr> |
|
358 </table> |
|
359 |
|
360 <a NAME="AddBookmarkProxyModel.__init__" ID="AddBookmarkProxyModel.__init__"></a> |
|
361 <h4>AddBookmarkProxyModel (Constructor)</h4> |
|
362 <b>AddBookmarkProxyModel</b>(<i>parent=None</i>) |
|
363 |
|
364 <p> |
|
365 Constructor |
|
366 </p> |
|
367 <dl> |
|
368 |
|
369 <dt><i>parent</i></dt> |
|
370 <dd> |
|
371 reference to the parent object (QObject) |
|
372 </dd> |
|
373 </dl> |
|
374 <a NAME="AddBookmarkProxyModel.columnCount" ID="AddBookmarkProxyModel.columnCount"></a> |
|
375 <h4>AddBookmarkProxyModel.columnCount</h4> |
|
376 <b>columnCount</b>(<i>parent</i>) |
|
377 |
|
378 <p> |
|
379 Public method to return the number of columns. |
|
380 </p> |
|
381 <dl> |
|
382 |
|
383 <dt><i>parent</i></dt> |
|
384 <dd> |
|
385 index of the parent (QModelIndex) |
|
386 </dd> |
|
387 </dl> |
|
388 <dl> |
|
389 <dt>Return:</dt> |
|
390 <dd> |
|
391 number of columns (integer) |
|
392 </dd> |
|
393 </dl> |
|
394 <a NAME="AddBookmarkProxyModel.filterAcceptsColumn" ID="AddBookmarkProxyModel.filterAcceptsColumn"></a> |
|
395 <h4>AddBookmarkProxyModel.filterAcceptsColumn</h4> |
|
396 <b>filterAcceptsColumn</b>(<i>sourceColumn, sourceParent</i>) |
|
397 |
|
398 <p> |
|
399 Public method to determine, if the column is acceptable. |
|
400 </p> |
|
401 <dl> |
|
402 |
|
403 <dt><i>sourceColumn</i></dt> |
|
404 <dd> |
|
405 column number in the source model (integer) |
|
406 </dd> |
|
407 <dt><i>sourceParent</i></dt> |
|
408 <dd> |
|
409 index of the source item (QModelIndex) |
|
410 </dd> |
|
411 </dl> |
|
412 <dl> |
|
413 <dt>Return:</dt> |
|
414 <dd> |
|
415 flag indicating acceptance (boolean) |
|
416 </dd> |
|
417 </dl> |
|
418 <a NAME="AddBookmarkProxyModel.filterAcceptsRow" ID="AddBookmarkProxyModel.filterAcceptsRow"></a> |
|
419 <h4>AddBookmarkProxyModel.filterAcceptsRow</h4> |
|
420 <b>filterAcceptsRow</b>(<i>sourceRow, sourceParent</i>) |
|
421 |
|
422 <p> |
|
423 Public method to determine, if the row is acceptable. |
|
424 </p> |
|
425 <dl> |
|
426 |
|
427 <dt><i>sourceRow</i></dt> |
|
428 <dd> |
|
429 row number in the source model (integer) |
|
430 </dd> |
|
431 <dt><i>sourceParent</i></dt> |
|
432 <dd> |
|
433 index of the source item (QModelIndex) |
|
434 </dd> |
|
435 </dl> |
|
436 <dl> |
|
437 <dt>Return:</dt> |
|
438 <dd> |
|
439 flag indicating acceptance (boolean) |
|
440 </dd> |
|
441 </dl> |
|
442 <a NAME="AddBookmarkProxyModel.hasChildren" ID="AddBookmarkProxyModel.hasChildren"></a> |
|
443 <h4>AddBookmarkProxyModel.hasChildren</h4> |
|
444 <b>hasChildren</b>(<i>parent=None</i>) |
|
445 |
|
446 <p> |
|
447 Public method to check, if a parent node has some children. |
|
448 </p> |
|
449 <dl> |
|
450 |
|
451 <dt><i>parent</i></dt> |
|
452 <dd> |
|
453 index of the parent node (QModelIndex) |
|
454 </dd> |
|
455 </dl> |
|
456 <dl> |
|
457 <dt>Return:</dt> |
|
458 <dd> |
|
459 flag indicating the presence of children (boolean) |
|
460 </dd> |
|
461 </dl> |
|
462 <div align="right"><a href="#top">Up</a></div> |
|
463 <hr /> |
|
464 </body></html> |