QTfrontend/net/newnetclient.cpp
changeset 7723 ca05b576ec74
parent 7712 10e7eed3f180
child 7725 4ad05a478c6c
--- a/QTfrontend/net/newnetclient.cpp	Wed Oct 03 12:04:29 2012 +0400
+++ b/QTfrontend/net/newnetclient.cpp	Sat Oct 06 01:09:41 2012 +0400
@@ -26,6 +26,7 @@
 #include "proto.h"
 #include "game.h"
 #include "roomslistmodel.h"
+#include "playerslistmodel.h"
 
 char delimeter='\n';
 
@@ -36,6 +37,8 @@
     netClientState(Disconnected)
 {
     m_roomsListModel = new RoomsListModel(this);
+    m_lobbyPlayersModel = new PlayersListModel(this);
+    m_roomPlayersModel = new PlayersListModel(this);
 // socket stuff
     connect(&NetSocket, SIGNAL(readyRead()), this, SLOT(ClientRead()));
     connect(&NetSocket, SIGNAL(connected()), this, SLOT(OnConnect()));
@@ -444,6 +447,7 @@
 
             emit nickAddedLobby(lst[i], false);
             emit chatStringLobby(lst[i], tr("%1 *** %2 has joined").arg('\x03').arg("|nick|"));
+            m_lobbyPlayersModel->addPlayer(lst[i]);
         }
         return;
     }
@@ -920,3 +924,13 @@
 {
     return m_roomsListModel;
 }
+
+PlayersListModel * HWNewNet::lobbyPlayersModel()
+{
+    return m_lobbyPlayersModel;
+}
+
+PlayersListModel * HWNewNet::roomPlayersModel()
+{
+    return m_roomPlayersModel;
+}