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