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