QTfrontend/hwform.cpp
changeset 329 4c3aad46baa5
parent 328 95625db21bf8
child 330 09cfe028a629
equal deleted inserted replaced
328:95625db21bf8 329:4c3aad46baa5
    33 #include "teamselect.h"
    33 #include "teamselect.h"
    34 #include "gameuiconfig.h"
    34 #include "gameuiconfig.h"
    35 #include "pages.h"
    35 #include "pages.h"
    36 #include "hwconsts.h"
    36 #include "hwconsts.h"
    37 #include "newnetclient.h"
    37 #include "newnetclient.h"
       
    38 #include "gamecfgwidget.h"
    38 
    39 
    39 HWForm::HWForm(QWidget *parent)
    40 HWForm::HWForm(QWidget *parent)
    40   : QMainWindow(parent), pnetserver(0)
    41   : QMainWindow(parent), pnetserver(0)
    41 {
    42 {
    42 	ui.setupUi(this);
    43 	ui.setupUi(this);
   239 {
   240 {
   240 	hwnet = new HWNewNet(config);
   241 	hwnet = new HWNewNet(config);
   241 	connect(hwnet, SIGNAL(AddGame(const QString &)), this, SLOT(AddGame(const QString &)));
   242 	connect(hwnet, SIGNAL(AddGame(const QString &)), this, SLOT(AddGame(const QString &)));
   242 	connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter()));
   243 	connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter()));
   243 	connect(hwnet, SIGNAL(ChangeInTeams(const QStringList &)), this, SLOT(ChangeInNetTeams(const QStringList &)));
   244 	connect(hwnet, SIGNAL(ChangeInTeams(const QStringList &)), this, SLOT(ChangeInNetTeams(const QStringList &)));
       
   245 
   244 	connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(teamWillPlay(HWTeam)), hwnet, SLOT(AddTeam(HWTeam)));
   246 	connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(teamWillPlay(HWTeam)), hwnet, SLOT(AddTeam(HWTeam)));
       
   247 
       
   248 	connect(ui.pageNetGame->pGameCFG, SIGNAL(seedChanged(const QString &)), hwnet, SLOT(onSeedChanged(const QString &)));
       
   249 	connect(ui.pageNetGame->pGameCFG, SIGNAL(mapChanged(const QString &)), hwnet, SLOT(onMapChanged(const QString &)));
       
   250 	connect(ui.pageNetGame->pGameCFG, SIGNAL(themeChanged(const QString &)), hwnet, SLOT(onThemeChanged(const QString &)));
       
   251 	connect(ui.pageNetGame->pGameCFG, SIGNAL(initHealthChanged(quint32)), hwnet, SLOT(onInitHealthChanged(quint32)));
       
   252 	connect(ui.pageNetGame->pGameCFG, SIGNAL(turnTimeChanged(quint32)), hwnet, SLOT(onTurnTimeChanged(quint32)));
       
   253 	connect(ui.pageNetGame->pGameCFG, SIGNAL(fortsModeChanged(bool)), hwnet, SLOT(onFortsModeChanged(bool)));
       
   254 
       
   255 	connect(hwnet, SIGNAL(seedChanged(const QString &)), ui.pageNetGame->pGameCFG, SLOT(onSeedChanged(const QString &)));
       
   256 	connect(hwnet, SIGNAL(mapChanged(const QString &)), ui.pageNetGame->pGameCFG, SLOT(onMapChanged(const QString &)));
       
   257 	connect(hwnet, SIGNAL(themeChanged(const QString &)), ui.pageNetGame->pGameCFG, SLOT(onThemeChanged(const QString &)));
       
   258 	connect(hwnet, SIGNAL(initHealthChanged(quint32)), ui.pageNetGame->pGameCFG, SLOT(onInitHealthChanged(quint32)));
       
   259 	connect(hwnet, SIGNAL(turnTimeChanged(quint32)), ui.pageNetGame->pGameCFG, SLOT(onTurnTimeChanged(quint32)));
       
   260 	connect(hwnet, SIGNAL(fortsModeChanged(bool)), ui.pageNetGame->pGameCFG, SLOT(onFortsModeChanged(bool)));
       
   261 
       
   262 
   245 	hwnet->Connect(hostName, port, nick);
   263 	hwnet->Connect(hostName, port, nick);
   246 	config->SaveOptions();
   264 	config->SaveOptions();
   247 }
   265 }
   248 
   266 
   249 void HWForm::NetConnect()
   267 void HWForm::NetConnect()