forked from M-Labs/artiq
1
0
Fork 0

gui/applets: add shortcuts

This commit is contained in:
Sebastien Bourdeauducq 2016-01-16 13:12:16 -07:00
parent 331ac37505
commit f9a6ba1884
1 changed files with 4 additions and 0 deletions

View File

@ -117,9 +117,13 @@ class AppletsDock(dockarea.Dock):
restart_action.setMenu(templates_menu) restart_action.setMenu(templates_menu)
self.table.addAction(restart_action) self.table.addAction(restart_action)
restart_action = QtGui.QAction("Restart selected applet", self.table) restart_action = QtGui.QAction("Restart selected applet", self.table)
restart_action.setShortcut("CTRL+R")
restart_action.setShortcutContext(QtCore.Qt.WidgetShortcut)
restart_action.triggered.connect(self.restart) restart_action.triggered.connect(self.restart)
self.table.addAction(restart_action) self.table.addAction(restart_action)
delete_action = QtGui.QAction("Delete selected applet", self.table) delete_action = QtGui.QAction("Delete selected applet", self.table)
delete_action.setShortcut("DELETE")
delete_action.setShortcutContext(QtCore.Qt.WidgetShortcut)
delete_action.triggered.connect(self.delete) delete_action.triggered.connect(self.delete)
self.table.addAction(delete_action) self.table.addAction(delete_action)