QTfrontend/pages.cpp
changeset 421 ebd79d171804
parent 416 595d8663254d
child 427 b505012a3f15
equal deleted inserted replaced
420:6cdfc07dceed 421:ebd79d171804
   390 {
   390 {
   391 	QFont * font14 = new QFont("MS Shell Dlg", 14);
   391 	QFont * font14 = new QFont("MS Shell Dlg", 14);
   392 	QGridLayout * pageLayout = new QGridLayout(this);
   392 	QGridLayout * pageLayout = new QGridLayout(this);
   393 	pageLayout->setColumnStretch(0, 1);
   393 	pageLayout->setColumnStretch(0, 1);
   394 	pageLayout->setColumnStretch(1, 1);
   394 	pageLayout->setColumnStretch(1, 1);
   395 	pageLayout->setColumnStretch(2, 1);
   395 
       
   396 	BtnNetSvrStart = new QPushButton(this);
       
   397 	BtnNetSvrStart->setFont(*font14);
       
   398 	BtnNetSvrStart->setText(QPushButton::tr("Start server"));
       
   399 	pageLayout->addWidget(BtnNetSvrStart, 0, 1);
   396 
   400 
   397 	NNGroupBox = new QGroupBox(this);
   401 	NNGroupBox = new QGroupBox(this);
   398 	NNGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
   402 	NNGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
   399 	NNGroupBox->setTitle(QGroupBox::tr("Net options"));
   403 	NNGroupBox->setTitle(QGroupBox::tr("Net options"));
   400 	pageLayout->addWidget(NNGroupBox, 0, 1, 1, 2);
   404 	pageLayout->addWidget(NNGroupBox, 0, 0);
   401 
       
   402 	pageLayout->addWidget(new QWidget(), 1, 1);
       
   403 
   405 
   404 	QGridLayout * GBNlayout = new QGridLayout(NNGroupBox);
   406 	QGridLayout * GBNlayout = new QGridLayout(NNGroupBox);
   405 	labelNN = new QLabel(NNGroupBox);
   407 	labelNN = new QLabel(NNGroupBox);
   406 	labelNN->setText(QLabel::tr("Net nick"));
   408 	labelNN->setText(QLabel::tr("Net nick"));
   407 	GBNlayout->addWidget(labelNN, 0, 0);
   409 	GBNlayout->addWidget(labelNN, 0, 0);
   409 	editNetNick	= new QLineEdit(NNGroupBox);
   411 	editNetNick	= new QLineEdit(NNGroupBox);
   410 	editNetNick->setMaxLength(20);
   412 	editNetNick->setMaxLength(20);
   411 	editNetNick->setText(QLineEdit::tr("unnamed"));
   413 	editNetNick->setText(QLineEdit::tr("unnamed"));
   412 	GBNlayout->addWidget(editNetNick, 0, 1);
   414 	GBNlayout->addWidget(editNetNick, 0, 1);
   413 
   415 
   414 	labelIP = new QLabel(NNGroupBox);
   416 	QGroupBox * ConnGroupBox = new QGroupBox(this);
       
   417 	ConnGroupBox->setTitle(QGroupBox::tr("Net game"));
       
   418 	pageLayout->addWidget(ConnGroupBox, 2, 0, 1, 3);
       
   419 	QGridLayout * GBClayout = new QGridLayout(ConnGroupBox);
       
   420 	GBClayout->setColumnStretch(0, 0);
       
   421 	GBClayout->setColumnStretch(1, 1);
       
   422 	GBClayout->setColumnStretch(2, 1);
       
   423 	GBClayout->setRowStretch(0, 0);
       
   424 	GBClayout->setRowStretch(1, 0);
       
   425 	GBClayout->setRowStretch(2, 1);
       
   426 
       
   427 	labelIP = new QLabel(ConnGroupBox);
   415 	labelIP->setText(QLabel::tr("Server address"));
   428 	labelIP->setText(QLabel::tr("Server address"));
   416 	GBNlayout->addWidget(labelIP, 1, 0);
   429 	GBClayout->addWidget(labelIP, 0, 0);
   417 
   430 
   418 	editIP = new QLineEdit(NNGroupBox);
   431 	editIP = new QLineEdit(ConnGroupBox);
   419 	editIP->setMaxLength(50);
   432 	editIP->setMaxLength(50);
   420 	GBNlayout->addWidget(editIP, 1, 1);
   433 	GBClayout->addWidget(editIP, 0, 1);
   421 
   434 
   422 	pUdpClient=new HWNetUdpWidget(this);
   435 	BtnNetConnect = new	QPushButton(ConnGroupBox);
   423 	pageLayout->addWidget(pUdpClient, 2, 1, 1, 2);
       
   424 	
       
   425 	BtnNetConnect = new	QPushButton(this);
       
   426 	BtnNetConnect->setFont(*font14);
   436 	BtnNetConnect->setFont(*font14);
   427 	BtnNetConnect->setText(QPushButton::tr("Connect"));
   437 	BtnNetConnect->setText(QPushButton::tr("Connect"));
   428 	pageLayout->addWidget(BtnNetConnect, 3, 3);
   438 	GBClayout->addWidget(BtnNetConnect, 0, 2);
   429 
   439 
   430 	pUpdateUdpButt = new QPushButton(this);
   440 	pUdpClient=new HWNetUdpWidget(ConnGroupBox);
       
   441 	GBClayout->addWidget(pUdpClient, 1, 0, 2, 2);
       
   442 
       
   443 	pUpdateUdpButt = new QPushButton(ConnGroupBox);
   431 	pUpdateUdpButt->setFont(*font14);
   444 	pUpdateUdpButt->setFont(*font14);
   432 	pUpdateUdpButt->setText(QPushButton::tr("Update"));
   445 	pUpdateUdpButt->setText(QPushButton::tr("Update"));
   433 	pageLayout->addWidget(pUpdateUdpButt, 3, 1);
   446 	GBClayout->addWidget(pUpdateUdpButt, 1, 2);
   434 
       
   435 	BtnNetSvrStart = new	QPushButton(this);
       
   436 	BtnNetSvrStart->setFont(*font14);
       
   437 	BtnNetSvrStart->setText(QPushButton::tr("Start server"));
       
   438 	pageLayout->addWidget(BtnNetSvrStart, 3, 2);
       
   439 
   447 
   440 	BtnBack = new QPushButton(this);
   448 	BtnBack = new QPushButton(this);
   441 	BtnBack->setFont(*font14);
   449 	BtnBack->setFont(*font14);
   442 	BtnBack->setText(QPushButton::tr("Back"));
   450 	BtnBack->setText(QPushButton::tr("Back"));
   443 	pageLayout->addWidget(BtnBack, 3, 0);
   451 	pageLayout->addWidget(BtnBack, 3, 0);