634 BtnJoin = addButton(tr("Join"), pageLayout, 1, 1); |
634 BtnJoin = addButton(tr("Join"), pageLayout, 1, 1); |
635 BtnRefresh = addButton(tr("Refresh"), pageLayout, 2, 1); |
635 BtnRefresh = addButton(tr("Refresh"), pageLayout, 2, 1); |
636 |
636 |
637 connect(BtnCreate, SIGNAL(clicked()), this, SLOT(onCreateClick())); |
637 connect(BtnCreate, SIGNAL(clicked()), this, SLOT(onCreateClick())); |
638 connect(BtnJoin, SIGNAL(clicked()), this, SLOT(onJoinClick())); |
638 connect(BtnJoin, SIGNAL(clicked()), this, SLOT(onJoinClick())); |
|
639 connect(BtnRefresh, SIGNAL(clicked()), this, SLOT(onRefreshClick())); |
639 connect(roomsList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(onJoinClick())); |
640 connect(roomsList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(onJoinClick())); |
640 } |
641 } |
641 |
642 |
642 void PageRoomsList::setRoomsList(const QStringList & list) |
643 void PageRoomsList::setRoomsList(const QStringList & list) |
643 { |
644 { |
651 if (roomName->text().size()) |
652 if (roomName->text().size()) |
652 emit askForCreateRoom(roomName->text()); |
653 emit askForCreateRoom(roomName->text()); |
653 else |
654 else |
654 QMessageBox::critical(this, |
655 QMessageBox::critical(this, |
655 tr("Error"), |
656 tr("Error"), |
656 tr("Please, select record from the list"), |
657 tr("Please, enter room name"), |
657 tr("OK")); |
658 tr("OK")); |
658 } |
659 } |
659 |
660 |
660 void PageRoomsList::onJoinClick() |
661 void PageRoomsList::onJoinClick() |
661 { |
662 { |