added listView shortkeys

This commit is contained in:
Andreas Preikschat 2013-02-19 10:56:36 +01:00
parent 38c2c2db5e
commit b6f6cc916e
2 changed files with 41 additions and 5 deletions

View File

@ -221,7 +221,6 @@ class MediaManagerItem(QtGui.QWidget):
self.pageLayout.addWidget(self.listView)
# define and add the context menu
self.listView.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
# FIXME: Look for better objectNames.
if self.hasEditIcon:
create_widget_action(self.listView,
text=self.plugin.getString(StringContent.Edit)[u'title'],
@ -229,22 +228,26 @@ class MediaManagerItem(QtGui.QWidget):
triggers=self.onEditClick)
create_widget_action(self.listView, separator=True)
if self.hasDeleteIcon:
create_widget_action(self.listView, u'%s%s' % (self.plugin.name, StringContent.Delete),
create_widget_action(self.listView,
u'listView%s%sItem' % (self.plugin.name.title(), StringContent.Delete.title()),
text=self.plugin.getString(StringContent.Delete)[u'title'],
icon=u':/general/general_delete.png',
can_shortcuts=True, triggers=self.onDeleteClick)
create_widget_action(self.listView, separator=True)
create_widget_action(self.listView, u'%s%s' % (self.plugin.name, StringContent.Preview),
create_widget_action(self.listView,
u'listView%s%sItem' % (self.plugin.name.title(), StringContent.Preview.title()),
text=self.plugin.getString(StringContent.Preview)[u'title'],
icon=u':/general/general_preview.png',
can_shortcuts=True,
triggers=self.onPreviewClick)
create_widget_action(self.listView, u'%s%s' % (self.plugin.name, StringContent.Live),
create_widget_action(self.listView,
u'listView%s%sItem' % (self.plugin.name.title(), StringContent.Live.title()),
text=self.plugin.getString(StringContent.Live)[u'title'],
icon=u':/general/general_live.png',
can_shortcuts=True,
triggers=self.onLiveClick)
create_widget_action(self.listView, u'%s%s' % (self.plugin.name, StringContent.Service),
create_widget_action(self.listView,
u'listView%s%sItem' % (self.plugin.name.title(), StringContent.Service.title()),
can_shortcuts=True,
text=self.plugin.getString(StringContent.Service)[u'title'],
icon=u':/general/general_add.png',

View File

@ -240,6 +240,39 @@ class Settings(QtCore.QSettings):
u'shortcuts/viewLivePanel': [QtGui.QKeySequence(u'F12')],
u'shortcuts/viewServiceManagerItem': [QtGui.QKeySequence(u'F9')],
u'shortcuts/webSiteItem': [],
# FIXME: To be sorted.
u'shortcuts/listViewSongsDeleteItem': [QtCore.Qt.Key_Delete],
u'shortcuts/listViewSongsPreviewItem': [QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return],
u'shortcuts/listViewSongsLiveItem': [QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter,
QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return],
u'shortcuts/listViewSongsServiceItem': [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal],
u'shortcuts/listViewBiblesDeleteItem': [QtCore.Qt.Key_Delete],
u'shortcuts/listViewBiblesPreviewItem': [QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return],
u'shortcuts/listViewBiblesLiveItem': [QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter,
QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return],
u'shortcuts/listViewBiblesServiceItem': [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal],
u'shortcuts/listViewPresentationsDeleteItem': [QtCore.Qt.Key_Delete],
u'shortcuts/listViewPresentationsPreviewItem': [QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return],
u'shortcuts/listViewPresentationsLiveItem': [QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter,
QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return],
u'shortcuts/listViewPresentationsServiceItem': [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal],
u'shortcuts/listViewImagesDeleteItem': [QtCore.Qt.Key_Delete],
u'shortcuts/listViewImagesPreviewItem': [QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return],
u'shortcuts/listViewImagesLiveItem': [QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter,
QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return],
u'shortcuts/listViewImagesServiceItem': [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal],
u'shortcuts/listViewMediaDeleteItem': [QtCore.Qt.Key_Delete],
u'shortcuts/listViewMediaPreviewItem': [QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return],
u'shortcuts/listViewMediaLiveItem': [QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter,
QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return],
u'shortcuts/listViewMediaServiceItem': [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal],
u'shortcuts/listViewCustomDeleteItem': [QtCore.Qt.Key_Delete],
u'shortcuts/listViewCustomPreviewItem': [QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return],
u'shortcuts/listViewCustomLiveItem': [QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter,
QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return],
u'shortcuts/listViewCustomServiceItem': [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal],
u'themes/global theme': u'',
u'themes/last directory': u'',
u'themes/last directory export': u'',