QTfrontend/hwform.cpp
changeset 666 07fa9a74a074
parent 665 5c7bfc8bac6a
child 668 0d7683a66d61
equal deleted inserted replaced
665:5c7bfc8bac6a 666:07fa9a74a074
    92 
    92 
    93 	connect(ui.pageNet->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
    93 	connect(ui.pageNet->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
    94 	connect(ui.pageNet->BtnNetConnect,	SIGNAL(clicked()),	this, SLOT(NetConnectServer()));
    94 	connect(ui.pageNet->BtnNetConnect,	SIGNAL(clicked()),	this, SLOT(NetConnectServer()));
    95 	connect(ui.pageNet->BtnSpecifyServer,	SIGNAL(clicked()),	this, SLOT(NetConnect()));
    95 	connect(ui.pageNet->BtnSpecifyServer,	SIGNAL(clicked()),	this, SLOT(NetConnect()));
    96 	connect(ui.pageNet->BtnNetSvrStart,	SIGNAL(clicked()),	this, SLOT(GoToNetServer()));
    96 	connect(ui.pageNet->BtnNetSvrStart,	SIGNAL(clicked()),	this, SLOT(GoToNetServer()));
    97 	connect(ui.pageNet,	SIGNAL(connectClicked()),	this, SLOT(NetConnectServer()));
    97 	connect(ui.pageNet,	SIGNAL(connectClicked(const QString &, quint16)),	this, SLOT(NetConnectServer(const QString &, quint16)));
    98 	
    98 	
    99 	connect(ui.pageNetServer->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
    99 	connect(ui.pageNetServer->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   100 	connect(ui.pageNetServer->BtnStart,	SIGNAL(clicked()),	this, SLOT(NetStartServer()));
   100 	connect(ui.pageNetServer->BtnStart,	SIGNAL(clicked()),	this, SLOT(NetStartServer()));
   101 
   101 
   102 	connect(ui.pageNetGame->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   102 	connect(ui.pageNetGame->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
   339 	}
   339 	}
   340 	CreateGame(0, 0);
   340 	CreateGame(0, 0);
   341 	game->PlayDemo(curritem->data(Qt::UserRole).toString());
   341 	game->PlayDemo(curritem->data(Qt::UserRole).toString());
   342 }
   342 }
   343 
   343 
   344 void HWForm::NetConnectServer()
   344 void HWForm::NetConnectServer(const QString & host, quint16 port)
   345 {
   345 {
   346 /*  QListWidgetItem * curritem = ui.pageNet->netServersWidget->serversList->currentItem();
   346   _NetConnect(host, port, ui.pageOptions->editNetNick->text());
   347   if (!curritem) {
       
   348     QMessageBox::critical(this,
       
   349 			  tr("Error"),
       
   350 			  tr("Please, select server from the list above"),
       
   351 			  tr("OK"));
       
   352     return ;
       
   353   }
       
   354   _NetConnect(curritem->text(), 46631, ui.pageOptions->editNetNick->text());*/
       
   355 }
   347 }
   356 
   348 
   357 void HWForm::_NetConnect(const QString & hostName, quint16 port, const QString & nick)
   349 void HWForm::_NetConnect(const QString & hostName, quint16 port, const QString & nick)
   358 {
   350 {
   359 	if(hwnet) {
   351 	if(hwnet) {