QTfrontend/hwform.cpp
changeset 13202 0bc5f618ca7c
parent 13091 8d569c7b36a2
child 13335 3f2ee2f9b51d
--- a/QTfrontend/hwform.cpp	Wed Mar 14 14:42:50 2018 +0100
+++ b/QTfrontend/hwform.cpp	Wed Mar 14 15:19:08 2018 +0100
@@ -90,7 +90,7 @@
 #include "chatwidget.h"
 #include "input_ip.h"
 #include "input_password.h"
-#include "ammoSchemeModel.h"
+#include "gameSchemeModel.h"
 #include "bgwidget.h"
 #include "drawmapwidget.h"
 #include "mouseoverfilter.h"
@@ -347,10 +347,10 @@
 
     connect(ui.pageVideos, SIGNAL(goBack()), config, SLOT(SaveVideosOptions()));
 
-    ammoSchemeModel = new AmmoSchemeModel(this, cfgdir->absolutePath() + "/Schemes/Game");
-    ui.pageScheme->setModel(ammoSchemeModel);
-    ui.pageMultiplayer->gameCFG->GameSchemes->setModel(ammoSchemeModel);
-    ui.pageOptions->SchemesName->setModel(ammoSchemeModel);
+    gameSchemeModel = new GameSchemeModel(this, cfgdir->absolutePath() + "/Schemes/Game");
+    ui.pageScheme->setModel(gameSchemeModel);
+    ui.pageMultiplayer->gameCFG->GameSchemes->setModel(gameSchemeModel);
+    ui.pageOptions->SchemesName->setModel(gameSchemeModel);
 
     wBackground = new BGWidget(this);
     wBackground->setFixedSize(this->width(), this->height());
@@ -919,7 +919,7 @@
     //if (curid == ID_PAGE_NETGAME && (!game || game->gameState != gsStarted)) hwnet->partRoom();
 
     if (curid == ID_PAGE_SCHEME)
-        ammoSchemeModel->Save();
+        gameSchemeModel->Save();
 
 #if (QT_VERSION >= 0x040600)
     /**Start animation :**/
@@ -1079,14 +1079,14 @@
 void HWForm::DeleteScheme()
 {
     ui.pageScheme->selectScheme->setCurrentIndex(ui.pageOptions->SchemesName->currentIndex());
-    if (ui.pageOptions->SchemesName->currentIndex() < ammoSchemeModel->numberOfDefaultSchemes)
+    if (ui.pageOptions->SchemesName->currentIndex() < gameSchemeModel->numberOfDefaultSchemes)
     {
         MessageDialog::ShowErrorMessage(QMessageBox::tr("Cannot delete default scheme '%1'!").arg(ui.pageOptions->SchemesName->currentText()), this);
     }
     else
     {
         ui.pageScheme->deleteRow();
-        ammoSchemeModel->Save();
+        gameSchemeModel->Save();
     }
 }
 
@@ -1899,7 +1899,7 @@
     ui.pageNetGame->restrictJoins->setChecked(false);
     ui.pageNetGame->restrictTeamAdds->setChecked(false);
     ui.pageNetGame->restrictUnregistered->setChecked(false);
-    ui.pageNetGame->pGameCFG->GameSchemes->setModel(ammoSchemeModel);
+    ui.pageNetGame->pGameCFG->GameSchemes->setModel(gameSchemeModel);
     ui.pageNetGame->pGameCFG->setMaster(true);
     ui.pageNetGame->pNetTeamsWidget->setInteractivity(true);
 
@@ -1936,7 +1936,7 @@
 
     if (hwnet)
     {
-        NetAmmoSchemeModel * netAmmo = new NetAmmoSchemeModel(hwnet);
+        NetGameSchemeModel * netAmmo = new NetGameSchemeModel(hwnet);
         connect(hwnet, SIGNAL(netSchemeConfig(QStringList)), netAmmo, SLOT(setNetSchemeConfig(QStringList)));
 
         ui.pageNetGame->pGameCFG->GameSchemes->setModel(netAmmo);