QTfrontend/ui/page/pageroomslist.cpp
changeset 8731 924840dad6a0
parent 8729 b19be476a2fa
child 9031 9477443dd583
--- a/QTfrontend/ui/page/pageroomslist.cpp	Wed Mar 13 21:02:26 2013 -0400
+++ b/QTfrontend/ui/page/pageroomslist.cpp	Fri Mar 15 11:12:42 2013 +0100
@@ -40,6 +40,16 @@
 #include "lineeditcursor.h"
 #include "pageroomslist.h"
 
+void RoomTableView::moveDown()
+{
+    setCurrentIndex(moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
+}
+
+void RoomTableView::moveUp()
+{
+    setCurrentIndex(moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
+}
+
 QLayout * PageRoomsList::bodyLayoutDefinition()
 {
     QVBoxLayout * pageLayout = new QVBoxLayout();
@@ -231,12 +241,12 @@
 
 void PageRoomsList::moveSelectionUp()
 {
-    roomsList->setCurrentIndex(roomsList->moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
+    roomsList->moveUp();
 }
 
 void PageRoomsList::moveSelectionDown()
 {
-    roomsList->setCurrentIndex(roomsList->moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
+    roomsList->moveDown();
 }
 
 void PageRoomsList::roomSelectionChanged(const QModelIndex & current, const QModelIndex & previous)