667 //AGGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); |
667 //AGGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); |
668 AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options")); |
668 AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options")); |
669 |
669 |
670 QVBoxLayout * GBAlayout = new QVBoxLayout(AGGroupBox); |
670 QVBoxLayout * GBAlayout = new QVBoxLayout(AGGroupBox); |
671 QHBoxLayout * GBAreslayout = new QHBoxLayout(0); |
671 QHBoxLayout * GBAreslayout = new QHBoxLayout(0); |
|
672 QHBoxLayout * GBAstereolayout = new QHBoxLayout(0); |
672 QHBoxLayout * GBAqualayout = new QHBoxLayout(0); |
673 QHBoxLayout * GBAqualayout = new QHBoxLayout(0); |
673 |
674 |
674 CBFrontendFullscreen = new QCheckBox(AGGroupBox); |
675 CBFrontendFullscreen = new QCheckBox(AGGroupBox); |
675 CBFrontendFullscreen->setText(QCheckBox::tr("Frontend fullscreen")); |
676 CBFrontendFullscreen->setText(QCheckBox::tr("Frontend fullscreen")); |
676 GBAlayout->addWidget(CBFrontendFullscreen); |
677 GBAlayout->addWidget(CBFrontendFullscreen); |
702 GBAlayout->addLayout(GBAreslayout); |
703 GBAlayout->addLayout(GBAreslayout); |
703 |
704 |
704 CBFullscreen = new QCheckBox(AGGroupBox); |
705 CBFullscreen = new QCheckBox(AGGroupBox); |
705 CBFullscreen->setText(QCheckBox::tr("Fullscreen")); |
706 CBFullscreen->setText(QCheckBox::tr("Fullscreen")); |
706 GBAlayout->addWidget(CBFullscreen); |
707 GBAlayout->addWidget(CBFullscreen); |
|
708 connect(CBFullscreen, SIGNAL(stateChanged(int)), this, SLOT(setFullscreen(void))); |
707 |
709 |
708 QLabel * quality = new QLabel(AGGroupBox); |
710 QLabel * quality = new QLabel(AGGroupBox); |
709 quality->setText(QLabel::tr("Quality")); |
711 quality->setText(QLabel::tr("Quality")); |
710 quality->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
712 quality->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
711 GBAqualayout->addWidget(quality); |
713 GBAqualayout->addWidget(quality); |
715 SLQuality->setMaximum(5); |
717 SLQuality->setMaximum(5); |
716 SLQuality->setMinimum(0); |
718 SLQuality->setMinimum(0); |
717 SLQuality->setFixedWidth(150); |
719 SLQuality->setFixedWidth(150); |
718 GBAqualayout->addWidget(SLQuality); |
720 GBAqualayout->addWidget(SLQuality); |
719 GBAlayout->addLayout(GBAqualayout); |
721 GBAlayout->addLayout(GBAqualayout); |
|
722 QLabel * stereo = new QLabel(AGGroupBox); |
|
723 stereo->setText(QLabel::tr("Stereo rendering")); |
|
724 GBAstereolayout->addWidget(stereo); |
|
725 |
|
726 CBStereoMode = new QComboBox(AGGroupBox); |
|
727 CBStereoMode->addItem(QComboBox::tr("Disabled")); |
|
728 CBStereoMode->addItem(QComboBox::tr("Red/Cyan")); |
|
729 CBStereoMode->addItem(QComboBox::tr("Cyan/Red")); |
|
730 CBStereoMode->addItem(QComboBox::tr("Red/Blue")); |
|
731 CBStereoMode->addItem(QComboBox::tr("Blue/Red")); |
|
732 CBStereoMode->addItem(QComboBox::tr("Red/Green")); |
|
733 CBStereoMode->addItem(QComboBox::tr("Green/Red")); |
|
734 CBStereoMode->addItem(QComboBox::tr("Side-by-side")); |
|
735 CBStereoMode->addItem(QComboBox::tr("Top-Bottom")); |
|
736 CBStereoMode->addItem(QComboBox::tr("Wiggle")); |
|
737 connect(CBStereoMode, SIGNAL(currentIndexChanged(int)), this, SLOT(forceFullscreen(int))); |
|
738 |
|
739 GBAstereolayout->addWidget(CBStereoMode); |
|
740 GBAlayout->addLayout(GBAstereolayout); |
720 |
741 |
721 hr = new QFrame(AGGroupBox); |
742 hr = new QFrame(AGGroupBox); |
722 hr->setFrameStyle(QFrame::HLine); |
743 hr->setFrameStyle(QFrame::HLine); |
723 hr->setLineWidth(3); |
744 hr->setLineWidth(3); |
724 hr->setFixedHeight(10); |
745 hr->setFixedHeight(10); |
779 |
800 |
780 BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true); |
801 BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true); |
781 BtnBack->setFixedHeight(BtnSaveOptions->height()); |
802 BtnBack->setFixedHeight(BtnSaveOptions->height()); |
782 BtnBack->setFixedWidth(BtnBack->width()+2); |
803 BtnBack->setFixedWidth(BtnBack->width()+2); |
783 BtnBack->setStyleSheet("QPushButton{margin: 22px 0 9px 2px;}"); |
804 BtnBack->setStyleSheet("QPushButton{margin: 22px 0 9px 2px;}"); |
784 |
805 } |
785 // BtnAssociateFiles = addButton(""); |
806 |
|
807 void PageOptions::forceFullscreen(int index) |
|
808 { |
|
809 if (index != 0) { |
|
810 previousFullscreenValue = this->CBFullscreen->isChecked(); |
|
811 this->CBFullscreen->setChecked(true); |
|
812 this->CBFullscreen->setEnabled(false); |
|
813 previousQuality = this->SLQuality->value(); |
|
814 this->SLQuality->setValue(this->SLQuality->maximum()); |
|
815 this->SLQuality->setEnabled(false); |
|
816 } else { |
|
817 this->CBFullscreen->setChecked(previousFullscreenValue); |
|
818 this->CBFullscreen->setEnabled(true); |
|
819 this->SLQuality->setValue(previousQuality); |
|
820 this->SLQuality->setEnabled(true); |
|
821 } |
|
822 } |
|
823 |
|
824 void PageOptions::setFullscreen(void) |
|
825 { |
|
826 int tmp = this->CBResolution->currentIndex(); |
|
827 if (this->CBFullscreen->isChecked()) |
|
828 this->CBResolution->setCurrentIndex(0); |
|
829 else |
|
830 this->CBResolution->setCurrentIndex(previousResolutionIndex); |
|
831 previousResolutionIndex = tmp; |
|
832 this->CBResolution->setEnabled(!this->CBFullscreen->isChecked()); |
786 } |
833 } |
787 |
834 |
788 PageNet::PageNet(QWidget* parent) : AbstractPage(parent) |
835 PageNet::PageNet(QWidget* parent) : AbstractPage(parent) |
789 { |
836 { |
790 QFont * font14 = new QFont("MS Shell Dlg", 14); |
837 QFont * font14 = new QFont("MS Shell Dlg", 14); |