QTfrontend/hwform.cpp
changeset 686 494b5880989a
parent 683 57d624f71e65
child 687 8e2dedaa01b4
equal deleted inserted replaced
685:6bf4d8dc6b06 686:494b5880989a
   507 				pRegisterServer = 0;
   507 				pRegisterServer = 0;
   508 			}
   508 			}
   509 			break;
   509 			break;
   510 		}
   510 		}
   511 		case gsFinished: {
   511 		case gsFinished: {
       
   512 			GoBack();
   512 			GoToPage(ID_PAGE_GAMESTATS);
   513 			GoToPage(ID_PAGE_GAMESTATS);
   513 			break;
   514 			break;
   514 		}
   515 		}
   515 		default: ;
   516 		default: {
       
   517 			quint8 id = ui.Pages->currentIndex();
       
   518 qDebug() << id;
       
   519 			if (id == ID_PAGE_INGAME) GoBack();
       
   520 		};
   516 	}
   521 	}
   517 
   522 
   518 	if (hwnet)
   523 	if (hwnet)
   519 	{
   524 	{
   520 		ui.pageNetGame->BtnGo->setText(QPushButton::tr("Go!"));
   525 		ui.pageNetGame->BtnGo->setText(QPushButton::tr("Go!"));
   555 	game = new HWGame(config, gamecfg, ui.pageSelectWeapon->pWeapons->getWeaponsString(), pTeamSelWidget);
   560 	game = new HWGame(config, gamecfg, ui.pageSelectWeapon->pWeapons->getWeaponsString(), pTeamSelWidget);
   556 	connect(game, SIGNAL(GameStateChanged(GameState)), this, SLOT(GameStateChanged(GameState)));
   561 	connect(game, SIGNAL(GameStateChanged(GameState)), this, SLOT(GameStateChanged(GameState)));
   557 	connect(game, SIGNAL(GameStats(char, const QString &)), this, SLOT(GameStats(char, const QString &)));
   562 	connect(game, SIGNAL(GameStats(char, const QString &)), this, SLOT(GameStats(char, const QString &)));
   558 	connect(game, SIGNAL(ErrorMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection);
   563 	connect(game, SIGNAL(ErrorMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection);
   559 	connect(game, SIGNAL(HaveRecord(bool, const QByteArray &)), this, SLOT(GetRecord(bool, const QByteArray &)));
   564 	connect(game, SIGNAL(HaveRecord(bool, const QByteArray &)), this, SLOT(GetRecord(bool, const QByteArray &)));
       
   565 
       
   566 	GoToPage(ID_PAGE_INGAME);
   560 }
   567 }
   561 
   568 
   562 void HWForm::ShowErrorMessage(const QString & msg)
   569 void HWForm::ShowErrorMessage(const QString & msg)
   563 {
   570 {
   564 	QMessageBox::warning(this,
   571 	QMessageBox::warning(this,