eric6/Preferences/ShortcutsDialog.py

branch
maintenance
changeset 8043
0acf98cd089a
parent 7924
8a96736d465e
parent 7960
e8fc383322f7
child 8176
31965986ecd1
equal deleted inserted replaced
7991:866adc8c315b 8043:0acf98cd089a
2 2
3 # Copyright (c) 2003 - 2021 Detlev Offenbach <detlev@die-offenbachs.de> 3 # Copyright (c) 2003 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a dialog for the configuration of eric6's keyboard 7 Module implementing a dialog for the configuration of eric's keyboard
8 shortcuts. 8 shortcuts.
9 """ 9 """
10 10
11 import re 11 import re
12 12
23 from Preferences import Shortcuts 23 from Preferences import Shortcuts
24 24
25 25
26 class ShortcutsDialog(QDialog, Ui_ShortcutsDialog): 26 class ShortcutsDialog(QDialog, Ui_ShortcutsDialog):
27 """ 27 """
28 Class implementing a dialog for the configuration of eric6's keyboard 28 Class implementing a dialog for the configuration of eric's keyboard
29 shortcuts. 29 shortcuts.
30 30
31 @signal updateShortcuts() emitted when the user pressed the dialogs OK 31 @signal updateShortcuts() emitted when the user pressed the dialogs OK
32 button 32 button
33 """ 33 """
90 """ 90 """
91 Private method to generate a keyboard shortcut item. 91 Private method to generate a keyboard shortcut item.
92 92
93 @param category reference to the category item (QTreeWidgetItem) 93 @param category reference to the category item (QTreeWidgetItem)
94 @param action reference to the keyboard action (E5Action) 94 @param action reference to the keyboard action (E5Action)
95 @keyparam noCheck flag indicating that no uniqueness check should 95 @param noCheck flag indicating that no uniqueness check should
96 be performed (boolean) 96 be performed (boolean)
97 @keyparam objectType type of the object (string). Objects of the same 97 @param objectType type of the object (string). Objects of the same
98 type are not checked for duplicate shortcuts. 98 type are not checked for duplicate shortcuts.
99 """ 99 """
100 itm = QTreeWidgetItem( 100 itm = QTreeWidgetItem(
101 category, 101 category,
102 [action.iconText(), action.shortcut().toString(), 102 [action.iconText(), action.shortcut().toString(),
193 objectType=objectType) 193 objectType=objectType)
194 self.pluginCategoryItems.append(categoryItem) 194 self.pluginCategoryItems.append(categoryItem)
195 195
196 else: 196 else:
197 self.helpViewerItem = self.__generateCategoryItem( 197 self.helpViewerItem = self.__generateCategoryItem(
198 self.tr("eric6 Web Browser")) 198 self.tr("eric Web Browser"))
199 for act in helpViewer.getActions(): 199 for act in helpViewer.getActions():
200 self.__generateShortcutItem(self.helpViewerItem, act, True) 200 self.__generateShortcutItem(self.helpViewerItem, act, True)
201 201
202 self.__resort() 202 self.__resort()
203 self.__resizeColumns() 203 self.__resizeColumns()

eric ide

mercurial