335 pageLayout->addWidget(gbTwoBoxes, 0, 0, 1, 3); |
335 pageLayout->addWidget(gbTwoBoxes, 0, 0, 1, 3); |
336 QGridLayout * gbTBLayout = new QGridLayout(gbTwoBoxes); |
336 QGridLayout * gbTBLayout = new QGridLayout(gbTwoBoxes); |
337 gbTBLayout->setMargin(0); |
337 gbTBLayout->setMargin(0); |
338 gbTBLayout->setSpacing(0); |
338 gbTBLayout->setSpacing(0); |
339 { |
339 { |
340 teamsBox = new IconedGroupBox(this); |
340 teamsBox = new IconedGroupBox(this); |
341 //teamsBox->setAttribute(Qt::WA_PaintOnScreen, true); |
341 //teamsBox->setAttribute(Qt::WA_PaintOnScreen, true); |
342 teamsBox->setIcon(QIcon(":/res/teamicon.png")); |
342 teamsBox->setIcon(QIcon(":/res/teamicon.png")); |
343 teamsBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
343 teamsBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
344 teamsBox->setTitle(QGroupBox::tr("Teams")); |
344 teamsBox->setTitle(QGroupBox::tr("Teams")); |
345 |
345 |
346 QVBoxLayout * GBTlayout = new QVBoxLayout(teamsBox); |
346 QVBoxLayout * GBTlayout = new QVBoxLayout(teamsBox); |
347 |
347 |
348 CBTeamName = new QComboBox(teamsBox); |
348 CBTeamName = new QComboBox(teamsBox); |
349 GBTlayout->addWidget(CBTeamName); |
349 GBTlayout->addWidget(CBTeamName); |
350 |
350 |
351 QHBoxLayout * layout1 = new QHBoxLayout; |
351 QHBoxLayout * layout1 = new QHBoxLayout; |
352 GBTlayout->addLayout(layout1); |
352 GBTlayout->addLayout(layout1); |
353 BtnNewTeam = addButton(tr("New team"), layout1, 0); |
353 BtnNewTeam = addButton(tr("New team"), layout1, 0); |
354 BtnEditTeam = addButton(tr("Edit team"), layout1, 1); |
354 BtnEditTeam = addButton(tr("Edit team"), layout1, 1); |
355 layout1->setStretchFactor(BtnNewTeam, 100); |
355 layout1->setStretchFactor(BtnNewTeam, 100); |
356 layout1->setStretchFactor(BtnEditTeam, 100); |
356 layout1->setStretchFactor(BtnEditTeam, 100); |
357 |
357 |
358 QHBoxLayout * layout2 = new QHBoxLayout; |
358 QHBoxLayout * layout2 = new QHBoxLayout; |
359 GBTlayout->addLayout(layout2); |
359 GBTlayout->addLayout(layout2); |
360 |
360 |
361 labelNN = new QLabel(teamsBox); |
361 labelNN = new QLabel(teamsBox); |
362 labelNN->setText(QLabel::tr("Net nick")); |
362 labelNN->setText(QLabel::tr("Net nick")); |
363 layout2->addWidget(labelNN); |
363 layout2->addWidget(labelNN); |
364 |
364 |
365 editNetNick = new QLineEdit(teamsBox); |
365 editNetNick = new QLineEdit(teamsBox); |
366 editNetNick->setMaxLength(20); |
366 editNetNick->setMaxLength(20); |
367 editNetNick->setText(QLineEdit::tr("unnamed")); |
367 editNetNick->setText(QLineEdit::tr("unnamed")); |
368 layout2->addWidget(editNetNick); |
368 layout2->addWidget(editNetNick); |
369 |
369 |
370 gbTBLayout->addWidget(teamsBox, 0, 0); |
370 gbTBLayout->addWidget(teamsBox, 0, 0); |
371 } |
371 } |
372 |
372 |
373 { |
373 { |
374 IconedGroupBox* groupWeapons = new IconedGroupBox(this); |
374 IconedGroupBox* groupWeapons = new IconedGroupBox(this); |
375 groupWeapons->setContentTopPadding(0); |
375 groupWeapons->setContentTopPadding(0); |
376 groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
376 groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
377 groupWeapons->setIcon(QIcon(":/res/weaponsicon.png")); |
377 groupWeapons->setIcon(QIcon(":/res/weaponsicon.png")); |
378 //groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
378 //groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
379 groupWeapons->setTitle(QGroupBox::tr("Weapons")); |
379 groupWeapons->setTitle(QGroupBox::tr("Weapons")); |
380 QGridLayout * WeaponsLayout = new QGridLayout(groupWeapons); |
380 QGridLayout * WeaponsLayout = new QGridLayout(groupWeapons); |
381 |
381 |
382 WeaponsButt = addButton(tr("Weapons set"), WeaponsLayout, 1, 0); |
382 WeaponsButt = addButton(tr("Weapons set"), WeaponsLayout, 1, 0); |
383 WeaponsName = new QComboBox(this); |
383 WeaponsName = new QComboBox(this); |
384 WeaponsLayout->addWidget(WeaponsName, 0, 0, 1, 2); |
384 WeaponsLayout->addWidget(WeaponsName, 0, 0, 1, 2); |
385 WeaponEdit = addButton(tr("Edit"), WeaponsLayout, 1, 1); |
385 WeaponEdit = addButton(tr("Edit"), WeaponsLayout, 1, 1); |
386 gbTBLayout->addWidget(groupWeapons, 1, 0); |
386 gbTBLayout->addWidget(groupWeapons, 1, 0); |
387 } |
387 } |
388 |
388 |
389 { |
389 { |
390 AGGroupBox = new IconedGroupBox(this); |
390 AGGroupBox = new IconedGroupBox(this); |
391 AGGroupBox->setIcon(QIcon(":/res/graphicsicon.png")); |
391 AGGroupBox->setIcon(QIcon(":/res/graphicsicon.png")); |
392 AGGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); |
392 AGGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); |
393 AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options")); |
393 AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options")); |
394 |
394 |
395 QVBoxLayout * GBAlayout = new QVBoxLayout(AGGroupBox); |
395 QVBoxLayout * GBAlayout = new QVBoxLayout(AGGroupBox); |
396 QHBoxLayout * GBAreslayout = new QHBoxLayout(0); |
396 QHBoxLayout * GBAreslayout = new QHBoxLayout(0); |
397 |
397 |
398 QLabel * resolution = new QLabel(AGGroupBox); |
398 QLabel * resolution = new QLabel(AGGroupBox); |
399 resolution->setText(QLabel::tr("Resolution")); |
399 resolution->setText(QLabel::tr("Resolution")); |
400 GBAreslayout->addWidget(resolution); |
400 GBAreslayout->addWidget(resolution); |
401 |
401 |
402 CBResolution = new QComboBox(AGGroupBox); |
402 CBResolution = new QComboBox(AGGroupBox); |
403 GBAreslayout->addWidget(CBResolution); |
403 GBAreslayout->addWidget(CBResolution); |
404 GBAlayout->addLayout(GBAreslayout); |
404 GBAlayout->addLayout(GBAreslayout); |
405 |
405 |
406 QHBoxLayout * GBAfpslayout = new QHBoxLayout(0); |
406 QHBoxLayout * GBAfpslayout = new QHBoxLayout(0); |
407 QLabel * maxfps = new QLabel(AGGroupBox); |
407 QLabel * maxfps = new QLabel(AGGroupBox); |
408 maxfps->setText(QLabel::tr("FPS limit")); |
408 maxfps->setText(QLabel::tr("FPS limit")); |
409 GBAfpslayout->addWidget(maxfps); |
409 GBAfpslayout->addWidget(maxfps); |
410 GBAlayout->addLayout(GBAfpslayout); |
410 GBAlayout->addLayout(GBAfpslayout); |
411 |
411 |
412 CBReduceQuality = new QCheckBox(AGGroupBox); |
412 CBReduceQuality = new QCheckBox(AGGroupBox); |
413 CBReduceQuality->setText(QCheckBox::tr("Reduce Quality")); |
413 CBReduceQuality->setText(QCheckBox::tr("Reduce Quality")); |
414 GBAlayout->addWidget(CBReduceQuality); |
414 GBAlayout->addWidget(CBReduceQuality); |
415 |
415 |
416 CBFrontendEffects = new QCheckBox(AGGroupBox); |
416 CBFrontendEffects = new QCheckBox(AGGroupBox); |
417 CBFrontendEffects->setText(QCheckBox::tr("Frontend Effects (Requires Restart)")); |
417 CBFrontendEffects->setText(QCheckBox::tr("Frontend Effects (Requires Restart)")); |
418 GBAlayout->addWidget(CBFrontendEffects); |
418 GBAlayout->addWidget(CBFrontendEffects); |
419 |
419 |
420 CBFullscreen = new QCheckBox(AGGroupBox); |
420 CBFullscreen = new QCheckBox(AGGroupBox); |
421 CBFullscreen->setText(QCheckBox::tr("Fullscreen")); |
421 CBFullscreen->setText(QCheckBox::tr("Fullscreen")); |
422 GBAlayout->addWidget(CBFullscreen); |
422 GBAlayout->addWidget(CBFullscreen); |
423 |
423 |
424 CBFrontendFullscreen = new QCheckBox(AGGroupBox); |
424 CBFrontendFullscreen = new QCheckBox(AGGroupBox); |
425 CBFrontendFullscreen->setText(QCheckBox::tr("Frontend fullscreen")); |
425 CBFrontendFullscreen->setText(QCheckBox::tr("Frontend fullscreen")); |
426 GBAlayout->addWidget(CBFrontendFullscreen); |
426 GBAlayout->addWidget(CBFrontendFullscreen); |
427 |
427 |
428 CBHardwareSound = new QCheckBox(AGGroupBox); |
428 CBHardwareSound = new QCheckBox(AGGroupBox); |
429 CBHardwareSound->setText(QCheckBox::tr("Use hardware sound (if available; requires restart)")); |
429 CBHardwareSound->setText(QCheckBox::tr("Use hardware sound (if available; requires restart)")); |
430 //CBHardwareSound->setEnabled(openal_ready()); |
430 //CBHardwareSound->setEnabled(openal_ready()); |
431 GBAlayout->addWidget(CBHardwareSound); |
431 GBAlayout->addWidget(CBHardwareSound); |
432 |
432 |
433 CBEnableSound = new QCheckBox(AGGroupBox); |
433 CBEnableSound = new QCheckBox(AGGroupBox); |
434 CBEnableSound->setText(QCheckBox::tr("Enable sound")); |
434 CBEnableSound->setText(QCheckBox::tr("Enable sound")); |
435 //CBEnableSound->setEnabled(openal_ready()); |
435 //CBEnableSound->setEnabled(openal_ready()); |
436 GBAlayout->addWidget(CBEnableSound); |
436 GBAlayout->addWidget(CBEnableSound); |
437 |
437 CBEnableMusic = new QCheckBox(AGGroupBox); |
438 CBEnableMusic = new QCheckBox(AGGroupBox); |
438 CBEnableMusic->setText(QCheckBox::tr("Enable music")); |
439 CBEnableMusic->setText(QCheckBox::tr("Enable music")); |
439 //CBEnableMusic->setEnabled(openal_ready()); |
440 //CBEnableMusic->setEnabled(openal_ready()); |
440 GBAlayout->addWidget(CBEnableMusic); |
441 GBAlayout->addWidget(CBEnableMusic); |
441 |
442 |
442 QHBoxLayout * GBAvollayout = new QHBoxLayout(0); |
443 QHBoxLayout * GBAvollayout = new QHBoxLayout(0); |
443 QLabel * vol = new QLabel(AGGroupBox); |
444 QLabel * vol = new QLabel(AGGroupBox); |
444 vol->setText(QLabel::tr("Initial sound volume")); |
445 vol->setText(QLabel::tr("Initial sound volume")); |
445 GBAvollayout->addWidget(vol); |
446 GBAvollayout->addWidget(vol); |
446 GBAlayout->addLayout(GBAvollayout); |
447 GBAlayout->addLayout(GBAvollayout); |
447 volumeBox = new QSpinBox(AGGroupBox); |
448 volumeBox = new QSpinBox(AGGroupBox); |
448 volumeBox->setRange(0, 100); |
449 volumeBox->setRange(0, 100); |
449 volumeBox->setSingleStep(5); |
450 volumeBox->setSingleStep(5); |
450 //volumeBox->setEnabled(openal_ready()); |
451 //volumeBox->setEnabled(openal_ready()); |
451 GBAvollayout->addWidget(volumeBox); |
452 GBAvollayout->addWidget(volumeBox); |
452 |
453 |
453 CBShowFPS = new QCheckBox(AGGroupBox); |
454 CBShowFPS = new QCheckBox(AGGroupBox); |
454 CBShowFPS->setText(QCheckBox::tr("Show FPS")); |
455 CBShowFPS->setText(QCheckBox::tr("Show FPS")); |
455 GBAlayout->addWidget(CBShowFPS); |
456 GBAlayout->addWidget(CBShowFPS); |
456 |
457 |
457 CBAltDamage = new QCheckBox(AGGroupBox); |
458 CBAltDamage = new QCheckBox(AGGroupBox); |
458 CBAltDamage->setText(QCheckBox::tr("Alternative damage show")); |
459 CBAltDamage->setText(QCheckBox::tr("Alternative damage show")); |
459 GBAlayout->addWidget(CBAltDamage); |
460 GBAlayout->addWidget(CBAltDamage); |
460 |
461 |
461 CBNameWithDate = new QCheckBox(AGGroupBox); |
462 CBNameWithDate = new QCheckBox(AGGroupBox); |
462 CBNameWithDate->setText(QCheckBox::tr("Append date and time to record file name")); |
463 CBNameWithDate->setText(QCheckBox::tr("Append date and time to record file name")); |
463 GBAlayout->addWidget(CBNameWithDate); |
464 GBAlayout->addWidget(CBNameWithDate); |
464 |
465 |
465 #ifdef SPARKLE_ENABLED |
466 #ifdef __APPLE__ |
466 CBAutoUpdate = new QCheckBox(AGGroupBox); |
467 //autoupdate |
467 CBAutoUpdate->setText(QCheckBox::tr("Check for updates at startup")); |
468 CBAutoUpdate = new QCheckBox(AGGroupBox); |
468 GBAlayout->addWidget(CBAutoUpdate); |
469 CBAutoUpdate->setText(QCheckBox::tr("Check for updates at startup")); |
|
470 GBAlayout->addWidget(CBAutoUpdate); |
|
471 #endif |
469 #endif |
472 |
470 |
473 fpsedit = new FPSEdit(AGGroupBox); |
471 fpsedit = new FPSEdit(AGGroupBox); |
474 GBAfpslayout->addWidget(fpsedit); |
472 GBAfpslayout->addWidget(fpsedit); |
475 gbTBLayout->addWidget(AGGroupBox, 0, 1, 2, 1); |
473 gbTBLayout->addWidget(AGGroupBox, 0, 1, 2, 1); |
476 } |
474 } |
477 |
475 |
478 BtnSaveOptions = addButton(":/res/Save.png", pageLayout, 2, 2, true); |
476 BtnSaveOptions = addButton(":/res/Save.png", pageLayout, 2, 2, true); |
479 BtnSaveOptions->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}"); |
477 BtnSaveOptions->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}"); |
480 |
478 |
481 BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true); |
479 BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true); |