QTfrontend/ui/page/pageroomslist.cpp
changeset 8731 924840dad6a0
parent 8729 b19be476a2fa
child 9031 9477443dd583
equal deleted inserted replaced
8730:b39f433f8ab4 8731:924840dad6a0
    38 #include "chatwidget.h"
    38 #include "chatwidget.h"
    39 #include "roomnameprompt.h"
    39 #include "roomnameprompt.h"
    40 #include "lineeditcursor.h"
    40 #include "lineeditcursor.h"
    41 #include "pageroomslist.h"
    41 #include "pageroomslist.h"
    42 
    42 
       
    43 void RoomTableView::moveDown()
       
    44 {
       
    45     setCurrentIndex(moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
       
    46 }
       
    47 
       
    48 void RoomTableView::moveUp()
       
    49 {
       
    50     setCurrentIndex(moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
       
    51 }
       
    52 
    43 QLayout * PageRoomsList::bodyLayoutDefinition()
    53 QLayout * PageRoomsList::bodyLayoutDefinition()
    44 {
    54 {
    45     QVBoxLayout * pageLayout = new QVBoxLayout();
    55     QVBoxLayout * pageLayout = new QVBoxLayout();
    46     pageLayout->setSpacing(0);
    56     pageLayout->setSpacing(0);
    47 
    57 
   229             this, SLOT(onSortIndicatorChanged(int, Qt::SortOrder)));
   239             this, SLOT(onSortIndicatorChanged(int, Qt::SortOrder)));
   230 }
   240 }
   231 
   241 
   232 void PageRoomsList::moveSelectionUp()
   242 void PageRoomsList::moveSelectionUp()
   233 {
   243 {
   234     roomsList->setCurrentIndex(roomsList->moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
   244     roomsList->moveUp();
   235 }
   245 }
   236 
   246 
   237 void PageRoomsList::moveSelectionDown()
   247 void PageRoomsList::moveSelectionDown()
   238 {
   248 {
   239     roomsList->setCurrentIndex(roomsList->moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
   249     roomsList->moveDown();
   240 }
   250 }
   241 
   251 
   242 void PageRoomsList::roomSelectionChanged(const QModelIndex & current, const QModelIndex & previous)
   252 void PageRoomsList::roomSelectionChanged(const QModelIndex & current, const QModelIndex & previous)
   243 {
   253 {
   244     BtnJoin->setEnabled(current.isValid());
   254     BtnJoin->setEnabled(current.isValid());