13 from E5Gui.E5Application import e5App |
13 from E5Gui.E5Application import e5App |
14 from E5Gui import E5MessageBox |
14 from E5Gui import E5MessageBox |
15 |
15 |
16 from .Ui_ShortcutsDialog import Ui_ShortcutsDialog |
16 from .Ui_ShortcutsDialog import Ui_ShortcutsDialog |
17 from .ShortcutDialog import ShortcutDialog |
17 from .ShortcutDialog import ShortcutDialog |
18 |
|
19 import UI.PixmapCache |
|
20 |
18 |
21 import Preferences |
19 import Preferences |
22 from Preferences import Shortcuts |
20 from Preferences import Shortcuts |
23 |
21 |
24 |
22 |
46 if name: |
44 if name: |
47 self.setObjectName(name) |
45 self.setObjectName(name) |
48 self.setModal(modal) |
46 self.setModal(modal) |
49 self.setupUi(self) |
47 self.setupUi(self) |
50 |
48 |
51 self.clearSearchButton.setIcon(UI.PixmapCache.getIcon("clearLeft.png")) |
|
52 self.shortcutsList.headerItem().setText(self.shortcutsList.columnCount(), "") |
49 self.shortcutsList.headerItem().setText(self.shortcutsList.columnCount(), "") |
53 self.shortcutsList.header().setSortIndicator(0, Qt.AscendingOrder) |
50 self.shortcutsList.header().setSortIndicator(0, Qt.AscendingOrder) |
54 |
51 |
55 self.shortcutDialog = ShortcutDialog() |
52 self.shortcutDialog = ShortcutDialog() |
56 self.shortcutDialog.shortcutChanged.connect(self.__shortcutChanged) |
53 self.shortcutDialog.shortcutChanged.connect(self.__shortcutChanged) |
427 childHiddenCount += 1 |
424 childHiddenCount += 1 |
428 else: |
425 else: |
429 itm.setHidden(False) |
426 itm.setHidden(False) |
430 topItem.setHidden(childHiddenCount == topItem.childCount()) |
427 topItem.setHidden(childHiddenCount == topItem.childCount()) |
431 |
428 |
432 @pyqtSlot() |
|
433 def on_clearSearchButton_clicked(self): |
|
434 """ |
|
435 Private slot called by a click of the clear search button. |
|
436 """ |
|
437 self.searchEdit.clear() |
|
438 |
429 |
439 @pyqtSlot(bool) |
430 @pyqtSlot(bool) |
440 def on_actionButton_toggled(self, checked): |
431 def on_actionButton_toggled(self, checked): |
441 """ |
432 """ |
442 Private slot called, when the action radio button is toggled. |
433 Private slot called, when the action radio button is toggled. |