QTfrontend/pages.cpp
changeset 2773 e94f240a8a41
parent 2762 2fbc8d35eb52
child 2774 a4fd9eacd286
equal deleted inserted replaced
2772:1965eba10be6 2773:e94f240a8a41
   630 void PageNetServer::setDefaultPort()
   630 void PageNetServer::setDefaultPort()
   631 {
   631 {
   632 	sbPort->setValue(46631);
   632 	sbPort->setValue(46631);
   633 }
   633 }
   634 
   634 
   635 PageNetGame::PageNetGame(QWidget* parent) : AbstractPage(parent)
   635 PageNetGame::PageNetGame(QWidget* parent, QSettings * gameSettings, SDLInteraction * sdli) : AbstractPage(parent)
   636 {
   636 {
   637 	QGridLayout * pageLayout = new QGridLayout(this);
   637 	QGridLayout * pageLayout = new QGridLayout(this);
   638 	pageLayout->setSizeConstraint(QLayout::SetMinimumSize);
   638 	pageLayout->setSizeConstraint(QLayout::SetMinimumSize);
   639 	//pageLayout->setSpacing(1);
   639 	//pageLayout->setSpacing(1);
   640 	pageLayout->setColumnStretch(0, 50);
   640 	pageLayout->setColumnStretch(0, 50);
   641 	pageLayout->setColumnStretch(1, 50);
   641 	pageLayout->setColumnStretch(1, 50);
   642 
   642 
   643 	// chatwidget
   643 	// chatwidget
   644 	pChatWidget = new HWChatWidget(this);
   644 	pChatWidget = new HWChatWidget(this, gameSettings, sdli);
   645 	pageLayout->addWidget(pChatWidget, 1, 0, 1, 2);
   645 	pageLayout->addWidget(pChatWidget, 1, 0, 1, 2);
   646 	pageLayout->setRowStretch(1, 100);
   646 	pageLayout->setRowStretch(1, 100);
   647 
   647 
   648 	pGameCFG = new GameCFGWidget(this);
   648 	pGameCFG = new GameCFGWidget(this);
   649 	pageLayout->addWidget(pGameCFG, 0, 0);
   649 	pageLayout->addWidget(pGameCFG, 0, 0);
   794 {
   794 {
   795 	QLabel * label = new QLabel(this);
   795 	QLabel * label = new QLabel(this);
   796 	label->setText("In game...");
   796 	label->setText("In game...");
   797 }
   797 }
   798 
   798 
   799 PageRoomsList::PageRoomsList(QWidget* parent) :
   799 PageRoomsList::PageRoomsList(QWidget* parent, QSettings * gameSettings, SDLInteraction * sdli) :
   800   AbstractPage(parent)
   800   AbstractPage(parent)
   801 {
   801 {
   802 	QGridLayout * pageLayout = new QGridLayout(this);
   802 	QGridLayout * pageLayout = new QGridLayout(this);
   803 
   803 
   804 	QHBoxLayout * newRoomLayout = new QHBoxLayout();
   804 	QHBoxLayout * newRoomLayout = new QHBoxLayout();
   816 	roomsList->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
   816 	roomsList->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
   817 	roomsList->setAlternatingRowColors(true);
   817 	roomsList->setAlternatingRowColors(true);
   818 	pageLayout->addWidget(roomsList, 1, 0, 3, 1);
   818 	pageLayout->addWidget(roomsList, 1, 0, 3, 1);
   819 	pageLayout->setRowStretch(2, 100);
   819 	pageLayout->setRowStretch(2, 100);
   820 
   820 
   821 	chatWidget = new HWChatWidget(this);
   821 	chatWidget = new HWChatWidget(this, gameSettings, sdli);
   822 	pageLayout->addWidget(chatWidget, 4, 0, 1, 2);
   822 	pageLayout->addWidget(chatWidget, 4, 0, 1, 2);
   823 	pageLayout->setRowStretch(4, 350);
   823 	pageLayout->setRowStretch(4, 350);
   824 
   824 
   825 	BtnCreate = addButton(tr("Create"), pageLayout, 0, 1);
   825 	BtnCreate = addButton(tr("Create"), pageLayout, 0, 1);
   826 	BtnJoin = addButton(tr("Join"), pageLayout, 1, 1);
   826 	BtnJoin = addButton(tr("Join"), pageLayout, 1, 1);