QTfrontend/hwform.cpp
changeset 32 78bff13b11c0
parent 31 99888245a4e8
child 34 fbe30de53d1d
equal deleted inserted replaced
31:99888245a4e8 32:78bff13b11c0
   249 }
   249 }
   250 
   250 
   251 void HWForm::SimpleGame()
   251 void HWForm::SimpleGame()
   252 {
   252 {
   253 	game = new HWGame(ui.CBResolution->currentIndex(), ui.CBFullscreen->isChecked());
   253 	game = new HWGame(ui.CBResolution->currentIndex(), ui.CBFullscreen->isChecked());
   254 	game->AddTeam("team.cfg");
   254 	game->AddTeam("team");
   255 	game->AddTeam("team.cfg");
   255 	game->AddTeam("team");
   256 	game->StartLocal();
   256 	game->StartLocal();
   257 }
   257 }
   258 
   258 
   259 void HWForm::CBGrave_activated(const QString & gravename)
   259 void HWForm::CBGrave_activated(const QString & gravename)
   260 {
   260 {
   308 	hwnet = new HWNet(ui.CBResolution->currentIndex(), ui.CBFullscreen->isChecked());
   308 	hwnet = new HWNet(ui.CBResolution->currentIndex(), ui.CBFullscreen->isChecked());
   309 	hwnet->Connect("172.19.5.168", 6667, ui.editNetNick->text());
   309 	hwnet->Connect("172.19.5.168", 6667, ui.editNetNick->text());
   310 	connect(hwnet, SIGNAL(Connected()), this, SLOT(GoToNetChat()));
   310 	connect(hwnet, SIGNAL(Connected()), this, SLOT(GoToNetChat()));
   311 	connect(hwnet, SIGNAL(AddGame(const QString &)), this, SLOT(AddGame(const QString &)));
   311 	connect(hwnet, SIGNAL(AddGame(const QString &)), this, SLOT(AddGame(const QString &)));
   312 	connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter()));
   312 	connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter()));
       
   313 	connect(hwnet, SIGNAL(ChangeInTeams(const QStringList &)), this, SLOT(ChangeInNetTeams(const QStringList &)));
   313 }
   314 }
   314 
   315 
   315 void HWForm::NetDisconnect()
   316 void HWForm::NetDisconnect()
   316 {
   317 {
   317 	hwnet->Disconnect();
   318 	hwnet->Disconnect();
   348 
   349 
   349 void HWForm::NetStartGame()
   350 void HWForm::NetStartGame()
   350 {
   351 {
   351 	hwnet->StartGame();
   352 	hwnet->StartGame();
   352 }
   353 }
       
   354 
       
   355 void HWForm::ChangeInNetTeams(const QStringList & teams)
       
   356 {
       
   357 	ui.listNetTeams->clear();
       
   358 	ui.listNetTeams->addItems(teams);
       
   359 }
       
   360