QTfrontend/hwform.cpp
changeset 1409 d1cbe4a57ebf
parent 1405 ee4b28a1861d
child 1410 eece43296890
--- a/QTfrontend/hwform.cpp	Fri Oct 24 15:02:26 2008 +0000
+++ b/QTfrontend/hwform.cpp	Fri Oct 24 17:30:30 2008 +0000
@@ -29,6 +29,7 @@
 #include <QCloseEvent>
 #include <QCheckBox>
 #include <QTextBrowser>
+#include <QAction>
 
 #include "hwform.h"
 #include "game.h"
@@ -435,6 +436,10 @@
 		hwnet, SLOT(CreateRoom(const QString&)));
 	connect(ui.pageRoomsList, SIGNAL(askForJoinRoom(const QString &)),
 		hwnet, SLOT(JoinRoom(const QString&)));
+	connect(ui.pageRoomsList, SIGNAL(askForCreateRoom(const QString &)),
+		this, SLOT(NetGameMaster()));
+	connect(ui.pageRoomsList, SIGNAL(askForJoinRoom(const QString &)),
+		this, SLOT(NetGameSlave()));
 	connect(ui.pageRoomsList, SIGNAL(askForRoomList()),
 		hwnet, SLOT(askRoomsList()));
 
@@ -726,3 +731,15 @@
 	else
 		sdli.StopMusic();
 }
+
+void HWForm::NetGameMaster()
+{
+	ui.pageNetGame->BtnMaster->setVisible(true);
+	ui.pageNetGame->restrictJoins->setChecked(false);
+	ui.pageNetGame->restrictTeamAdds->setChecked(false);
+}
+
+void HWForm::NetGameSlave()
+{
+	ui.pageNetGame->BtnMaster->setVisible(false);
+}