QTfrontend/hwform.cpp
changeset 1897 e9dcb47013c7
parent 1895 7ba647a88b2f
child 1898 f0ab0c77946d
equal deleted inserted replaced
1896:fdacad5d0acc 1897:e9dcb47013c7
   148 
   148 
   149 	connect(ui.pageScheme->BtnSave, SIGNAL(clicked()), this, SLOT(GoBack()));
   149 	connect(ui.pageScheme->BtnSave, SIGNAL(clicked()), this, SLOT(GoBack()));
   150 	connect(ui.pageScheme->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
   150 	connect(ui.pageScheme->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
   151 
   151 
   152 
   152 
   153 	AmmoSchemeModel * ammoSchemeModel = new AmmoSchemeModel(this);
   153 	ammoSchemeModel = new AmmoSchemeModel(this, cfgdir->absolutePath() + "/schemes.ini");
   154 	ui.pageScheme->setModel(ammoSchemeModel);
   154 	ui.pageScheme->setModel(ammoSchemeModel);
   155 	ui.pageMultiplayer->gameCFG->GameSchemes->setModel(ammoSchemeModel);
   155 	ui.pageMultiplayer->gameCFG->GameSchemes->setModel(ammoSchemeModel);
   156 
   156 
   157 	PagesStack.push(ID_PAGE_MAIN);
   157 	PagesStack.push(ID_PAGE_MAIN);
   158 	GoBack();
   158 	GoBack();
   363 	eggTimer.start();
   363 	eggTimer.start();
   364 }
   364 }
   365 
   365 
   366 void HWForm::btnExitClicked()
   366 void HWForm::btnExitClicked()
   367 {
   367 {
       
   368 	ammoSchemeModel->Save();
       
   369 	
   368 	if (eggTimer.elapsed() < 3000)
   370 	if (eggTimer.elapsed() < 3000)
   369 		close();
   371 		close();
   370 	else
   372 	else
   371 	{
   373 	{
   372 		QPushButton * btn = findChild<QPushButton *>("imageButt");
   374 		QPushButton * btn = findChild<QPushButton *>("imageButt");