camino-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Camino-devel] camino/src/server ServerDialog.cpp ServerDialog...


From: Philippe Fremy
Subject: [Camino-devel] camino/src/server ServerDialog.cpp ServerDialog...
Date: Sun, 26 Jan 2003 17:28:54 -0500

CVSROOT:        /cvsroot/camino
Module name:    camino
Changes by:     Philippe Fremy <address@hidden> 03/01/26 17:28:54

Modified files:
        src/server     : ServerDialog.cpp ServerDialog.h 
                         ServerDialogUI.ui 

Log message:
        connected clients now appear in the server window

Patches:
Index: camino/src/server/ServerDialog.cpp
diff -u camino/src/server/ServerDialog.cpp:1.7 
camino/src/server/ServerDialog.cpp:1.8
--- camino/src/server/ServerDialog.cpp:1.7      Sun Jan 26 14:39:40 2003
+++ camino/src/server/ServerDialog.cpp  Sun Jan 26 17:28:54 2003
@@ -2,7 +2,7 @@
 **
 ** Camino
 **
-** Version : $Id: ServerDialog.cpp,v 1.7 2003/01/26 19:39:40 pfremy Exp $
+** Version : $Id: ServerDialog.cpp,v 1.8 2003/01/26 22:28:54 pfremy Exp $
 **
 ** Author(s) : Philippe Fremy, Pascal Audoux
 ** Creation : 14/01/2003
@@ -29,6 +29,7 @@
 #include <qpushbutton.h>
 #include <qradiobutton.h>
 #include <qlineedit.h>
+#include <qlistview.h>
 // application specific include files
 #include "ServerDialog.h"
 #include "server/CaminoServer.h"
@@ -108,7 +109,14 @@
        qDebug("ServerDialog - Port number : %d", portNumber );
 
        _server = new CaminoServer( portNumber );
-       // connect so that new players appear in the player list
+       connect( _server, SIGNAL( sig_playerConnected(QString,QString)), 
+                       SLOT( slotPlayerConnected(QString,QString)) );
+}
+
+void ServerDialog::slotPlayerConnected( QString hostName, QString playerName )
+{
+       qDebug("ServerDialog - slotPlayerConnected!");
+       new QListViewItem( _playerList, playerName, hostName );
 }
 
 
Index: camino/src/server/ServerDialog.h
diff -u camino/src/server/ServerDialog.h:1.6 
camino/src/server/ServerDialog.h:1.7
--- camino/src/server/ServerDialog.h:1.6        Sun Jan 26 11:50:09 2003
+++ camino/src/server/ServerDialog.h    Sun Jan 26 17:28:54 2003
@@ -5,7 +5,7 @@
 ** ServerDialog.h
 ** Main dialog of the server
 **
-** Version : $Id: ServerDialog.h,v 1.6 2003/01/26 16:50:09 pfremy Exp $
+** Version : $Id: ServerDialog.h,v 1.7 2003/01/26 22:28:54 pfremy Exp $
 ** Author(s) : Philippe Fremy, Pascal Audoux
 ** Creation : 15/01/2003
 ** Copyright: Pascal Audoux, Philippe Fremy 2003
@@ -51,6 +51,8 @@
        void startServer();
 
        CaminoServer * getServer() { return _server; }
+
+    virtual void slotPlayerConnected( QString hostName, QString playerName );
 
 public slots:
        void slot_2players();
Index: camino/src/server/ServerDialogUI.ui
diff -u camino/src/server/ServerDialogUI.ui:1.4 
camino/src/server/ServerDialogUI.ui:1.5
--- camino/src/server/ServerDialogUI.ui:1.4     Sun Jan 26 11:50:09 2003
+++ camino/src/server/ServerDialogUI.ui Sun Jan 26 17:28:54 2003
@@ -236,6 +236,7 @@
 </widget>
 <slots>
     <slot>slotStartGame()</slot>
+    <slot>slotPlayerConnected( QString, QString )</slot>
 </slots>
 <layoutdefaults spacing="6" margin="11"/>
 </UI>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]