--- a/QTfrontend/hwform.cpp Sat Feb 04 22:37:12 2006 +0000
+++ b/QTfrontend/hwform.cpp Sun Feb 05 12:48:02 2006 +0000
@@ -44,7 +44,6 @@
#include "hwform.h"
#include "sdlkeys.h"
#include "hwconsts.h"
-#include "teamselect.h"
HWForm::HWForm(QWidget *parent)
: QMainWindow(parent)
@@ -123,10 +122,12 @@
list.push_back("DefaultTeam");
}
+ pts=new TeamSelWidget(ui.Pages->widget(ID_PAGE_SINGLEPLAYER));
+
for (QStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
QString tmpTeamStr=(*it).replace(QRegExp("^(.*).cfg$"), "\\1");
- m_teamNames.push_back(tmpTeamStr);
+ pts->addTeam(tmpTeamStr);
ui.CBTeamName->addItem(tmpTeamStr);
}
@@ -195,8 +196,6 @@
{
ui.Pages->setCurrentIndex(ID_PAGE_SINGLEPLAYER);
- TeamSelWidget* pts=new TeamSelWidget(m_teamNames, ui.Pages->widget(ID_PAGE_SINGLEPLAYER));
-
pts->resize(500, 350);
pts->show();
}
--- a/QTfrontend/hwform.h Sat Feb 04 22:37:12 2006 +0000
+++ b/QTfrontend/hwform.h Sun Feb 05 12:48:02 2006 +0000
@@ -38,15 +38,12 @@
#include <QLineEdit>
#include <QDir>
-#include <vector>
-
#include "ui_hwform.h"
#include "binds.h"
#include "game.h"
#include "team.h"
#include "netclient.h"
-
-using namespace std;
+#include "teamselect.h"
class HWForm : public QMainWindow
{
@@ -95,7 +92,7 @@
HWTeam * tmpTeam;
HWNet * hwnet;
- vector<QString> m_teamNames;
+ TeamSelWidget* pts;
};
#define ID_PAGE_SINGLEPLAYER 0