QTfrontend/hwform.cpp
changeset 587 74db4115064a
parent 586 ecb6347dfeca
child 597 ec5f057ab268
--- a/QTfrontend/hwform.cpp	Thu Sep 06 18:14:12 2007 +0000
+++ b/QTfrontend/hwform.cpp	Thu Sep 06 19:10:03 2007 +0000
@@ -104,9 +104,12 @@
 	connect(ui.pageGameStats->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
 
 	connect(ui.pageSinglePlayer->BtnSimpleGamePage,	SIGNAL(clicked()),	this, SLOT(GoToSimpleGame()));
-	connect(ui.pageSinglePlayer->BtnTrainPage,	SIGNAL(clicked()),	this, SLOT(GoBack()));
+	connect(ui.pageSinglePlayer->BtnTrainPage,	SIGNAL(clicked()),	this, SLOT(GoToTraining()));
 	connect(ui.pageSinglePlayer->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
 
+	connect(ui.pageTraining->BtnStartTrain,	SIGNAL(clicked()),	this, SLOT(StartTraining()));
+	connect(ui.pageTraining->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
+
 	GoToPage(ID_PAGE_MAIN);
 }
 
@@ -144,6 +147,11 @@
 	GoToPage(ID_PAGE_SIMPLEGAME);
 }
 
+void HWForm::GoToTraining()
+{
+	GoToPage(ID_PAGE_TRAINING);
+}
+
 void HWForm::GoToSetup()
 {
 	GoToPage(ID_PAGE_SETUP);
@@ -530,3 +538,10 @@
 	demofile.write(demo.constData(), demo.size());
 	demofile.close();
 }
+
+void HWForm::StartTraining()
+{
+	CreateGame(0, 0);
+
+	game->StartTraining();
+}