QTfrontend/pages.cpp
branchexperimental3D
changeset 3698 793386610068
parent 3696 6009d8378422
child 4004 b1c2c2f6fc5e
equal deleted inserted replaced
3696:6009d8378422 3698:793386610068
   607             GBAlayout->addLayout(GBAreslayout);
   607             GBAlayout->addLayout(GBAreslayout);
   608 
   608 
   609             CBFullscreen = new QCheckBox(AGGroupBox);
   609             CBFullscreen = new QCheckBox(AGGroupBox);
   610             CBFullscreen->setText(QCheckBox::tr("Fullscreen"));
   610             CBFullscreen->setText(QCheckBox::tr("Fullscreen"));
   611             GBAlayout->addWidget(CBFullscreen);
   611             GBAlayout->addWidget(CBFullscreen);
       
   612             connect(CBFullscreen, SIGNAL(stateChanged(int)), this, SLOT(setFullscreen(void)));
   612 
   613 
   613             QLabel * quality = new QLabel(AGGroupBox);
   614             QLabel * quality = new QLabel(AGGroupBox);
   614             quality->setText(QLabel::tr("Quality"));
   615             quality->setText(QLabel::tr("Quality"));
   615             GBAqualayout->addWidget(quality);
   616             GBAqualayout->addWidget(quality);
   616             
   617             
   632             CBStereoMode->addItem(QComboBox::tr("Cyan/Red"));
   633             CBStereoMode->addItem(QComboBox::tr("Cyan/Red"));
   633             CBStereoMode->addItem(QComboBox::tr("Red/Blue"));
   634             CBStereoMode->addItem(QComboBox::tr("Red/Blue"));
   634             CBStereoMode->addItem(QComboBox::tr("Blue/Red"));
   635             CBStereoMode->addItem(QComboBox::tr("Blue/Red"));
   635             CBStereoMode->addItem(QComboBox::tr("Red/Green"));
   636             CBStereoMode->addItem(QComboBox::tr("Red/Green"));
   636             CBStereoMode->addItem(QComboBox::tr("Green/Red"));
   637             CBStereoMode->addItem(QComboBox::tr("Green/Red"));
   637             CBStereoMode->addItem(QComboBox::tr("Side-by-side (horizontal)"));
   638             CBStereoMode->addItem(QComboBox::tr("Side-by-side"));
   638             CBStereoMode->addItem(QComboBox::tr("Side-by-side (vertical)"));
   639             CBStereoMode->addItem(QComboBox::tr("Top-Bottom"));
   639             CBStereoMode->addItem(QComboBox::tr("Alternate frame rendering"));
   640             CBStereoMode->addItem(QComboBox::tr("Frame Alternate"));
       
   641             connect(CBStereoMode, SIGNAL(currentIndexChanged(int)), this, SLOT(forceFullscreen(int)));
   640 
   642 
   641             GBAstereolayout->addWidget(CBStereoMode);
   643             GBAstereolayout->addWidget(CBStereoMode);
   642             GBAlayout->addLayout(GBAstereolayout);
   644             GBAlayout->addLayout(GBAstereolayout);
   643 
   645 
   644             hr = new QFrame(AGGroupBox);
   646             hr = new QFrame(AGGroupBox);
   687             hr->setFrameStyle(QFrame::HLine);
   689             hr->setFrameStyle(QFrame::HLine);
   688             hr->setLineWidth(3);
   690             hr->setLineWidth(3);
   689             hr->setFixedHeight(10);
   691             hr->setFixedHeight(10);
   690             GBAlayout->addWidget(hr);
   692             GBAlayout->addWidget(hr);
   691 
   693 
   692                 QLabel *restartNote = new QLabel(this);
   694             QLabel *restartNote = new QLabel(this);
   693             restartNote->setText(QString("* ") + QLabel::tr("Restart game to apply"));
   695             restartNote->setText(QString("* ") + QLabel::tr("Restart game to apply"));
   694             restartNote->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
   696             restartNote->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
   695             GBAlayout->addWidget(restartNote);
   697             GBAlayout->addWidget(restartNote);
   696 
   698 
   697             gbTBLayout->addWidget(AGGroupBox, 0, 1, 3, 1);
   699             gbTBLayout->addWidget(AGGroupBox, 0, 1, 3, 1);
   702 
   704 
   703     BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true);
   705     BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true);
   704     BtnBack->setFixedHeight(BtnSaveOptions->height());
   706     BtnBack->setFixedHeight(BtnSaveOptions->height());
   705     BtnBack->setFixedWidth(BtnBack->width()+2);
   707     BtnBack->setFixedWidth(BtnBack->width()+2);
   706     BtnBack->setStyleSheet("QPushButton{margin: 22px 0 9px 2px;}");
   708     BtnBack->setStyleSheet("QPushButton{margin: 22px 0 9px 2px;}");
       
   709 }
       
   710 
       
   711 void PageOptions::forceFullscreen(int index)
       
   712 {
       
   713     if (index != 0) {
       
   714         previousFullscreenValue = this->CBFullscreen->isChecked();
       
   715         this->CBFullscreen->setChecked(true);
       
   716         this->CBFullscreen->setEnabled(false);
       
   717     } else {
       
   718         this->CBFullscreen->setChecked(previousFullscreenValue);
       
   719         this->CBFullscreen->setEnabled(true);
       
   720     }
       
   721 }
       
   722 
       
   723 void PageOptions::setFullscreen(void)
       
   724 {
       
   725     this->CBResolution->setEnabled(!this->CBFullscreen->isChecked());
   707 }
   726 }
   708 
   727 
   709 PageNet::PageNet(QWidget* parent) : AbstractPage(parent)
   728 PageNet::PageNet(QWidget* parent) : AbstractPage(parent)
   710 {
   729 {
   711     QFont * font14 = new QFont("MS Shell Dlg", 14);
   730     QFont * font14 = new QFont("MS Shell Dlg", 14);