QTfrontend/hwform.cpp
changeset 788 00720357601f
parent 724 21706280d913
child 869 daddcd31ef34
equal deleted inserted replaced
787:5064d72fa0e2 788:00720357601f
    62 	connect(ui.pageMain->BtnNet,	SIGNAL(clicked()),	this, SLOT(GoToNet()));
    62 	connect(ui.pageMain->BtnNet,	SIGNAL(clicked()),	this, SLOT(GoToNet()));
    63 	connect(ui.pageMain->BtnInfo,	SIGNAL(clicked()),	this, SLOT(GoToInfo()));
    63 	connect(ui.pageMain->BtnInfo,	SIGNAL(clicked()),	this, SLOT(GoToInfo()));
    64 	connect(ui.pageMain->BtnExit, SIGNAL(pressed()), this, SLOT(btnExitPressed()));
    64 	connect(ui.pageMain->BtnExit, SIGNAL(pressed()), this, SLOT(btnExitPressed()));
    65 	connect(ui.pageMain->BtnExit, SIGNAL(clicked()), this, SLOT(btnExitClicked()));
    65 	connect(ui.pageMain->BtnExit, SIGNAL(clicked()), this, SLOT(btnExitClicked()));
    66 
    66 
    67 	connect(ui.pageSimpleGame->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
       
    68 	connect(ui.pageSimpleGame->BtnSimpleGame,	SIGNAL(clicked()),	this, SLOT(SimpleGame()));
       
    69 
       
    70 	connect(ui.pageEditTeam->BtnTeamSave,	SIGNAL(clicked()),	this, SLOT(TeamSave()));
    67 	connect(ui.pageEditTeam->BtnTeamSave,	SIGNAL(clicked()),	this, SLOT(TeamSave()));
    71 	connect(ui.pageEditTeam->BtnTeamDiscard,	SIGNAL(clicked()),	this, SLOT(TeamDiscard()));
    68 	connect(ui.pageEditTeam->BtnTeamDiscard,	SIGNAL(clicked()),	this, SLOT(TeamDiscard()));
    72 
    69 
    73 	connect(ui.pageMultiplayer->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
    70 	connect(ui.pageMultiplayer->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
    74 	connect(ui.pageMultiplayer->BtnStartMPGame,	SIGNAL(clicked()),	this, SLOT(StartMPGame()));
    71 	connect(ui.pageMultiplayer->BtnStartMPGame,	SIGNAL(clicked()),	this, SLOT(StartMPGame()));
   107 
   104 
   108 	connect(ui.pageInfo->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   105 	connect(ui.pageInfo->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   109 
   106 
   110 	connect(ui.pageGameStats->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   107 	connect(ui.pageGameStats->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   111 
   108 
   112 	connect(ui.pageSinglePlayer->BtnSimpleGamePage,	SIGNAL(clicked()),	this, SLOT(GoToSimpleGame()));
   109 	connect(ui.pageSinglePlayer->BtnSimpleGamePage,	SIGNAL(clicked()),	this, SLOT(SimpleGame()));
   113 	connect(ui.pageSinglePlayer->BtnTrainPage,	SIGNAL(clicked()),	this, SLOT(GoToTraining()));
   110 	connect(ui.pageSinglePlayer->BtnTrainPage,	SIGNAL(clicked()),	this, SLOT(GoToTraining()));
   114 	connect(ui.pageSinglePlayer->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   111 	connect(ui.pageSinglePlayer->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   115 
   112 
   116 	connect(ui.pageTraining->BtnStartTrain,	SIGNAL(clicked()),	this, SLOT(StartTraining()));
   113 	connect(ui.pageTraining->BtnStartTrain,	SIGNAL(clicked()),	this, SLOT(StartTraining()));
   117 	connect(ui.pageTraining->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   114 	connect(ui.pageTraining->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   133 void HWForm::UpdateWeapons()
   130 void HWForm::UpdateWeapons()
   134 {
   131 {
   135   // FIXME: rewrite this with boost (or TR1/0x)
   132   // FIXME: rewrite this with boost (or TR1/0x)
   136   QVector<QComboBox*> combos;
   133   QVector<QComboBox*> combos;
   137   combos.push_back(ui.pageOptions->WeaponsName);
   134   combos.push_back(ui.pageOptions->WeaponsName);
   138   combos.push_back(ui.pageSimpleGame->gameCFG->WeaponsName);
       
   139   combos.push_back(ui.pageMultiplayer->gameCFG->WeaponsName);
   135   combos.push_back(ui.pageMultiplayer->gameCFG->WeaponsName);
   140   combos.push_back(ui.pageNetGame->pGameCFG->WeaponsName);
   136   combos.push_back(ui.pageNetGame->pGameCFG->WeaponsName);
   141 
   137 
   142   for(QVector<QComboBox*>::iterator it=combos.begin(); it!=combos.end(); ++it) {
   138   for(QVector<QComboBox*>::iterator it=combos.begin(); it!=combos.end(); ++it) {
   143     (*it)->clear();
   139     (*it)->clear();
   180 }
   176 }
   181 
   177 
   182 void HWForm::GoToSinglePlayer()
   178 void HWForm::GoToSinglePlayer()
   183 {
   179 {
   184 	GoToPage(ID_PAGE_SINGLEPLAYER);
   180 	GoToPage(ID_PAGE_SINGLEPLAYER);
   185 }
       
   186 
       
   187 void HWForm::GoToSimpleGame()
       
   188 {
       
   189 	GoToPage(ID_PAGE_SIMPLEGAME);
       
   190 }
   181 }
   191 
   182 
   192 void HWForm::GoToTraining()
   183 void HWForm::GoToTraining()
   193 {
   184 {
   194 	GoToPage(ID_PAGE_TRAINING);
   185 	GoToPage(ID_PAGE_TRAINING);
   361 	GoBack();
   352 	GoBack();
   362 }
   353 }
   363 
   354 
   364 void HWForm::SimpleGame()
   355 void HWForm::SimpleGame()
   365 {
   356 {
   366 	CreateGame(ui.pageSimpleGame->gameCFG, 0, cDefaultAmmoStore->mid(10));
   357 	CreateGame(0, 0, cDefaultAmmoStore->mid(10));
   367 	game->StartQuick();
   358 	game->StartQuick();
   368 }
   359 }
   369 
   360 
   370 void HWForm::PlayDemo()
   361 void HWForm::PlayDemo()
   371 {
   362 {