194 # step 2: save the shortcuts |
194 # step 2: save the shortcuts |
195 for act in helpViewer.getActions(): |
195 for act in helpViewer.getActions(): |
196 __saveShortcut(act, helpViewerCategory, prefClass) |
196 __saveShortcut(act, helpViewerCategory, prefClass) |
197 |
197 |
198 |
198 |
|
199 # TODO: do the JSON shortcuts |
199 def exportShortcuts(fn, helpViewer=None): |
200 def exportShortcuts(fn, helpViewer=None): |
200 """ |
201 """ |
201 Module function to export the keyboard shortcuts for the defined QActions. |
202 Module function to export the keyboard shortcuts for the defined QActions. |
202 |
203 |
203 @param fn filename of the export file (string) |
204 @param fn filename of the export file (string) |
222 "<p>The keyboard shortcuts could not be written to file" |
223 "<p>The keyboard shortcuts could not be written to file" |
223 " <b>{0}</b>.</p>") |
224 " <b>{0}</b>.</p>") |
224 .format(fn)) |
225 .format(fn)) |
225 |
226 |
226 |
227 |
|
228 # TODO: do the JSON shortcuts |
227 def importShortcuts(fn, helpViewer=None): |
229 def importShortcuts(fn, helpViewer=None): |
228 """ |
230 """ |
229 Module function to import the keyboard shortcuts for the defined E5Actions. |
231 Module function to import the keyboard shortcuts for the defined E5Actions. |
230 |
232 |
231 @param fn filename of the import file (string) |
233 @param fn filename of the import file (string) |