QTfrontend/hwform.cpp
changeset 1409 d1cbe4a57ebf
parent 1405 ee4b28a1861d
child 1410 eece43296890
equal deleted inserted replaced
1408:fab171a17968 1409:d1cbe4a57ebf
    27 #include <QRadioButton>
    27 #include <QRadioButton>
    28 #include <QSpinBox>
    28 #include <QSpinBox>
    29 #include <QCloseEvent>
    29 #include <QCloseEvent>
    30 #include <QCheckBox>
    30 #include <QCheckBox>
    31 #include <QTextBrowser>
    31 #include <QTextBrowser>
       
    32 #include <QAction>
    32 
    33 
    33 #include "hwform.h"
    34 #include "hwform.h"
    34 #include "game.h"
    35 #include "game.h"
    35 #include "team.h"
    36 #include "team.h"
    36 #include "teamselect.h"
    37 #include "teamselect.h"
   433 	
   434 	
   434 	connect(ui.pageRoomsList, SIGNAL(askForCreateRoom(const QString &)),
   435 	connect(ui.pageRoomsList, SIGNAL(askForCreateRoom(const QString &)),
   435 		hwnet, SLOT(CreateRoom(const QString&)));
   436 		hwnet, SLOT(CreateRoom(const QString&)));
   436 	connect(ui.pageRoomsList, SIGNAL(askForJoinRoom(const QString &)),
   437 	connect(ui.pageRoomsList, SIGNAL(askForJoinRoom(const QString &)),
   437 		hwnet, SLOT(JoinRoom(const QString&)));
   438 		hwnet, SLOT(JoinRoom(const QString&)));
       
   439 	connect(ui.pageRoomsList, SIGNAL(askForCreateRoom(const QString &)),
       
   440 		this, SLOT(NetGameMaster()));
       
   441 	connect(ui.pageRoomsList, SIGNAL(askForJoinRoom(const QString &)),
       
   442 		this, SLOT(NetGameSlave()));
   438 	connect(ui.pageRoomsList, SIGNAL(askForRoomList()),
   443 	connect(ui.pageRoomsList, SIGNAL(askForRoomList()),
   439 		hwnet, SLOT(askRoomsList()));
   444 		hwnet, SLOT(askRoomsList()));
   440 
   445 
   441 	connect(hwnet, SIGNAL(chatStringFromNet(const QString&)),
   446 	connect(hwnet, SIGNAL(chatStringFromNet(const QString&)),
   442 		ui.pageNetGame->pChatWidget, SLOT(onChatString(const QString&)));
   447 		ui.pageNetGame->pChatWidget, SLOT(onChatString(const QString&)));
   724 	if (checked)
   729 	if (checked)
   725 		sdli.StartMusic();
   730 		sdli.StartMusic();
   726 	else
   731 	else
   727 		sdli.StopMusic();
   732 		sdli.StopMusic();
   728 }
   733 }
       
   734 
       
   735 void HWForm::NetGameMaster()
       
   736 {
       
   737 	ui.pageNetGame->BtnMaster->setVisible(true);
       
   738 	ui.pageNetGame->restrictJoins->setChecked(false);
       
   739 	ui.pageNetGame->restrictTeamAdds->setChecked(false);
       
   740 }
       
   741 
       
   742 void HWForm::NetGameSlave()
       
   743 {
       
   744 	ui.pageNetGame->BtnMaster->setVisible(false);
       
   745 }