QTfrontend/hwform.cpp
changeset 1898 f0ab0c77946d
parent 1897 e9dcb47013c7
child 1899 5763f46d7486
equal deleted inserted replaced
1897:e9dcb47013c7 1898:f0ab0c77946d
   580 	connect(hwnet, SIGNAL(hhnumChanged(const HWTeam&)),
   580 	connect(hwnet, SIGNAL(hhnumChanged(const HWTeam&)),
   581 		ui.pageNetGame->pNetTeamsWidget, SLOT(changeHHNum(const HWTeam&)));
   581 		ui.pageNetGame->pNetTeamsWidget, SLOT(changeHHNum(const HWTeam&)));
   582 	connect(hwnet, SIGNAL(teamColorChanged(const HWTeam&)),
   582 	connect(hwnet, SIGNAL(teamColorChanged(const HWTeam&)),
   583 		ui.pageNetGame->pNetTeamsWidget, SLOT(changeTeamColor(const HWTeam&)));
   583 		ui.pageNetGame->pNetTeamsWidget, SLOT(changeTeamColor(const HWTeam&)));
   584 
   584 
   585 // config stuff
   585 // disconnect
   586 	connect(hwnet, SIGNAL(paramChanged(const QString &, const QStringList &)), ui.pageNetGame->pGameCFG, SLOT(setParam(const QString &, const QStringList &)));
       
   587 	connect(ui.pageNetGame->pGameCFG, SIGNAL(paramChanged(const QString &, const QStringList &)), hwnet, SLOT(onParamChanged(const QString &, const QStringList &)));
       
   588 	connect(hwnet, SIGNAL(configAsked()), ui.pageNetGame->pGameCFG, SLOT(fullNetConfig()));
       
   589 
       
   590 
       
   591 	connect(hwnet, SIGNAL(Disconnected()), this, SLOT(ForcedDisconnect()), Qt::QueuedConnection);
   586 	connect(hwnet, SIGNAL(Disconnected()), this, SLOT(ForcedDisconnect()), Qt::QueuedConnection);
   592 	
   587 	
   593 	hwnet->Connect(hostName, port, nick);
   588 	hwnet->Connect(hostName, port, nick);
   594 }
   589 }
   595 
   590 
   819 void HWForm::NetGameMaster()
   814 void HWForm::NetGameMaster()
   820 {
   815 {
   821 	ui.pageNetGame->setMasterMode(true);
   816 	ui.pageNetGame->setMasterMode(true);
   822 	ui.pageNetGame->restrictJoins->setChecked(false);
   817 	ui.pageNetGame->restrictJoins->setChecked(false);
   823 	ui.pageNetGame->restrictTeamAdds->setChecked(false);
   818 	ui.pageNetGame->restrictTeamAdds->setChecked(false);
       
   819 	ui.pageNetGame->pGameCFG->GameSchemes->setModel(ammoSchemeModel);
   824 	
   820 	
   825 	if (hwnet)
   821 	if (hwnet)
   826 	{
   822 	{
   827 		// disconnect connections first to ensure their inexistance and not to connect twice
   823 		// disconnect connections first to ensure their inexistance and not to connect twice
   828 		ui.pageNetGame->startGame->disconnect(hwnet);
   824 		ui.pageNetGame->startGame->disconnect(hwnet);