Merged changed keyboard events.

bzr-revno: 474
This commit is contained in:
Raoul Snyman 2009-06-22 20:50:15 +02:00
commit 23a4f1feb7

View File

@ -104,12 +104,18 @@ class SlideList(QtGui.QListView):
def keyPressEvent(self, event):
if type(event) == QtGui.QKeyEvent:
#here accept the event and do something
if event.key() == QtCore.Qt.Key_PageUp:
if event.key() == QtCore.Qt.Key_Up:
self.parent.onSlideSelectedPrevious()
event.accept()
elif event.key() == QtCore.Qt.Key_PageDown:
elif event.key() == QtCore.Qt.Key_Down:
self.parent.onSlideSelectedNext()
event.accept()
elif event.key() == QtCore.Qt.Key_PageUp:
self.parent.onSlideSelectedFirst()
event.accept()
elif event.key() == QtCore.Qt.Key_PageDown:
self.parent.onSlideSelectedLast()
event.accept()
event.ignore()
else:
event.ignore()