QTfrontend/hwmap.h
changeset 177 c67c15e6fae3
parent 170 ef1031ba44fc
child 180 ea83b9e9057f
--- a/QTfrontend/hwmap.h	Thu Sep 28 16:34:42 2006 +0000
+++ b/QTfrontend/hwmap.h	Sun Oct 01 20:14:30 2006 +0000
@@ -43,11 +43,11 @@
 #include <QProcess>
 #include <QImage>
 
-#include "game.h"
+#include "tcpBase.h"
 
 #include <string>
 
-class HWMap : public QObject
+class HWMap : public TCPBase
 {
   Q_OBJECT
     
@@ -56,31 +56,18 @@
   virtual ~HWMap();
   void getImage(std::string seed);
 
+ protected:
+  virtual QStringList setArguments();
+  virtual void onClientDisconnect();
+  virtual void SendToClientFirst();
+
  signals:
   void ImageReceived(const QImage newImage);
-  void isReadyNow();
 
  private:
-  void RealStart();
-
-  bool m_isStarted;
   std::string m_seed;
-  QTcpServer * IPCServer;
-  QTcpSocket * IPCSocket;
-  
-  QByteArray readbuffer;
-
-  void Start();
-
-  void SendToClientFirst();
 
  private slots:
-  void NewConnection();
-  void ClientDisconnect();
-  void ClientRead();
-  void StartProcessError(QProcess::ProcessError error);
-
-  void tcpServerReady();
 };
 
 #endif // _HWMAP_INCLUDED