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