QTfrontend/pages.cpp
changeset 94 c6eec0bdb630
parent 93 c21ff3af56cf
child 97 e7c1df9cce2c
equal deleted inserted replaced
93:c21ff3af56cf 94:c6eec0bdb630
   288 }
   288 }
   289 
   289 
   290 PageOptions::PageOptions(QWidget* parent) : QWidget(parent)
   290 PageOptions::PageOptions(QWidget* parent) : QWidget(parent)
   291 {
   291 {
   292 	QFont * font14 = new QFont("MS Shell Dlg", 14);
   292 	QFont * font14 = new QFont("MS Shell Dlg", 14);
       
   293 	QGridLayout * pageLayout = new QGridLayout(this);
   293 	groupBox = new QGroupBox(this);
   294 	groupBox = new QGroupBox(this);
   294 	groupBox->setGeometry(QRect(20, 10,	591, 71));
   295 	groupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
   295 	groupBox->setTitle(QGroupBox::tr("Teams"));
   296 	groupBox->setTitle(QGroupBox::tr("Teams"));
   296 
   297 	pageLayout->addWidget(groupBox, 0, 0, 1, 3);
       
   298 
       
   299 	QGridLayout * GBTlayout = new QGridLayout(groupBox);
   297 	BtnNewTeam = new QPushButton(groupBox);
   300 	BtnNewTeam = new QPushButton(groupBox);
   298 	BtnNewTeam->setGeometry(QRect(10, 20, 160, 40));
       
   299 	BtnNewTeam->setFont(*font14);
   301 	BtnNewTeam->setFont(*font14);
   300 	BtnNewTeam->setText(QPushButton::tr("New team"));
   302 	BtnNewTeam->setText(QPushButton::tr("New team"));
       
   303 	GBTlayout->addWidget(BtnNewTeam, 0, 0);
       
   304 
       
   305 	CBTeamName = new QComboBox(groupBox);
       
   306 	GBTlayout->addWidget(CBTeamName, 0, 1);
   301 
   307 
   302 	BtnEditTeam	= new QPushButton(groupBox);
   308 	BtnEditTeam	= new QPushButton(groupBox);
   303 	BtnEditTeam->setGeometry(QRect(400,	20, 160, 40));
       
   304 	BtnEditTeam->setFont(*font14);
   309 	BtnEditTeam->setFont(*font14);
   305 	BtnEditTeam->setText(QPushButton::tr("Edit team"));
   310 	BtnEditTeam->setText(QPushButton::tr("Edit team"));
   306 
   311 	GBTlayout->addWidget(BtnEditTeam, 0, 2);
   307 	CBTeamName = new QComboBox(groupBox);
   312 
   308 	CBTeamName->setGeometry(QRect(200, 30, 171,	22));
   313 	AGGroupBox = new QGroupBox(this);
   309 	CBResolution = new QComboBox(this);
   314 	AGGroupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
       
   315 	AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options"));
       
   316 	pageLayout->addWidget(AGGroupBox, 1, 0, 1, 3);
       
   317 
       
   318 	QGridLayout * GBAlayout = new QGridLayout(AGGroupBox);
       
   319 	CBResolution = new QComboBox(AGGroupBox);
   310 	CBResolution->addItem("640x480");
   320 	CBResolution->addItem("640x480");
   311 	CBResolution->addItem("800x600");
   321 	CBResolution->addItem("800x600");
   312 	CBResolution->addItem("1024x768");
   322 	CBResolution->addItem("1024x768");
   313 	CBResolution->addItem("1280x1024");
   323 	CBResolution->addItem("1280x1024");
   314 	CBResolution->setGeometry(QRect(20,	120, 151, 22));
   324 	GBAlayout->addWidget(CBResolution, 0, 0);
   315 
   325 
   316 	CBEnableSound = new	QCheckBox(this);
   326 	CBFullscreen = new QCheckBox(AGGroupBox);
   317 	CBEnableSound->setGeometry(QRect(20, 180, 101, 18));
   327 	CBFullscreen->setText(QCheckBox::tr("Fullscreen"));
       
   328 	GBAlayout->addWidget(CBFullscreen, 0, 1);
       
   329 
       
   330 	CBEnableSound = new	QCheckBox(AGGroupBox);
   318 	CBEnableSound->setText(QCheckBox::tr("Enable sound"));
   331 	CBEnableSound->setText(QCheckBox::tr("Enable sound"));
   319 
   332 	GBAlayout->addWidget(CBEnableSound, 0, 2);
   320 	CBFullscreen = new QCheckBox(this);
   333 
   321 	CBFullscreen->setGeometry(QRect(20,	160, 101, 18));
   334 	NNGroupBox = new QGroupBox(this);
   322 	CBFullscreen->setText(QCheckBox::tr("Fullscreen"));
   335 	NNGroupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
   323 
   336 	NNGroupBox->setTitle(QGroupBox::tr("Net nick"));
   324 	label = new	QLabel(this);
   337 	pageLayout->addWidget(NNGroupBox, 2, 0, 1, 3);
   325 	label->setGeometry(QRect(10, 233, 47, 13));
   338 
       
   339 	QGridLayout * GBNlayout = new QGridLayout(NNGroupBox);
       
   340 	label = new	QLabel(NNGroupBox);
   326 	label->setText(QLabel::tr("Net nick"));
   341 	label->setText(QLabel::tr("Net nick"));
   327 
   342 	GBNlayout->addWidget(label, 0, 0);
   328 	editNetNick	= new QLineEdit(this);
   343 
   329 	editNetNick->setGeometry(QRect(60, 230, 113, 20));
   344 	editNetNick	= new QLineEdit(NNGroupBox);
   330 	editNetNick->setMaxLength(30);
   345 	editNetNick->setMaxLength(30);
   331 	editNetNick->setText(QLineEdit::tr("unnamed"));
   346 	editNetNick->setText(QLineEdit::tr("unnamed"));
       
   347 	GBNlayout->addWidget(editNetNick, 0, 1);
       
   348 
       
   349 	pageLayout->addWidget(new QWidget(), 3, 0, 1, 3);
   332 
   350 
   333 	BtnSaveOptions = new QPushButton(this);
   351 	BtnSaveOptions = new QPushButton(this);
   334 	BtnSaveOptions->setGeometry(QRect(20, 380, 161, 41));
       
   335 	BtnSaveOptions->setFont(*font14);
   352 	BtnSaveOptions->setFont(*font14);
   336 	BtnSaveOptions->setText(QPushButton::tr("Save"));
   353 	BtnSaveOptions->setText(QPushButton::tr("Save"));
       
   354 	pageLayout->addWidget(BtnSaveOptions, 4, 2);
   337 
   355 
   338 	BtnBack = new QPushButton(this);
   356 	BtnBack = new QPushButton(this);
   339 	BtnBack->setGeometry(QRect(440, 380, 161, 41));
   357 	BtnBack->setFont(*font14);
   340 	BtnBack->setFont(*font14);
   358 	BtnBack->setText(QPushButton::tr("Back"));
   341 	BtnBack->setText(QPushButton::tr("Back"));
   359 	pageLayout->addWidget(BtnBack, 4, 0);
   342 }
   360 }
   343 
   361 
   344 PageNet::PageNet(QWidget* parent) : QWidget(parent)
   362 PageNet::PageNet(QWidget* parent) : QWidget(parent)
   345 {
   363 {
   346 	QFont * font14 = new QFont("MS Shell Dlg", 14);
   364 	QFont * font14 = new QFont("MS Shell Dlg", 14);