|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.EricWidgets.EricToolBarManager</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.EricWidgets.EricToolBarManager</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a toolbar manager class. |
|
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="#EricToolBarManager">EricToolBarManager</a></td> |
|
25 <td>Class implementing a toolbar manager.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="EricToolBarManager" ID="EricToolBarManager"></a> |
|
36 <h2>EricToolBarManager</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing a toolbar manager. |
|
40 </p> |
|
41 <h3>Derived from</h3> |
|
42 QObject |
|
43 <h3>Class Attributes</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>CustomToolBarMarker</td></tr><tr><td>ToolBarMarker</td></tr><tr><td>VersionMarker</td></tr> |
|
47 </table> |
|
48 <h3>Class Methods</h3> |
|
49 |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <h3>Methods</h3> |
|
54 |
|
55 <table> |
|
56 |
|
57 <tr> |
|
58 <td><a href="#EricToolBarManager.__init__">EricToolBarManager</a></td> |
|
59 <td>Constructor</td> |
|
60 </tr> |
|
61 <tr> |
|
62 <td><a href="#EricToolBarManager.__findAction">__findAction</a></td> |
|
63 <td>Private method to find an action by name.</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#EricToolBarManager.__findDefaultToolBar">__findDefaultToolBar</a></td> |
|
67 <td>Private method to find a default toolbar by name.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#EricToolBarManager.__toolBarByName">__toolBarByName</a></td> |
|
71 <td>Private slot to get a toolbar by its object name.</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#EricToolBarManager.actionById">actionById</a></td> |
|
75 <td>Public method to get an action given its id.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#EricToolBarManager.addAction">addAction</a></td> |
|
79 <td>Public method to add an action to be managed.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#EricToolBarManager.addActions">addActions</a></td> |
|
83 <td>Public method to add actions to be managed.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#EricToolBarManager.addToolBar">addToolBar</a></td> |
|
87 <td>Public method to add a toolbar to be managed.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#EricToolBarManager.categories">categories</a></td> |
|
91 <td>Public method to get the list of categories.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#EricToolBarManager.categoryActions">categoryActions</a></td> |
|
95 <td>Public method to get the actions belonging to a category.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#EricToolBarManager.createToolBar">createToolBar</a></td> |
|
99 <td>Public method to create a custom toolbar.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#EricToolBarManager.defaultToolBarActions">defaultToolBarActions</a></td> |
|
103 <td>Public method to get a default toolbar's actions given its id.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#EricToolBarManager.defaultToolBars">defaultToolBars</a></td> |
|
107 <td>Public method to get all toolbars added with addToolBar().</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#EricToolBarManager.deleteToolBar">deleteToolBar</a></td> |
|
111 <td>Public method to remove a custom toolbar created with createToolBar().</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#EricToolBarManager.isDefaultToolBar">isDefaultToolBar</a></td> |
|
115 <td>Public method to check, if a toolbar was added with addToolBar().</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#EricToolBarManager.isWidgetAction">isWidgetAction</a></td> |
|
119 <td>Public method to check, if action is a widget action.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#EricToolBarManager.mainWindow">mainWindow</a></td> |
|
123 <td>Public method to get the reference to the main window.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#EricToolBarManager.removeAction">removeAction</a></td> |
|
127 <td>Public method to remove an action from the manager.</td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td><a href="#EricToolBarManager.removeCategoryActions">removeCategoryActions</a></td> |
|
131 <td>Public method to remove the actions belonging to a category.</td> |
|
132 </tr> |
|
133 <tr> |
|
134 <td><a href="#EricToolBarManager.removeToolBar">removeToolBar</a></td> |
|
135 <td>Public method to remove a toolbar added with addToolBar().</td> |
|
136 </tr> |
|
137 <tr> |
|
138 <td><a href="#EricToolBarManager.removeWidgetActions">removeWidgetActions</a></td> |
|
139 <td>Public method to remove widget actions.</td> |
|
140 </tr> |
|
141 <tr> |
|
142 <td><a href="#EricToolBarManager.renameToolBar">renameToolBar</a></td> |
|
143 <td>Public method to give a toolbar a new title.</td> |
|
144 </tr> |
|
145 <tr> |
|
146 <td><a href="#EricToolBarManager.resetAllToolBars">resetAllToolBars</a></td> |
|
147 <td>Public method to reset all toolbars to their default state.</td> |
|
148 </tr> |
|
149 <tr> |
|
150 <td><a href="#EricToolBarManager.resetToolBar">resetToolBar</a></td> |
|
151 <td>Public method to reset a toolbar to its default state.</td> |
|
152 </tr> |
|
153 <tr> |
|
154 <td><a href="#EricToolBarManager.restoreState">restoreState</a></td> |
|
155 <td>Public method to restore the state of the toolbar manager.</td> |
|
156 </tr> |
|
157 <tr> |
|
158 <td><a href="#EricToolBarManager.saveState">saveState</a></td> |
|
159 <td>Public method to save the state of the toolbar manager.</td> |
|
160 </tr> |
|
161 <tr> |
|
162 <td><a href="#EricToolBarManager.setMainWindow">setMainWindow</a></td> |
|
163 <td>Public method to set the reference to the main window.</td> |
|
164 </tr> |
|
165 <tr> |
|
166 <td><a href="#EricToolBarManager.setToolBar">setToolBar</a></td> |
|
167 <td>Public method to set the actions of a toolbar.</td> |
|
168 </tr> |
|
169 <tr> |
|
170 <td><a href="#EricToolBarManager.setToolBars">setToolBars</a></td> |
|
171 <td>Public method to set the actions of several toolbars.</td> |
|
172 </tr> |
|
173 <tr> |
|
174 <td><a href="#EricToolBarManager.toolBarActions">toolBarActions</a></td> |
|
175 <td>Public method to get a toolbar's actions given its id.</td> |
|
176 </tr> |
|
177 <tr> |
|
178 <td><a href="#EricToolBarManager.toolBarById">toolBarById</a></td> |
|
179 <td>Public method to get a toolbar given its id.</td> |
|
180 </tr> |
|
181 <tr> |
|
182 <td><a href="#EricToolBarManager.toolBarWidgetAction">toolBarWidgetAction</a></td> |
|
183 <td>Public method to get the toolbar for a widget action.</td> |
|
184 </tr> |
|
185 <tr> |
|
186 <td><a href="#EricToolBarManager.toolBars">toolBars</a></td> |
|
187 <td>Public method to get all toolbars.</td> |
|
188 </tr> |
|
189 <tr> |
|
190 <td><a href="#EricToolBarManager.toolBarsActions">toolBarsActions</a></td> |
|
191 <td>Public method to get all toolbars and their actions.</td> |
|
192 </tr> |
|
193 </table> |
|
194 <h3>Static Methods</h3> |
|
195 |
|
196 <table> |
|
197 <tr><td>None</td></tr> |
|
198 </table> |
|
199 |
|
200 <a NAME="EricToolBarManager.__init__" ID="EricToolBarManager.__init__"></a> |
|
201 <h4>EricToolBarManager (Constructor)</h4> |
|
202 <b>EricToolBarManager</b>(<i>ui=None, parent=None</i>) |
|
203 |
|
204 <p> |
|
205 Constructor |
|
206 </p> |
|
207 <dl> |
|
208 |
|
209 <dt><i>ui</i></dt> |
|
210 <dd> |
|
211 reference to the user interface object (UI.UserInterface) |
|
212 </dd> |
|
213 <dt><i>parent</i></dt> |
|
214 <dd> |
|
215 reference to the parent object (QObject) |
|
216 </dd> |
|
217 </dl> |
|
218 <a NAME="EricToolBarManager.__findAction" ID="EricToolBarManager.__findAction"></a> |
|
219 <h4>EricToolBarManager.__findAction</h4> |
|
220 <b>__findAction</b>(<i>name</i>) |
|
221 |
|
222 <p> |
|
223 Private method to find an action by name. |
|
224 </p> |
|
225 <dl> |
|
226 |
|
227 <dt><i>name</i></dt> |
|
228 <dd> |
|
229 name of the action to search for (string) |
|
230 </dd> |
|
231 </dl> |
|
232 <dl> |
|
233 <dt>Return:</dt> |
|
234 <dd> |
|
235 reference to the action (QAction) |
|
236 </dd> |
|
237 </dl> |
|
238 <a NAME="EricToolBarManager.__findDefaultToolBar" ID="EricToolBarManager.__findDefaultToolBar"></a> |
|
239 <h4>EricToolBarManager.__findDefaultToolBar</h4> |
|
240 <b>__findDefaultToolBar</b>(<i>name</i>) |
|
241 |
|
242 <p> |
|
243 Private method to find a default toolbar by name. |
|
244 </p> |
|
245 <dl> |
|
246 |
|
247 <dt><i>name</i></dt> |
|
248 <dd> |
|
249 name of the default toolbar to search for (string) |
|
250 </dd> |
|
251 </dl> |
|
252 <dl> |
|
253 <dt>Return:</dt> |
|
254 <dd> |
|
255 reference to the default toolbar (QToolBar) |
|
256 </dd> |
|
257 </dl> |
|
258 <a NAME="EricToolBarManager.__toolBarByName" ID="EricToolBarManager.__toolBarByName"></a> |
|
259 <h4>EricToolBarManager.__toolBarByName</h4> |
|
260 <b>__toolBarByName</b>(<i>name</i>) |
|
261 |
|
262 <p> |
|
263 Private slot to get a toolbar by its object name. |
|
264 </p> |
|
265 <dl> |
|
266 |
|
267 <dt><i>name</i></dt> |
|
268 <dd> |
|
269 object name of the toolbar (string) |
|
270 </dd> |
|
271 </dl> |
|
272 <dl> |
|
273 <dt>Return:</dt> |
|
274 <dd> |
|
275 reference to the toolbar (QToolBar) |
|
276 </dd> |
|
277 </dl> |
|
278 <a NAME="EricToolBarManager.actionById" ID="EricToolBarManager.actionById"></a> |
|
279 <h4>EricToolBarManager.actionById</h4> |
|
280 <b>actionById</b>(<i>aID</i>) |
|
281 |
|
282 <p> |
|
283 Public method to get an action given its id. |
|
284 </p> |
|
285 <dl> |
|
286 |
|
287 <dt><i>aID</i></dt> |
|
288 <dd> |
|
289 id of the action object (integer) |
|
290 </dd> |
|
291 </dl> |
|
292 <dl> |
|
293 <dt>Return:</dt> |
|
294 <dd> |
|
295 reference to the action (QAction) |
|
296 </dd> |
|
297 </dl> |
|
298 <a NAME="EricToolBarManager.addAction" ID="EricToolBarManager.addAction"></a> |
|
299 <h4>EricToolBarManager.addAction</h4> |
|
300 <b>addAction</b>(<i>action, category</i>) |
|
301 |
|
302 <p> |
|
303 Public method to add an action to be managed. |
|
304 </p> |
|
305 <dl> |
|
306 |
|
307 <dt><i>action</i></dt> |
|
308 <dd> |
|
309 reference to the action to be managed (QAction) |
|
310 </dd> |
|
311 <dt><i>category</i></dt> |
|
312 <dd> |
|
313 category for the toolbar (string) |
|
314 </dd> |
|
315 </dl> |
|
316 <a NAME="EricToolBarManager.addActions" ID="EricToolBarManager.addActions"></a> |
|
317 <h4>EricToolBarManager.addActions</h4> |
|
318 <b>addActions</b>(<i>actions, category</i>) |
|
319 |
|
320 <p> |
|
321 Public method to add actions to be managed. |
|
322 </p> |
|
323 <dl> |
|
324 |
|
325 <dt><i>actions</i> (list of QAction)</dt> |
|
326 <dd> |
|
327 list of actions to be managed |
|
328 </dd> |
|
329 <dt><i>category</i> (str)</dt> |
|
330 <dd> |
|
331 category for the toolbar |
|
332 </dd> |
|
333 </dl> |
|
334 <a NAME="EricToolBarManager.addToolBar" ID="EricToolBarManager.addToolBar"></a> |
|
335 <h4>EricToolBarManager.addToolBar</h4> |
|
336 <b>addToolBar</b>(<i>toolBar, category</i>) |
|
337 |
|
338 <p> |
|
339 Public method to add a toolbar to be managed. |
|
340 </p> |
|
341 <dl> |
|
342 |
|
343 <dt><i>toolBar</i></dt> |
|
344 <dd> |
|
345 reference to the toolbar to be managed (QToolBar) |
|
346 </dd> |
|
347 <dt><i>category</i></dt> |
|
348 <dd> |
|
349 category for the toolbar (string) |
|
350 </dd> |
|
351 </dl> |
|
352 <a NAME="EricToolBarManager.categories" ID="EricToolBarManager.categories"></a> |
|
353 <h4>EricToolBarManager.categories</h4> |
|
354 <b>categories</b>(<i></i>) |
|
355 |
|
356 <p> |
|
357 Public method to get the list of categories. |
|
358 </p> |
|
359 <dl> |
|
360 <dt>Return:</dt> |
|
361 <dd> |
|
362 list of categories (list of string) |
|
363 </dd> |
|
364 </dl> |
|
365 <a NAME="EricToolBarManager.categoryActions" ID="EricToolBarManager.categoryActions"></a> |
|
366 <h4>EricToolBarManager.categoryActions</h4> |
|
367 <b>categoryActions</b>(<i>category</i>) |
|
368 |
|
369 <p> |
|
370 Public method to get the actions belonging to a category. |
|
371 </p> |
|
372 <dl> |
|
373 |
|
374 <dt><i>category</i></dt> |
|
375 <dd> |
|
376 category for the actions (string) |
|
377 </dd> |
|
378 </dl> |
|
379 <dl> |
|
380 <dt>Return:</dt> |
|
381 <dd> |
|
382 list of actions (list of QAction) |
|
383 </dd> |
|
384 </dl> |
|
385 <a NAME="EricToolBarManager.createToolBar" ID="EricToolBarManager.createToolBar"></a> |
|
386 <h4>EricToolBarManager.createToolBar</h4> |
|
387 <b>createToolBar</b>(<i>title, name=""</i>) |
|
388 |
|
389 <p> |
|
390 Public method to create a custom toolbar. |
|
391 </p> |
|
392 <dl> |
|
393 |
|
394 <dt><i>title</i></dt> |
|
395 <dd> |
|
396 title to be used for the toolbar (string) |
|
397 </dd> |
|
398 <dt><i>name</i></dt> |
|
399 <dd> |
|
400 optional name for the new toolbar (string) |
|
401 </dd> |
|
402 </dl> |
|
403 <dl> |
|
404 <dt>Return:</dt> |
|
405 <dd> |
|
406 reference to the created toolbar (QToolBar) |
|
407 </dd> |
|
408 </dl> |
|
409 <a NAME="EricToolBarManager.defaultToolBarActions" ID="EricToolBarManager.defaultToolBarActions"></a> |
|
410 <h4>EricToolBarManager.defaultToolBarActions</h4> |
|
411 <b>defaultToolBarActions</b>(<i>tbID</i>) |
|
412 |
|
413 <p> |
|
414 Public method to get a default toolbar's actions given its id. |
|
415 </p> |
|
416 <dl> |
|
417 |
|
418 <dt><i>tbID</i></dt> |
|
419 <dd> |
|
420 id of the default toolbar object (integer) |
|
421 </dd> |
|
422 </dl> |
|
423 <dl> |
|
424 <dt>Return:</dt> |
|
425 <dd> |
|
426 list of actions (list of QAction) |
|
427 </dd> |
|
428 </dl> |
|
429 <a NAME="EricToolBarManager.defaultToolBars" ID="EricToolBarManager.defaultToolBars"></a> |
|
430 <h4>EricToolBarManager.defaultToolBars</h4> |
|
431 <b>defaultToolBars</b>(<i></i>) |
|
432 |
|
433 <p> |
|
434 Public method to get all toolbars added with addToolBar(). |
|
435 </p> |
|
436 <dl> |
|
437 <dt>Return:</dt> |
|
438 <dd> |
|
439 list of all default toolbars (list of QToolBar) |
|
440 </dd> |
|
441 </dl> |
|
442 <a NAME="EricToolBarManager.deleteToolBar" ID="EricToolBarManager.deleteToolBar"></a> |
|
443 <h4>EricToolBarManager.deleteToolBar</h4> |
|
444 <b>deleteToolBar</b>(<i>toolBar</i>) |
|
445 |
|
446 <p> |
|
447 Public method to remove a custom toolbar created with createToolBar(). |
|
448 </p> |
|
449 <dl> |
|
450 |
|
451 <dt><i>toolBar</i></dt> |
|
452 <dd> |
|
453 reference to the toolbar to be managed (QToolBar) |
|
454 </dd> |
|
455 </dl> |
|
456 <a NAME="EricToolBarManager.isDefaultToolBar" ID="EricToolBarManager.isDefaultToolBar"></a> |
|
457 <h4>EricToolBarManager.isDefaultToolBar</h4> |
|
458 <b>isDefaultToolBar</b>(<i>toolBar</i>) |
|
459 |
|
460 <p> |
|
461 Public method to check, if a toolbar was added with addToolBar(). |
|
462 </p> |
|
463 <dl> |
|
464 |
|
465 <dt><i>toolBar</i></dt> |
|
466 <dd> |
|
467 reference to the toolbar to be checked (QToolBar) |
|
468 </dd> |
|
469 </dl> |
|
470 <dl> |
|
471 <dt>Return:</dt> |
|
472 <dd> |
|
473 flag indicating an added toolbar (boolean) |
|
474 </dd> |
|
475 </dl> |
|
476 <a NAME="EricToolBarManager.isWidgetAction" ID="EricToolBarManager.isWidgetAction"></a> |
|
477 <h4>EricToolBarManager.isWidgetAction</h4> |
|
478 <b>isWidgetAction</b>(<i>action</i>) |
|
479 |
|
480 <p> |
|
481 Public method to check, if action is a widget action. |
|
482 </p> |
|
483 <dl> |
|
484 |
|
485 <dt><i>action</i></dt> |
|
486 <dd> |
|
487 reference to the action to be checked (QAction) |
|
488 </dd> |
|
489 </dl> |
|
490 <dl> |
|
491 <dt>Return:</dt> |
|
492 <dd> |
|
493 flag indicating a widget action (boolean) |
|
494 </dd> |
|
495 </dl> |
|
496 <a NAME="EricToolBarManager.mainWindow" ID="EricToolBarManager.mainWindow"></a> |
|
497 <h4>EricToolBarManager.mainWindow</h4> |
|
498 <b>mainWindow</b>(<i></i>) |
|
499 |
|
500 <p> |
|
501 Public method to get the reference to the main window. |
|
502 </p> |
|
503 <dl> |
|
504 <dt>Return:</dt> |
|
505 <dd> |
|
506 reference to the main window (QMainWindow) |
|
507 </dd> |
|
508 </dl> |
|
509 <a NAME="EricToolBarManager.removeAction" ID="EricToolBarManager.removeAction"></a> |
|
510 <h4>EricToolBarManager.removeAction</h4> |
|
511 <b>removeAction</b>(<i>action</i>) |
|
512 |
|
513 <p> |
|
514 Public method to remove an action from the manager. |
|
515 </p> |
|
516 <dl> |
|
517 |
|
518 <dt><i>action</i></dt> |
|
519 <dd> |
|
520 reference to the action to be removed (QAction) |
|
521 </dd> |
|
522 </dl> |
|
523 <a NAME="EricToolBarManager.removeCategoryActions" ID="EricToolBarManager.removeCategoryActions"></a> |
|
524 <h4>EricToolBarManager.removeCategoryActions</h4> |
|
525 <b>removeCategoryActions</b>(<i>category</i>) |
|
526 |
|
527 <p> |
|
528 Public method to remove the actions belonging to a category. |
|
529 </p> |
|
530 <dl> |
|
531 |
|
532 <dt><i>category</i></dt> |
|
533 <dd> |
|
534 category for the actions (string) |
|
535 </dd> |
|
536 </dl> |
|
537 <a NAME="EricToolBarManager.removeToolBar" ID="EricToolBarManager.removeToolBar"></a> |
|
538 <h4>EricToolBarManager.removeToolBar</h4> |
|
539 <b>removeToolBar</b>(<i>toolBar</i>) |
|
540 |
|
541 <p> |
|
542 Public method to remove a toolbar added with addToolBar(). |
|
543 </p> |
|
544 <dl> |
|
545 |
|
546 <dt><i>toolBar</i></dt> |
|
547 <dd> |
|
548 reference to the toolbar to be removed (QToolBar) |
|
549 </dd> |
|
550 </dl> |
|
551 <a NAME="EricToolBarManager.removeWidgetActions" ID="EricToolBarManager.removeWidgetActions"></a> |
|
552 <h4>EricToolBarManager.removeWidgetActions</h4> |
|
553 <b>removeWidgetActions</b>(<i>actions</i>) |
|
554 |
|
555 <p> |
|
556 Public method to remove widget actions. |
|
557 </p> |
|
558 <dl> |
|
559 |
|
560 <dt><i>actions</i></dt> |
|
561 <dd> |
|
562 dictionary with toolbar id as key and |
|
563 a list of widget actions as value |
|
564 </dd> |
|
565 </dl> |
|
566 <a NAME="EricToolBarManager.renameToolBar" ID="EricToolBarManager.renameToolBar"></a> |
|
567 <h4>EricToolBarManager.renameToolBar</h4> |
|
568 <b>renameToolBar</b>(<i>toolBar, title</i>) |
|
569 |
|
570 <p> |
|
571 Public method to give a toolbar a new title. |
|
572 </p> |
|
573 <dl> |
|
574 |
|
575 <dt><i>toolBar</i></dt> |
|
576 <dd> |
|
577 reference to the toolbar to be managed (QToolBar) |
|
578 </dd> |
|
579 <dt><i>title</i></dt> |
|
580 <dd> |
|
581 title to be used for the toolbar (string) |
|
582 </dd> |
|
583 </dl> |
|
584 <a NAME="EricToolBarManager.resetAllToolBars" ID="EricToolBarManager.resetAllToolBars"></a> |
|
585 <h4>EricToolBarManager.resetAllToolBars</h4> |
|
586 <b>resetAllToolBars</b>(<i></i>) |
|
587 |
|
588 <p> |
|
589 Public method to reset all toolbars to their default state. |
|
590 </p> |
|
591 <a NAME="EricToolBarManager.resetToolBar" ID="EricToolBarManager.resetToolBar"></a> |
|
592 <h4>EricToolBarManager.resetToolBar</h4> |
|
593 <b>resetToolBar</b>(<i>toolBar</i>) |
|
594 |
|
595 <p> |
|
596 Public method to reset a toolbar to its default state. |
|
597 </p> |
|
598 <dl> |
|
599 |
|
600 <dt><i>toolBar</i></dt> |
|
601 <dd> |
|
602 reference to the toolbar to configure (QToolBar) |
|
603 </dd> |
|
604 </dl> |
|
605 <a NAME="EricToolBarManager.restoreState" ID="EricToolBarManager.restoreState"></a> |
|
606 <h4>EricToolBarManager.restoreState</h4> |
|
607 <b>restoreState</b>(<i>state, version=0</i>) |
|
608 |
|
609 <p> |
|
610 Public method to restore the state of the toolbar manager. |
|
611 </p> |
|
612 <dl> |
|
613 |
|
614 <dt><i>state</i></dt> |
|
615 <dd> |
|
616 byte array containing the saved state (QByteArray) |
|
617 </dd> |
|
618 <dt><i>version</i></dt> |
|
619 <dd> |
|
620 version number stored with the data (integer) |
|
621 </dd> |
|
622 </dl> |
|
623 <dl> |
|
624 <dt>Return:</dt> |
|
625 <dd> |
|
626 flag indicating success (boolean) |
|
627 </dd> |
|
628 </dl> |
|
629 <a NAME="EricToolBarManager.saveState" ID="EricToolBarManager.saveState"></a> |
|
630 <h4>EricToolBarManager.saveState</h4> |
|
631 <b>saveState</b>(<i>version=0</i>) |
|
632 |
|
633 <p> |
|
634 Public method to save the state of the toolbar manager. |
|
635 </p> |
|
636 <dl> |
|
637 |
|
638 <dt><i>version</i></dt> |
|
639 <dd> |
|
640 version number stored with the data (integer) |
|
641 </dd> |
|
642 </dl> |
|
643 <dl> |
|
644 <dt>Return:</dt> |
|
645 <dd> |
|
646 saved state as a byte array (QByteArray) |
|
647 </dd> |
|
648 </dl> |
|
649 <a NAME="EricToolBarManager.setMainWindow" ID="EricToolBarManager.setMainWindow"></a> |
|
650 <h4>EricToolBarManager.setMainWindow</h4> |
|
651 <b>setMainWindow</b>(<i>mainWindow</i>) |
|
652 |
|
653 <p> |
|
654 Public method to set the reference to the main window. |
|
655 </p> |
|
656 <dl> |
|
657 |
|
658 <dt><i>mainWindow</i></dt> |
|
659 <dd> |
|
660 reference to the main window (QMainWindow) |
|
661 </dd> |
|
662 </dl> |
|
663 <a NAME="EricToolBarManager.setToolBar" ID="EricToolBarManager.setToolBar"></a> |
|
664 <h4>EricToolBarManager.setToolBar</h4> |
|
665 <b>setToolBar</b>(<i>toolBar, actions</i>) |
|
666 |
|
667 <p> |
|
668 Public method to set the actions of a toolbar. |
|
669 </p> |
|
670 <dl> |
|
671 |
|
672 <dt><i>toolBar</i></dt> |
|
673 <dd> |
|
674 reference to the toolbar to configure (QToolBar) |
|
675 </dd> |
|
676 <dt><i>actions</i></dt> |
|
677 <dd> |
|
678 list of actions to be set (list of QAction) |
|
679 </dd> |
|
680 </dl> |
|
681 <a NAME="EricToolBarManager.setToolBars" ID="EricToolBarManager.setToolBars"></a> |
|
682 <h4>EricToolBarManager.setToolBars</h4> |
|
683 <b>setToolBars</b>(<i>toolBars</i>) |
|
684 |
|
685 <p> |
|
686 Public method to set the actions of several toolbars. |
|
687 </p> |
|
688 <dl> |
|
689 |
|
690 <dt><i>toolBars</i></dt> |
|
691 <dd> |
|
692 dictionary with toolbar id as key and |
|
693 a list of actions as value |
|
694 </dd> |
|
695 </dl> |
|
696 <a NAME="EricToolBarManager.toolBarActions" ID="EricToolBarManager.toolBarActions"></a> |
|
697 <h4>EricToolBarManager.toolBarActions</h4> |
|
698 <b>toolBarActions</b>(<i>tbID</i>) |
|
699 |
|
700 <p> |
|
701 Public method to get a toolbar's actions given its id. |
|
702 </p> |
|
703 <dl> |
|
704 |
|
705 <dt><i>tbID</i></dt> |
|
706 <dd> |
|
707 id of the toolbar object (integer) |
|
708 </dd> |
|
709 </dl> |
|
710 <dl> |
|
711 <dt>Return:</dt> |
|
712 <dd> |
|
713 list of actions (list of QAction) |
|
714 </dd> |
|
715 </dl> |
|
716 <a NAME="EricToolBarManager.toolBarById" ID="EricToolBarManager.toolBarById"></a> |
|
717 <h4>EricToolBarManager.toolBarById</h4> |
|
718 <b>toolBarById</b>(<i>tbID</i>) |
|
719 |
|
720 <p> |
|
721 Public method to get a toolbar given its id. |
|
722 </p> |
|
723 <dl> |
|
724 |
|
725 <dt><i>tbID</i></dt> |
|
726 <dd> |
|
727 id of the toolbar object (integer) |
|
728 </dd> |
|
729 </dl> |
|
730 <dl> |
|
731 <dt>Return:</dt> |
|
732 <dd> |
|
733 reference to the toolbar (QToolBar) |
|
734 </dd> |
|
735 </dl> |
|
736 <a NAME="EricToolBarManager.toolBarWidgetAction" ID="EricToolBarManager.toolBarWidgetAction"></a> |
|
737 <h4>EricToolBarManager.toolBarWidgetAction</h4> |
|
738 <b>toolBarWidgetAction</b>(<i>action</i>) |
|
739 |
|
740 <p> |
|
741 Public method to get the toolbar for a widget action. |
|
742 </p> |
|
743 <dl> |
|
744 |
|
745 <dt><i>action</i></dt> |
|
746 <dd> |
|
747 widget action to check for (QAction) |
|
748 </dd> |
|
749 </dl> |
|
750 <dl> |
|
751 <dt>Return:</dt> |
|
752 <dd> |
|
753 reference to the toolbar containing action (QToolBar) |
|
754 </dd> |
|
755 </dl> |
|
756 <a NAME="EricToolBarManager.toolBars" ID="EricToolBarManager.toolBars"></a> |
|
757 <h4>EricToolBarManager.toolBars</h4> |
|
758 <b>toolBars</b>(<i></i>) |
|
759 |
|
760 <p> |
|
761 Public method to get all toolbars. |
|
762 </p> |
|
763 <dl> |
|
764 <dt>Return:</dt> |
|
765 <dd> |
|
766 list of all toolbars (list of QToolBar) |
|
767 </dd> |
|
768 </dl> |
|
769 <a NAME="EricToolBarManager.toolBarsActions" ID="EricToolBarManager.toolBarsActions"></a> |
|
770 <h4>EricToolBarManager.toolBarsActions</h4> |
|
771 <b>toolBarsActions</b>(<i></i>) |
|
772 |
|
773 <p> |
|
774 Public method to get all toolbars and their actions. |
|
775 </p> |
|
776 <dl> |
|
777 <dt>Return:</dt> |
|
778 <dd> |
|
779 reference to dictionary of toolbar IDs as key and list |
|
780 of actions as values |
|
781 </dd> |
|
782 </dl> |
|
783 <div align="right"><a href="#top">Up</a></div> |
|
784 <hr /> |
|
785 </body></html> |