QTfrontend/hwform.cpp
changeset 530 f0b962214436
parent 502 bc178daca088
child 533 eebb7684ac22
--- a/QTfrontend/hwform.cpp	Sun May 27 20:17:55 2007 +0000
+++ b/QTfrontend/hwform.cpp	Tue May 29 21:55:45 2007 +0000
@@ -59,7 +59,8 @@
 	connect(ui.pageMain->BtnDemos,	SIGNAL(clicked()),	this, SLOT(GoToDemos()));
 	connect(ui.pageMain->BtnNet,	SIGNAL(clicked()),	this, SLOT(GoToNet()));
 	connect(ui.pageMain->BtnInfo,	SIGNAL(clicked()),	this, SLOT(GoToInfo()));
-	connect(ui.pageMain->BtnExit, SIGNAL(clicked()), this, SLOT(close()));
+	connect(ui.pageMain->BtnExit, SIGNAL(pressed()), this, SLOT(btnExitPressed()));
+	connect(ui.pageMain->BtnExit, SIGNAL(clicked()), this, SLOT(btnExitClicked()));
 
 	connect(ui.pageLocalGame->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
 	connect(ui.pageLocalGame->BtnSimpleGame,	SIGNAL(clicked()),	this, SLOT(SimpleGame()));
@@ -201,6 +202,25 @@
 	ui.Pages->setCurrentIndex(id);
 }
 
+void HWForm::btnExitPressed()
+{
+	eggTimer.start();
+}
+
+void HWForm::btnExitClicked()
+{
+	if (eggTimer.elapsed() < 3000)
+		close();
+	else
+	{
+		QPushButton * btn = findChild<QPushButton *>("imageButt");
+		if (btn)
+		{
+			btn->setIcon(QIcon(":/res/bonus.png"));
+		}
+	}
+}
+
 void HWForm::NewTeam()
 {
 	editedTeam = new HWTeam("unnamed");