diff -r d1ded2532d3f -r 8e0d62727f01 QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Fri Jan 09 11:22:46 2009 +0000 +++ b/QTfrontend/hwform.cpp Fri Jan 09 11:27:52 2009 +0000 @@ -643,7 +643,7 @@ case gsStarted: { Music(false); GoToPage(ID_PAGE_INGAME); - ui.pageGameStats->labelGameStats->setText(""); + ui.pageGameStats->clear(); if (pRegisterServer) { pRegisterServer->unregister(); @@ -669,46 +669,11 @@ } } -void HWForm::AddStatText(const QString & msg) -{ - ui.pageGameStats->labelGameStats->setText( - ui.pageGameStats->labelGameStats->text() + msg); -} - -void HWForm::GameStats(char type, const QString & info) -{ - switch(type) { - case 'r' : { - AddStatText(QString("
The best shot award was won by %1 with %2 pts.
") - .arg(info.mid(i + 1), info.left(i)); - AddStatText(message); - break; - } - case 'k' : { - int i = info.indexOf(' '); - QString message = QLabel::tr("The best shot award was won by %1 with %2 kills.
") - .arg(info.mid(i + 1), info.left(i)); - AddStatText(message); - break; - } - case 'K' : { - QString message = QLabel::tr("A total of %1 Hedgehog(s) were killed during this round.
").arg(info); - AddStatText(message); - break; - } - } -} - void HWForm::CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo) { game = new HWGame(config, gamecfg, ammo, pTeamSelWidget); connect(game, SIGNAL(GameStateChanged(GameState)), this, SLOT(GameStateChanged(GameState))); - connect(game, SIGNAL(GameStats(char, const QString &)), this, SLOT(GameStats(char, const QString &))); + connect(game, SIGNAL(GameStats(char, const QString &)), ui.pageGameStats, SLOT(GameStats(char, const QString &))); connect(game, SIGNAL(ErrorMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection); connect(game, SIGNAL(HaveRecord(bool, const QByteArray &)), this, SLOT(GetRecord(bool, const QByteArray &))); }