- Remake net game page
authorunc0rr
Fri, 09 Feb 2007 19:38:52 +0000
changeset 421 ebd79d171804
parent 420 6cdfc07dceed
child 422 12295a8b8b2f
- Remake net game page - Set svn:eol-style to 'native'
QTfrontend/netudpwidget.cpp
QTfrontend/pages.cpp
--- a/QTfrontend/netudpwidget.cpp	Thu Feb 08 21:11:58 2007 +0000
+++ b/QTfrontend/netudpwidget.cpp	Fri Feb 09 19:38:52 2007 +0000
@@ -9,6 +9,7 @@
   QWidget(parent), mainLayout(this)
 {
   serversList = new QListWidget(this);
+  mainLayout.setMargin(0);
   mainLayout.addWidget(serversList);
   pUdpSocket = new QUdpSocket(this);
 
--- a/QTfrontend/pages.cpp	Thu Feb 08 21:11:58 2007 +0000
+++ b/QTfrontend/pages.cpp	Fri Feb 09 19:38:52 2007 +0000
@@ -392,14 +392,16 @@
 	QGridLayout * pageLayout = new QGridLayout(this);
 	pageLayout->setColumnStretch(0, 1);
 	pageLayout->setColumnStretch(1, 1);
-	pageLayout->setColumnStretch(2, 1);
+
+	BtnNetSvrStart = new QPushButton(this);
+	BtnNetSvrStart->setFont(*font14);
+	BtnNetSvrStart->setText(QPushButton::tr("Start server"));
+	pageLayout->addWidget(BtnNetSvrStart, 0, 1);
 
 	NNGroupBox = new QGroupBox(this);
 	NNGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
 	NNGroupBox->setTitle(QGroupBox::tr("Net options"));
-	pageLayout->addWidget(NNGroupBox, 0, 1, 1, 2);
-
-	pageLayout->addWidget(new QWidget(), 1, 1);
+	pageLayout->addWidget(NNGroupBox, 0, 0);
 
 	QGridLayout * GBNlayout = new QGridLayout(NNGroupBox);
 	labelNN = new QLabel(NNGroupBox);
@@ -411,31 +413,37 @@
 	editNetNick->setText(QLineEdit::tr("unnamed"));
 	GBNlayout->addWidget(editNetNick, 0, 1);
 
-	labelIP = new QLabel(NNGroupBox);
+	QGroupBox * ConnGroupBox = new QGroupBox(this);
+	ConnGroupBox->setTitle(QGroupBox::tr("Net game"));
+	pageLayout->addWidget(ConnGroupBox, 2, 0, 1, 3);
+	QGridLayout * GBClayout = new QGridLayout(ConnGroupBox);
+	GBClayout->setColumnStretch(0, 0);
+	GBClayout->setColumnStretch(1, 1);
+	GBClayout->setColumnStretch(2, 1);
+	GBClayout->setRowStretch(0, 0);
+	GBClayout->setRowStretch(1, 0);
+	GBClayout->setRowStretch(2, 1);
+
+	labelIP = new QLabel(ConnGroupBox);
 	labelIP->setText(QLabel::tr("Server address"));
-	GBNlayout->addWidget(labelIP, 1, 0);
+	GBClayout->addWidget(labelIP, 0, 0);
 
-	editIP = new QLineEdit(NNGroupBox);
+	editIP = new QLineEdit(ConnGroupBox);
 	editIP->setMaxLength(50);
-	GBNlayout->addWidget(editIP, 1, 1);
+	GBClayout->addWidget(editIP, 0, 1);
 
-	pUdpClient=new HWNetUdpWidget(this);
-	pageLayout->addWidget(pUdpClient, 2, 1, 1, 2);
-	
-	BtnNetConnect = new	QPushButton(this);
+	BtnNetConnect = new	QPushButton(ConnGroupBox);
 	BtnNetConnect->setFont(*font14);
 	BtnNetConnect->setText(QPushButton::tr("Connect"));
-	pageLayout->addWidget(BtnNetConnect, 3, 3);
+	GBClayout->addWidget(BtnNetConnect, 0, 2);
 
-	pUpdateUdpButt = new QPushButton(this);
+	pUdpClient=new HWNetUdpWidget(ConnGroupBox);
+	GBClayout->addWidget(pUdpClient, 1, 0, 2, 2);
+
+	pUpdateUdpButt = new QPushButton(ConnGroupBox);
 	pUpdateUdpButt->setFont(*font14);
 	pUpdateUdpButt->setText(QPushButton::tr("Update"));
-	pageLayout->addWidget(pUpdateUdpButt, 3, 1);
-
-	BtnNetSvrStart = new	QPushButton(this);
-	BtnNetSvrStart->setFont(*font14);
-	BtnNetSvrStart->setText(QPushButton::tr("Start server"));
-	pageLayout->addWidget(BtnNetSvrStart, 3, 2);
+	GBClayout->addWidget(pUpdateUdpButt, 1, 2);
 
 	BtnBack = new QPushButton(this);
 	BtnBack->setFont(*font14);