|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.EricWidgets.EricToolBarDialog</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.EricToolBarDialog</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a toolbar configuration dialog. |
|
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="#EricToolBarDialog">EricToolBarDialog</a></td> |
|
25 <td>Class implementing a toolbar configuration dialog.</td> |
|
26 </tr> |
|
27 <tr> |
|
28 <td><a href="#EricToolBarItem">EricToolBarItem</a></td> |
|
29 <td>Class storing data belonging to a toolbar entry of the toolbar 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="EricToolBarDialog" ID="EricToolBarDialog"></a> |
|
40 <h2>EricToolBarDialog</h2> |
|
41 |
|
42 <p> |
|
43 Class implementing a toolbar configuration dialog. |
|
44 </p> |
|
45 <h3>Derived from</h3> |
|
46 QDialog, Ui_EricToolBarDialog |
|
47 <h3>Class Attributes</h3> |
|
48 |
|
49 <table> |
|
50 <tr><td>ActionIdRole</td></tr><tr><td>WidgetActionRole</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="#EricToolBarDialog.__init__">EricToolBarDialog</a></td> |
|
63 <td>Constructor</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#EricToolBarDialog.__resetCurrentToolbar">__resetCurrentToolbar</a></td> |
|
67 <td>Private method to revert all changes made to the current toolbar.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#EricToolBarDialog.__restoreCurrentToolbar">__restoreCurrentToolbar</a></td> |
|
71 <td>Private methdo to restore the current toolbar to the given list of actions.</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#EricToolBarDialog.__restoreCurrentToolbarToDefault">__restoreCurrentToolbarToDefault</a></td> |
|
75 <td>Private method to set the current toolbar to its default configuration.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#EricToolBarDialog.__saveToolBars">__saveToolBars</a></td> |
|
79 <td>Private method to save the configured toolbars.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#EricToolBarDialog.__setupButtons">__setupButtons</a></td> |
|
83 <td>Private slot to set the buttons state.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#EricToolBarDialog.__toolbarComboBox_currentIndexChanged">__toolbarComboBox_currentIndexChanged</a></td> |
|
87 <td>Private slot called upon a selection of the current toolbar.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#EricToolBarDialog.on_actionsTree_currentItemChanged">on_actionsTree_currentItemChanged</a></td> |
|
91 <td>Private slot called, when the currently selected action changes.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#EricToolBarDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
95 <td>Private slot called, when a button of the button box was clicked.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#EricToolBarDialog.on_downButton_clicked">on_downButton_clicked</a></td> |
|
99 <td>Private slot used to move an action down in the list.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#EricToolBarDialog.on_leftButton_clicked">on_leftButton_clicked</a></td> |
|
103 <td>Private slot to delete an action from the list.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#EricToolBarDialog.on_newButton_clicked">on_newButton_clicked</a></td> |
|
107 <td>Private slot to create a new toolbar.</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#EricToolBarDialog.on_removeButton_clicked">on_removeButton_clicked</a></td> |
|
111 <td>Private slot to remove a custom toolbar.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#EricToolBarDialog.on_renameButton_clicked">on_renameButton_clicked</a></td> |
|
115 <td>Private slot to rename a custom toolbar.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#EricToolBarDialog.on_rightButton_clicked">on_rightButton_clicked</a></td> |
|
119 <td>Private slot to add an action to the list.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#EricToolBarDialog.on_toolbarActionsList_currentItemChanged">on_toolbarActionsList_currentItemChanged</a></td> |
|
123 <td>Private slot to handle a change of the current item.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#EricToolBarDialog.on_upButton_clicked">on_upButton_clicked</a></td> |
|
127 <td>Private slot used to move an action up in the list.</td> |
|
128 </tr> |
|
129 </table> |
|
130 <h3>Static Methods</h3> |
|
131 |
|
132 <table> |
|
133 <tr><td>None</td></tr> |
|
134 </table> |
|
135 |
|
136 <a NAME="EricToolBarDialog.__init__" ID="EricToolBarDialog.__init__"></a> |
|
137 <h4>EricToolBarDialog (Constructor)</h4> |
|
138 <b>EricToolBarDialog</b>(<i>toolBarManager, parent=None</i>) |
|
139 |
|
140 <p> |
|
141 Constructor |
|
142 </p> |
|
143 <dl> |
|
144 |
|
145 <dt><i>toolBarManager</i></dt> |
|
146 <dd> |
|
147 reference to a toolbar manager object |
|
148 (EricToolBarManager) |
|
149 </dd> |
|
150 <dt><i>parent</i></dt> |
|
151 <dd> |
|
152 reference to the parent widget (QWidget) |
|
153 </dd> |
|
154 </dl> |
|
155 <a NAME="EricToolBarDialog.__resetCurrentToolbar" ID="EricToolBarDialog.__resetCurrentToolbar"></a> |
|
156 <h4>EricToolBarDialog.__resetCurrentToolbar</h4> |
|
157 <b>__resetCurrentToolbar</b>(<i></i>) |
|
158 |
|
159 <p> |
|
160 Private method to revert all changes made to the current toolbar. |
|
161 </p> |
|
162 <a NAME="EricToolBarDialog.__restoreCurrentToolbar" ID="EricToolBarDialog.__restoreCurrentToolbar"></a> |
|
163 <h4>EricToolBarDialog.__restoreCurrentToolbar</h4> |
|
164 <b>__restoreCurrentToolbar</b>(<i>actions</i>) |
|
165 |
|
166 <p> |
|
167 Private methdo to restore the current toolbar to the given list of |
|
168 actions. |
|
169 </p> |
|
170 <dl> |
|
171 |
|
172 <dt><i>actions</i></dt> |
|
173 <dd> |
|
174 list of actions to set for the current toolbar |
|
175 (list of QAction) |
|
176 </dd> |
|
177 </dl> |
|
178 <a NAME="EricToolBarDialog.__restoreCurrentToolbarToDefault" ID="EricToolBarDialog.__restoreCurrentToolbarToDefault"></a> |
|
179 <h4>EricToolBarDialog.__restoreCurrentToolbarToDefault</h4> |
|
180 <b>__restoreCurrentToolbarToDefault</b>(<i></i>) |
|
181 |
|
182 <p> |
|
183 Private method to set the current toolbar to its default configuration. |
|
184 </p> |
|
185 <a NAME="EricToolBarDialog.__saveToolBars" ID="EricToolBarDialog.__saveToolBars"></a> |
|
186 <h4>EricToolBarDialog.__saveToolBars</h4> |
|
187 <b>__saveToolBars</b>(<i></i>) |
|
188 |
|
189 <p> |
|
190 Private method to save the configured toolbars. |
|
191 </p> |
|
192 <dl> |
|
193 |
|
194 <dt>Raises <b>RuntimeError</b>:</dt> |
|
195 <dd> |
|
196 raised to indicate an invalid action |
|
197 </dd> |
|
198 </dl> |
|
199 <a NAME="EricToolBarDialog.__setupButtons" ID="EricToolBarDialog.__setupButtons"></a> |
|
200 <h4>EricToolBarDialog.__setupButtons</h4> |
|
201 <b>__setupButtons</b>(<i></i>) |
|
202 |
|
203 <p> |
|
204 Private slot to set the buttons state. |
|
205 </p> |
|
206 <a NAME="EricToolBarDialog.__toolbarComboBox_currentIndexChanged" ID="EricToolBarDialog.__toolbarComboBox_currentIndexChanged"></a> |
|
207 <h4>EricToolBarDialog.__toolbarComboBox_currentIndexChanged</h4> |
|
208 <b>__toolbarComboBox_currentIndexChanged</b>(<i>index</i>) |
|
209 |
|
210 <p> |
|
211 Private slot called upon a selection of the current toolbar. |
|
212 </p> |
|
213 <dl> |
|
214 |
|
215 <dt><i>index</i></dt> |
|
216 <dd> |
|
217 index of the new current toolbar (integer) |
|
218 </dd> |
|
219 </dl> |
|
220 <a NAME="EricToolBarDialog.on_actionsTree_currentItemChanged" ID="EricToolBarDialog.on_actionsTree_currentItemChanged"></a> |
|
221 <h4>EricToolBarDialog.on_actionsTree_currentItemChanged</h4> |
|
222 <b>on_actionsTree_currentItemChanged</b>(<i>current, previous</i>) |
|
223 |
|
224 <p> |
|
225 Private slot called, when the currently selected action changes. |
|
226 </p> |
|
227 <dl> |
|
228 |
|
229 <dt><i>current</i></dt> |
|
230 <dd> |
|
231 reference to the current item (QTreeWidgetItem) |
|
232 </dd> |
|
233 <dt><i>previous</i></dt> |
|
234 <dd> |
|
235 reference to the previous current item |
|
236 (QTreeWidgetItem) |
|
237 </dd> |
|
238 </dl> |
|
239 <a NAME="EricToolBarDialog.on_buttonBox_clicked" ID="EricToolBarDialog.on_buttonBox_clicked"></a> |
|
240 <h4>EricToolBarDialog.on_buttonBox_clicked</h4> |
|
241 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
242 |
|
243 <p> |
|
244 Private slot called, when a button of the button box was clicked. |
|
245 </p> |
|
246 <dl> |
|
247 |
|
248 <dt><i>button</i></dt> |
|
249 <dd> |
|
250 reference to the button clicked (QAbstractButton) |
|
251 </dd> |
|
252 </dl> |
|
253 <a NAME="EricToolBarDialog.on_downButton_clicked" ID="EricToolBarDialog.on_downButton_clicked"></a> |
|
254 <h4>EricToolBarDialog.on_downButton_clicked</h4> |
|
255 <b>on_downButton_clicked</b>(<i></i>) |
|
256 |
|
257 <p> |
|
258 Private slot used to move an action down in the list. |
|
259 </p> |
|
260 <a NAME="EricToolBarDialog.on_leftButton_clicked" ID="EricToolBarDialog.on_leftButton_clicked"></a> |
|
261 <h4>EricToolBarDialog.on_leftButton_clicked</h4> |
|
262 <b>on_leftButton_clicked</b>(<i></i>) |
|
263 |
|
264 <p> |
|
265 Private slot to delete an action from the list. |
|
266 </p> |
|
267 <a NAME="EricToolBarDialog.on_newButton_clicked" ID="EricToolBarDialog.on_newButton_clicked"></a> |
|
268 <h4>EricToolBarDialog.on_newButton_clicked</h4> |
|
269 <b>on_newButton_clicked</b>(<i></i>) |
|
270 |
|
271 <p> |
|
272 Private slot to create a new toolbar. |
|
273 </p> |
|
274 <a NAME="EricToolBarDialog.on_removeButton_clicked" ID="EricToolBarDialog.on_removeButton_clicked"></a> |
|
275 <h4>EricToolBarDialog.on_removeButton_clicked</h4> |
|
276 <b>on_removeButton_clicked</b>(<i></i>) |
|
277 |
|
278 <p> |
|
279 Private slot to remove a custom toolbar. |
|
280 </p> |
|
281 <a NAME="EricToolBarDialog.on_renameButton_clicked" ID="EricToolBarDialog.on_renameButton_clicked"></a> |
|
282 <h4>EricToolBarDialog.on_renameButton_clicked</h4> |
|
283 <b>on_renameButton_clicked</b>(<i></i>) |
|
284 |
|
285 <p> |
|
286 Private slot to rename a custom toolbar. |
|
287 </p> |
|
288 <a NAME="EricToolBarDialog.on_rightButton_clicked" ID="EricToolBarDialog.on_rightButton_clicked"></a> |
|
289 <h4>EricToolBarDialog.on_rightButton_clicked</h4> |
|
290 <b>on_rightButton_clicked</b>(<i></i>) |
|
291 |
|
292 <p> |
|
293 Private slot to add an action to the list. |
|
294 </p> |
|
295 <a NAME="EricToolBarDialog.on_toolbarActionsList_currentItemChanged" ID="EricToolBarDialog.on_toolbarActionsList_currentItemChanged"></a> |
|
296 <h4>EricToolBarDialog.on_toolbarActionsList_currentItemChanged</h4> |
|
297 <b>on_toolbarActionsList_currentItemChanged</b>(<i>current, previous</i>) |
|
298 |
|
299 <p> |
|
300 Private slot to handle a change of the current item. |
|
301 </p> |
|
302 <dl> |
|
303 |
|
304 <dt><i>current</i></dt> |
|
305 <dd> |
|
306 reference to the current item (QListWidgetItem) |
|
307 </dd> |
|
308 <dt><i>previous</i></dt> |
|
309 <dd> |
|
310 reference to the previous current item |
|
311 (QListWidgetItem) |
|
312 </dd> |
|
313 </dl> |
|
314 <a NAME="EricToolBarDialog.on_upButton_clicked" ID="EricToolBarDialog.on_upButton_clicked"></a> |
|
315 <h4>EricToolBarDialog.on_upButton_clicked</h4> |
|
316 <b>on_upButton_clicked</b>(<i></i>) |
|
317 |
|
318 <p> |
|
319 Private slot used to move an action up in the list. |
|
320 </p> |
|
321 <div align="right"><a href="#top">Up</a></div> |
|
322 <hr /> |
|
323 <hr /> |
|
324 <a NAME="EricToolBarItem" ID="EricToolBarItem"></a> |
|
325 <h2>EricToolBarItem</h2> |
|
326 |
|
327 <p> |
|
328 Class storing data belonging to a toolbar entry of the toolbar dialog. |
|
329 </p> |
|
330 <h3>Derived from</h3> |
|
331 None |
|
332 <h3>Class Attributes</h3> |
|
333 |
|
334 <table> |
|
335 <tr><td>None</td></tr> |
|
336 </table> |
|
337 <h3>Class Methods</h3> |
|
338 |
|
339 <table> |
|
340 <tr><td>None</td></tr> |
|
341 </table> |
|
342 <h3>Methods</h3> |
|
343 |
|
344 <table> |
|
345 |
|
346 <tr> |
|
347 <td><a href="#EricToolBarItem.__init__">EricToolBarItem</a></td> |
|
348 <td>Constructor</td> |
|
349 </tr> |
|
350 </table> |
|
351 <h3>Static Methods</h3> |
|
352 |
|
353 <table> |
|
354 <tr><td>None</td></tr> |
|
355 </table> |
|
356 |
|
357 <a NAME="EricToolBarItem.__init__" ID="EricToolBarItem.__init__"></a> |
|
358 <h4>EricToolBarItem (Constructor)</h4> |
|
359 <b>EricToolBarItem</b>(<i>toolBarId, actionIDs, default</i>) |
|
360 |
|
361 <p> |
|
362 Constructor |
|
363 </p> |
|
364 <dl> |
|
365 |
|
366 <dt><i>toolBarId</i></dt> |
|
367 <dd> |
|
368 id of the toolbar object (integer) |
|
369 </dd> |
|
370 <dt><i>actionIDs</i></dt> |
|
371 <dd> |
|
372 list of action IDs belonging to the toolbar |
|
373 (list of integer) |
|
374 </dd> |
|
375 <dt><i>default</i></dt> |
|
376 <dd> |
|
377 flag indicating a default toolbar (boolean) |
|
378 </dd> |
|
379 </dl> |
|
380 <div align="right"><a href="#top">Up</a></div> |
|
381 <hr /> |
|
382 </body></html> |