144 connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsDeleted()), |
144 connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsDeleted()), |
145 this, SLOT(UpdateWeapons())); // executed second |
145 this, SLOT(UpdateWeapons())); // executed second |
146 connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsDeleted()), |
146 connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsDeleted()), |
147 this, SLOT(GoBack())); // executed third |
147 this, SLOT(GoBack())); // executed third |
148 |
148 |
149 connect(ui.pageScheme->BtnSave, SIGNAL(clicked()), this, SLOT(GoBack())); |
|
150 connect(ui.pageScheme->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); |
149 connect(ui.pageScheme->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); |
151 |
150 |
152 |
151 |
153 ammoSchemeModel = new AmmoSchemeModel(this, cfgdir->absolutePath() + "/schemes.ini"); |
152 ammoSchemeModel = new AmmoSchemeModel(this, cfgdir->absolutePath() + "/schemes.ini"); |
154 ui.pageScheme->setModel(ammoSchemeModel); |
153 ui.pageScheme->setModel(ammoSchemeModel); |
354 GoBack(); |
353 GoBack(); |
355 |
354 |
356 if (id == ID_PAGE_NET) { |
355 if (id == ID_PAGE_NET) { |
357 if(hwnet || pnetserver) NetDisconnect(); |
356 if(hwnet || pnetserver) NetDisconnect(); |
358 } |
357 } |
|
358 |
|
359 if (curid == ID_PAGE_SCHEME) |
|
360 ammoSchemeModel->Save(); |
359 } |
361 } |
360 |
362 |
361 void HWForm::btnExitPressed() |
363 void HWForm::btnExitPressed() |
362 { |
364 { |
363 eggTimer.start(); |
365 eggTimer.start(); |
364 } |
366 } |
365 |
367 |
366 void HWForm::btnExitClicked() |
368 void HWForm::btnExitClicked() |
367 { |
369 { |
368 ammoSchemeModel->Save(); |
|
369 |
|
370 if (eggTimer.elapsed() < 3000) |
370 if (eggTimer.elapsed() < 3000) |
371 close(); |
371 close(); |
372 else |
372 else |
373 { |
373 { |
374 QPushButton * btn = findChild<QPushButton *>("imageButt"); |
374 QPushButton * btn = findChild<QPushButton *>("imageButt"); |