Preferences/Shortcuts.py

changeset 81
a40a255e56e4
parent 55
b5c84934de9c
child 97
c4086afea02b
equal deleted inserted replaced
80:166d5df6337c 81:a40a255e56e4
117 @param prefClass preferences class used as the storage area 117 @param prefClass preferences class used as the storage area
118 """ 118 """
119 if act.objectName(): 119 if act.objectName():
120 prefClass.settings.setValue( 120 prefClass.settings.setValue(
121 "Shortcuts/{0}/{1}/Accel".format(category, act.objectName()), 121 "Shortcuts/{0}/{1}/Accel".format(category, act.objectName()),
122 act.shortcut()) 122 act.shortcut().toString())
123 prefClass.settings.setValue( 123 prefClass.settings.setValue(
124 "Shortcuts/{0}/{1}/AltAccel".format(category, act.objectName()), 124 "Shortcuts/{0}/{1}/AltAccel".format(category, act.objectName()),
125 act.alternateShortcut()) 125 act.alternateShortcut().toString())
126 126
127 def saveShortcuts(prefClass = Prefs): 127 def saveShortcuts(prefClass = Prefs):
128 """ 128 """
129 Module function to write the keyboard shortcuts for the defined QActions. 129 Module function to write the keyboard shortcuts for the defined QActions.
130 130

eric ide

mercurial