15 * along with this program; if not, write to the Free Software |
15 * along with this program; if not, write to the Free Software |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
17 */ |
17 */ |
18 |
18 |
19 #include <QGridLayout> |
19 #include <QGridLayout> |
|
20 #include <QHBoxLayout> |
20 #include <QPushButton> |
21 #include <QPushButton> |
21 #include <QGroupBox> |
22 #include <QGroupBox> |
22 #include <QTableView> |
23 #include <QTableView> |
23 #include <QMessageBox> |
24 #include <QMessageBox> |
24 #include <QHeaderView> |
25 #include <QHeaderView> |
32 QGridLayout * pageLayout = new QGridLayout(); |
33 QGridLayout * pageLayout = new QGridLayout(); |
33 |
34 |
34 pageLayout->setColumnStretch(0, 1); |
35 pageLayout->setColumnStretch(0, 1); |
35 pageLayout->setColumnStretch(1, 1); |
36 pageLayout->setColumnStretch(1, 1); |
36 pageLayout->setColumnStretch(2, 1); |
37 pageLayout->setColumnStretch(2, 1); |
37 |
|
38 BtnNetSvrStart = new QPushButton(this); |
|
39 BtnNetSvrStart->setFont(*font14); |
|
40 BtnNetSvrStart->setText(QPushButton::tr("Start server")); |
|
41 BtnNetSvrStart->setVisible(haveServer); |
|
42 pageLayout->addWidget(BtnNetSvrStart, 4, 2); |
|
43 |
38 |
44 ConnGroupBox = new QGroupBox(this); |
39 ConnGroupBox = new QGroupBox(this); |
45 ConnGroupBox->setTitle(QGroupBox::tr("Net game")); |
40 ConnGroupBox->setTitle(QGroupBox::tr("Net game")); |
46 pageLayout->addWidget(ConnGroupBox, 2, 0, 1, 3); |
41 pageLayout->addWidget(ConnGroupBox, 2, 0, 1, 3); |
47 GBClayout = new QGridLayout(ConnGroupBox); |
42 GBClayout = new QGridLayout(ConnGroupBox); |
67 BtnSpecifyServer->setFont(*font14); |
62 BtnSpecifyServer->setFont(*font14); |
68 BtnSpecifyServer->setText(QPushButton::tr("Specify")); |
63 BtnSpecifyServer->setText(QPushButton::tr("Specify")); |
69 GBClayout->addWidget(BtnSpecifyServer, 2, 1); |
64 GBClayout->addWidget(BtnSpecifyServer, 2, 1); |
70 |
65 |
71 return pageLayout; |
66 return pageLayout; |
|
67 } |
|
68 |
|
69 QLayout * PageNet::footerLayoutDefinition() |
|
70 { |
|
71 QHBoxLayout * footerLayout = new QHBoxLayout(); |
|
72 |
|
73 BtnNetSvrStart = formattedButton(QPushButton::tr("Start server")); |
|
74 BtnNetSvrStart->setMinimumWidth(180); |
|
75 BtnNetSvrStart->setVisible(haveServer); |
|
76 |
|
77 footerLayout->addStretch(); |
|
78 footerLayout->addWidget(BtnNetSvrStart); |
|
79 |
|
80 return footerLayout; |
72 } |
81 } |
73 |
82 |
74 void PageNet::connectSignals() |
83 void PageNet::connectSignals() |
75 { |
84 { |
76 connect(BtnNetConnect, SIGNAL(clicked()), this, SLOT(slotConnect())); |
85 connect(BtnNetConnect, SIGNAL(clicked()), this, SLOT(slotConnect())); |