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() |