QTfrontend/hwform.cpp
changeset 1395 46fd70de89e2
parent 1391 735f6d43780b
child 1404 2b6b6809c2e4
equal deleted inserted replaced
1394:962001cfcf48 1395:46fd70de89e2
    90 	connect(ui.pageOptions->WeaponEdit,	SIGNAL(clicked()),	this, SLOT(GoToSelectWeapon()));
    90 	connect(ui.pageOptions->WeaponEdit,	SIGNAL(clicked()),	this, SLOT(GoToSelectWeapon()));
    91 	connect(ui.pageOptions->WeaponsButt,	SIGNAL(clicked()),	this, SLOT(GoToSelectNewWeapon()));
    91 	connect(ui.pageOptions->WeaponsButt,	SIGNAL(clicked()),	this, SLOT(GoToSelectNewWeapon()));
    92 	connect(ui.pageSelectWeapon->pWeapons,       SIGNAL(weaponsChanged()), this, SLOT(UpdateWeapons()));
    92 	connect(ui.pageSelectWeapon->pWeapons,       SIGNAL(weaponsChanged()), this, SLOT(UpdateWeapons()));
    93 	connect(ui.pageNetGame->pGameCFG,       SIGNAL(newWeaponsName(const QString&)), this, SLOT(NetWeaponNameChanged(const QString&)));
    93 	connect(ui.pageNetGame->pGameCFG,       SIGNAL(newWeaponsName(const QString&)), this, SLOT(NetWeaponNameChanged(const QString&)));
    94 
    94 
    95 	connect(ui.pageNet->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
    95 	connect(ui.pageNet->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
    96 	connect(ui.pageNet->BtnSpecifyServer,	SIGNAL(clicked()),	this, SLOT(NetConnect()));
    96 	connect(ui.pageNet->BtnSpecifyServer, SIGNAL(clicked()), this, SLOT(NetConnect()));
    97 	connect(ui.pageNet->BtnNetSvrStart,	SIGNAL(clicked()),	this, SLOT(GoToNetServer()));
    97 	connect(ui.pageNet->BtnOfficialServer, SIGNAL(clicked()), this, SLOT(NetConnectOfficialServer()));
    98 	connect(ui.pageNet,	SIGNAL(connectClicked(const QString &, quint16)),	this, SLOT(NetConnectServer(const QString &, quint16)));
    98 	connect(ui.pageNet->BtnNetSvrStart, SIGNAL(clicked()), this, SLOT(GoToNetServer()));
       
    99 	connect(ui.pageNet, SIGNAL(connectClicked(const QString &, quint16)), this, SLOT(NetConnectServer(const QString &, quint16)));
    99 	
   100 	
   100 	connect(ui.pageNetServer->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   101 	connect(ui.pageNetServer->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   101 	connect(ui.pageNetServer->BtnStart,	SIGNAL(clicked()),	this, SLOT(NetStartServer()));
   102 	connect(ui.pageNetServer->BtnStart,	SIGNAL(clicked()),	this, SLOT(NetStartServer()));
   102 
   103 
   103 	connect(ui.pageNetGame->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   104 	connect(ui.pageNetGame->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   399 	game->PlayDemo(curritem->data(Qt::UserRole).toString());
   400 	game->PlayDemo(curritem->data(Qt::UserRole).toString());
   400 }
   401 }
   401 
   402 
   402 void HWForm::NetConnectServer(const QString & host, quint16 port)
   403 void HWForm::NetConnectServer(const QString & host, quint16 port)
   403 {
   404 {
   404   _NetConnect(host, port, ui.pageOptions->editNetNick->text());
   405 	_NetConnect(host, port, ui.pageOptions->editNetNick->text());
       
   406 }
       
   407 
       
   408 void HWForm::NetConnectOfficialServer()
       
   409 {
       
   410 	NetConnectServer("netserver.hedgewars.org", 46631);
   405 }
   411 }
   406 
   412 
   407 void HWForm::_NetConnect(const QString & hostName, quint16 port, const QString & nick)
   413 void HWForm::_NetConnect(const QString & hostName, quint16 port, const QString & nick)
   408 {
   414 {
   409 	if(hwnet) {
   415 	if(hwnet) {