QTfrontend/gameuiconfig.cpp
changeset 7280 fd707afbc3a2
parent 7238 313b2ecc4441
child 7347 88685fbb2679
equal deleted inserted replaced
7278:000e4543f204 7280:fd707afbc3a2
   125     else
   125     else
   126     {
   126     {
   127         Form->ui.pageVideos->widthEdit->setText(value("videorec/width","800").toString());
   127         Form->ui.pageVideos->widthEdit->setText(value("videorec/width","800").toString());
   128         Form->ui.pageVideos->heightEdit->setText(value("videorec/height","600").toString());
   128         Form->ui.pageVideos->heightEdit->setText(value("videorec/height","600").toString());
   129     }
   129     }
   130     Form->ui.pageVideos->CBUseGameRes->setChecked(useGameRes);
   130     Form->ui.pageVideos->checkUseGameRes->setChecked(useGameRes);
   131     Form->ui.pageVideos->CBRecordAudio->setChecked(value("videorec/audio",true).toBool());
   131     Form->ui.pageVideos->checkRecordAudio->setChecked(value("videorec/audio",true).toBool());
   132     if (!Form->ui.pageVideos->tryCodecs(value("videorec/format","no").toString(),
   132     if (!Form->ui.pageVideos->tryCodecs(value("videorec/format","no").toString(),
   133                                         value("videorec/videocodec","no").toString(),
   133                                         value("videorec/videocodec","no").toString(),
   134                                         value("videorec/audiocodec","no").toString()))
   134                                         value("videorec/audiocodec","no").toString()))
   135         Form->ui.pageVideos->setDefaultCodecs();
   135         Form->ui.pageVideos->setDefaultCodecs();
   136 }
   136 }
   218     setValue("videorec/videocodec", videoCodec());
   218     setValue("videorec/videocodec", videoCodec());
   219     setValue("videorec/audiocodec", audioCodec());
   219     setValue("videorec/audiocodec", audioCodec());
   220     setValue("videorec/fps", rec_Framerate());
   220     setValue("videorec/fps", rec_Framerate());
   221     setValue("videorec/width", res.width());
   221     setValue("videorec/width", res.width());
   222     setValue("videorec/height", res.height());
   222     setValue("videorec/height", res.height());
   223     setValue("videorec/usegameres", Form->ui.pageVideos->CBUseGameRes->isChecked());
   223     setValue("videorec/usegameres", Form->ui.pageVideos->checkUseGameRes->isChecked());
   224     setValue("videorec/audio", recordAudio());
   224     setValue("videorec/audio", recordAudio());
   225 
   225 
   226     Form->gameSettings->sync();
   226     Form->gameSettings->sync();
   227 }
   227 }
   228 
   228 
   422     return Form->ui.pageOptions->volumeBox->value() * 128 / 100;
   422     return Form->ui.pageOptions->volumeBox->value() * 128 / 100;
   423 }
   423 }
   424 
   424 
   425 QString GameUIConfig::AVFormat()
   425 QString GameUIConfig::AVFormat()
   426 {
   426 {
   427     return Form->ui.pageVideos->getFormat();
   427     return Form->ui.pageVideos->format();
   428 }
   428 }
   429 
   429 
   430 QString GameUIConfig::videoCodec()
   430 QString GameUIConfig::videoCodec()
   431 {
   431 {
   432     return Form->ui.pageVideos->getVideoCodec();
   432     return Form->ui.pageVideos->videoCodec();
   433 }
   433 }
   434 
   434 
   435 QString GameUIConfig::audioCodec()
   435 QString GameUIConfig::audioCodec()
   436 {
   436 {
   437     return Form->ui.pageVideos->getAudioCodec();
   437     return Form->ui.pageVideos->audioCodec();
   438 }
   438 }
   439 
   439 
   440 QRect GameUIConfig::rec_Resolution()
   440 QRect GameUIConfig::rec_Resolution()
   441 {
   441 {
   442     if (Form->ui.pageVideos->CBUseGameRes->isChecked())
   442     if (Form->ui.pageVideos->checkUseGameRes->isChecked())
   443         return vid_Resolution();
   443         return vid_Resolution();
   444     QRect res(0,0,0,0);
   444     QRect res(0,0,0,0);
   445     res.setWidth(Form->ui.pageVideos->widthEdit->text().toUInt());
   445     res.setWidth(Form->ui.pageVideos->widthEdit->text().toUInt());
   446     res.setHeight(Form->ui.pageVideos->heightEdit->text().toUInt());
   446     res.setHeight(Form->ui.pageVideos->heightEdit->text().toUInt());
   447     return res;
   447     return res;
   452     return Form->ui.pageVideos->framerateBox->value();
   452     return Form->ui.pageVideos->framerateBox->value();
   453 }
   453 }
   454 
   454 
   455 bool GameUIConfig::recordAudio()
   455 bool GameUIConfig::recordAudio()
   456 {
   456 {
   457     return Form->ui.pageVideos->CBRecordAudio->isChecked();
   457     return Form->ui.pageVideos->checkRecordAudio->isChecked();
   458 }
   458 }