eric6/Preferences/Shortcuts.py

branch
maintenance
changeset 8043
0acf98cd089a
parent 7924
8a96736d465e
parent 7923
91e843545d9a
child 8142
43248bafe9b2
equal deleted inserted replaced
7991:866adc8c315b 8043:0acf98cd089a
37 37
38 def readShortcuts(prefClass=Prefs, helpViewer=None, pluginName=None): 38 def readShortcuts(prefClass=Prefs, helpViewer=None, pluginName=None):
39 """ 39 """
40 Module function to read the keyboard shortcuts for the defined QActions. 40 Module function to read the keyboard shortcuts for the defined QActions.
41 41
42 @keyparam prefClass preferences class used as the storage area 42 @param prefClass preferences class used as the storage area
43 @keyparam helpViewer reference to the help window object 43 @param helpViewer reference to the help window object
44 @keyparam pluginName name of the plugin for which to load shortcuts 44 @param pluginName name of the plugin for which to load shortcuts
45 (string) 45 (string)
46 """ 46 """
47 if helpViewer is None and pluginName is None: 47 if helpViewer is None and pluginName is None:
48 for act in e5App().getObject("Project").getActions(): 48 for act in e5App().getObject("Project").getActions():
49 __readShortcut(act, "Project", prefClass) 49 __readShortcut(act, "Project", prefClass)
126 def saveShortcuts(prefClass=Prefs, helpViewer=None): 126 def saveShortcuts(prefClass=Prefs, helpViewer=None):
127 """ 127 """
128 Module function to write the keyboard shortcuts for the defined QActions. 128 Module function to write the keyboard shortcuts for the defined QActions.
129 129
130 @param prefClass preferences class used as the storage area 130 @param prefClass preferences class used as the storage area
131 @keyparam helpViewer reference to the help window object 131 @param helpViewer reference to the help window object
132 """ 132 """
133 if helpViewer is None: 133 if helpViewer is None:
134 # step 1: clear all previously saved shortcuts 134 # step 1: clear all previously saved shortcuts
135 prefClass.settings.beginGroup("Shortcuts") 135 prefClass.settings.beginGroup("Shortcuts")
136 prefClass.settings.remove("") 136 prefClass.settings.remove("")

eric ide

mercurial