Add chat widget to lobby page (not usable yet)
authorunc0rr
Fri, 28 Nov 2008 18:41:31 +0000
changeset 1522 6794cf8f1e6f
parent 1521 971f523d7c01
child 1523 be52ace20c1a
Add chat widget to lobby page (not usable yet)
QTfrontend/pages.cpp
QTfrontend/pages.h
--- a/QTfrontend/pages.cpp	Fri Nov 28 16:46:56 2008 +0000
+++ b/QTfrontend/pages.cpp	Fri Nov 28 18:41:31 2008 +0000
@@ -683,16 +683,22 @@
 	roomsList->verticalHeader()->setVisible(false);
 	roomsList->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
 	roomsList->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
+	pageLayout->addWidget(roomsList, 1, 0, 3, 1);
+	pageLayout->setRowStretch(2, 125);
 	
-	pageLayout->addWidget(roomsList, 1, 0, 3, 1);
 	serverMessage = new QTextBrowser(this);
 	serverMessage->setOpenExternalLinks(true);
 	pageLayout->addWidget(serverMessage, 4, 0, 1, 2);
-	
-	BtnBack = addButton(":/res/Exit.png", pageLayout, 5, 0, true);
+	pageLayout->setRowStretch(4, 100);
+
+	chatWidget = new HWChatWidget(this);
+	pageLayout->addWidget(chatWidget, 5, 0, 1, 2);
+	pageLayout->setRowStretch(5, 200);
+
+	BtnBack = addButton(":/res/Exit.png", pageLayout, 6, 0, true);
 	BtnCreate = addButton(tr("Create"), pageLayout, 0, 1);
 	BtnJoin = addButton(tr("Join"), pageLayout, 1, 1);
-	BtnRefresh = addButton(tr("Refresh"), pageLayout, 2, 1);
+	BtnRefresh = addButton(tr("Refresh"), pageLayout, 3, 1);
 
 	connect(BtnCreate, SIGNAL(clicked()), this, SLOT(onCreateClick()));
 	connect(BtnJoin, SIGNAL(clicked()), this, SLOT(onJoinClick()));
--- a/QTfrontend/pages.h	Fri Nov 28 16:46:56 2008 +0000
+++ b/QTfrontend/pages.h	Fri Nov 28 18:41:31 2008 +0000
@@ -366,6 +366,7 @@
 	QPushButton * BtnJoin;
 	QPushButton * BtnRefresh;
 	QTextBrowser * serverMessage;
+	HWChatWidget * chatWidget;
 	
 public slots:
 	void setRoomsList(const QStringList & list);