512 QGridLayout * pageLayout = new QGridLayout(this); |
512 QGridLayout * pageLayout = new QGridLayout(this); |
513 pageLayout->setColumnStretch(0, 1); |
513 pageLayout->setColumnStretch(0, 1); |
514 pageLayout->setColumnStretch(1, 1); |
514 pageLayout->setColumnStretch(1, 1); |
515 pageLayout->setColumnStretch(2, 1); |
515 pageLayout->setColumnStretch(2, 1); |
516 |
516 |
517 BtnBack = new QPushButton(this); |
517 pageLayout->setRowStretch(0, 0); |
518 BtnBack->setFont(*font14); |
518 pageLayout->setRowStretch(1, 0); |
519 BtnBack->setText(QPushButton::tr("Back")); |
519 pageLayout->setRowStretch(2, 1); |
520 pageLayout->addWidget(BtnBack, 2, 0); |
520 pageLayout->setRowStretch(3, 0); |
|
521 |
|
522 BtnBack = new QPushButton(this); |
|
523 BtnBack->setFont(*font14); |
|
524 BtnBack->setText(QPushButton::tr("Back")); |
|
525 pageLayout->addWidget(BtnBack, 3, 0); |
521 |
526 |
522 BtnStart = new QPushButton(this); |
527 BtnStart = new QPushButton(this); |
523 BtnStart->setFont(*font14); |
528 BtnStart->setFont(*font14); |
524 BtnStart->setText(QPushButton::tr("Start")); |
529 BtnStart->setText(QPushButton::tr("Start")); |
525 pageLayout->addWidget(BtnStart, 2, 2); |
530 pageLayout->addWidget(BtnStart, 3, 2); |
|
531 |
|
532 labelSD = new QLabel(this); |
|
533 labelSD->setText(QLabel::tr("Server name:")); |
|
534 pageLayout->addWidget(labelSD, 0, 0); |
|
535 |
|
536 leServerDescr = new QLineEdit(this); |
|
537 pageLayout->addWidget(leServerDescr, 0, 1); |
|
538 |
|
539 labelPort = new QLabel(this); |
|
540 labelPort->setText(QLabel::tr("Server port:")); |
|
541 pageLayout->addWidget(labelPort, 1, 0); |
|
542 |
|
543 sbPort = new QSpinBox(this); |
|
544 sbPort->setMinimum(0); |
|
545 sbPort->setMaximum(65535); |
|
546 pageLayout->addWidget(sbPort, 1, 1); |
|
547 |
|
548 BtnDefault = new QPushButton(this); |
|
549 BtnDefault->setText(QPushButton::tr("default")); |
|
550 pageLayout->addWidget(BtnDefault, 1, 2); |
|
551 |
|
552 connect(BtnDefault, SIGNAL(clicked()), this, SLOT(setDefaultPort())); |
|
553 } |
|
554 |
|
555 void PageNetServer::setDefaultPort() |
|
556 { |
|
557 sbPort->setValue(46631); |
526 } |
558 } |
527 |
559 |
528 PageNetGame::PageNetGame(QWidget* parent) : QWidget(parent) |
560 PageNetGame::PageNetGame(QWidget* parent) : QWidget(parent) |
529 { |
561 { |
530 QFont * font14 = new QFont("MS Shell Dlg", 14); |
562 QFont * font14 = new QFont("MS Shell Dlg", 14); |