433 delete hwnet; |
433 delete hwnet; |
434 hwnet=0; |
434 hwnet=0; |
435 } |
435 } |
436 |
436 |
437 ui.pageNetGame->pChatWidget->clear(); |
437 ui.pageNetGame->pChatWidget->clear(); |
|
438 ui.pageRoomsList->chatWidget->clear(); |
438 |
439 |
439 hwnet = new HWNewNet(config, ui.pageNetGame->pGameCFG, ui.pageNetGame->pNetTeamsWidget); |
440 hwnet = new HWNewNet(config, ui.pageNetGame->pGameCFG, ui.pageNetGame->pNetTeamsWidget); |
440 |
441 |
441 connect(hwnet, SIGNAL(showMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection); |
442 connect(hwnet, SIGNAL(showMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection); |
442 |
443 |
469 ui.pageNetGame->pChatWidget, SLOT(onChatString(const QString&))); |
470 ui.pageNetGame->pChatWidget, SLOT(onChatString(const QString&))); |
470 connect(ui.pageNetGame->pChatWidget, SIGNAL(chatLine(const QString&)), |
471 connect(ui.pageNetGame->pChatWidget, SIGNAL(chatLine(const QString&)), |
471 hwnet, SLOT(chatLineToNet(const QString&))); |
472 hwnet, SLOT(chatLineToNet(const QString&))); |
472 connect(ui.pageNetGame->pChatWidget, SIGNAL(kick(const QString&)), |
473 connect(ui.pageNetGame->pChatWidget, SIGNAL(kick(const QString&)), |
473 hwnet, SLOT(kickPlayer(const QString&))); |
474 hwnet, SLOT(kickPlayer(const QString&))); |
|
475 connect(ui.pageNetGame->BtnGo, SIGNAL(clicked()), hwnet, SLOT(ToggleReady())); |
|
476 |
474 connect(hwnet, SIGNAL(nickAdded(const QString&)), |
477 connect(hwnet, SIGNAL(nickAdded(const QString&)), |
475 ui.pageNetGame->pChatWidget, SLOT(nickAdded(const QString&))); |
478 ui.pageNetGame->pChatWidget, SLOT(nickAdded(const QString&))); |
476 connect(hwnet, SIGNAL(nickRemoved(const QString&)), |
479 connect(hwnet, SIGNAL(nickRemoved(const QString&)), |
477 ui.pageNetGame->pChatWidget, SLOT(nickRemoved(const QString&))); |
480 ui.pageNetGame->pChatWidget, SLOT(nickRemoved(const QString&))); |
478 connect(ui.pageNetGame->BtnGo, SIGNAL(clicked()), hwnet, SLOT(ToggleReady())); |
481 connect(hwnet, SIGNAL(nickAddedLobby(const QString&)), |
|
482 ui.pageRoomsList->chatWidget, SLOT(nickAdded(const QString&))); |
|
483 connect(hwnet, SIGNAL(nickRemovedLobby(const QString&)), |
|
484 ui.pageRoomsList->chatWidget, SLOT(nickRemoved(const QString&))); |
479 |
485 |
480 connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(hhogsNumChanged(const HWTeam&)), |
486 connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(hhogsNumChanged(const HWTeam&)), |
481 hwnet, SLOT(onHedgehogsNumChanged(const HWTeam&))); |
487 hwnet, SLOT(onHedgehogsNumChanged(const HWTeam&))); |
482 connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(teamColorChanged(const HWTeam&)), |
488 connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(teamColorChanged(const HWTeam&)), |
483 hwnet, SLOT(onTeamColorChanged(const HWTeam&))); |
489 hwnet, SLOT(onTeamColorChanged(const HWTeam&))); |