# HG changeset patch # User displacer # Date 1139143682 0 # Node ID 7fbfa2f13f6f6473951b3a69f58b4b010464b185 # Parent f00aa2cc8b35b4815e871056e184e6ceb66a4588 vector removed & teamselwidget moved to constructor diff -r f00aa2cc8b35 -r 7fbfa2f13f6f QTfrontend/hwform.cpp --- 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(); } diff -r f00aa2cc8b35 -r 7fbfa2f13f6f QTfrontend/hwform.h --- 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 #include -#include - #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 m_teamNames; + TeamSelWidget* pts; }; #define ID_PAGE_SINGLEPLAYER 0