35 //pageLayout->setSpacing(1); |
35 //pageLayout->setSpacing(1); |
36 pageLayout->setColumnStretch(0, 50); |
36 pageLayout->setColumnStretch(0, 50); |
37 pageLayout->setColumnStretch(1, 50); |
37 pageLayout->setColumnStretch(1, 50); |
38 |
38 |
39 // chatwidget |
39 // chatwidget |
40 pChatWidget = new HWChatWidget(this, m_gameSettings, true); |
40 chatWidget = new HWChatWidget(this, true); |
41 pChatWidget->setShowFollow(false); // don't show follow in nicks' context menus |
41 chatWidget->setShowFollow(false); // don't show follow in nicks' context menus |
42 pChatWidget->setIgnoreListKick(true); // kick ignored players automatically |
42 chatWidget->setIgnoreListKick(true); // kick ignored players automatically |
43 pageLayout->addWidget(pChatWidget, 2, 0, 1, 2); |
43 pageLayout->addWidget(chatWidget, 2, 0, 1, 2); |
44 pageLayout->setRowStretch(1, 100); |
44 pageLayout->setRowStretch(1, 100); |
45 pageLayout->setRowStretch(2, 100); |
45 pageLayout->setRowStretch(2, 100); |
46 |
46 |
47 pGameCFG = new GameCFGWidget(this); |
47 pGameCFG = new GameCFGWidget(this); |
48 pageLayout->addWidget(pGameCFG, 0, 0); |
48 pageLayout->addWidget(pGameCFG, 0, 0); |
94 connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked())); |
94 connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked())); |
95 |
95 |
96 connect(BtnUpdate, SIGNAL(clicked()), this, SLOT(onUpdateClick())); |
96 connect(BtnUpdate, SIGNAL(clicked()), this, SLOT(onUpdateClick())); |
97 } |
97 } |
98 |
98 |
99 PageNetGame::PageNetGame(QWidget* parent, QSettings * gameSettings) : AbstractPage(parent) |
99 PageNetGame::PageNetGame(QWidget* parent) : AbstractPage(parent) |
100 { |
100 { |
101 m_gameSettings = gameSettings; |
|
102 |
|
103 initPage(); |
101 initPage(); |
104 |
102 |
105 QMenu * menu = new QMenu(BtnMaster); |
103 QMenu * menu = new QMenu(BtnMaster); |
106 |
104 |
107 restrictJoins = new QAction(QAction::tr("Restrict Joins"), menu); |
105 restrictJoins = new QAction(QAction::tr("Restrict Joins"), menu); |
111 //menu->addAction(startGame); |
109 //menu->addAction(startGame); |
112 menu->addAction(restrictJoins); |
110 menu->addAction(restrictJoins); |
113 menu->addAction(restrictTeamAdds); |
111 menu->addAction(restrictTeamAdds); |
114 |
112 |
115 BtnMaster->setMenu(menu); |
113 BtnMaster->setMenu(menu); |
116 |
|
117 } |
114 } |
118 |
115 |
119 |
116 |
120 void PageNetGame::displayError(const QString & message) |
117 void PageNetGame::displayError(const QString & message) |
121 { |
118 { |
122 pChatWidget->displayError(message); |
119 chatWidget->displayError(message); |
123 } |
120 } |
124 |
121 |
125 |
122 |
126 void PageNetGame::displayNotice(const QString & message) |
123 void PageNetGame::displayNotice(const QString & message) |
127 { |
124 { |
128 pChatWidget->displayNotice(message); |
125 chatWidget->displayNotice(message); |
129 } |
126 } |
130 |
127 |
131 void PageNetGame::displayWarning(const QString & message) |
128 void PageNetGame::displayWarning(const QString & message) |
132 { |
129 { |
133 pChatWidget->displayWarning(message); |
130 chatWidget->displayWarning(message); |
134 } |
131 } |
135 |
132 |
136 |
133 |
137 void PageNetGame::setReadyStatus(bool isReady) |
134 void PageNetGame::setReadyStatus(bool isReady) |
138 { |
135 { |