|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Preferences.ShortcutsDialog</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><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.Preferences.ShortcutsDialog</h1> |
|
23 <p> |
|
24 Module implementing a dialog for the configuration of eric6's keyboard |
|
25 shortcuts. |
|
26 </p> |
|
27 <h3>Global Attributes</h3> |
|
28 <table> |
|
29 <tr><td>None</td></tr> |
|
30 </table> |
|
31 <h3>Classes</h3> |
|
32 <table> |
|
33 <tr> |
|
34 <td><a href="#ShortcutsDialog">ShortcutsDialog</a></td> |
|
35 <td>Class implementing a dialog for the configuration of eric6's keyboard shortcuts.</td> |
|
36 </tr> |
|
37 </table> |
|
38 <h3>Functions</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <hr /><hr /> |
|
43 <a NAME="ShortcutsDialog" ID="ShortcutsDialog"></a> |
|
44 <h2>ShortcutsDialog</h2> |
|
45 <p> |
|
46 Class implementing a dialog for the configuration of eric6's keyboard |
|
47 shortcuts. |
|
48 </p><h3>Signals</h3> |
|
49 <dl> |
|
50 <dt>updateShortcuts()</dt> |
|
51 <dd> |
|
52 emitted when the user pressed the dialogs OK |
|
53 button |
|
54 </dd> |
|
55 </dl> |
|
56 <h3>Derived from</h3> |
|
57 QDialog, Ui_ShortcutsDialog |
|
58 <h3>Class Attributes</h3> |
|
59 <table> |
|
60 <tr><td>noCheckRole</td></tr><tr><td>objectNameRole</td></tr><tr><td>objectTypeRole</td></tr> |
|
61 </table> |
|
62 <h3>Class Methods</h3> |
|
63 <table> |
|
64 <tr><td>None</td></tr> |
|
65 </table> |
|
66 <h3>Methods</h3> |
|
67 <table> |
|
68 <tr> |
|
69 <td><a href="#ShortcutsDialog.__init__">ShortcutsDialog</a></td> |
|
70 <td>Constructor</td> |
|
71 </tr><tr> |
|
72 <td><a href="#ShortcutsDialog.__checkShortcut">__checkShortcut</a></td> |
|
73 <td>Private method to check a keysequence for uniqueness.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#ShortcutsDialog.__generateCategoryItem">__generateCategoryItem</a></td> |
|
76 <td>Private method to generate a category item.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#ShortcutsDialog.__generateShortcutItem">__generateShortcutItem</a></td> |
|
79 <td>Private method to generate a keyboard shortcut item.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#ShortcutsDialog.__resizeColumns">__resizeColumns</a></td> |
|
82 <td>Private method to resize the list columns.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#ShortcutsDialog.__resort">__resort</a></td> |
|
85 <td>Private method to resort the tree.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#ShortcutsDialog.__saveCategoryActions">__saveCategoryActions</a></td> |
|
88 <td>Private method to save the actions for a category.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#ShortcutsDialog.__shortcutChanged">__shortcutChanged</a></td> |
|
91 <td>Private slot to handle the shortcutChanged signal of the shortcut dialog.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#ShortcutsDialog.on_actionButton_toggled">on_actionButton_toggled</a></td> |
|
94 <td>Private slot called, when the action radio button is toggled.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#ShortcutsDialog.on_buttonBox_accepted">on_buttonBox_accepted</a></td> |
|
97 <td>Private slot to handle the OK button press.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#ShortcutsDialog.on_searchEdit_textChanged">on_searchEdit_textChanged</a></td> |
|
100 <td>Private slot called, when the text in the search edit changes.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#ShortcutsDialog.on_shortcutButton_toggled">on_shortcutButton_toggled</a></td> |
|
103 <td>Private slot called, when the shortcuts radio button is toggled.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#ShortcutsDialog.on_shortcutsList_itemChanged">on_shortcutsList_itemChanged</a></td> |
|
106 <td>Private slot to handle the edit of a shortcut key.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#ShortcutsDialog.on_shortcutsList_itemClicked">on_shortcutsList_itemClicked</a></td> |
|
109 <td>Private slot to handle a click in the shortcuts list.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#ShortcutsDialog.on_shortcutsList_itemDoubleClicked">on_shortcutsList_itemDoubleClicked</a></td> |
|
112 <td>Private slot to handle a double click in the shortcuts list.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#ShortcutsDialog.populate">populate</a></td> |
|
115 <td>Public method to populate the dialog.</td> |
|
116 </tr> |
|
117 </table> |
|
118 <h3>Static Methods</h3> |
|
119 <table> |
|
120 <tr><td>None</td></tr> |
|
121 </table> |
|
122 <a NAME="ShortcutsDialog.__init__" ID="ShortcutsDialog.__init__"></a> |
|
123 <h4>ShortcutsDialog (Constructor)</h4> |
|
124 <b>ShortcutsDialog</b>(<i>parent=None, name=None, modal=False</i>) |
|
125 <p> |
|
126 Constructor |
|
127 </p><dl> |
|
128 <dt><i>parent</i></dt> |
|
129 <dd> |
|
130 The parent widget of this dialog. (QWidget) |
|
131 </dd><dt><i>name</i></dt> |
|
132 <dd> |
|
133 The name of this dialog. (string) |
|
134 </dd><dt><i>modal</i></dt> |
|
135 <dd> |
|
136 Flag indicating a modal dialog. (boolean) |
|
137 </dd> |
|
138 </dl><a NAME="ShortcutsDialog.__checkShortcut" ID="ShortcutsDialog.__checkShortcut"></a> |
|
139 <h4>ShortcutsDialog.__checkShortcut</h4> |
|
140 <b>__checkShortcut</b>(<i>keysequence, objectType, origTopItem</i>) |
|
141 <p> |
|
142 Private method to check a keysequence for uniqueness. |
|
143 </p><dl> |
|
144 <dt><i>keysequence</i></dt> |
|
145 <dd> |
|
146 the keysequence to check (QKeySequence) |
|
147 </dd><dt><i>objectType</i></dt> |
|
148 <dd> |
|
149 type of the object (string). Entries with the same |
|
150 object type are not checked for uniqueness. |
|
151 </dd><dt><i>origTopItem</i></dt> |
|
152 <dd> |
|
153 refrence to the parent of the item to be checked |
|
154 (QTreeWidgetItem) |
|
155 </dd> |
|
156 </dl><dl> |
|
157 <dt>Returns:</dt> |
|
158 <dd> |
|
159 flag indicating uniqueness (boolean) |
|
160 </dd> |
|
161 </dl><a NAME="ShortcutsDialog.__generateCategoryItem" ID="ShortcutsDialog.__generateCategoryItem"></a> |
|
162 <h4>ShortcutsDialog.__generateCategoryItem</h4> |
|
163 <b>__generateCategoryItem</b>(<i>title</i>) |
|
164 <p> |
|
165 Private method to generate a category item. |
|
166 </p><dl> |
|
167 <dt><i>title</i></dt> |
|
168 <dd> |
|
169 title for the item (string) |
|
170 </dd> |
|
171 </dl><dl> |
|
172 <dt>Returns:</dt> |
|
173 <dd> |
|
174 reference to the category item (QTreeWidgetItem) |
|
175 </dd> |
|
176 </dl><a NAME="ShortcutsDialog.__generateShortcutItem" ID="ShortcutsDialog.__generateShortcutItem"></a> |
|
177 <h4>ShortcutsDialog.__generateShortcutItem</h4> |
|
178 <b>__generateShortcutItem</b>(<i>category, action, noCheck=False, objectType=""</i>) |
|
179 <p> |
|
180 Private method to generate a keyboard shortcut item. |
|
181 </p><dl> |
|
182 <dt><i>category</i></dt> |
|
183 <dd> |
|
184 reference to the category item (QTreeWidgetItem) |
|
185 </dd><dt><i>action</i></dt> |
|
186 <dd> |
|
187 reference to the keyboard action (E5Action) |
|
188 </dd><dt><i>noCheck=</i></dt> |
|
189 <dd> |
|
190 flag indicating that no uniqueness check should |
|
191 be performed (boolean) |
|
192 </dd><dt><i>objectType=</i></dt> |
|
193 <dd> |
|
194 type of the object (string). Objects of the same |
|
195 type are not checked for duplicate shortcuts. |
|
196 </dd> |
|
197 </dl><a NAME="ShortcutsDialog.__resizeColumns" ID="ShortcutsDialog.__resizeColumns"></a> |
|
198 <h4>ShortcutsDialog.__resizeColumns</h4> |
|
199 <b>__resizeColumns</b>(<i></i>) |
|
200 <p> |
|
201 Private method to resize the list columns. |
|
202 </p><a NAME="ShortcutsDialog.__resort" ID="ShortcutsDialog.__resort"></a> |
|
203 <h4>ShortcutsDialog.__resort</h4> |
|
204 <b>__resort</b>(<i></i>) |
|
205 <p> |
|
206 Private method to resort the tree. |
|
207 </p><a NAME="ShortcutsDialog.__saveCategoryActions" ID="ShortcutsDialog.__saveCategoryActions"></a> |
|
208 <h4>ShortcutsDialog.__saveCategoryActions</h4> |
|
209 <b>__saveCategoryActions</b>(<i>category, actions</i>) |
|
210 <p> |
|
211 Private method to save the actions for a category. |
|
212 </p><dl> |
|
213 <dt><i>category</i></dt> |
|
214 <dd> |
|
215 reference to the category item (QTreeWidgetItem) |
|
216 </dd><dt><i>actions</i></dt> |
|
217 <dd> |
|
218 list of actions for the category (list of E5Action) |
|
219 </dd> |
|
220 </dl><a NAME="ShortcutsDialog.__shortcutChanged" ID="ShortcutsDialog.__shortcutChanged"></a> |
|
221 <h4>ShortcutsDialog.__shortcutChanged</h4> |
|
222 <b>__shortcutChanged</b>(<i>keysequence, altKeysequence, noCheck, objectType</i>) |
|
223 <p> |
|
224 Private slot to handle the shortcutChanged signal of the shortcut |
|
225 dialog. |
|
226 </p><dl> |
|
227 <dt><i>keysequence</i></dt> |
|
228 <dd> |
|
229 the keysequence of the changed action (QKeySequence) |
|
230 </dd><dt><i>altKeysequence</i></dt> |
|
231 <dd> |
|
232 the alternative keysequence of the changed |
|
233 action (QKeySequence) |
|
234 </dd><dt><i>noCheck</i></dt> |
|
235 <dd> |
|
236 flag indicating that no uniqueness check should |
|
237 be performed (boolean) |
|
238 </dd><dt><i>objectType</i></dt> |
|
239 <dd> |
|
240 type of the object (string). |
|
241 </dd> |
|
242 </dl><a NAME="ShortcutsDialog.on_actionButton_toggled" ID="ShortcutsDialog.on_actionButton_toggled"></a> |
|
243 <h4>ShortcutsDialog.on_actionButton_toggled</h4> |
|
244 <b>on_actionButton_toggled</b>(<i>checked</i>) |
|
245 <p> |
|
246 Private slot called, when the action radio button is toggled. |
|
247 </p><dl> |
|
248 <dt><i>checked</i></dt> |
|
249 <dd> |
|
250 state of the action radio button (boolean) |
|
251 </dd> |
|
252 </dl><a NAME="ShortcutsDialog.on_buttonBox_accepted" ID="ShortcutsDialog.on_buttonBox_accepted"></a> |
|
253 <h4>ShortcutsDialog.on_buttonBox_accepted</h4> |
|
254 <b>on_buttonBox_accepted</b>(<i></i>) |
|
255 <p> |
|
256 Private slot to handle the OK button press. |
|
257 </p><a NAME="ShortcutsDialog.on_searchEdit_textChanged" ID="ShortcutsDialog.on_searchEdit_textChanged"></a> |
|
258 <h4>ShortcutsDialog.on_searchEdit_textChanged</h4> |
|
259 <b>on_searchEdit_textChanged</b>(<i>txt</i>) |
|
260 <p> |
|
261 Private slot called, when the text in the search edit changes. |
|
262 </p><dl> |
|
263 <dt><i>txt</i></dt> |
|
264 <dd> |
|
265 text of the search edit (string) |
|
266 </dd> |
|
267 </dl><a NAME="ShortcutsDialog.on_shortcutButton_toggled" ID="ShortcutsDialog.on_shortcutButton_toggled"></a> |
|
268 <h4>ShortcutsDialog.on_shortcutButton_toggled</h4> |
|
269 <b>on_shortcutButton_toggled</b>(<i>checked</i>) |
|
270 <p> |
|
271 Private slot called, when the shortcuts radio button is toggled. |
|
272 </p><dl> |
|
273 <dt><i>checked</i></dt> |
|
274 <dd> |
|
275 state of the shortcuts radio button (boolean) |
|
276 </dd> |
|
277 </dl><a NAME="ShortcutsDialog.on_shortcutsList_itemChanged" ID="ShortcutsDialog.on_shortcutsList_itemChanged"></a> |
|
278 <h4>ShortcutsDialog.on_shortcutsList_itemChanged</h4> |
|
279 <b>on_shortcutsList_itemChanged</b>(<i>itm, column</i>) |
|
280 <p> |
|
281 Private slot to handle the edit of a shortcut key. |
|
282 </p><dl> |
|
283 <dt><i>itm</i></dt> |
|
284 <dd> |
|
285 reference to the item changed (QTreeWidgetItem) |
|
286 </dd><dt><i>column</i></dt> |
|
287 <dd> |
|
288 column changed (integer) |
|
289 </dd> |
|
290 </dl><a NAME="ShortcutsDialog.on_shortcutsList_itemClicked" ID="ShortcutsDialog.on_shortcutsList_itemClicked"></a> |
|
291 <h4>ShortcutsDialog.on_shortcutsList_itemClicked</h4> |
|
292 <b>on_shortcutsList_itemClicked</b>(<i>itm, column</i>) |
|
293 <p> |
|
294 Private slot to handle a click in the shortcuts list. |
|
295 </p><dl> |
|
296 <dt><i>itm</i></dt> |
|
297 <dd> |
|
298 the list item that was clicked (QTreeWidgetItem) |
|
299 </dd><dt><i>column</i></dt> |
|
300 <dd> |
|
301 the list item was clicked in (integer) |
|
302 </dd> |
|
303 </dl><a NAME="ShortcutsDialog.on_shortcutsList_itemDoubleClicked" ID="ShortcutsDialog.on_shortcutsList_itemDoubleClicked"></a> |
|
304 <h4>ShortcutsDialog.on_shortcutsList_itemDoubleClicked</h4> |
|
305 <b>on_shortcutsList_itemDoubleClicked</b>(<i>itm, column</i>) |
|
306 <p> |
|
307 Private slot to handle a double click in the shortcuts list. |
|
308 </p><dl> |
|
309 <dt><i>itm</i></dt> |
|
310 <dd> |
|
311 the list item that was double clicked (QTreeWidgetItem) |
|
312 </dd><dt><i>column</i></dt> |
|
313 <dd> |
|
314 the list item was double clicked in (integer) |
|
315 </dd> |
|
316 </dl><a NAME="ShortcutsDialog.populate" ID="ShortcutsDialog.populate"></a> |
|
317 <h4>ShortcutsDialog.populate</h4> |
|
318 <b>populate</b>(<i></i>) |
|
319 <p> |
|
320 Public method to populate the dialog. |
|
321 </p> |
|
322 <div align="right"><a href="#top">Up</a></div> |
|
323 <hr /> |
|
324 </body></html> |