QTfrontend/ui/widget/hatprompt.cpp
changeset 8731 924840dad6a0
parent 8488 e72f3398a28b
child 9080 9b42757d7e71
--- a/QTfrontend/ui/widget/hatprompt.cpp	Wed Mar 13 21:02:26 2013 -0400
+++ b/QTfrontend/ui/widget/hatprompt.cpp	Fri Mar 15 11:12:42 2013 +0100
@@ -35,6 +35,26 @@
 #include "HatModel.h"
 #include "hatprompt.h"
 
+void HatListView::moveUp()
+{
+    setCurrentIndex(moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
+}
+
+void HatListView::moveDown()
+{
+    setCurrentIndex(moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
+}
+
+void HatListView::moveLeft()
+{
+    setCurrentIndex(moveCursor(QAbstractItemView::MoveLeft, Qt::NoModifier));
+}
+
+void HatListView::moveRight()
+{
+    setCurrentIndex(moveCursor(QAbstractItemView::MoveRight, Qt::NoModifier));
+}
+
 HatPrompt::HatPrompt(int currentIndex, QWidget* parent) : QDialog(parent)
 {
     setModal(true);
@@ -128,22 +148,22 @@
 
 void HatPrompt::moveUp()
 {
-    list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
+    list->moveUp();
 }
 
 void HatPrompt::moveDown()
 {
-    list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
+    list->moveDown();
 }
 
 void HatPrompt::moveLeft()
 {
-    list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveLeft, Qt::NoModifier));
+    list->moveLeft();
 }
 
 void HatPrompt::moveRight()
 {
-    list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveRight, Qt::NoModifier));
+    list->moveRight();
 }
 
 void HatPrompt::onAccepted()